@quandis/qbo4.configuration 4.0.1-CI-20241009-155903 → 4.0.1-CI-20241011-172926
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +19 -19
- package/src/Configuration.d.ts +35 -35
- package/src/Configuration.js +104 -104
- package/src/IConfiguration.d.ts +34 -34
- package/src/IConfiguration.js +37 -37
- package/src/Program.d.ts +24 -24
- package/src/Program.js +8 -8
- package/src/Services.d.ts +9 -9
- package/src/Services.js +18 -18
- package/src/qbo-config-editor.d.ts +19 -18
- package/src/qbo-config-editor.js +89 -84
- package/src/qbo-config-editor.js.map +1 -1
- package/src/qbo-config-editor.ts +4 -1
- package/src/qbo-css.d.ts +35 -35
- package/src/qbo-css.js +226 -226
- package/src/qbo-template.d.ts +22 -22
- package/src/qbo-template.js +418 -417
- package/src/qbo-template.js.map +1 -1
- package/src/qbo-template.ts +1 -0
- package/src/styles.d.ts +1 -1
- package/src/styles.js +6 -6
- package/src/styles.js.map +1 -1
- package/src/styles.ts +5 -5
- package/wwwroot/css/qbo-config-editor.css +2 -2
- package/wwwroot/css/qbo-configuration.css +1730 -1730
- package/wwwroot/css/qbo-configuration.css.map +1 -1
- package/wwwroot/css/qbo-configuration.min.css +5 -5
- package/wwwroot/js/esm/qbo4.configuration.js +39557 -39055
- package/wwwroot/js/esm/qbo4.configuration.min.js +76 -76
- package/wwwroot/js/esm/qbo4.configuration.min.js.LICENSE.txt +41 -41
- package/wwwroot/js/esm/qbo4.configuration.min.js.map +1 -1
- package/wwwroot/js/qbo4.configuration.js +39633 -39131
- package/wwwroot/js/qbo4.configuration.min.js +76 -76
- package/wwwroot/js/qbo4.configuration.min.js.LICENSE.txt +41 -41
- package/wwwroot/js/qbo4.configuration.min.js.map +1 -1
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/*! For license information please see qbo4.configuration.min.js.LICENSE.txt */
|
|
2
|
-
var t={630:(t,e,i)=>{var r;!function(t){!function(e){var r="object"==typeof globalThis?globalThis:"object"==typeof i.g?i.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),o=n(t);function n(t,e){return function(i,r){Object.defineProperty(t,i,{configurable:!0,writable:!0,value:r}),e&&e(i,r)}}void 0!==r.Reflect&&(o=n(r.Reflect,o)),function(t,e){var i=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,o=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,a={__proto__:[]}instanceof Array,l=!s&&!a,h={create:s?function(){return D(Object.create(null))}:a?function(){return D({__proto__:null})}:function(){return D({})},has:l?function(t,e){return i.call(t,e)}:function(t,e){return e in t},get:l?function(t,e){return i.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var t={},e=[],i=function(){function t(t,e,i){this._index=0,this._keys=t,this._values=e,this._selector=i}return t.prototype["@@iterator"]=function(){return this},t.prototype[n]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var i=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}();return function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var i=this._find(t,!0);return this._values[i]=e,this},e.prototype.delete=function(e){var i=this._find(e,!1);if(i>=0){for(var r=this._keys.length,o=i+1;o<r;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,M(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new i(this._keys,this._values,r)},e.prototype.values=function(){return new i(this._keys,this._values,o)},e.prototype.entries=function(){return new i(this._keys,this._values,s)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[n]=function(){return this.entries()},e.prototype._find=function(t,e){if(!M(this._cacheKey,t)){this._cacheIndex=-1;for(var i=0;i<this._keys.length;i++)if(M(this._keys[i],t)){this._cacheIndex=i;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();function r(t,e){return t}function o(t,e){return e}function s(t,e){return[t,e]}}(),u="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function t(){this._map=new d}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[n]=function(){return this.keys()},t}(),f="function"==typeof WeakMap?WeakMap:function(){var t=16,e=h.create(),r=o();return function(){function t(){this._key=o()}return t.prototype.has=function(t){var e=n(t,!1);return void 0!==e&&h.has(e,this._key)},t.prototype.get=function(t){var e=n(t,!1);return void 0!==e?h.get(e,this._key):void 0},t.prototype.set=function(t,e){return n(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=n(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=o()},t}();function o(){var t;do{t="@@WeakMap@@"+a()}while(h.has(e,t));return e[t]=!0,t}function n(t,e){if(!i.call(t,r)){if(!e)return;Object.defineProperty(t,r,{value:h.create()})}return t[r]}function s(t,e){for(var i=0;i<e;++i)t[i]=255*Math.random()|0;return t}function a(){var e,i=(e=t,"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(e)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(e)):s(new Uint8Array(e),e):s(new Array(e),e));i[6]=79&i[6]|64,i[8]=191&i[8]|128;for(var r="",o=0;o<t;++o){var n=i[o];4!==o&&6!==o&&8!==o||(r+="-"),n<16&&(r+="0"),r+=n.toString(16).toLowerCase()}return r}}(),p=r?Symbol.for("@reflect-metadata:registry"):void 0,O=function(){var t;return!Q(p)&&P(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[p]),Q(t)&&(t=function(){var t,i,r,o;Q(p)||void 0===e.Reflect||p in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=function(t){var e=t.defineMetadata,i=t.hasOwnMetadata,r=t.getOwnMetadata,o=t.getOwnMetadataKeys,n=t.deleteMetadata,s=new f;return{isProviderFor:function(t,e){var i=s.get(t);return Q(i)?!!o(t,e).length&&(Q(i)&&(i=new u,s.set(t,i)),i.add(e),!0):i.has(e)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:o,OrdinaryDeleteMetadata:n}}(e.Reflect));var n=new f,s={registerProvider:a,getProvider:h,setProvider:O};return s;function a(e){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case Q(i):i=e;break;case i===e:break;case Q(r):r=e;break;case r===e:break;default:void 0===o&&(o=new u),o.add(e)}}function l(e,n){if(!Q(i)){if(i.isProviderFor(e,n))return i;if(!Q(r)){if(r.isProviderFor(e,n))return i;if(!Q(o))for(var s=q(o);;){var a=z(s);if(!a)return;var l=W(a);if(l.isProviderFor(e,n))return E(s),l}}}if(!Q(t)&&t.isProviderFor(e,n))return t}function h(t,e){var i,r=n.get(t);return Q(r)||(i=r.get(e)),Q(i)?(Q(i=l(t,e))||(Q(r)&&(r=new d,n.set(t,r)),r.set(e,i)),i):i}function c(t){if(Q(t))throw new TypeError;return i===t||r===t||!Q(o)&&o.has(t)}function O(t,e,i){if(!c(i))throw new Error("Metadata provider not registered.");var r=h(t,e);if(r!==i){if(!Q(r))return!1;var o=n.get(t);Q(o)&&(o=new d,n.set(t,o)),o.set(e,i)}return!0}}()),!Q(p)&&P(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}(),g=function(t){var e=new f,i={isProviderFor:function(t,i){var r=e.get(t);return!Q(r)&&r.has(i)},OrdinaryDefineOwnMetadata:function(t,e,i,o){r(i,o,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,i){var o=r(e,i,!1);return!Q(o)&&T(o.has(t))},OrdinaryGetOwnMetadata:function(t,e,i){var o=r(e,i,!1);if(!Q(o))return o.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var i=[],o=r(t,e,!1);if(Q(o))return i;for(var n=q(o.keys()),s=0;;){var a=z(n);if(!a)return i.length=s,i;var l=W(a);try{i[s]=l}catch(t){try{E(n)}finally{throw t}}s++}},OrdinaryDeleteMetadata:function(t,i,o){var n=r(i,o,!1);if(Q(n))return!1;if(!n.delete(t))return!1;if(0===n.size){var s=e.get(i);Q(s)||(s.delete(o),0===s.size&&e.delete(s))}return!0}};return O.registerProvider(i),i;function r(r,o,n){var s=e.get(r),a=!1;if(Q(s)){if(!n)return;s=new d,e.set(r,s),a=!0}var l=s.get(o);if(Q(l)){if(!n)return;if(l=new d,s.set(o,l),!t.setProvider(r,o,i))throw s.delete(o),a&&e.delete(r),new Error("Wrong provider for target.")}return l}}(O);function m(t,e,i){if(b(t,e,i))return!0;var r=Y(e);return!$(r)&&m(t,r,i)}function b(t,e,i){var r=V(e,i,!1);return!Q(r)&&T(r.OrdinaryHasOwnMetadata(t,e,i))}function v(t,e,i){if(b(t,e,i))return w(t,e,i);var r=Y(e);return $(r)?void 0:v(t,r,i)}function w(t,e,i){var r=V(e,i,!1);if(!Q(r))return r.OrdinaryGetOwnMetadata(t,e,i)}function y(t,e,i,r){V(i,r,!0).OrdinaryDefineOwnMetadata(t,e,i,r)}function x(t,e){var i=S(t,e),r=Y(t);if(null===r)return i;var o=x(r,e);if(o.length<=0)return i;if(i.length<=0)return o;for(var n=new u,s=[],a=0,l=i;a<l.length;a++){var h=l[a];n.has(h)||(n.add(h),s.push(h))}for(var c=0,d=o;c<d.length;c++)h=d[c],n.has(h)||(n.add(h),s.push(h));return s}function S(t,e){var i=V(t,e,!1);return i?i.OrdinaryOwnMetadataKeys(t,e):[]}function k(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function Q(t){return void 0===t}function $(t){return null===t}function P(t){return"object"==typeof t?null!==t:"function"==typeof t}function Z(t,e){switch(k(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var i=3===e?"string":5===e?"number":"default",r=_(t,o);if(void 0!==r){var n=r.call(t,i);if(P(n))throw new TypeError;return n}return function(t,e){if("string"===e){var i=t.toString;if(C(i)&&!P(o=i.call(t)))return o;if(C(r=t.valueOf)&&!P(o=r.call(t)))return o}else{var r;if(C(r=t.valueOf)&&!P(o=r.call(t)))return o;var o,n=t.toString;if(C(n)&&!P(o=n.call(t)))return o}throw new TypeError}(t,"default"===i?"number":i)}function T(t){return!!t}function R(t){var e=Z(t,3);return"symbol"==typeof e?e:function(t){return""+t}(e)}function A(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function C(t){return"function"==typeof t}function X(t){return"function"==typeof t}function M(t,e){return t===e||t!=t&&e!=e}function _(t,e){var i=t[e];if(null!=i){if(!C(i))throw new TypeError;return i}}function q(t){var e=_(t,n);if(!C(e))throw new TypeError;var i=e.call(t);if(!P(i))throw new TypeError;return i}function W(t){return t.value}function z(t){var e=t.next();return!e.done&&e}function E(t){var e=t.return;e&&e.call(t)}function Y(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var i=t.prototype,r=i&&Object.getPrototypeOf(i);if(null==r||r===Object.prototype)return e;var o=r.constructor;return"function"!=typeof o||o===t?e:o}function V(t,e,i){var r=O.getProvider(t,e);if(!Q(r))return r;if(i){if(O.setProvider(t,e,g))return g;throw new Error("Illegal state.")}}function D(t){return t.__=void 0,delete t.__,t}t("decorate",(function(t,e,i,r){if(Q(i)){if(!A(t))throw new TypeError;if(!X(e))throw new TypeError;return function(t,e){for(var i=t.length-1;i>=0;--i){var r=(0,t[i])(e);if(!Q(r)&&!$(r)){if(!X(r))throw new TypeError;e=r}}return e}(t,e)}if(!A(t))throw new TypeError;if(!P(e))throw new TypeError;if(!P(r)&&!Q(r)&&!$(r))throw new TypeError;return $(r)&&(r=void 0),function(t,e,i,r){for(var o=t.length-1;o>=0;--o){var n=(0,t[o])(e,i,r);if(!Q(n)&&!$(n)){if(!P(n))throw new TypeError;r=n}}return r}(t,e,i=R(i),r)})),t("metadata",(function(t,e){return function(i,r){if(!P(i))throw new TypeError;if(!Q(r)&&!function(t){switch(k(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;y(t,e,i,r)}})),t("defineMetadata",(function(t,e,i,r){if(!P(i))throw new TypeError;return Q(r)||(r=R(r)),y(t,e,i,r)})),t("hasMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return Q(i)||(i=R(i)),m(t,e,i)})),t("hasOwnMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return Q(i)||(i=R(i)),b(t,e,i)})),t("getMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return Q(i)||(i=R(i)),v(t,e,i)})),t("getOwnMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return Q(i)||(i=R(i)),w(t,e,i)})),t("getMetadataKeys",(function(t,e){if(!P(t))throw new TypeError;return Q(e)||(e=R(e)),x(t,e)})),t("getOwnMetadataKeys",(function(t,e){if(!P(t))throw new TypeError;return Q(e)||(e=R(e)),S(t,e)})),t("deleteMetadata",(function(t,e,i){if(!P(e))throw new TypeError;if(Q(i)||(i=R(i)),!P(e))throw new TypeError;Q(i)||(i=R(i));var r=V(e,i,!1);return!Q(r)&&r.OrdinaryDeleteMetadata(t,e,i)}))}(o,r),void 0===r.Reflect&&(r.Reflect=t)}()}(r||(r={}))}},e={};function i(r){var o=e[r];if(void 0!==o)return o.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,i),n.exports}i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};(()=>{i.d(r,{Vk:()=>Vt,CA:()=>Yt,F2:()=>Et,KY:()=>_t,jm:()=>qt,uH:()=>zt,U7:()=>Lt,wy:()=>Lb,lk:()=>Ib,_N:()=>Nb,xC:()=>Xt,qy:()=>U,JZ:()=>Wt,$p:()=>Mt,vs:()=>Ub,kT:()=>jb}),i(630);const t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),n=new WeakMap;class s{constructor(t,e,i){if(this._$cssResult$=!0,i!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const i=this.t;if(e&&void 0===t){const e=void 0!==i&&1===i.length;e&&(t=n.get(i)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&n.set(i,t))}return t}toString(){return this.cssText}}const a=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new s(i,t,o)},l=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new s("string"==typeof t?t:t+"",void 0,o))(e)})(t):t,{is:h,defineProperty:c,getOwnPropertyDescriptor:d,getOwnPropertyNames:u,getOwnPropertySymbols:f,getPrototypeOf:p}=Object,O=globalThis,g=O.trustedTypes,m=g?g.emptyScript:"",b=O.reactiveElementPolyfillSupport,v=(t,e)=>t,w={toAttribute(t,e){switch(e){case Boolean:t=t?m:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},y=(t,e)=>!h(t,e),x={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:y};Symbol.metadata??=Symbol("metadata"),O.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=x){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&c(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:o}=d(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const n=r?.call(this);o.call(this,e),this.requestUpdate(t,n,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??x}static _$Ei(){if(this.hasOwnProperty(v("elementProperties")))return;const t=p(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(v("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(v("properties"))){const t=this.properties,e=[...u(t),...f(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const i=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((i,r)=>{if(e)i.adoptedStyleSheets=r.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of r){const r=document.createElement("style"),o=t.litNonce;void 0!==o&&r.setAttribute("nonce",o),r.textContent=e.cssText,i.appendChild(r)}})(i,this.constructor.elementStyles),i}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==i.converter?.toAttribute?i.converter:w).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:w;this._$Em=r,this[r]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??y)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[v("elementProperties")]=new Map,S[v("finalized")]=new Map,b?.({ReactiveElement:S}),(O.reactiveElementVersions??=[]).push("2.0.4");const k=globalThis,Q=k.trustedTypes,$=Q?Q.createPolicy("lit-html",{createHTML:t=>t}):void 0,P="$lit$",Z=`lit$${(Math.random()+"").slice(9)}$`,T="?"+Z,R=`<${T}>`,A=document,C=()=>A.createComment(""),X=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,_="[ \t\n\f\r]",q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,W=/-->/g,z=/>/g,E=RegExp(`>|${_}(?:([^\\s"'>=/]+)(${_}*=${_}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,V=/"/g,D=/^(?:script|style|textarea|title)$/i,j=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),U=j(1),N=(j(2),Symbol.for("lit-noChange")),I=Symbol.for("lit-nothing"),B=new WeakMap,G=A.createTreeWalker(A,129);function L(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==$?$.createHTML(e):e}const H=(t,e)=>{const i=t.length-1,r=[];let o,n=2===e?"<svg>":"",s=q;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(s.lastIndex=c,l=s.exec(i),null!==l);)c=s.lastIndex,s===q?"!--"===l[1]?s=W:void 0!==l[1]?s=z:void 0!==l[2]?(D.test(l[2])&&(o=RegExp("</"+l[2],"g")),s=E):void 0!==l[3]&&(s=E):s===E?">"===l[0]?(s=o??q,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?E:'"'===l[3]?V:Y):s===V||s===Y?s=E:s===W||s===z?s=q:(s=E,o=void 0);const d=s===E&&t[e+1].startsWith("/>")?" ":"";n+=s===q?i+R:h>=0?(r.push(a),i.slice(0,h)+P+i.slice(h)+Z+d):i+Z+(-2===h?e:d)}return[L(t,n+(t[i]||"<?>")+(2===e?"</svg>":"")),r]};class F{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,n=0;const s=t.length-1,a=this.parts,[l,h]=H(t,e);if(this.el=F.createElement(l,i),G.currentNode=this.el.content,2===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=G.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(P)){const e=h[n++],i=r.getAttribute(t).split(Z),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:s[2],strings:i,ctor:"."===s[1]?it:"?"===s[1]?rt:"@"===s[1]?ot:et}),r.removeAttribute(t)}else t.startsWith(Z)&&(a.push({type:6,index:o}),r.removeAttribute(t));if(D.test(r.tagName)){const t=r.textContent.split(Z),e=t.length-1;if(e>0){r.textContent=Q?Q.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],C()),G.nextNode(),a.push({type:2,index:++o});r.append(t[e],C())}}}else if(8===r.nodeType)if(r.data===T)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=r.data.indexOf(Z,t+1));)a.push({type:7,index:o}),t+=Z.length-1}o++}}static createElement(t,e){const i=A.createElement("template");return i.innerHTML=t,i}}function K(t,e,i=t,r){if(e===N)return e;let o=void 0!==r?i._$Co?.[r]:i._$Cl;const n=X(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=o:i._$Cl=o),void 0!==o&&(e=K(t,o._$AS(t,e.values),o,r)),e}class J{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??A).importNode(e,!0);G.currentNode=r;let o=G.nextNode(),n=0,s=0,a=i[0];for(;void 0!==a;){if(n===a.index){let e;2===a.type?e=new tt(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new nt(o,this,t)),this._$AV.push(e),a=i[++s]}n!==a?.index&&(o=G.nextNode(),n++)}return G.currentNode=A,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=I,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=K(this,t,e),X(t)?t===I||null==t||""===t?(this._$AH!==I&&this._$AR(),this._$AH=I):t!==this._$AH&&t!==N&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>M(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}S(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.S(t))}_(t){this._$AH!==I&&X(this._$AH)?this._$AA.nextSibling.data=t:this.T(A.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=F.createElement(L(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new J(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=B.get(t.strings);return void 0===e&&B.set(t.strings,e=new F(t)),e}k(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new tt(this.S(C()),this.S(C()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,o){this.type=1,this._$AH=I,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=I}_$AI(t,e=this,i,r){const o=this.strings;let n=!1;if(void 0===o)t=K(this,t,e,0),n=!X(t)||t!==this._$AH&&t!==N,n&&(this._$AH=t);else{const r=t;let s,a;for(t=o[0],s=0;s<o.length-1;s++)a=K(this,r[i+s],e,s),a===N&&(a=this._$AH[s]),n||=!X(a)||a!==this._$AH[s],a===I?t=I:t!==I&&(t+=(a??"")+o[s+1]),this._$AH[s]=a}n&&!r&&this.j(t)}j(t){t===I?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class it extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===I?void 0:t}}class rt extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==I)}}class ot extends et{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){if((t=K(this,t,e,0)??I)===N)return;const i=this._$AH,r=t===I&&i!==I||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==I&&(i===I||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const st=k.litHtmlPolyfillSupport;st?.(F,tt),(k.litHtmlVersions??=[]).push("3.1.2");class at extends S{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const r=i?.renderBefore??e;let o=r._$litPart$;if(void 0===o){const t=i?.renderBefore??null;r._$litPart$=o=new tt(e.insertBefore(C(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return N}}at._$litElement$=!0,at.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:at});const lt=globalThis.litElementPolyfillSupport;var ht;lt?.({LitElement:at}),(globalThis.litElementVersions??=[]).push("4.0.4"),function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(ht||(ht={}));const ct=ht;var dt=function(t,e){return dt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},dt(t,e)};function ut(t,e){function i(){this.constructor=t}dt(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function ft(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function pt(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,o,n=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)s.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(i=n.return)&&i.call(n)}finally{if(o)throw o.error}}return s}function Ot(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(pt(arguments[e]));return t}function gt(t){return!!t.useClass}function mt(t){return!!t.useFactory}var bt=function(){function t(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(t){var e,i=this,r=!1;return new Proxy({},this.createHandler((function(){return r||(e=t(i.wrap()),r=!0),e})))},t.prototype.createHandler=function(t){var e={};return this.reflectMethods.forEach((function(i){e[i]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e[0]=t(),Reflect[i].apply(void 0,Ot(e))}})),e},t}();function vt(t){return"string"==typeof t||"symbol"==typeof t}function wt(t){return"object"==typeof t&&"token"in t&&"transform"in t}function yt(t){return!!t.useToken}function xt(t){return null!=t.useValue}const St=function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(t){return this.ensure(t),this._registryMap.get(t)},t.prototype.get=function(t){this.ensure(t);var e=this._registryMap.get(t);return e[e.length-1]||null},t.prototype.set=function(t,e){this.ensure(t),this._registryMap.get(t).push(e)},t.prototype.setAll=function(t,e){this._registryMap.set(t,e)},t.prototype.has=function(t){return this.ensure(t),this._registryMap.get(t).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(t){this._registryMap.has(t)||this._registryMap.set(t,[])},t}(),kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e}(St),Qt=function(){this.scopedResolutions=new Map};var $t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e}(St),Pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e}(St);const Zt=function(){this.preResolution=new $t,this.postResolution=new Pt};var Tt=new Map,Rt=function(){function t(t){this.parent=t,this._registry=new kt,this.interceptors=new Zt,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(t,e,i){var r;if(void 0===i&&(i={lifecycle:ct.Transient}),this.ensureNotDisposed(),r=function(t){return gt(t)||xt(t)||yt(t)||mt(t)}(e)?e:{useClass:e},yt(r))for(var o=[t],n=r;null!=n;){var s=n.useToken;if(o.includes(s))throw new Error("Token registration cycle detected! "+Ot(o,[s]).join(" -> "));o.push(s);var a=this._registry.get(s);n=a&&yt(a.provider)?a.provider:null}if((i.lifecycle===ct.Singleton||i.lifecycle==ct.ContainerScoped||i.lifecycle==ct.ResolutionScoped)&&(xt(r)||mt(r)))throw new Error('Cannot use lifecycle "'+ct[i.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(t,{provider:r,options:i}),this},t.prototype.registerType=function(t,e){return this.ensureNotDisposed(),vt(e)?this.register(t,{useToken:e}):this.register(t,{useClass:e})},t.prototype.registerInstance=function(t,e){return this.ensureNotDisposed(),this.register(t,{useValue:e})},t.prototype.registerSingleton=function(t,e){if(this.ensureNotDisposed(),vt(t)){if(vt(e))return this.register(t,{useToken:e},{lifecycle:ct.Singleton});if(e)return this.register(t,{useClass:e},{lifecycle:ct.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var i=t;return e&&!vt(e)&&(i=e),this.register(t,{useClass:i},{lifecycle:ct.Singleton})},t.prototype.resolve=function(t,e){void 0===e&&(e=new Qt),this.ensureNotDisposed();var i=this.getRegistration(t);if(!i&&vt(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),i){var r=this.resolveRegistration(i,e);return this.executePostResolutionInterceptor(t,r,"Single"),r}if(function(t){return"function"==typeof t||t instanceof bt}(t))return r=this.construct(t,e),this.executePostResolutionInterceptor(t,r,"Single"),r;throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,e){var i,r;if(this.interceptors.preResolution.has(t)){var o=[];try{for(var n=ft(this.interceptors.preResolution.getAll(t)),s=n.next();!s.done;s=n.next()){var a=s.value;"Once"!=a.options.frequency&&o.push(a),a.callback(t,e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}this.interceptors.preResolution.setAll(t,o)}},t.prototype.executePostResolutionInterceptor=function(t,e,i){var r,o;if(this.interceptors.postResolution.has(t)){var n=[];try{for(var s=ft(this.interceptors.postResolution.getAll(t)),a=s.next();!a.done;a=s.next()){var l=a.value;"Once"!=l.options.frequency&&n.push(l),l.callback(t,e,i)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}this.interceptors.postResolution.setAll(t,n)}},t.prototype.resolveRegistration=function(t,e){if(this.ensureNotDisposed(),t.options.lifecycle===ct.ResolutionScoped&&e.scopedResolutions.has(t))return e.scopedResolutions.get(t);var i,r=t.options.lifecycle===ct.Singleton,o=t.options.lifecycle===ct.ContainerScoped,n=r||o;return i=xt(t.provider)?t.provider.useValue:yt(t.provider)?n?t.instance||(t.instance=this.resolve(t.provider.useToken,e)):this.resolve(t.provider.useToken,e):gt(t.provider)?n?t.instance||(t.instance=this.construct(t.provider.useClass,e)):this.construct(t.provider.useClass,e):mt(t.provider)?t.provider.useFactory(this):this.construct(t.provider,e),t.options.lifecycle===ct.ResolutionScoped&&e.scopedResolutions.set(t,i),i},t.prototype.resolveAll=function(t,e){var i=this;void 0===e&&(e=new Qt),this.ensureNotDisposed();var r=this.getAllRegistrations(t);if(!r&&vt(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),r){var o=r.map((function(t){return i.resolveRegistration(t,e)}));return this.executePostResolutionInterceptor(t,o,"All"),o}var n=[this.construct(t,e)];return this.executePostResolutionInterceptor(t,n,"All"),n},t.prototype.isRegistered=function(t,e){return void 0===e&&(e=!1),this.ensureNotDisposed(),this._registry.has(t)||e&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,e;this.ensureNotDisposed();try{for(var i=ft(this._registry.entries()),r=i.next();!r.done;r=i.next()){var o=pt(r.value,2),n=o[0],s=o[1];this._registry.setAll(n,s.filter((function(t){return!xt(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var e,i;this.ensureNotDisposed();var r=new t(this);try{for(var o=ft(this._registry.entries()),n=o.next();!n.done;n=o.next()){var s=pt(n.value,2),a=s[0],l=s[1];l.some((function(t){return t.options.lifecycle===ct.ContainerScoped}))&&r._registry.setAll(a,l.map((function(t){return t.options.lifecycle===ct.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){e={error:t}}finally{try{n&&!n.done&&(i=o.return)&&i.call(o)}finally{if(e)throw e.error}}return r},t.prototype.beforeResolution=function(t,e,i){void 0===i&&(i={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:e,options:i})},t.prototype.afterResolution=function(t,e,i){void 0===i&&(i={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:e,options:i})},t.prototype.dispose=function(){return function(t,e,i,r){return new(i||(i=Promise))((function(o,n){function s(t){try{l(r.next(t))}catch(t){n(t)}}function a(t){try{l(r.throw(t))}catch(t){n(t)}}function l(t){var e;t.done?o(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function(){var t;return function(t,e){var i,r,o,n,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(n){return function(a){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,r&&(o=2&n[0]?r.return:n[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return s.label++,{value:n[1],done:!1};case 5:s.label++,r=n[1],n=[0];continue;case 7:n=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!o||n[1]>o[0]&&n[1]<o[3])){s.label=n[1];break}if(6===n[0]&&s.label<o[1]){s.label=o[1],o=n;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(n);break}o[2]&&s.ops.pop(),s.trys.pop();continue}n=e.call(t,s)}catch(t){n=[6,t],r=0}finally{i=o=0}if(5&n[0])throw n[1];return{value:n[0]?n[1]:void 0,done:!0}}([n,a])}}}(this,(function(e){switch(e.label){case 0:return this.disposed=!0,t=[],this.disposables.forEach((function(e){var i=e.dispose();i&&t.push(i)})),[4,Promise.all(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,e){var i=this;if(t instanceof bt)return t.createProxy((function(t){return i.resolve(t,e)}));var r,o=function(){var r=Tt.get(t);if(!r||0===r.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var o=r.map(i.resolveParams(e,t));return new(t.bind.apply(t,Ot([void 0],o)))}();return"function"!=typeof(r=o).dispose||r.dispose.length>0||this.disposables.add(o),o},t.prototype.resolveParams=function(t,e){var i=this;return function(r,o){var n,s,a,l;try{return"object"==typeof(l=r)&&"token"in l&&"multiple"in l?wt(r)?r.multiple?(n=i.resolve(r.transform)).transform.apply(n,Ot([i.resolveAll(r.token)],r.transformArgs)):(s=i.resolve(r.transform)).transform.apply(s,Ot([i.resolve(r.token,t)],r.transformArgs)):r.multiple?i.resolveAll(r.token):i.resolve(r.token,t):wt(r)?(a=i.resolve(r.transform,t)).transform.apply(a,Ot([i.resolve(r.token,t)],r.transformArgs)):i.resolve(r,t)}catch(t){throw new Error(function(t,e,i){var r,o,n=pt(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1];return function(t,e,i){return void 0===i&&(i=" "),Ot([t],e.message.split("\n").map((function(t){return i+t}))).join("\n")}("Cannot inject the dependency "+(o=e,(null===(r=void 0===n?null:n)?"at position #"+o:'"'+r.split(",")[o].trim()+'" at position #'+o)+' of "')+t.name+'" constructor. Reason:',i)}(e,o,t))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t}(),At=new Rt,Ct="injectionTokens";if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class Xt{constructor(t,e){this.container=t,this.options=e}getService(t){return this.container.resolve(t)}}const Mt=window?.qbo4?.services||new Xt(At.createChildContainer(),{});"undefined"!=typeof window&&(window.qbo4=window.qbo4||{},window.qbo4.services=window.qbo4.services||new Xt(At.createChildContainer(),{}),window.qbo4.services);const _t="IConfigurationSourceToken",qt="IConfigurationToken";function*Wt(t,e=""){for(const[i,r]of Object.entries(t)){const t=e?`${e}:${i}`:i;if(Array.isArray(r))for(let e=0;e<r.length;e++){const i=r[e];"object"==typeof i&&null!==i?yield*Wt(i,`${t}:${e}`):yield{key:`${t}:${e}`,value:i}}else"object"==typeof r&&null!==r?yield*Wt(r,t):yield{key:t,value:r}}}class zt{constructor(t){this.jsonConfig=t}getData(){return this.jsonConfig}*getValues(){yield*Wt(this.jsonConfig)}}class Et{getData(){return{}}*getValues(){yield*Wt({})}}class Yt{constructor(t){this.data=t}getSection(t){const e=t.split(":");let i=this.data;for(const t of e){if(!(t in i))return new Yt({});i=i[t]}return new Yt(i)}get(t){const e=t.split(":");let i=this.data;for(const t of e){if(!i||!(t in i))return{};i=i[t]}return i}bind(t){const e=new t;for(const t in this.data)this.data.hasOwnProperty(t)&&(e[t]=this.data[t]);return e}*getValues(){yield*Wt(this.data)}}let Vt=class extends Yt{constructor(t){super({}),this.sources=t,this.mergeConfigurations(t)}mergeConfigurations(t){t.forEach((t=>{const e=t.getData();this.data={...this.data,...e}}))}};var Dt,jt,Ut,Nt;Vt=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s}([function(t){Tt.set(t,function(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],i=Reflect.getOwnMetadata(Ct,t)||{};return Object.keys(i).forEach((function(t){e[+t]=i[t]})),e}(t))},(Dt=0,Ut=_t,Nt={token:Ut,multiple:!0},jt=function(t,e,i){var r=Reflect.getOwnMetadata(Ct,t)||{};r[i]=Nt,Reflect.defineMetadata(Ct,r,t)},function(t,e){jt(t,e,Dt)}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",[Array])],Vt),Mt.container.register(qt,{useClass:Vt},{lifecycle:ct.Singleton}),Mt.container.register(_t,{useClass:Et},{lifecycle:ct.Singleton});const It={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:y},Bt=(t=It,e,i)=>{const{kind:r,metadata:o}=i;let n=globalThis.litPropertyMetadata.get(o);if(void 0===n&&globalThis.litPropertyMetadata.set(o,n=new Map),n.set(i.name,t),"accessor"===r){const{name:r}=i;return{set(i){const o=e.get.call(this);e.set.call(this,i),this.requestUpdate(r,o,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=i;return function(i){const o=this[r];e.call(this,i),this.requestUpdate(r,o,t)}}throw Error("Unsupported decorator location: "+r)};function Gt(t){return(e,i)=>"object"==typeof i?Bt(t,e,i):((t,e,i)=>{const r=e.hasOwnProperty(i);return e.constructor.createProperty(i,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}class Lt extends at{static get formAssociated(){return!0}static{this.styles=a`
|
|
3
|
-
:host {
|
|
4
|
-
display: block;
|
|
5
|
-
padding: 16px;
|
|
6
|
-
}
|
|
7
|
-
.form-group {
|
|
8
|
-
margin-bottom: 10px;
|
|
9
|
-
}
|
|
10
|
-
`}constructor(){super(),this.configData={},this._internals=this.attachInternals()}_handleInput(t){this.value=t.target.value,this._internals.setFormValue(this.value)}async
|
|
11
|
-
<form>
|
|
12
|
-
${Array.from(t.getValues()).map((({key:t,value:e})=>
|
|
13
|
-
<div class="input-group mb-3">
|
|
14
|
-
<input type="text" class="form-control" .value="${t}" @input="${e=>this.updateConfigData(t,e.target.value,e,!0)}">
|
|
15
|
-
<input type="text" class="form-control" .value="${e}" @input="${e=>this.updateConfigData(t,e.target.value,e)}">
|
|
16
|
-
<button class="btn btn-outline-danger" @click="${e=>this.deleteKeyValuePair(t,e)}">Delete</button>
|
|
17
|
-
</div>`))}
|
|
18
|
-
<div>
|
|
19
|
-
<button class="btn btn-outline-primary" @click="${this.addKeyValuePair}">Add Entry</button>
|
|
20
|
-
<button class="btn btn-success" @click="${this.saveChanges}">Save</button>
|
|
21
|
-
<button class="btn btn-secondary" @click="${this.cancelChanges}">Cancel</button>
|
|
22
|
-
</div>
|
|
23
|
-
</form>
|
|
24
|
-
`}}(function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);n>3&&s&&Object.defineProperty(e,i,s)})([Gt({type:String}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:type",Object)],Lt.prototype,"value",void 0),customElements.define("qbo-config-editor",Lt);class Ht{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=ne(this,t,e);let r=[];return this.decompose(0,t,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),Kt.from(r,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=ne(this,t,e);let i=[];return this.decompose(t,e,i,0),Kt.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),r=new ee(this),o=new ee(t);for(let t=e,n=e;;){if(r.next(t),o.next(t),t=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(n+=r.value.length,r.done||n>=i)return!0}}iter(t=1){return new ee(this,t)}iterRange(t,e=this.length){return new ie(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new re(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new Ft(t):Kt.from(Ft.split(t,[])):Ht.empty}}class Ft extends Ht{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,r){for(let o=0;;o++){let n=this.text[o],s=r+n.length;if((e?i:s)>=t)return new oe(r,s,i,n);r=s+1,i++}}decompose(t,e,i,r){let o=t<=0&&e>=this.length?this:new Ft(te(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=i.pop(),e=Jt(o.text,t.text.slice(),0,o.length);if(e.length<=32)i.push(new Ft(e,t.length+o.length));else{let t=e.length>>1;i.push(new Ft(e.slice(0,t)),new Ft(e.slice(t)))}}else i.push(o)}replace(t,e,i){if(!(i instanceof Ft))return super.replace(t,e,i);[t,e]=ne(this,t,e);let r=Jt(this.text,Jt(i.text,te(this.text,0,t)),e),o=this.length+i.length-(e-t);return r.length<=32?new Ft(r,o):Kt.from(Ft.split(r,[]),o)}sliceString(t,e=this.length,i="\n"){[t,e]=ne(this,t,e);let r="";for(let o=0,n=0;o<=e&&n<this.text.length;n++){let s=this.text[n],a=o+s.length;o>t&&n&&(r+=i),t<a&&e>o&&(r+=s.slice(Math.max(0,t-o),e-o)),o=a+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],r=-1;for(let o of t)i.push(o),r+=o.length+1,32==i.length&&(e.push(new Ft(i,r)),i=[],r=-1);return r>-1&&e.push(new Ft(i,r)),e}}class Kt extends Ht{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,r){for(let o=0;;o++){let n=this.children[o],s=r+n.length,a=i+n.lines-1;if((e?a:s)>=t)return n.lineInner(t,e,i,r);r=s+1,i=a+1}}decompose(t,e,i,r){for(let o=0,n=0;n<=e&&o<this.children.length;o++){let s=this.children[o],a=n+s.length;if(t<=a&&e>=n){let o=r&((n<=t?1:0)|(a>=e?2:0));n>=t&&a<=e&&!o?i.push(s):s.decompose(t-n,e-n,i,o)}n=a+1}}replace(t,e,i){if([t,e]=ne(this,t,e),i.lines<this.lines)for(let r=0,o=0;r<this.children.length;r++){let n=this.children[r],s=o+n.length;if(t>=o&&e<=s){let a=n.replace(t-o,e-o,i),l=this.lines-n.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let o=this.children.slice();return o[r]=a,new Kt(o,this.length-(e-t)+i.length)}return super.replace(o,s,a)}o=s+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=ne(this,t,e);let r="";for(let o=0,n=0;o<this.children.length&&n<=e;o++){let s=this.children[o],a=n+s.length;n>t&&o&&(r+=i),t<a&&e>n&&(r+=s.sliceString(t-n,e-n,i)),n=a+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof Kt))return 0;let i=0,[r,o,n,s]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,o+=e){if(r==n||o==s)return i;let a=this.children[r],l=t.children[o];if(a!=l)return i+a.scanIdentical(l,e);i+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new Ft(i,e)}let r=Math.max(32,i>>5),o=r<<1,n=r>>1,s=[],a=0,l=-1,h=[];function c(t){let e;if(t.lines>o&&t instanceof Kt)for(let e of t.children)c(e);else t.lines>n&&(a>n||!a)?(d(),s.push(t)):t instanceof Ft&&a&&(e=h[h.length-1])instanceof Ft&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new Ft(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>r&&d(),a+=t.lines,l+=t.length+1,h.push(t))}function d(){0!=a&&(s.push(1==h.length?h[0]:Kt.from(h,l)),l=-1,a=h.length=0)}for(let e of t)c(e);return d(),1==s.length?s[0]:new Kt(s,e)}}function Jt(t,e,i=0,r=1e9){for(let o=0,n=0,s=!0;n<t.length&&o<=r;n++){let a=t[n],l=o+a.length;l>=i&&(l>r&&(a=a.slice(0,r-o)),o<i&&(a=a.slice(i-o)),s?(e[e.length-1]+=a,s=!1):e.push(a)),o=l+1}return e}function te(t,e,i){return Jt(t,[""],e,i)}Ht.empty=new Ft([""],0);class ee{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof Ft?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],o=this.offsets[i],n=o>>1,s=r instanceof Ft?r.text.length:r.children.length;if(n==(e>0?s:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof Ft){let o=r.text[n+(e<0?-1:0)];if(this.offsets[i]+=e,o.length>Math.max(0,t))return this.value=0==t?o:e>0?o.slice(t):o.slice(0,o.length-t),this;t-=o.length}else{let o=r.children[n+(e<0?-1:0)];t>o.length?(t-=o.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(o),this.offsets.push(e>0?1:(o instanceof Ft?o.text.length:o.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class ie{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new ee(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class re{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Ht.prototype[Symbol.iterator]=function(){return this.iter()},ee.prototype[Symbol.iterator]=ie.prototype[Symbol.iterator]=re.prototype[Symbol.iterator]=function(){return this});class oe{constructor(t,e,i,r){this.from=t,this.to=e,this.number=i,this.text=r}get length(){return this.to-this.from}}function ne(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}let se="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,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-1];function ae(t){for(let e=1;e<se.length;e+=2)if(se[e]>t)return se[e-1]<=t;return!1}function le(t){return t>=127462&&t<=127487}const he=8205;function ce(t,e,i=!0,r=!0){return(i?de:ue)(t,e,r)}function de(t,e,i){if(e==t.length)return e;e&&fe(t.charCodeAt(e))&&pe(t.charCodeAt(e-1))&&e--;let r=Oe(t,e);for(e+=me(r);e<t.length;){let o=Oe(t,e);if(r==he||o==he||i&&ae(o))e+=me(o),r=o;else{if(!le(o))break;{let i=0,r=e-2;for(;r>=0&&le(Oe(t,r));)i++,r-=2;if(i%2==0)break;e+=2}}}return e}function ue(t,e,i){for(;e>0;){let r=de(t,e-2,i);if(r<e)return r;e--}return 0}function fe(t){return t>=56320&&t<57344}function pe(t){return t>=55296&&t<56320}function Oe(t,e){let i=t.charCodeAt(e);if(!pe(i)||e+1==t.length)return i;let r=t.charCodeAt(e+1);return fe(r)?r-56320+(i-55296<<10)+65536:i}function ge(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function me(t){return t<65536?1:2}const be=/\r\n?|\n/;var ve=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(ve||(ve={}));class we{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,r=0;e<this.sections.length;){let o=this.sections[e++],n=this.sections[e++];n<0?(t(i,r,o),r+=o):r+=n,i+=o}}iterChangedRanges(t,e=!1){ke(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],r=this.sections[e++];r<0?t.push(i,r):t.push(r,i)}return new we(t)}composeDesc(t){return this.empty?t:t.empty?this:$e(this,t)}mapDesc(t,e=!1){return t.empty?this:Qe(this,t,e)}mapPos(t,e=-1,i=ve.Simple){let r=0,o=0;for(let n=0;n<this.sections.length;){let s=this.sections[n++],a=this.sections[n++],l=r+s;if(a<0){if(l>t)return o+(t-r);o+=s}else{if(i!=ve.Simple&&l>=t&&(i==ve.TrackDel&&r<t&&l>t||i==ve.TrackBefore&&r<t||i==ve.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!s)return t==r||e<0?o:o+a;o+=a}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return o}touchesRange(t,e=t){for(let i=0,r=0;i<this.sections.length&&r<=e;){let o=r+this.sections[i++];if(this.sections[i++]>=0&&r<=e&&o>=t)return!(r<t&&o>e)||"cover";r=o}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+i+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new we(t)}static create(t){return new we(t)}}class ye extends we{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return ke(this,((e,i,r,o,n)=>t=t.replace(r,r+(i-e),n)),!1),t}mapDesc(t,e=!1){return Qe(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let r=0,o=0;r<e.length;r+=2){let n=e[r],s=e[r+1];if(s>=0){e[r]=s,e[r+1]=n;let a=r>>1;for(;i.length<a;)i.push(Ht.empty);i.push(n?t.slice(o,o+n):Ht.empty)}o+=n}return new ye(e,i)}compose(t){return this.empty?t:t.empty?this:$e(this,t,!0)}map(t,e=!1){return t.empty?this:Qe(this,t,e,!0)}iterChanges(t,e=!1){ke(this,t,e)}get desc(){return we.create(this.sections)}filter(t){let e=[],i=[],r=[],o=new Pe(this);t:for(let n=0,s=0;;){let a=n==t.length?1e9:t[n++];for(;s<a||s==a&&0==o.len;){if(o.done)break t;let t=Math.min(o.len,a-s);xe(r,t,-1);let n=-1==o.ins?-1:0==o.off?o.ins:0;xe(e,t,n),n>0&&Se(i,e,o.text),o.forward(t),s+=t}let l=t[n++];for(;s<l;){if(o.done)break t;let t=Math.min(o.len,l-s);xe(e,t,-1),xe(r,t,-1==o.ins?-1:0==o.off?o.ins:0),o.forward(t),s+=t}}return{changes:new ye(e,i),filtered:we.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],r=this.sections[e+1];r<0?t.push(i):0==r?t.push([i]):t.push([i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let r=[],o=[],n=0,s=null;function a(t=!1){if(!t&&!r.length)return;n<e&&xe(r,e-n,-1);let i=new ye(r,o);s=s?s.compose(i.map(s)):i,r=[],o=[],n=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof ye){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:t,to:s=t,insert:h}=l;if(t>s||t<0||s>e)throw new RangeError(`Invalid change range ${t} to ${s} (in doc of length ${e})`);let c=h?"string"==typeof h?Ht.of(h.split(i||be)):h:Ht.empty,d=c.length;if(t==s&&0==d)return;t<n&&a(),t>n&&xe(r,t-n,-1),xe(r,s-t,d),Se(o,r,c),n=s}}(t),a(!s),s}static empty(t){return new ye(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let r=0;r<t.length;r++){let o=t[r];if("number"==typeof o)e.push(o,-1);else{if(!Array.isArray(o)||"number"!=typeof o[0]||o.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)e.push(o[0],0);else{for(;i.length<r;)i.push(Ht.empty);i[r]=Ht.of(o.slice(1)),e.push(o[0],i[r].length)}}}return new ye(e,i)}static createSet(t,e){return new ye(t,e)}}function xe(t,e,i,r=!1){if(0==e&&i<=0)return;let o=t.length-2;o>=0&&i<=0&&i==t[o+1]?t[o]+=e:0==e&&0==t[o]?t[o+1]+=i:r?(t[o]+=e,t[o+1]+=i):t.push(e,i)}function Se(t,e,i){if(0==i.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(i);else{for(;t.length<r;)t.push(Ht.empty);t.push(i)}}function ke(t,e,i){let r=t.inserted;for(let o=0,n=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)o+=a,n+=a;else{let h=o,c=n,d=Ht.empty;for(;h+=a,c+=l,l&&r&&(d=d.append(r[s-2>>1])),!(i||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(o,h,n,c,d),o=h,n=c}}}function Qe(t,e,i,r=!1){let o=[],n=r?[]:null,s=new Pe(t),a=new Pe(e);for(let t=-1;;)if(-1==s.ins&&-1==a.ins){let t=Math.min(s.len,a.len);xe(o,t,-1),s.forward(t),a.forward(t)}else if(a.ins>=0&&(s.ins<0||t==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!i))){let e=a.len;for(xe(o,a.ins,-1);e;){let i=Math.min(s.len,e);s.ins>=0&&t<s.i&&s.len<=i&&(xe(o,0,s.ins),n&&Se(n,o,s.text),t=s.i),s.forward(i),e-=i}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return n?ye.createSet(o,n):we.create(o);throw new Error("Mismatched change set lengths")}{let e=0,i=s.len;for(;i;)if(-1==a.ins){let t=Math.min(i,a.len);e+=t,i-=t,a.forward(t)}else{if(!(0==a.ins&&a.len<i))break;i-=a.len,a.next()}xe(o,e,t<s.i?s.ins:0),n&&t<s.i&&Se(n,o,s.text),t=s.i,s.forward(s.len-i)}}}function $e(t,e,i=!1){let r=[],o=i?[]:null,n=new Pe(t),s=new Pe(e);for(let t=!1;;){if(n.done&&s.done)return o?ye.createSet(r,o):we.create(r);if(0==n.ins)xe(r,n.len,0,t),n.next();else if(0!=s.len||s.done){if(n.done||s.done)throw new Error("Mismatched change set lengths");{let e=Math.min(n.len2,s.len),i=r.length;if(-1==n.ins){let i=-1==s.ins?-1:s.off?0:s.ins;xe(r,e,i,t),o&&i&&Se(o,r,s.text)}else-1==s.ins?(xe(r,n.off?0:n.len,e,t),o&&Se(o,r,n.textBit(e))):(xe(r,n.off?0:n.len,s.off?0:s.ins,t),o&&!s.off&&Se(o,r,s.text));t=(n.ins>e||s.ins>=0&&s.len>e)&&(t||r.length>i),n.forward2(e),s.forward(e)}}else xe(r,0,s.ins,t),o&&Se(o,r,s.text),s.next()}}class Pe{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?Ht.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?Ht.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Ze{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,r;return this.empty?i=r=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Ze(i,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return Te.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return Te.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Te.range(t.anchor,t.head)}static create(t,e,i){return new Ze(t,e,i)}}class Te{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:Te.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(t.ranges[i],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new Te([this.main],0)}addRange(t,e=!0){return Te.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();return i[e]=t,Te.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Te(t.ranges.map((t=>Ze.fromJSON(t))),t.main)}static single(t,e=t){return new Te([Te.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<t.length;r++){let o=t[r];if(o.empty?o.from<=i:o.from<i)return Te.normalized(t.slice(),e);i=o.to}return new Te(t,e)}static cursor(t,e=0,i,r){return Ze.create(t,t,(0==e?0:e<0?8:16)|(null==i?7:Math.min(6,i))|(null!=r?r:16777215)<<6)}static range(t,e,i,r){let o=(null!=i?i:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?Ze.create(e,t,48|o):Ze.create(t,e,(e>t?8:0)|o)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;i<t.length;i++){let r=t[i],o=t[i-1];if(r.empty?r.from<=o.to:r.from<o.to){let n=o.from,s=Math.max(r.to,o.to);i<=e&&e--,t.splice(--i,2,r.anchor>r.head?Te.range(s,n):Te.range(n,s))}}return new Te(t,e)}}function Re(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let Ae=0;class Ce{constructor(t,e,i,r,o){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=Ae++,this.default=t([]),this.extensions="function"==typeof o?o(this):o}get reader(){return this}static define(t={}){return new Ce(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:Xe),!!t.static,t.enables)}of(t){return new Me([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Me(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Me(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function Xe(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class Me{constructor(t,e,i,r){this.dependencies=t,this.facet=e,this.type=i,this.value=r,this.id=Ae++}dynamicSlot(t){var e;let i=this.value,r=this.facet.compareInput,o=this.id,n=t[o]>>1,s=2==this.type,a=!1,l=!1,h=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:1&(null!==(e=t[i.id])&&void 0!==e?e:1)||h.push(t[i.id]);return{create:t=>(t.values[n]=i(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||qe(t,h)){let e=i(t);if(s?!_e(e,t.values[n],r):!r(e,t.values[n]))return t.values[n]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[o];if(null!=l){let o=Be(e,l);if(this.dependencies.every((i=>i instanceof Ce?e.facet(i)===t.facet(i):!(i instanceof Ee)||e.field(i,!1)==t.field(i,!1)))||(s?_e(a=i(t),o,r):r(a=i(t),o)))return t.values[n]=o,0}else a=i(t);return t.values[n]=a,1}}}}function _e(t,e,i){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!i(t[r],e[r]))return!1;return!0}function qe(t,e){let i=!1;for(let r of e)1&Ie(t,r)&&(i=!0);return i}function We(t,e,i){let r=i.map((e=>t[e.id])),o=i.map((t=>t.type)),n=r.filter((t=>!(1&t))),s=t[e.id]>>1;function a(t){let i=[];for(let e=0;e<r.length;e++){let n=Be(t,r[e]);if(2==o[e])for(let t of n)i.push(t);else i.push(n)}return e.combine(i)}return{create(t){for(let e of r)Ie(t,e);return t.values[s]=a(t),1},update(t,i){if(!qe(t,n))return 0;let r=a(t);return e.compare(r,t.values[s])?0:(t.values[s]=r,1)},reconfigure(t,o){let n=qe(t,r),l=o.config.facets[e.id],h=o.facet(e);if(l&&!n&&Xe(i,l))return t.values[s]=h,0;let c=a(t);return e.compare(c,h)?(t.values[s]=h,0):(t.values[s]=c,1)}}}const ze=Ce.define({static:!0});class Ee{constructor(t,e,i,r,o){this.id=t,this.createF=e,this.updateF=i,this.compareF=r,this.spec=o,this.provides=void 0}static define(t){let e=new Ee(Ae++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(ze).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let r=t.values[e],o=this.updateF(r,i);return this.compareF(r,o)?0:(t.values[e]=o,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,ze.of({field:this,create:t})]}get extension(){return this}}function Ye(t){return e=>new De(e,t)}const Ve={highest:Ye(0),high:Ye(1),default:Ye(2),low:Ye(3),lowest:Ye(4)};class De{constructor(t,e){this.inner=t,this.prec=e}}class je{of(t){return new Ue(this,t)}reconfigure(t){return je.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Ue{constructor(t,e){this.compartment=t,this.inner=e}}class Ne{constructor(t,e,i,r,o,n){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=o,this.facets=n,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let r=[],o=Object.create(null),n=new Map;for(let i of function(t,e,i){let r=[[],[],[],[],[]],o=new Map;return function t(n,s){let a=o.get(n);if(null!=a){if(a<=s)return;let t=r[a].indexOf(n);t>-1&&r[a].splice(t,1),n instanceof Ue&&i.delete(n.compartment)}if(o.set(n,s),Array.isArray(n))for(let e of n)t(e,s);else if(n instanceof Ue){if(i.has(n.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(n.compartment)||n.inner;i.set(n.compartment,r),t(r,s)}else if(n instanceof De)t(n.inner,n.prec);else if(n instanceof Ee)r[s].push(n),n.provides&&t(n.provides,s);else if(n instanceof Me)r[s].push(n),n.facet.extensions&&t(n.facet.extensions,2);else{let e=n.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${n}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,s)}}(t,2),r.reduce(((t,e)=>t.concat(e)))}(t,e,n))i instanceof Ee?r.push(i):(o[i.facet.id]||(o[i.facet.id]=[])).push(i);let s=Object.create(null),a=[],l=[];for(let t of r)s[t.id]=l.length<<1,l.push((e=>t.slot(e)));let h=null==i?void 0:i.config.facets;for(let t in o){let e=o[t],r=e[0].facet,n=h&&h[t]||[];if(e.every((t=>0==t.type)))if(s[r.id]=a.length<<1|1,Xe(n,e))a.push(i.facet(r));else{let t=r.combine(e.map((t=>t.value)));a.push(i&&r.compare(t,i.facet(r))?i.facet(r):t)}else{for(let t of e)0==t.type?(s[t.id]=a.length<<1|1,a.push(t.value)):(s[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));s[r.id]=l.length<<1,l.push((t=>We(t,r,e)))}}let c=l.map((t=>t(s)));return new Ne(t,n,c,s,a,o)}}function Ie(t,e){if(1&e)return 2;let i=e>>1,r=t.status[i];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[i]=4;let o=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|o}function Be(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Ge=Ce.define(),Le=Ce.define({combine:t=>t.some((t=>t)),static:!0}),He=Ce.define({combine:t=>t.length?t[0]:void 0,static:!0}),Fe=Ce.define(),Ke=Ce.define(),Je=Ce.define(),ti=Ce.define({combine:t=>!!t.length&&t[0]});class ei{constructor(t,e){this.type=t,this.value=e}static define(){return new ii}}class ii{of(t){return new ei(this,t)}}class ri{constructor(t){this.map=t}of(t){return new oi(this,t)}}class oi{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new oi(this.type,e)}is(t){return this.type==t}static define(t={}){return new ri(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let r of t){let t=r.map(e);t&&i.push(t)}return i}}oi.reconfigure=oi.define(),oi.appendConfig=oi.define();class ni{constructor(t,e,i,r,o,n){this.startState=t,this.changes=e,this.selection=i,this.effects=r,this.annotations=o,this.scrollIntoView=n,this._doc=null,this._state=null,i&&Re(i,e.newLength),o.some((t=>t.type==ni.time))||(this.annotations=o.concat(ni.time.of(Date.now())))}static create(t,e,i,r,o,n){return new ni(t,e,i,r,o,n)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(ni.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function si(t,e){let i=[];for(let r=0,o=0;;){let n,s;if(r<t.length&&(o==e.length||e[o]>=t[r]))n=t[r++],s=t[r++];else{if(!(o<e.length))return i;n=e[o++],s=e[o++]}!i.length||i[i.length-1]<n?i.push(n,s):i[i.length-1]<s&&(i[i.length-1]=s)}}function ai(t,e,i){var r;let o,n,s;return i?(o=e.changes,n=ye.empty(e.changes.length),s=t.changes.compose(e.changes)):(o=e.changes.map(t.changes),n=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(o)),{changes:s,selection:e.selection?e.selection.map(n):null===(r=t.selection)||void 0===r?void 0:r.map(o),effects:oi.mapEffects(t.effects,o).concat(oi.mapEffects(e.effects,n)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function li(t,e,i){let r=e.selection,o=di(e.annotations);return e.userEvent&&(o=o.concat(ni.userEvent.of(e.userEvent))),{changes:e.changes instanceof ye?e.changes:ye.of(e.changes||[],i,t.facet(He)),selection:r&&(r instanceof Te?r:Te.single(r.anchor,r.head)),effects:di(e.effects),annotations:o,scrollIntoView:!!e.scrollIntoView}}function hi(t,e,i){let r=li(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(i=!1);for(let o=1;o<e.length;o++){!1===e[o].filter&&(i=!1);let n=!!e[o].sequential;r=ai(r,li(t,e[o],n?r.changes.newLength:t.doc.length),n)}let o=ni.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,i=e.facet(Je),r=t;for(let o=i.length-1;o>=0;o--){let n=i[o](t);n&&Object.keys(n).length&&(r=ai(r,li(e,n,t.changes.newLength),!0))}return r==t?t:ni.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let r of e.facet(Fe)){let e=r(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:si(i,e))}if(!0!==i){let r,o;if(!1===i)o=t.changes.invertedDesc,r=ye.empty(e.doc.length);else{let e=t.changes.filter(i);r=e.changes,o=e.filtered.mapDesc(e.changes).invertedDesc}t=ni.create(e,r,t.selection&&t.selection.map(o),oi.mapEffects(t.effects,o),t.annotations,t.scrollIntoView)}let r=e.facet(Ke);for(let i=r.length-1;i>=0;i--){let o=r[i](t);t=o instanceof ni?o:Array.isArray(o)&&1==o.length&&o[0]instanceof ni?o[0]:hi(e,di(o),!1)}return t}(o):o)}ni.time=ei.define(),ni.userEvent=ei.define(),ni.addToHistory=ei.define(),ni.remote=ei.define();const ci=[];function di(t){return null==t?ci:Array.isArray(t)?t:[t]}var ui=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(ui||(ui={}));const fi=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let pi;try{pi=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(z){}class Oi{constructor(t,e,i,r,o,n){this.config=t,this.doc=e,this.selection=i,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=o,n&&(n._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)Ie(this,t<<1);this.computeSlot=null}field(t,e=!0){let i=this.config.address[t.id];if(null!=i)return Ie(this,i),Be(this,i);if(e)throw new RangeError("Field is not present in this state")}update(...t){return hi(this,t,!0)}applyTransaction(t){let e,i=this.config,{base:r,compartments:o}=i;for(let e of t.effects)e.is(je.reconfigure)?(i&&(o=new Map,i.compartments.forEach(((t,e)=>o.set(e,t))),i=null),o.set(e.value.compartment,e.value.extension)):e.is(oi.reconfigure)?(i=null,r=e.value):e.is(oi.appendConfig)&&(i=null,r=di(r).concat(e.value));i?e=t.startState.values.slice():(i=Ne.resolve(r,o,this),e=new Oi(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let n=t.startState.facet(Le)?t.newSelection:t.newSelection.asSingle();new Oi(i,t.newDoc,n,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:Te.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),r=this.changes(i.changes),o=[i.range],n=di(i.effects);for(let i=1;i<e.ranges.length;i++){let s=t(e.ranges[i]),a=this.changes(s.changes),l=a.map(r);for(let t=0;t<i;t++)o[t]=o[t].map(l);let h=r.mapDesc(a,!0);o.push(s.range.map(h)),r=r.compose(l),n=oi.mapEffects(n,l).concat(oi.mapEffects(di(s.effects),h))}return{changes:r,selection:Te.create(o,e.mainIndex),effects:n}}changes(t=[]){return t instanceof ye?t:ye.of(t,this.doc.length,this.facet(Oi.lineSeparator))}toText(t){return Ht.of(t.split(this.facet(Oi.lineSeparator)||be))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(Ie(this,e),Be(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let r=t[i];r instanceof Ee&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(t[i]),this))}return e}static fromJSON(t,e={},i){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i)for(let e in i)if(Object.prototype.hasOwnProperty.call(t,e)){let o=i[e],n=t[e];r.push(o.init((t=>o.spec.fromJSON(n,t))))}return Oi.create({doc:t.doc,selection:Te.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=Ne.resolve(t.extensions||[],new Map),i=t.doc instanceof Ht?t.doc:Ht.of((t.doc||"").split(e.staticFacet(Oi.lineSeparator)||be)),r=t.selection?t.selection instanceof Te?t.selection:Te.single(t.selection.anchor,t.selection.head):Te.single(0);return Re(r,i.length),e.staticFacet(Le)||(r=r.asSingle()),new Oi(e,i,r,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Oi.tabSize)}get lineBreak(){return this.facet(Oi.lineSeparator)||"\n"}get readOnly(){return this.facet(ti)}phrase(t,...e){for(let e of this.facet(Oi.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let r=+(i||1);return!r||r>e.length?t:e[r-1]}))),t}languageDataAt(t,e,i=-1){let r=[];for(let o of this.facet(Ge))for(let n of o(this,e,i))Object.prototype.hasOwnProperty.call(n,t)&&r.push(n[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return ui.Space;if(function(t){if(pi)return pi.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||fi.test(i)))return!0}return!1}(t))return ui.Word;for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return ui.Word;return ui.Other};var e}wordAt(t){let{text:e,from:i,length:r}=this.doc.lineAt(t),o=this.charCategorizer(t),n=t-i,s=t-i;for(;n>0;){let t=ce(e,n,!1);if(o(e.slice(t,n))!=ui.Word)break;n=t}for(;s<r;){let t=ce(e,s);if(o(e.slice(s,t))!=ui.Word)break;s=t}return n==s?null:Te.range(n+i,s+i)}}function gi(t,e,i={}){let r={};for(let e of t)for(let t of Object.keys(e)){let o=e[t],n=r[t];if(void 0===n)r[t]=o;else if(n===o||void 0===o);else{if(!Object.hasOwnProperty.call(i,t))throw new Error("Config merge conflict for field "+t);r[t]=i[t](n,o)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}Oi.allowMultipleSelections=Le,Oi.tabSize=Ce.define({combine:t=>t.length?t[0]:4}),Oi.lineSeparator=He,Oi.readOnly=ti,Oi.phrases=Ce.define({compare(t,e){let i=Object.keys(t),r=Object.keys(e);return i.length==r.length&&i.every((i=>t[i]==e[i]))}}),Oi.languageData=Ge,Oi.changeFilter=Fe,Oi.transactionFilter=Ke,Oi.transactionExtender=Je,je.reconfigure=oi.define();class mi{eq(t){return this==t}range(t,e=t){return bi.create(t,e,this)}}mi.prototype.startSide=mi.prototype.endSide=0,mi.prototype.point=!1,mi.prototype.mapMode=ve.TrackDel;class bi{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new bi(t,e,i)}}function vi(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class wi{constructor(t,e,i,r){this.from=t,this.to=e,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,r=0){let o=i?this.to:this.from;for(let n=r,s=o.length;;){if(n==s)return n;let r=n+s>>1,a=o[r]-t||(i?this.value[r].endSide:this.value[r].startSide)-e;if(r==n)return a>=0?n:s;a>=0?s=r:n=r+1}}between(t,e,i,r){for(let o=this.findIndex(e,-1e9,!0),n=this.findIndex(i,1e9,!1,o);o<n;o++)if(!1===r(this.from[o]+t,this.to[o]+t,this.value[o]))return!1}map(t,e){let i=[],r=[],o=[],n=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,h,c=this.value[a],d=this.from[a]+t,u=this.to[a]+t;if(d==u){let t=e.mapPos(d,c.startSide,c.mapMode);if(null==t)continue;if(l=h=t,c.startSide!=c.endSide&&(h=e.mapPos(d,c.endSide),h<l))continue}else if(l=e.mapPos(d,c.startSide),h=e.mapPos(u,c.endSide),l>h||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(n<0&&(n=l),c.point&&(s=Math.max(s,h-l)),i.push(c),r.push(l-n),o.push(h-n))}return{mapped:i.length?new wi(r,o,i,s):null,pos:n}}}class yi{constructor(t,e,i,r){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=r}static create(t,e,i,r){return new yi(t,e,i,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:r=0,filterTo:o=this.length}=t,n=t.filter;if(0==e.length&&!n)return this;if(i&&(e=e.slice().sort(vi)),this.isEmpty)return e.length?yi.of(e):this;let s=new ki(this,null,-1).goto(0),a=0,l=[],h=new xi;for(;s.value||a<e.length;)if(a<e.length&&(s.from-e[a].from||s.startSide-e[a].value.startSide)>=0){let t=e[a++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==e.length||this.chunkEnd(s.chunkIndex)<e[a].from)&&(!n||r>this.chunkEnd(s.chunkIndex)||o<this.chunkPos[s.chunkIndex])&&h.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!n||r>s.to||o<s.from||n(s.from,s.to,s.value))&&(h.addInner(s.from,s.to,s.value)||l.push(bi.create(s.from,s.to,s.value))),s.next());return h.finishInner(this.nextLayer.isEmpty&&!l.length?yi.empty:this.nextLayer.update({add:l,filter:n,filterFrom:r,filterTo:o}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],i=[],r=-1;for(let o=0;o<this.chunk.length;o++){let n=this.chunkPos[o],s=this.chunk[o],a=t.touchesRange(n,n+s.length);if(!1===a)r=Math.max(r,s.maxPoint),e.push(s),i.push(t.mapPos(n));else if(!0===a){let{mapped:o,pos:a}=s.map(n,t);o&&(r=Math.max(r,o.maxPoint),e.push(o),i.push(a))}}let o=this.nextLayer.map(t);return 0==e.length?o:new yi(i,e,o||yi.empty,r)}between(t,e,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],n=this.chunk[r];if(e>=o&&t<=o+n.length&&!1===n.between(o,t-o,e-o,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Qi.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Qi.from(t).goto(e)}static compare(t,e,i,r,o=-1){let n=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=o)),s=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=o)),a=Si(n,s,i),l=new Pi(n,a,o),h=new Pi(s,a,o);i.iterGaps(((t,e,i)=>Zi(l,t,h,e,i,r))),i.empty&&0==i.length&&Zi(l,0,h,0,0,r)}static eq(t,e,i=0,r){null==r&&(r=999999999);let o=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),n=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(o.length!=n.length)return!1;if(!o.length)return!0;let s=Si(o,n),a=new Pi(o,s,0).goto(i),l=new Pi(n,s,0).goto(i);for(;;){if(a.to!=l.to||!Ti(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(t,e,i,r,o=-1){let n=new Pi(t,null,o).goto(e),s=e,a=n.openStart;for(;;){let t=Math.min(n.to,i);if(n.point){let i=n.activeForPoint(n.to),o=n.pointFrom<e?i.length+1:n.point.startSide<0?i.length:Math.min(i.length,a);r.point(s,t,n.point,i,o,n.pointRank),a=Math.min(n.openEnd(t),i.length)}else t>s&&(r.span(s,t,n.active,a),a=n.openEnd(t));if(n.to>i)return a+(n.point&&n.to>i?1:0);s=n.to,n.next()}}static of(t,e=!1){let i=new xi;for(let r of t instanceof bi?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i<t.length;i++){let r=t[i];if(vi(e,r)>0)return t.slice().sort(vi);e=r}return t}(t):t)i.add(r.from,r.to,r.value);return i.finish()}static join(t){if(!t.length)return yi.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let r=t[i];r!=yi.empty;r=r.nextLayer)e=new yi(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}yi.empty=new yi([],[],null,-1),yi.empty.nextLayer=yi.empty;class xi{finishChunk(t){this.chunks.push(new wi(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new xi)).add(t,e,i)}addInner(t,e,i){let r=t-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(yi.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=yi.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function Si(t,e,i){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let o=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let n=r.get(t.chunk[e]);null==n||(i?i.mapPos(n):n)!=t.chunkPos[e]||(null==i?void 0:i.touchesRange(n,n+t.chunk[e].length))||o.add(t.chunk[e])}return o}class ki{constructor(t,e,i,r=0){this.layer=t,this.skip=e,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,i){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],i=t+e.from[this.rangeIndex];if(this.from=i,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Qi{constructor(t){this.heap=t}static from(t,e=null,i=-1){let r=[];for(let o=0;o<t.length;o++)for(let n=t[o];!n.isEmpty;n=n.nextLayer)n.maxPoint>=i&&r.push(new ki(n,e,i,o));return 1==r.length?r[0]:new Qi(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)$i(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)$i(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),$i(this.heap,0)}}}function $i(t,e){for(let i=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let o=t[r];if(r+1<t.length&&o.compare(t[r+1])>=0&&(o=t[r+1],r++),i.compare(o)<0)break;t[r]=i,t[e]=o,e=r}}class Pi{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Qi.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Ri(this.active,t),Ri(this.activeTo,t),Ri(this.activeRank,t),this.minActive=Ci(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:r,rank:o}=this.cursor;for(;e<this.activeRank.length&&(o-this.activeRank[e]||r-this.activeTo[e])>0;)e++;Ai(this.active,e,i),Ai(this.activeTo,e,r),Ai(this.activeRank,e,o),t&&Ai(t,e,this.cursor.from),this.minActive=Ci(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Ri(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){this.openStart=0;for(let e=i.length-1;e>=0&&i[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function Zi(t,e,i,r,o,n){t.goto(e),i.goto(r);let s=r+o,a=r,l=r-e;for(;;){let e=t.to+l-i.to||t.endSide-i.endSide,r=e<0?t.to+l:i.to,o=Math.min(r,s);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Ti(t.activeForPoint(t.to),i.activeForPoint(i.to))||n.comparePoint(a,o,t.point,i.point):o>a&&!Ti(t.active,i.active)&&n.compareRange(a,o,t.active,i.active),r>s)break;a=r,e<=0&&t.next(),e>=0&&i.next()}}function Ti(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!=e[i]&&!t[i].eq(e[i]))return!1;return!0}function Ri(t,e){for(let i=e,r=t.length-1;i<r;i++)t[i]=t[i+1];t.pop()}function Ai(t,e,i){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=i}function Ci(t,e){let i=-1,r=1e9;for(let o=0;o<e.length;o++)(e[o]-r||t[o].endSide-t[i].endSide)<0&&(i=o,r=e[o]);return i}function Xi(t,e,i=t.length){let r=0;for(let o=0;o<i;)9==t.charCodeAt(o)?(r+=e-r%e,o++):(r++,o=ce(t,o));return r}function Mi(t,e,i,r){for(let r=0,o=0;;){if(o>=e)return r;if(r==t.length)break;o+=9==t.charCodeAt(r)?i-o%i:1,r=ce(t,r)}return!0===r?-1:t.length}const _i="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),qi="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Wi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class zi{constructor(t,e){this.rules=[];let{finish:i}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function o(t,e,n,s){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return n.push(t[0]+";");for(let i in e){let s=e[i];if(/&/.test(i))o(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),s,n);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");o(r(i),s,a,h)}else null!=s&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+s+";")}(a.length||h)&&n.push((!i||l||s?t:t.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let e in t)o(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Wi[_i]||1;return Wi[_i]=t+1,"ͼ"+t.toString(36)}static mount(t,e,i){let r=t[qi],o=i&&i.nonce;r?o&&r.setNonce(o):r=new Yi(t,o),r.mount(Array.isArray(e)?e:[e],t)}}let Ei=new Map;class Yi{constructor(t,e){let i=t.ownerDocument||t,r=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=Ei.get(i);if(e)return t[qi]=e;this.sheet=new r.CSSStyleSheet,Ei.set(i,this)}else this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[qi]=this}mount(t,e){let i=this.sheet,r=0,o=0;for(let e=0;e<t.length;e++){let n=t[e],s=this.modules.indexOf(n);if(s<o&&s>-1&&(this.modules.splice(s,1),o--,s=-1),-1==s){if(this.modules.splice(o++,0,n),i)for(let t=0;t<n.rules.length;t++)i.insertRule(n.rules[t],r++)}else{for(;o<s;)r+=this.modules[o++].rules.length;r+=n.rules.length,o++}}if(i)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let i=e.head||e;this.styleTag.parentNode!=i&&i.insertBefore(this.styleTag,i.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var Vi={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:"'"},Di={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},ji="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ui="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ni=0;Ni<10;Ni++)Vi[48+Ni]=Vi[96+Ni]=String(Ni);for(Ni=1;Ni<=24;Ni++)Vi[Ni+111]="F"+Ni;for(Ni=65;Ni<=90;Ni++)Vi[Ni]=String.fromCharCode(Ni+32),Di[Ni]=String.fromCharCode(Ni);for(var Ii in Vi)Di.hasOwnProperty(Ii)||(Di[Ii]=Vi[Ii]);function Bi(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function Gi(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Li(t,e){if(!e.anchorNode)return!1;try{return Gi(t,e.anchorNode)}catch(t){return!1}}function Hi(t){return 3==t.nodeType?hr(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function Fi(t,e,i,r){return!!i&&(tr(t,e,i,r,-1)||tr(t,e,i,r,1))}function Ki(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function Ji(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function tr(t,e,i,r,o){for(;;){if(t==i&&e==r)return!0;if(e==(o<0?0:er(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=Ki(t)+(o<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(o<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=o<0?er(t):0}}}function er(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function ir(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function rr(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function or(t,e){let i=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:i,scaleY:r}}class nr{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?er(e):0),i,Math.min(t.focusOffset,i?er(i):0))}set(t,e,i,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}let sr,ar=null;function lr(t){if(t.setActive)return t.setActive();if(ar)return t.focus(ar);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==ar?{get preventScroll(){return ar={preventScroll:!0},!0}}:void 0),!ar){ar=!1;for(let t=0;t<e.length;){let i=e[t++],r=e[t++],o=e[t++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=o&&(i.scrollLeft=o)}}}function hr(t,e,i=e){let r=sr||(sr=document.createRange());return r.setEnd(t,i),r.setStart(t,e),r}function cr(t,e,i,r){let o={key:e,code:e,keyCode:i,which:i,cancelable:!0};r&&({altKey:o.altKey,ctrlKey:o.ctrlKey,shiftKey:o.shiftKey,metaKey:o.metaKey}=r);let n=new KeyboardEvent("keydown",o);n.synthetic=!0,t.dispatchEvent(n);let s=new KeyboardEvent("keyup",o);return s.synthetic=!0,t.dispatchEvent(s),n.defaultPrevented||s.defaultPrevented}function dr(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function ur(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function fr(t,e){for(let i=t,r=e;;){if(3==i.nodeType&&r>0)return{node:i,offset:r};if(1==i.nodeType&&r>0){if("false"==i.contentEditable)return null;i=i.childNodes[r-1],r=er(i)}else{if(!i.parentNode||Ji(i))return null;r=Ki(i),i=i.parentNode}}}function pr(t,e){for(let i=t,r=e;;){if(3==i.nodeType&&r<i.nodeValue.length)return{node:i,offset:r};if(1==i.nodeType&&r<i.childNodes.length){if("false"==i.contentEditable)return null;i=i.childNodes[r],r=0}else{if(!i.parentNode||Ji(i))return null;r=Ki(i)+1,i=i.parentNode}}}class Or{constructor(t,e,i=!0){this.node=t,this.offset=e,this.precise=i}static before(t,e){return new Or(t.parentNode,Ki(t),e)}static after(t,e){return new Or(t.parentNode,Ki(t)+1,e)}}const gr=[];class mr{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let i of this.children){if(i==t)return e;e+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let i,r=this.dom,o=null;for(let n of this.children){if(7&n.flags){if(!n.dom&&(i=o?o.nextSibling:r.firstChild)){let t=mr.get(i);(!t||!t.parent&&t.canReuseDOM(n))&&n.reuseDOM(i)}n.sync(t,e),n.flags&=-8}if(i=o?o.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&i!=n.dom&&(e.written=!0),n.dom.parentNode==r)for(;i&&i!=n.dom;)i=br(i);else r.insertBefore(n.dom,i);o=n.dom}for(i=o?o.nextSibling:r.firstChild,i&&e&&e.node==r&&(e.written=!0);i;)i=br(i)}else if(1&this.flags)for(let i of this.children)7&i.flags&&(i.sync(t,e),i.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let i;if(t==this.dom)i=this.dom.childNodes[e];else{let r=0==er(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}i=r<0?t:t.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!mr.get(i);)i=i.nextSibling;if(!i)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==i)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,i=0){let r=-1,o=-1,n=-1,s=-1;for(let a=0,l=i,h=i;a<this.children.length;a++){let i=this.children[a],c=l+i.length;if(l<t&&c>e)return i.domBoundsAround(t,e,l);if(c>=t&&-1==r&&(r=a,o=l),l>e&&i.dom.parentNode==this.dom){n=a,s=h;break}h=c,l=c+i.breakAfter}return{from:o,to:s<0?i+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:n<this.children.length&&n>=0?this.children[n].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=gr){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&i.indexOf(t)<0&&t.destroy()}this.children.splice(t,e-t,...i);for(let t=0;t<i.length;t++)i[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new vr(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,i,r,o,n){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function br(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}mr.prototype.breakAfter=0;class vr{constructor(t,e,i){this.children=t,this.pos=e,this.i=i,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function wr(t,e,i,r,o,n,s,a,l){let{children:h}=t,c=h.length?h[e]:null,d=n.length?n[n.length-1]:null,u=d?d.breakAfter:s;if(!(e==r&&c&&!s&&!u&&n.length<2&&c.merge(i,o,n.length?d:null,0==i,a,l))){if(r<h.length){let t=h[r];t&&(o<t.length||t.breakAfter&&(null==d?void 0:d.breakAfter))?(e==r&&(t=t.split(o),o=0),!u&&d&&t.merge(0,o,d,!0,0,l)?n[n.length-1]=t:((o||t.children.length&&!t.children[0].length)&&t.merge(0,o,null,!1,0,l),n.push(t))):(null==t?void 0:t.breakAfter)&&(d?d.breakAfter=1:s=1),r++}for(c&&(c.breakAfter=s,i>0&&(!s&&n.length&&c.merge(i,c.length,n[0],!1,a,0)?c.breakAfter=n.shift().breakAfter:(i<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(i,c.length,null,!1,a,0),e++));e<r&&n.length;)if(h[r-1].become(n[n.length-1]))r--,n.pop(),l=n.length?0:a;else{if(!h[e].become(n[0]))break;e++,n.shift(),a=n.length?0:l}!n.length&&e&&r<h.length&&!h[e-1].breakAfter&&h[r].merge(0,0,h[e-1],!1,a,l)&&e--,(e<r||n.length)&&t.replaceChildren(e,r,n)}}function yr(t,e,i,r,o,n){let s=t.childCursor(),{i:a,off:l}=s.findPos(i,1),{i:h,off:c}=s.findPos(e,-1),d=e-i;for(let t of r)d+=t.length;t.length+=d,wr(t,h,c,a,l,r,0,o,n)}let xr="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},Sr="undefined"!=typeof document?document:{documentElement:{style:{}}};const kr=/Edge\/(\d+)/.exec(xr.userAgent),Qr=/MSIE \d/.test(xr.userAgent),$r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(xr.userAgent),Pr=!!(Qr||$r||kr),Zr=!Pr&&/gecko\/(\d+)/i.test(xr.userAgent),Tr=!Pr&&/Chrome\/(\d+)/.exec(xr.userAgent),Rr="webkitFontSmoothing"in Sr.documentElement.style,Ar=!Pr&&/Apple Computer/.test(xr.vendor),Cr=Ar&&(/Mobile\/\w+/.test(xr.userAgent)||xr.maxTouchPoints>2);var Xr={mac:Cr||/Mac/.test(xr.platform),windows:/Win/.test(xr.platform),linux:/Linux|X11/.test(xr.platform),ie:Pr,ie_version:Qr?Sr.documentMode||6:$r?+$r[1]:kr?+kr[1]:0,gecko:Zr,gecko_version:Zr?+(/Firefox\/(\d+)/.exec(xr.userAgent)||[0,0])[1]:0,chrome:!!Tr,chrome_version:Tr?+Tr[1]:0,ios:Cr,android:/Android\b/.test(xr.userAgent),webkit:Rr,safari:Ar,webkit_version:Rr?+(/\bAppleWebKit\/(\d+)/.exec(xr.userAgent)||[0,0])[1]:0,tabSize:null!=Sr.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Mr extends mr{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return!(8&this.flags||i&&(!(i instanceof Mr)||this.length-(e-t)+i.length>256||8&i.flags)||(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new Mr(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new Or(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,i){let r=t.nodeValue.length;e>r&&(e=r);let o=e,n=e,s=0;0==e&&i<0||e==r&&i>=0?Xr.chrome||Xr.gecko||(e?(o--,s=1):n<r&&(n++,s=-1)):i<0?o--:n<r&&n++;let a=hr(t,o,n).getClientRects();if(!a.length)return null;let l=a[(s?s<0:i>=0)?0:a.length-1];return Xr.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l),s?ir(l,s<0):l||null}(this.dom,t,e)}}class _r extends mr{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}setAttrs(t){if(dr(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,i,r,o,n){return!(i&&(!(i instanceof _r&&i.mark.eq(this.mark))||t&&o<=0||e<this.length&&n<=0)||(yr(this,t,e,i?i.children.slice():[],o-1,n-1),this.markDirty(),0))}split(t){let e=[],i=0,r=-1,o=0;for(let n of this.children){let s=i+n.length;s>t&&e.push(i<t?n.split(t-i):n),r<0&&i>=t&&(r=o),i=s,o++}let n=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new _r(this.mark,e,n)}domAtPos(t){return zr(this,t)}coordsAt(t,e){return Yr(this,t,e)}}class qr extends mr{static create(t,e,i){return new qr(t,e,i)}constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}split(t){let e=qr.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,i,r,o,n){return!(i&&(!(i instanceof qr&&this.widget.compare(i.widget))||t>0&&o<=0||e<this.length&&n<=0)||(this.length=t+(i?i.length:0)+(this.length-e),0))}become(t){return t instanceof qr&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return Ht.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,i=e&&e.state.doc,r=this.posAtStart;return i?i.slice(r,r+this.length):Ht.empty}domAtPos(t){return(this.length?0==t:this.side>0)?Or.before(this.dom):Or.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.widget.coordsAt(this.dom,t,e);if(i)return i;let r=this.dom.getClientRects(),o=null;if(!r.length)return null;let n=this.side?this.side<0:t>0;for(let e=n?r.length-1:0;o=r[e],!(t>0?0==e:e==r.length-1||o.top<o.bottom);e+=n?-1:1);return ir(o,!n)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Wr extends mr{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Wr&&t.side==this.side}split(){return new Wr(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?Or.before(this.dom):Or.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Ht.empty}get isHidden(){return!0}}function zr(t,e){let i=t.dom,{children:r}=t,o=0;for(let t=0;o<r.length;o++){let n=r[o],s=t+n.length;if(!(s==t&&n.getSide()<=0)){if(e>t&&e<s&&n.dom.parentNode==i)return n.domAtPos(e-t);if(e<=t)break;t=s}}for(let t=o;t>0;t--){let e=r[t-1];if(e.dom.parentNode==i)return e.domAtPos(e.length)}for(let t=o;t<r.length;t++){let e=r[t];if(e.dom.parentNode==i)return e.domAtPos(0)}return new Or(i,0)}function Er(t,e,i){let r,{children:o}=t;i>0&&e instanceof _r&&o.length&&(r=o[o.length-1])instanceof _r&&r.mark.eq(e.mark)?Er(r,e.children[0],i-1):(o.push(e),e.setParent(t)),t.length+=e.length}function Yr(t,e,i){let r=null,o=-1,n=null,s=-1;!function t(e,a){for(let l=0,h=0;l<e.children.length&&h<=a;l++){let c=e.children[l],d=h+c.length;d>=a&&(c.children.length?t(c,a-h):(!n||n.isHidden&&i>0)&&(d>a||h==d&&c.getSide()>0)?(n=c,s=a-h):(h<a||h==d&&c.getSide()<0&&!c.isHidden)&&(r=c,o=a-h)),h=d}}(t,e);let a=(i<0?r:n)||r||n;return a?a.coordsAt(Math.max(0,a==r?o:s),i):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let i=Hi(e);return i[i.length-1]||null}(t)}function Vr(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}Mr.prototype.children=qr.prototype.children=Wr.prototype.children=gr;const Dr=Object.create(null);function jr(t,e,i){if(t==e)return!0;t||(t=Dr),e||(e=Dr);let r=Object.keys(t),o=Object.keys(e);if(r.length-(i&&r.indexOf(i)>-1?1:0)!=o.length-(i&&o.indexOf(i)>-1?1:0))return!1;for(let n of r)if(n!=i&&(-1==o.indexOf(n)||t[n]!==e[n]))return!1;return!0}function Ur(t,e,i){let r=!1;if(e)for(let o in e)i&&o in i||(r=!0,"style"==o?t.style.cssText="":t.removeAttribute(o));if(i)for(let o in i)e&&e[o]==i[o]||(r=!0,"style"==o?t.style.cssText=i[o]:t.setAttribute(o,i[o]));return r}function Nr(t){let e=Object.create(null);for(let i=0;i<t.attributes.length;i++){let r=t.attributes[i];e[r.name]=r.value}return e}class Ir extends mr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,r,o,n){if(i){if(!(i instanceof Ir))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),yr(this,t,e,i?i.children.slice():[],o,n),!0}split(t){let e=new Ir;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i,off:r}=this.childPos(t);r&&(e.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let t=i;t<this.children.length;t++)e.append(this.children[t],0);for(;i>0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){jr(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Er(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=Vr(e,this.attrs||{})),i&&(this.attrs=Vr({class:i},this.attrs||{}))}domAtPos(t){return zr(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var i;this.dom?4&this.flags&&(dr(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Ur(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&mr.get(r)instanceof _r;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(i=mr.get(r))||void 0===i?void 0:i.isEditable)||Xr.ios&&this.children.some((t=>t instanceof Mr))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let i of this.children){if(!(i instanceof Mr)||/[^ -~]/.test(i.text))return null;let r=Hi(i.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let i=Yr(this,t,e);if(!this.children.length&&i&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=i.bottom-i.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:i.top+r,bottom:i.bottom-r,left:i.left,right:i.left}}}return i}become(t){return!1}covers(){return!0}static find(t,e){for(let i=0,r=0;i<t.children.length;i++){let o=t.children[i],n=r+o.length;if(n>=e){if(o instanceof Ir)return o;if(n>e)break}r=n+o.breakAfter}return null}}class Br extends mr{constructor(t,e,i){super(),this.widget=t,this.length=e,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,r,o,n){return!(i&&(!(i instanceof Br&&this.widget.compare(i.widget))||t>0&&o<=0||e<this.length&&n<=0)||(this.length=t+(i?i.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?Or.before(this.dom):Or.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let i=new Br(this.widget,e,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return gr}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):Ht.empty}domBoundsAround(){return null}become(t){return t instanceof Br&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:i}=this.deco;return e!=i&&(t<0?e<0:i>0)}}class Gr{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var Lr=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Lr||(Lr={}));class Hr extends mi{constructor(t,e,i,r){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(t){return new Fr(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),i=!!t.block;return e+=i&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new Jr(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,r=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:o,end:n}=to(t,r);e=(o?r?-3e8:-1:5e8)-1,i=1+(n?r?2e8:1:-6e8)}return new Jr(t,e,i,r,t.widget||null,!0)}static line(t){return new Kr(t)}static set(t,e=!1){return yi.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Hr.none=yi.empty;class Fr extends Hr{constructor(t){let{start:e,end:i}=to(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,i;return this==t||t instanceof Fr&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(i=t.attrs)||void 0===i?void 0:i.class))&&jr(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Fr.prototype.point=!1;class Kr extends Hr{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Kr&&this.spec.class==t.spec.class&&jr(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Kr.prototype.mapMode=ve.TrackBefore,Kr.prototype.point=!0;class Jr extends Hr{constructor(t,e,i,r,o,n){super(e,i,o,t),this.block=r,this.isReplace=n,this.mapMode=r?e<=0?ve.TrackBefore:ve.TrackAfter:ve.TrackDel}get type(){return this.startSide!=this.endSide?Lr.WidgetRange:this.startSide<=0?Lr.WidgetBefore:Lr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof Jr&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function to(t,e=!1){let{inclusiveStart:i,inclusiveEnd:r}=t;return null==i&&(i=t.inclusive),null==r&&(r=t.inclusive),{start:null!=i?i:e,end:null!=r?r:e}}function eo(t,e,i,r=0){let o=i.length-1;o>=0&&i[o]+r>=t?i[o]=Math.max(i[o],e):i.push(t,e)}Jr.prototype.point=!0;class io{constructor(t,e,i,r){this.doc=t,this.pos=e,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof Br&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Ir),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ro(new Wr(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof Br||this.getLine()}buildText(t,e,i){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(ro(new Mr(this.text.slice(this.textOff,this.textOff+r)),e),i),this.atCursorPos=!0,this.textOff+=r,t-=r,i=0}}span(t,e,i,r){this.buildText(e-t,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,i,r,o,n){if(this.disallowBlockEffectsFor[n]&&i instanceof Jr){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=e-t;if(i instanceof Jr)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Br(i.widget||oo.block,s,i));else{let n=qr.create(i.widget||oo.inline,s,s?0:i.startSide),a=this.atCursorPos&&!n.isEditable&&o<=r.length&&(t<e||i.startSide>0),l=!n.isEditable&&(t<e||o>r.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||a||n.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(h.append(ro(new Wr(1),r),o),o=r.length+Math.max(0,o-r.length)),h.append(ro(n,r),o),this.atCursorPos=l,this.pendingBuffer=l?t<e||o>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=o)}static build(t,e,i,r,o){let n=new io(t,e,i,o);return n.openEnd=yi.spans(r,e,i,n),n.openStart<0&&(n.openStart=n.openEnd),n.finish(n.openEnd),n}}function ro(t,e){for(let i of e)t=new _r(i,[t],t.length);return t}class oo extends Gr{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}oo.inline=new oo("span"),oo.block=new oo("div");var no=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(no||(no={}));const so=no.LTR,ao=no.RTL;function lo(t){let e=[];for(let i=0;i<t.length;i++)e.push(1<<+t[i]);return e}const ho=lo("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),co=lo("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),uo=Object.create(null),fo=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),i=t.charCodeAt(1);uo[e]=i,uo[i]=-e}function po(t){return t<=247?ho[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?co[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const Oo=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class go{get dir(){return this.level%2?ao:so}constructor(t,e,i){this.from=t,this.to=e,this.level=i}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,i,r){let o=-1;for(let n=0;n<t.length;n++){let s=t[n];if(s.from<=e&&s.to>=e){if(s.level==i)return n;(o<0||(0!=r?r<0?s.from<e:s.to>e:t[o].level>s.level))&&(o=n)}}if(o<0)throw new RangeError("Index out of range");return o}}function mo(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],o=e[i];if(r.from!=o.from||r.to!=o.to||r.direction!=o.direction||!mo(r.inner,o.inner))return!1}return!0}const bo=[];function vo(t,e,i,r,o,n,s){let a=r%2?2:1;if(r%2==o%2)for(let l=e,h=0;l<i;){let e=!0,c=!1;if(h==n.length||l<n[h].from){let t=bo[l];t!=a&&(e=!1,c=16==t)}let d=e||1!=a?null:[],u=e?r:r+1,f=l;t:for(;;)if(h<n.length&&f==n[h].from){if(c)break t;let p=n[h];if(!e)for(let t=p.to,e=h+1;;){if(t==i)break t;if(!(e<n.length&&n[e].from==t)){if(bo[t]==a)break t;break}t=n[e++].to}h++,d?d.push(p):(p.from>l&&s.push(new go(l,p.from,u)),wo(t,p.direction==so!=!(u%2)?r+1:r,o,p.inner,p.from,p.to,s),l=p.to),f=p.to}else{if(f==i||(e?bo[f]!=a:bo[f]==a))break;f++}d?vo(t,l,f,r+1,o,d,s):l<f&&s.push(new go(l,f,u)),l=f}else for(let l=i,h=n.length;l>e;){let i=!0,c=!1;if(!h||l>n[h-1].to){let t=bo[l-1];t!=a&&(i=!1,c=16==t)}let d=i||1!=a?null:[],u=i?r:r+1,f=l;t:for(;;)if(h&&f==n[h-1].to){if(c)break t;let p=n[--h];if(!i)for(let t=p.from,i=h;;){if(t==e)break t;if(!i||n[i-1].to!=t){if(bo[t-1]==a)break t;break}t=n[--i].from}d?d.push(p):(p.to<l&&s.push(new go(p.to,l,u)),wo(t,p.direction==so!=!(u%2)?r+1:r,o,p.inner,p.from,p.to,s),l=p.from),f=p.from}else{if(f==e||(i?bo[f-1]!=a:bo[f-1]==a))break;f--}d?vo(t,f,l,r+1,o,d,s):f<l&&s.push(new go(f,l,u)),l=f}}function wo(t,e,i,r,o,n,s){let a=e%2?2:1;!function(t,e,i,r,o){for(let n=0;n<=r.length;n++){let s=n?r[n-1].to:e,a=n<r.length?r[n].from:i,l=n?256:o;for(let e=s,i=l,r=l;e<a;e++){let o=po(t.charCodeAt(e));512==o?o=i:8==o&&4==r&&(o=16),bo[e]=4==o?2:o,7&o&&(r=o),i=o}for(let t=s,e=l,r=l;t<a;t++){let o=bo[t];if(128==o)t<a-1&&e==bo[t+1]&&24&e?o=bo[t]=e:bo[t]=256;else if(64==o){let o=t+1;for(;o<a&&64==bo[o];)o++;let n=t&&8==e||o<i&&8==bo[o]?1==r?1:8:256;for(let e=t;e<o;e++)bo[e]=n;t=o-1}else 8==o&&1==r&&(bo[t]=1);e=o,7&o&&(r=o)}}}(t,o,n,r,a),function(t,e,i,r,o){let n=1==o?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let h=s?r[s-1].to:e,c=s<r.length?r[s].from:i;for(let e,i,r,s=h;s<c;s++)if(i=uo[e=t.charCodeAt(s)])if(i<0){for(let t=a-3;t>=0;t-=3)if(fo[t+1]==-i){let e=fo[t+2],i=2&e?o:4&e?1&e?n:o:0;i&&(bo[s]=bo[fo[t]]=i),a=t;break}}else{if(189==fo.length)break;fo[a++]=s,fo[a++]=e,fo[a++]=l}else if(2==(r=bo[s])||1==r){let t=r==o;l=t?0:1;for(let e=a-3;e>=0;e-=3){let i=fo[e+2];if(2&i)break;if(t)fo[e+2]|=2;else{if(4&i)break;fo[e+2]|=4}}}}}(t,o,n,r,a),function(t,e,i,r){for(let o=0,n=r;o<=i.length;o++){let s=o?i[o-1].to:t,a=o<i.length?i[o].from:e;for(let l=s;l<a;){let s=bo[l];if(256==s){let s=l+1;for(;;)if(s==a){if(o==i.length)break;s=i[o++].to,a=o<i.length?i[o].from:e}else{if(256!=bo[s])break;s++}let h=1==n,c=h==(1==(s<e?bo[s]:r))?h?1:2:r;for(let e=s,r=o,n=r?i[r-1].to:t;e>l;)e==n&&(e=i[--r].from,n=r?i[r-1].to:t),bo[--e]=c;l=s}else n=s,l++}}}(o,n,r,a),vo(t,o,n,e,i,r,s)}function yo(t){return[new go(0,t,0)]}let xo="";function So(t,e,i,r,o){var n;let s=r.head-t.from,a=go.find(e,s,null!==(n=r.bidiLevel)&&void 0!==n?n:-1,r.assoc),l=e[a],h=l.side(o,i);if(s==h){let t=a+=o?1:-1;if(t<0||t>=e.length)return null;l=e[a=t],s=l.side(!o,i),h=l.side(o,i)}let c=ce(t.text,s,l.forward(o,i));(c<l.from||c>l.to)&&(c=h),xo=t.text.slice(Math.min(s,c),Math.max(s,c));let d=a==(o?e.length-1:0)?null:e[a+(o?1:-1)];return d&&c==h&&d.level+(o?0:1)<l.level?Te.cursor(d.side(!o,i)+t.from,d.forward(o,i)?1:-1,d.level):Te.cursor(c+t.from,l.forward(o,i)?-1:1,l.level)}function ko(t,e,i){for(let r=e;r<i;r++){let e=po(t.charCodeAt(r));if(1==e)return so;if(2==e||4==e)return ao}return so}const Qo=Ce.define(),$o=Ce.define(),Po=Ce.define(),Zo=Ce.define(),To=Ce.define(),Ro=Ce.define(),Ao=Ce.define(),Co=Ce.define({combine:t=>t.some((t=>t))}),Xo=Ce.define({combine:t=>t.some((t=>t))}),Mo=Ce.define();class _o{constructor(t,e="nearest",i="nearest",r=5,o=5,n=!1){this.range=t,this.y=e,this.x=i,this.yMargin=r,this.xMargin=o,this.isSnapshot=n}map(t){return t.empty?this:new _o(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new _o(Te.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const qo=oi.define({map:(t,e)=>t.map(e)});function Wo(t,e,i){let r=t.facet(Zo);r.length?r[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const zo=Ce.define({combine:t=>!t.length||t[0]});let Eo=0;const Yo=Ce.define();class Vo{constructor(t,e,i,r,o){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=r,this.extension=o(this)}static define(t,e){const{eventHandlers:i,eventObservers:r,provide:o,decorations:n}=e||{};return new Vo(Eo++,t,i,r,(t=>{let e=[Yo.of(t)];return n&&e.push(No.of((e=>{let i=e.plugin(t);return i?n(i):Hr.none}))),o&&e.push(o(t)),e}))}static fromClass(t,e){return Vo.define((e=>new t(e)),e)}}class Do{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(Wo(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){Wo(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){Wo(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const jo=Ce.define(),Uo=Ce.define(),No=Ce.define(),Io=Ce.define(),Bo=Ce.define(),Go=Ce.define();function Lo(t,e){let i=t.state.facet(Go);if(!i.length)return i;let r=i.map((e=>e instanceof Function?e(t):e)),o=[];return yi.spans(r,e.from,e.to,{point(){},span(t,i,r,n){let s=t-e.from,a=i-e.from,l=o;for(let t=r.length-1;t>=0;t--,n--){let i,o=r[t].spec.bidiIsolate;if(null==o&&(o=ko(e.text,s,a)),n>0&&l.length&&(i=l[l.length-1]).to==s&&i.direction==o)i.to=a,l=i.inner;else{let t={from:s,to:a,direction:o,inner:[]};l.push(t),l=t.inner}}}}),o}const Ho=Ce.define();function Fo(t){let e=0,i=0,r=0,o=0;for(let n of t.state.facet(Ho)){let s=n(t);s&&(null!=s.left&&(e=Math.max(e,s.left)),null!=s.right&&(i=Math.max(i,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(o=Math.max(o,s.bottom)))}return{left:e,right:i,top:r,bottom:o}}const Ko=Ce.define();class Jo{constructor(t,e,i,r){this.fromA=t,this.toA=e,this.fromB=i,this.toB=r}join(t){return new Jo(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),t.splice(e-1,1)}}return t.splice(e,0,i),t}static extendWithRanges(t,e){if(0==e.length)return t;let i=[];for(let r=0,o=0,n=0,s=0;;r++){let a=r==t.length?null:t[r],l=n-s,h=a?a.fromB:1e9;for(;o<e.length&&e[o]<h;){let t=e[o],r=e[o+1],n=Math.max(s,t),a=Math.min(h,r);if(n<=a&&new Jo(n+l,a+l,n,a).addToSet(i),r>h)break;o+=2}if(!a)return i;new Jo(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),n=a.toA,s=a.toB}}}class tn{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=ye.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let r=[];this.changes.iterChangedRanges(((t,e,i,o)=>r.push(new Jo(t,e,i,o)))),this.changedRanges=r}static create(t,e,i){return new tn(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class en extends mr{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new Ir],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Jo(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let i=!1;return e&&t.iterChangedRanges(((t,r)=>{t<e.to&&r>e.from&&(i=!0)})),i}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let o=r>-1?function(t,e,i){let r=on(t,i);if(!r)return null;let{node:o,from:n,to:s}=r,a=o.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,h=new Jo(l.mapPos(n),l.mapPos(s),n,s),c=[];for(let e=o.parentNode;;e=e.parentNode){let i=mr.get(e);if(i instanceof _r)c.push({node:e,deco:i.mark});else{if(i instanceof Ir||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:h,text:o,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new Fr({inclusive:!0,attributes:Nr(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;i=new Jo(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Xr.ie||Xr.chrome)&&!o&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let n=function(t,e,i){let r=new nn;return yi.compare(t,e,i,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return i=Jo.extendWithRanges(i,n),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,t.startState.doc.length,o),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=Xr.chrome||Xr.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let o=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof Br&&t.widget instanceof rn&&o.push(t.dom);r.updateGaps(o)}updateChildren(t,e,i){let r=i?i.range.addToSet(t.slice()):t,o=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let n,s,a,l,{fromA:h,toA:c,fromB:d,toB:u}=e;if(i&&i.range.fromB<u&&i.range.toB>d){let t=io.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),e=io.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);s=t.breakAtStart,a=t.openStart,l=e.openEnd;let r=this.compositionView(i);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),n=t.content.concat(r).concat(e.content)}else({content:n,breakAtStart:s,openStart:a,openEnd:l}=io.build(this.view.state.doc,d,u,this.decorations,this.dynamicDecorationMap));let{i:f,off:p}=o.findPos(c,1),{i:O,off:g}=o.findPos(h,-1);wr(this,O,g,f,p,n,s,a,l)}i&&this.fixCompositionDOM(i)}compositionView(t){let e=new Mr(t.text.nodeValue);e.flags|=8;for(let{deco:i}of t.marks)e=new _r(i,[e],e.length);let i=new Ir;return i.append(e,0),i}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let i=mr.get(t);i&&i!=e&&(i.dom=null),e.setDOM(t)},i=this.childPos(t.range.fromB,1),r=this.children[i.i];e(t.line,r);for(let o=t.marks.length-1;o>=-1;o--)i=r.childPos(i.off,1),r=r.children[i.i],e(o>=0?t.marks[o].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,o=!r&&Li(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||e||o))return;let n=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(Xr.gecko&&s.empty&&!this.hasComposition&&1==(h=a).node.nodeType&&h.node.firstChild&&(0==h.offset||"false"==h.node.childNodes[h.offset-1].contentEditable)&&(h.offset==h.node.childNodes.length||"false"==h.node.childNodes[h.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(t,a.node.childNodes[a.offset]||null))),a=l=new Or(t,0),n=!0}var h;let c=this.view.observer.selectionRange;!n&&c.focusNode&&(Fi(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Fi(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,s))||(this.view.observer.ignore((()=>{Xr.android&&Xr.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Bi(this.view.root);if(t)if(s.empty){if(Xr.gecko){let t=(e=a.node,r=a.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?fr:pr)(a.node,a.offset);e&&(a=new Or(e.node,e.offset))}}t.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=s.bidiLevel)}else if(t.extend){t.collapse(a.node,a.offset);try{t.extend(l.node,l.offset)}catch(t){}}else{let e=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),e.setEnd(l.node,l.offset),e.setStart(a.node,a.offset),t.removeAllRanges(),t.addRange(e)}var e,r;o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new Or(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new Or(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&Fi(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=Bi(t.root),{anchorNode:r,anchorOffset:o}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let n=Ir.find(this,e.head);if(!n)return;let s=n.posAtStart;if(e.head==s||e.head==s+n.length)return;let a=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(e.head+e.assoc);i.collapse(h.node,h.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&i.collapse(r,o)}moveToLine(t){let e,i=this.dom;if(t.node!=i)return t;for(let r=t.offset;!e&&r<i.childNodes.length;r++){let t=mr.get(i.childNodes[r]);t instanceof Ir&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=mr.get(i.childNodes[r]);t instanceof Ir&&(e=t.domAtPos(t.length))}return e?new Or(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=mr.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(i<t.length||t instanceof Ir)break;e++,i=0}return this.children[e].domAtPos(i)}coordsAt(t,e){let i=null,r=0;for(let o=this.length,n=this.children.length-1;n>=0;n--){let s=this.children[n],a=o-s.breakAfter,l=a-s.length;if(a<t)break;if(l<=t&&(l<t||s.covers(-1))&&(a>t||s.covers(1))&&(!i||s instanceof Ir&&!(i instanceof Ir&&e>=0)))i=s,r=l;else if(i&&l==t&&a==t&&s instanceof Br&&Math.abs(e)<2){if(s.deco.startSide<0)break;n&&(i=null)}o=l}return i?i.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:i}=this.childPos(t,1),r=this.children[e];if(!(r instanceof Ir))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(i,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}i=e}if(!(r instanceof Mr))return null;let o=ce(r.text,i);if(o==i)return null;let n=hr(r.dom,i,o).getClientRects();for(let t=0;t<n.length;t++){let e=n[t];if(t==n.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:i,to:r}=t,o=this.view.contentDOM.clientWidth,n=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==no.LTR;for(let t=0,l=0;l<this.children.length;l++){let h=this.children[l],c=t+h.length;if(c>r)break;if(t>=i){let i=h.dom.getBoundingClientRect();if(e.push(i.height),n){let e=h.dom.lastChild,r=e?Hi(e):[];if(r.length){let e=r[r.length-1],n=a?e.right-i.left:i.right-e.left;n>s&&(s=n,this.minWidth=o,this.minWidthFrom=t,this.minWidthTo=c)}}}t=c+h.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?no.RTL:no.LTR}measureTextSize(){for(let t of this.children)if(t instanceof Ir){let e=t.measureTextSize();if(e)return e}let t,e,i,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let o=Hi(r.firstChild)[0];t=r.getBoundingClientRect().height,e=o?o.width/27:7,i=o?o.height:t,r.remove()})),{lineHeight:t,charWidth:e,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new vr(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,r=0;;r++){let o=r==e.viewports.length?null:e.viewports[r],n=o?o.from-1:this.length;if(n>i){let r=(e.lineBlockAt(n).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(Hr.replace({widget:new rn(r),block:!0,inclusive:!0,isBlockGap:!0}).range(i,n))}if(!o)break;i=o.to+1}return Hr.set(t)}updateDeco(){let t=0,e=this.view.state.facet(No).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),i=!1,r=this.view.state.facet(Io).map(((t,e)=>{let r="function"==typeof t;return r&&(i=!0),r?t(this.view):t}));for(r.length&&(this.dynamicDecorationMap[t++]=i,e.push(yi.join(r))),this.decorations=[...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(Mo))try{if(e(this.view,t.range,t))return!0}catch(t){Wo(this.view.state,t,"scroll handler")}let e,{range:i}=t,r=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1);if(!r)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let o=Fo(this.view),n={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(t,e,i,r,o,n,s,a){let l=t.ownerDocument,h=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(1==c.nodeType){let t,u=c==l.body,f=1,p=1;if(u)t=rr(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:f,scaleY:p}=or(c,e)),t={left:e.left,right:e.left+c.clientWidth*f,top:e.top,bottom:e.top+c.clientHeight*p}}let O=0,g=0;if("nearest"==o)e.top<t.top?(g=-(t.top-e.top+s),i>0&&e.bottom>t.bottom+g&&(g=e.bottom-t.bottom+g+s)):e.bottom>t.bottom&&(g=e.bottom-t.bottom+s,i<0&&e.top-g<t.top&&(g=-(t.top+g-e.top+s)));else{let r=e.bottom-e.top,n=t.bottom-t.top;g=("center"==o&&r<=n?e.top+r/2-n/2:"start"==o||"center"==o&&i<0?e.top-s:e.bottom-n+s)-t.top}if("nearest"==r?e.left<t.left?(O=-(t.left-e.left+n),i>0&&e.right>t.right+O&&(O=e.right-t.right+O+n)):e.right>t.right&&(O=e.right-t.right+n,i<0&&e.left<t.left+O&&(O=-(t.left+O-e.left+n))):O=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==a?e.left-n:e.right-(t.right-t.left)+n)-t.left,O||g)if(u)h.scrollBy(O,g);else{let t=0,i=0;if(g){let t=c.scrollTop;c.scrollTop+=g/p,i=(c.scrollTop-t)*p}if(O){let e=c.scrollLeft;c.scrollLeft+=O/f,t=(c.scrollLeft-e)*f}e={left:e.left-t,top:e.top-i,right:e.right-t,bottom:e.bottom-i},t&&Math.abs(t-O)<1&&(r="nearest"),i&&Math.abs(i-g)<1&&(o="nearest")}if(u)break;c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,n,i.head<i.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,s),-s),Math.max(Math.min(t.yMargin,a),-a),this.view.textDirection==no.LTR)}}class rn extends Gr{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function on(t,e){let i=t.observer.selectionRange;if(!i.focusNode)return null;let r=fr(i.focusNode,i.focusOffset),o=pr(i.focusNode,i.focusOffset),n=r||o;if(o&&r&&o.node!=r.node){let e=mr.get(o.node);if(!e||e instanceof Mr&&e.text!=o.node.nodeValue)n=o;else if(t.docView.lastCompositionAfterCursor){let t=mr.get(r.node);!t||t instanceof Mr&&t.text!=r.node.nodeValue||(n=o)}}if(t.docView.lastCompositionAfterCursor=n!=r,!n)return null;let s=e-n.offset;return{from:s,to:s+n.node.nodeValue.length,node:n.node}}let nn=class{constructor(){this.changes=[]}compareRange(t,e){eo(t,e,this.changes)}comparePoint(t,e){eo(t,e,this.changes)}};function sn(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function an(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function ln(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function hn(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function cn(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function dn(t,e,i){let r,o,n,s,a,l,h,c,d=!1;for(let u=t.firstChild;u;u=u.nextSibling){let t=Hi(u);for(let f=0;f<t.length;f++){let p=t[f];o&&ln(o,p)&&(p=hn(cn(p,o.bottom),o.top));let O=sn(e,p),g=an(i,p);if(0==O&&0==g)return 3==u.nodeType?un(u,e,i):dn(u,e,i);if(!r||s>g||s==g&&n>O){r=u,o=p,n=O,s=g;let a=g?i<p.top?-1:1:O?e<p.left?-1:1:0;d=!a||(a>0?f<t.length-1:f>0)}0==O?i>p.bottom&&(!h||h.bottom<p.bottom)?(a=u,h=p):i<p.top&&(!c||c.top>p.top)&&(l=u,c=p):h&&ln(h,p)?h=cn(h,p.bottom):c&&ln(c,p)&&(c=hn(c,p.top))}}if(h&&h.bottom>=i?(r=a,o=h):c&&c.top<=i&&(r=l,o=c),!r)return{node:t,offset:0};let u=Math.max(o.left,Math.min(o.right,e));return 3==r.nodeType?un(r,u,i):d&&"false"!=r.contentEditable?dn(r,u,i):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(o.left+o.right)/2?1:0)}}function un(t,e,i){let r=t.nodeValue.length,o=-1,n=1e9,s=0;for(let a=0;a<r;a++){let r=hr(t,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let h=r[l];if(h.top==h.bottom)continue;s||(s=e-h.left);let c=(h.top>i?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c<n){let i=e>=(h.left+h.right)/2,r=i;if((Xr.chrome||Xr.gecko)&&hr(t,a).getBoundingClientRect().left==h.right&&(r=!i),c<=0)return{node:t,offset:a+(r?1:0)};o=a+(r?1:0),n=c}}}return{node:t,offset:o>-1?o:s>0?t.nodeValue.length:0}}function fn(t,e,i,r=-1){var o,n;let s,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:h}=t.viewState,{x:c,y:d}=e,u=d-l;if(u<0)return 0;if(u>h)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,o=!1;s=t.elementAtHeight(u),s.type!=Lr.Text;)for(;u=r>0?s.bottom+e:s.top-e,!(u>=0&&u<=h);){if(o)return i?null:0;o=!0,r=-r}d=l+u;let f=s.from;if(f<t.viewport.from)return 0==t.viewport.from?0:i?null:pn(t,a,s,c,d);if(f>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:i?null:pn(t,a,s,c,d);let p=t.dom.ownerDocument,O=t.root.elementFromPoint?t.root:p,g=O.elementFromPoint(c,d);g&&!t.contentDOM.contains(g)&&(g=null),g||(c=Math.max(a.left+1,Math.min(a.right-1,c)),g=O.elementFromPoint(c,d),g&&!t.contentDOM.contains(g)&&(g=null));let m,b=-1;if(g&&0!=(null===(o=t.docView.nearest(g))||void 0===o?void 0:o.isEditable))if(p.caretPositionFromPoint){let t=p.caretPositionFromPoint(c,d);t&&({offsetNode:m,offset:b}=t)}else if(p.caretRangeFromPoint){let e=p.caretRangeFromPoint(c,d);e&&(({startContainer:m,startOffset:b}=e),(!t.contentDOM.contains(m)||Xr.safari&&function(t,e,i){let r;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return hr(t,r-1,r).getBoundingClientRect().left>i}(m,b,c)||Xr.chrome&&function(t,e,i){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return i-(1==t.nodeType?t.getBoundingClientRect():hr(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(m,b,c))&&(m=void 0))}if(!m||!t.docView.dom.contains(m)){let e=Ir.find(t.docView,f);if(!e)return u>s.top+s.height/2?s.to:s.from;({node:m,offset:b}=dn(e.dom,c,d))}let v=t.docView.nearest(m);if(!v)return null;if(v.isWidget&&1==(null===(n=v.dom)||void 0===n?void 0:n.nodeType)){let t=v.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?v.posAtStart:v.posAtEnd}return v.localPosFromDOM(m,b)+v.posAtStart}function pn(t,e,i,r,o){let n=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;n+=Math.floor((o-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(i.from,i.to);return i.from+Mi(s,n,t.state.tabSize)}function On(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==Lr.Text))return t;return i}function gn(t,e,i,r){let o=t.state.doc.lineAt(e.head),n=t.bidiSpans(o),s=t.textDirectionAt(o.from);for(let a=e,l=null;;){let e=So(o,n,s,a,i),h=xo;if(!e){if(o.number==(i?t.state.doc.lines:1))return a;h="\n",o=t.state.doc.line(o.number+(i?1:-1)),n=t.bidiSpans(o),e=t.visualLineSide(o,!i)}if(l){if(!l(h))return a}else{if(!r)return e;l=r(h)}a=e}}function mn(t,e,i){for(;;){let r=0;for(let o of t)o.between(e-1,e+1,((t,o,n)=>{if(e>t&&e<o){let n=r||i||(e-t<o-e?-1:1);e=n<0?t:o,r=n}}));if(!r)return e}}function bn(t,e,i){let r=mn(t.state.facet(Bo).map((e=>e(t))),i.from,e.head>i.from?-1:1);return r==i.from?i:Te.cursor(r,r<i.from?1:-1)}class vn{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,Xr.safari&&t.contentDOM.addEventListener("input",(()=>null)),Xr.gecko&&function(t){In.has(t)||(In.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(i=mr.get(r))&&i.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=yn(t),i=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let o=!e[t].handlers.length,n=i[t];n&&o!=!n.handlers.length&&(r.removeEventListener(t,this.handleEvent),n=null),n||r.addEventListener(t,this.handleEvent,{passive:o})}for(let t in i)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&kn.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),Xr.android&&Xr.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!Xr.ios||t.synthetic||t.altKey||t.metaKey||!((e=xn.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||Sn.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,cr(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(Xr.safari&&!Xr.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function wn(t,e){return(i,r)=>{try{return e.call(t,r,i)}catch(t){Wo(i.state,t)}}}function yn(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let r in t.domEventHandlers){let o=t.domEventHandlers[r];o&&i(r).handlers.push(wn(e.value,o))}if(t&&t.domEventObservers)for(let r in t.domEventObservers){let o=t.domEventObservers[r];o&&i(r).observers.push(wn(e.value,o))}}for(let t in Pn)i(t).handlers.push(Pn[t]);for(let t in Zn)i(t).observers.push(Zn[t]);return e}const xn=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Sn="dthko",kn=[16,17,18,20,91,92,224,225];function Qn(t){return.7*Math.max(0,t)+8}class $n{constructor(t,e,i,r){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParent=function(t){let e=t.ownerDocument;for(let i=t.parentNode;i&&i!=e.body;)if(1==i.nodeType){if(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)return i;i=i.assignedSlot||i.parentNode}else{if(11!=i.nodeType)break;i=i.host}return null}(t.contentDOM),this.atoms=t.state.facet(Bo).map((e=>e(t)));let o=t.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(Oi.allowMultipleSelections)&&function(t,e){let i=t.state.facet(Qo);return i.length?i[0](e):Xr.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let r=Bi(t.root);if(!r||0==r.rangeCount)return!0;let o=r.getRangeAt(0).getClientRects();for(let t=0;t<o.length;t++){let i=o[t];if(i.left<=e.clientX&&i.right>=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Yn(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){var e;if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let i=0,r=0,o=(null===(e=this.scrollParent)||void 0===e?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},n=Fo(this.view);t.clientX-n.left<=o.left+6?i=-Qn(o.left-t.clientX):t.clientX+n.right>=o.right-6&&(i=Qn(t.clientX-o.right)),t.clientY-n.top<=o.top+6?r=-Qn(o.top-t.clientY):t.clientY+n.bottom>=o.bottom-6&&(r=Qn(t.clientY-o.bottom)),this.setScrollSpeed(i,r)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let i=0;i<t.ranges.length;i++){let r=t.ranges[i],o=null;if(r.empty){let t=mn(this.atoms,r.from,0);t!=r.from&&(o=Te.cursor(t,-1))}else{let t=mn(this.atoms,r.from,-1),e=mn(this.atoms,r.to,1);t==r.from&&e==r.to||(o=Te.range(r.from==r.anchor?t:e,r.from==r.head?t:e))}o&&(e||(e=t.ranges.slice()),e[i]=o)}return e?Te.create(e,t.mainIndex):t}select(t){let{view:e}=this,i=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&i.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some((t=>t.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const Pn=Object.create(null),Zn=Object.create(null),Tn=Xr.ie&&Xr.ie_version<15||Xr.ios&&Xr.webkit_version<604;function Rn(t,e){let i,{state:r}=t,o=1,n=r.toText(e),s=n.lines==r.selection.ranges.length;if(null!=Dn&&r.selection.ranges.every((t=>t.empty))&&Dn==n.toString()){let t=-1;i=r.changeByRange((i=>{let a=r.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let l=r.toText((s?n.line(o++).text:e)+r.lineBreak);return{changes:{from:a.from,insert:l},range:Te.cursor(i.from+l.length)}}))}else i=s?r.changeByRange((t=>{let e=n.line(o++);return{changes:{from:t.from,to:t.to,insert:e.text},range:Te.cursor(t.from+e.length)}})):r.replaceSelection(n);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function An(t,e,i,r){if(1==r)return Te.cursor(e,i);if(2==r)return function(t,e,i=1){let r=t.charCategorizer(e),o=t.doc.lineAt(e),n=e-o.from;if(0==o.length)return Te.cursor(e);0==n?i=1:n==o.length&&(i=-1);let s=n,a=n;i<0?s=ce(o.text,n,!1):a=ce(o.text,n);let l=r(o.text.slice(s,a));for(;s>0;){let t=ce(o.text,s,!1);if(r(o.text.slice(t,s))!=l)break;s=t}for(;a<o.length;){let t=ce(o.text,a);if(r(o.text.slice(a,t))!=l)break;a=t}return Te.range(s+o.from,a+o.from)}(t.state,e,i);{let i=Ir.find(t.docView,e),r=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:r.from,n=i?i.posAtEnd:r.to;return n<t.state.doc.length&&n==r.to&&n++,Te.range(o,n)}}Zn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Pn.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Zn.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Zn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Pn.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let r of t.state.facet(Po))if(i=r(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=_n(t,e),r=Yn(e),o=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),o=o.map(t.changes))},get(e,n,s){let a,l=_n(t,e),h=An(t,l.pos,l.bias,r);if(i.pos!=l.pos&&!n){let e=An(t,i.pos,i.bias,r),o=Math.min(e.from,h.from),n=Math.max(e.to,h.to);h=o<h.from?Te.range(o,n):Te.range(n,o)}return n?o.replaceRange(o.main.extend(h.from,h.to)):s&&1==r&&o.ranges.length>1&&(a=function(t,e){for(let i=0;i<t.ranges.length;i++){let{from:r,to:o}=t.ranges[i];if(r<=e&&o>=e)return Te.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(o,l.pos))?a:s?o.addRange(h):Te.create([h])}}}(t,e)),i){let r=!t.hasFocus;t.inputState.startMouseSelection(new $n(t,e,i,r)),r&&t.observer.ignore((()=>{lr(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let o=t.inputState.mouseSelection;if(o)return o.start(e),!1===o.dragging}return!1};let Cn=(t,e)=>t>=e.top&&t<=e.bottom,Xn=(t,e,i)=>Cn(e,i)&&t>=i.left&&t<=i.right;function Mn(t,e,i,r){let o=Ir.find(t.docView,e);if(!o)return 1;let n=e-o.posAtStart;if(0==n)return 1;if(n==o.length)return-1;let s=o.coordsAt(n,-1);if(s&&Xn(i,r,s))return-1;let a=o.coordsAt(n,1);return a&&Xn(i,r,a)?1:s&&Cn(r,s)?-1:1}function _n(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:Mn(t,i,e.clientX,e.clientY)}}const qn=Xr.ie&&Xr.ie_version<=11;let Wn=null,zn=0,En=0;function Yn(t){if(!qn)return t.detail;let e=Wn,i=En;return Wn=t,En=Date.now(),zn=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(zn+1)%3:1}function Vn(t,e,i,r){if(!i)return;let o=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:n}=t.inputState,s=r&&n&&function(t,e){let i=t.state.facet($o);return i.length?i[0](e):Xr.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:n.from,to:n.to}:null,a={from:o,insert:i},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Pn.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=i.to||e<=i.from)&&(i=Te.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to)),e.dataTransfer.effectAllowed="copyMove"),!1},Pn.dragend=t=>(t.inputState.draggedContent=null,!1),Pn.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let r=Array(i.length),o=0,n=()=>{++o==i.length&&Vn(t,e,r.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t<i.length;t++){let e=new FileReader;e.onerror=n,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),n()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return Vn(t,e,i,!0),!0}return!1},Pn.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=Tn?null:e.clipboardData;return i?(Rn(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),Rn(t,i.value)}),50)}(t),!1)};let Dn=null;Pn.copy=Pn.cut=(t,e)=>{let{text:i,ranges:r,linewise:o}=function(t){let e=[],i=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),i.push(r));if(!e.length){let o=-1;for(let{from:r}of t.selection.ranges){let n=t.doc.lineAt(r);n.number>o&&(e.push(n.text),i.push({from:n.from,to:Math.min(t.doc.length,n.to+1)})),o=n.number}r=!0}return{text:e.join(t.lineBreak),ranges:i,linewise:r}}(t.state);if(!i&&!o)return!1;Dn=o?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let n=Tn?null:e.clipboardData;return n?(n.clearData(),n.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let r=i.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((()=>{r.remove(),t.focus()}),50)}(t,i),!1)};const jn=ei.define();function Un(t,e){let i=[];for(let r of t.facet(Ao)){let o=r(t,e);o&&i.push(o)}return i?t.update({effects:i,annotations:jn.of(!0)}):null}function Nn(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=Un(t.state,e);i?t.dispatch(i):t.update([])}}),10)}Zn.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Nn(t)},Zn.blur=t=>{t.observer.clearSelectionRange(),Nn(t)},Zn.compositionstart=Zn.compositionupdate=t=>{null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0)},Zn.compositionend=t=>{t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Xr.chrome&&Xr.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50)},Zn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Pn.beforeinput=(t,e)=>{var i;let r;if(Xr.chrome&&Xr.android&&(r=xn.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let e=(null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return Xr.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),Xr.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>Zn.compositionend(t,e)),20),!1};const In=new Set,Bn=["pre-wrap","normal","pre-line","break-spaces"];class Gn{constructor(t){this.lineWrapping=t,this.doc=Ht.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return Bn.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i<t.length;i++){let r=t[i];r<0?i++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,i,r,o,n){let s=Bn.indexOf(t)>-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.textHeight=r,this.lineLength=o,a){this.heightSamples={};for(let t=0;t<n.length;t++){let e=n[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return a}}class Ln{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class Hn{constructor(t,e,i,r,o){this.from=t,this.length=e,this.top=i,this.height=r,this._content=o}get type(){return"number"==typeof this._content?Lr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Jr?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new Hn(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var Fn=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Fn||(Fn={}));const Kn=.001;class Jn{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t,e){this.height!=e&&(Math.abs(this.height-e)>Kn&&(t.heightChanged=!0),this.height=e)}replace(t,e,i){return Jn.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,r){let o=this,n=i.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:h,toB:c}=r[s],d=o.lineAt(a,Fn.ByPosNoHeight,i.setDoc(e),0,0),u=d.to>=l?d:o.lineAt(l,Fn.ByPosNoHeight,i,0,0);for(c+=u.to-l,l=u.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,h=r[s-1].fromB,s--,a<d.from&&(d=o.lineAt(a,Fn.ByPosNoHeight,i,0,0));h+=d.from-a,a=d.from;let f=ns.build(i.setDoc(n),t,h,c);o=o.replace(a,l,f)}return o.updateHeight(i,0)}static empty(){return new es(0,0)}static of(t){if(1==t.length)return t[0];let e=0,i=t.length,r=0,o=0;for(;;)if(e==i)if(r>2*o){let o=t[e-1];o.break?t.splice(--e,1,o.left,null,o.right):t.splice(--e,1,o.left,o.right),i+=1+o.break,r-=o.size}else{if(!(o>2*r))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,o-=e.size}}else if(r<o){let i=t[e++];i&&(r+=i.size)}else{let e=t[--i];e&&(o+=e.size)}let n=0;return null==t[e-1]?(n=1,e--):null==t[e]&&(n=1,i++),new rs(Jn.of(t.slice(0,e)),n,Jn.of(t.slice(i)))}}Jn.prototype.size=1;class ts extends Jn{constructor(t,e,i){super(t,e),this.deco=i}blockAt(t,e,i,r){return new Hn(r,this.length,i,this.height,this.deco||0)}lineAt(t,e,i,r,o){return this.blockAt(0,i,r,o)}forEachLine(t,e,i,r,o,n){t<=o+this.length&&e>=o&&n(this.blockAt(0,i,r,o))}updateHeight(t,e=0,i=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(t,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class es extends ts{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,i,r){return new Hn(r,this.length,i,this.height,this.breaks)}replace(t,e,i){let r=i[0];return 1==i.length&&(r instanceof es||r instanceof is&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof is?r=new es(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Jn.of(i)}updateHeight(t,e=0,i=!1,r){return r&&r.from<=e&&r.more?this.setHeight(t,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class is extends Jn{constructor(t){super(t,0)}heightMetrics(t,e){let i,r=t.doc.lineAt(e).number,o=t.doc.lineAt(e+this.length).number,n=o-r+1,s=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*n);i=e/n,this.length>n+1&&(s=(this.height-e)/(this.length-n-1))}else i=this.height/n;return{firstLine:r,lastLine:o,perLine:i,perChar:s}}blockAt(t,e,i,r){let{firstLine:o,lastLine:n,perLine:s,perChar:a}=this.heightMetrics(e,r);if(e.lineWrapping){let o=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-i)/this.height))*this.length)),n=e.doc.lineAt(o),l=s+n.length*a,h=Math.max(i,t-l/2);return new Hn(n.from,n.length,h,l,0)}{let r=Math.max(0,Math.min(n-o,Math.floor((t-i)/s))),{from:a,length:l}=e.doc.line(o+r);return new Hn(a,l,i+s*r,s,0)}}lineAt(t,e,i,r,o){if(e==Fn.ByHeight)return this.blockAt(t,i,r,o);if(e==Fn.ByPosNoHeight){let{from:e,to:r}=i.doc.lineAt(t);return new Hn(e,r-e,0,0,0)}let{firstLine:n,perLine:s,perChar:a}=this.heightMetrics(i,o),l=i.doc.lineAt(t),h=s+l.length*a,c=l.number-n,d=r+s*c+a*(l.from-o-c);return new Hn(l.from,l.length,Math.max(r,Math.min(d,r+this.height-h)),h,0)}forEachLine(t,e,i,r,o,n){t=Math.max(t,o),e=Math.min(e,o+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(i,o);for(let h=t,c=r;h<=e;){let e=i.doc.lineAt(h);if(h==t){let i=e.number-s;c+=a*i+l*(t-o-i)}let r=a+l*e.length;n(new Hn(e.from,e.length,c,r,0)),c+=r,h=e.to+1}}replace(t,e,i){let r=this.length-e;if(r>0){let t=i[i.length-1];t instanceof is?i[i.length-1]=new is(t.length+r):i.push(null,new is(r-1))}if(t>0){let e=i[0];e instanceof is?i[0]=new is(t+e.length):i.unshift(new is(t-1),null)}return Jn.of(i)}decomposeLeft(t,e){e.push(new is(t-1),null)}decomposeRight(t,e){e.push(null,new is(this.length-t-1))}updateHeight(t,e=0,i=!1,r){let o=e+this.length;if(r&&r.from<=e+this.length&&r.more){let i=[],n=Math.max(e,r.from),s=-1;for(r.from>e&&i.push(new is(r.from-e-1).updateHeight(t,e));n<=o&&r.more;){let e=t.doc.lineAt(n).length;i.length&&i.push(null);let o=r.heights[r.index++];-1==s?s=o:Math.abs(o-s)>=Kn&&(s=-2);let a=new es(e,o);a.outdated=!1,i.push(a),n+=e+1}n<=o&&i.push(null,new is(o-n).updateHeight(t,n));let a=Jn.of(i);return(s<0||Math.abs(a.height-this.height)>=Kn||Math.abs(s-this.heightMetrics(t,e).perLine)>=Kn)&&(t.heightChanged=!0),a}return(i||this.outdated)&&(this.setHeight(t,t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class rs extends Jn{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,r){let o=i+this.left.height;return t<o?this.left.blockAt(t,e,i,r):this.right.blockAt(t,e,o,r+this.left.length+this.break)}lineAt(t,e,i,r,o){let n=r+this.left.height,s=o+this.left.length+this.break,a=e==Fn.ByHeight?t<n:t<s,l=a?this.left.lineAt(t,e,i,r,o):this.right.lineAt(t,e,i,n,s);if(this.break||(a?l.to<s:l.from>s))return l;let h=e==Fn.ByPosNoHeight?Fn.ByPosNoHeight:Fn.ByPos;return a?l.join(this.right.lineAt(s,h,i,n,s)):this.left.lineAt(s,h,i,r,o).join(l)}forEachLine(t,e,i,r,o,n){let s=r+this.left.height,a=o+this.left.length+this.break;if(this.break)t<a&&this.left.forEachLine(t,e,i,r,o,n),e>=a&&this.right.forEachLine(t,e,i,s,a,n);else{let l=this.lineAt(a,Fn.ByPos,i,r,o);t<l.from&&this.left.forEachLine(t,l.from-1,i,r,o,n),l.to>=t&&l.from<=e&&n(l),e>l.to&&this.right.forEachLine(l.to+1,e,i,s,a,n)}}replace(t,e,i){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,i),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,i));let o=[];t>0&&this.decomposeLeft(t,o);let n=o.length;for(let t of i)o.push(t);if(t>0&&os(o,n-1),e<this.length){let t=o.length;this.decomposeRight(e,o),os(o,t)}return Jn.of(o)}decomposeLeft(t,e){let i=this.left.length;if(t<=i)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(i++,t>=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,r=i+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<i&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?Jn.of(this.break?[t,null,e]:[t,e]):(this.left=t,this.right=e,this.height=t.height+e.height,this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,r){let{left:o,right:n}=this,s=e+o.length+this.break,a=null;return r&&r.from<=e+o.length&&r.more?a=o=o.updateHeight(t,e,i,r):o.updateHeight(t,e,i),r&&r.from<=s+n.length&&r.more?a=n=n.updateHeight(t,s,i,r):n.updateHeight(t,s,i),a?this.balanced(o,n):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function os(t,e){let i,r;null==t[e]&&(i=t[e-1])instanceof is&&(r=t[e+1])instanceof is&&t.splice(e-1,3,new is(i.length+1+r.length))}class ns{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof es?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new es(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t<e||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,o=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let n=e-t;i.block?this.addBlock(new ts(n,r,i)):(n||o||r>=5)&&this.addLineDeco(r,o,n)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new es(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new is(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof es)return t;let e=new es(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof es||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new es(0,-1));let i=t;for(let t of this.nodes)t instanceof es&&t.updateHeight(this.oracle,i),i+=t?t.length:1;return this.nodes}static build(t,e,i,r){let o=new ns(i,t);return yi.spans(e,i,r,o,0),o.finish(i)}}class ss{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,i,r){(t<e||i&&i.heightRelevant||r&&r.heightRelevant)&&eo(t,e,this.changes,5)}}function as(t,e){let i=t.getBoundingClientRect(),r=t.ownerDocument,o=r.defaultView||window,n=Math.max(0,i.left),s=Math.min(o.innerWidth,i.right),a=Math.max(0,i.top),l=Math.min(o.innerHeight,i.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let i=e,r=window.getComputedStyle(i);if((i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=r.overflow){let r=i.getBoundingClientRect();n=Math.max(n,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=e==t.parentNode?r.bottom:Math.min(l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?i.offsetParent:i.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:n-i.left,right:Math.max(n,s)-i.left,top:a-(i.top+e),bottom:Math.max(a,l)-(i.top+e)}}function ls(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class hs{constructor(t,e,i){this.from=t,this.to=e,this.size=i}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],o=e[i];if(r.from!=o.from||r.to!=o.to||r.size!=o.size)return!1}return!0}draw(t,e){return Hr.replace({widget:new cs(this.size*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class cs extends Gr{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class ds{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=gs,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=no.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(Uo).some((t=>"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new Gn(e),this.stateDeco=t.facet(No).filter((t=>"function"!=typeof t)),this.heightMap=Jn.empty().applyChanges(this.stateDeco,Ht.empty,this.heightOracle.setDoc(t.doc),[new Jo(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Hr.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let r=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>r>=t&&r<=e))){let{from:e,to:i}=this.lineBlockAt(r);t.push(new us(e,i))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?gs:new ms(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(bs(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(No).filter((t=>"function"!=typeof t));let r=t.changedRanges,o=Jo.extendWithRanges(r,function(t,e,i){let r=new ss;return yi.compare(t,e,i,r,0),r.changes}(i,this.stateDeco,t?t.changes:ye.empty(this.state.doc.length))),n=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=n&&(t.flags|=2),s?(this.scrollAnchorPos=t.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=o.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<a.from||e.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Xo)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?no.RTL:no.LTR;let n=this.heightOracle.mustRefreshForWrapping(o),s=e.getBoundingClientRect(),a=n||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,h=0;if(s.width&&s.height){let{scaleX:t,scaleY:i}=or(e,s);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,l|=8,n=a=!0)}let c=(parseInt(i.paddingTop)||0)*this.scaleY,d=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==d||(this.paddingTop=c,this.paddingBottom=d,l|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=8);let u=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=u&&(this.scrollAnchorHeight=-1,this.scrollTop=u),this.scrolledToBottom=ur(t.scrollDOM);let f=(this.printing?ls:as)(e,this.paddingTop),p=f.top-this.pixelViewport.top,O=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let m=s.width;if(this.contentDOMWidth==m&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=t.scrollDOM.clientHeight,l|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(n=!0),n||r.lineWrapping&&Math.abs(m-this.contentDOMWidth)>r.charWidth){let{lineHeight:i,charWidth:s,textHeight:a}=t.docView.measureTextSize();n=i>0&&r.refresh(o,i,s,a,m/s,e),n&&(t.docView.minWidth=0,l|=8)}p>0&&O>0?h=Math.max(p,O):p<0&&O<0&&(h=Math.min(p,O)),r.heightChanged=!1;for(let i of this.viewports){let o=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(n?Jn.empty().applyChanges(this.stateDeco,Ht.empty,this.heightOracle,[new Jo(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,n,new Ln(i.from,o))}r.heightChanged&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),l|=this.updateForViewport()),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(n?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:n,visibleBottom:s}=this,a=new us(r.lineAt(n-1e3*i,Fn.ByHeight,o,0,0).from,r.lineAt(s+1e3*(1-i),Fn.ByHeight,o,0,0).to);if(e){let{head:t}=e.range;if(t<a.from||t>a.to){let i,n=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(t,Fn.ByPos,o,0,0);i="center"==e.y?(s.top+s.bottom)/2-n/2:"start"==e.y||"nearest"==e.y&&t<a.from?s.top:s.bottom-n,a=new us(r.lineAt(i-500,Fn.ByHeight,o,0,0).from,r.lineAt(i+n+500,Fn.ByHeight,o,0,0).to)}}return a}mapViewport(t,e){let i=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new us(this.heightMap.lineAt(i,Fn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Fn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,Fn.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(e,Fn.ByPos,this.heightOracle,0,0),{visibleTop:n,visibleBottom:s}=this;return(0==t||r<=n-Math.max(10,Math.min(-i,250)))&&(e==this.state.doc.length||o>=s+Math.max(10,Math.min(i,250)))&&r>n-2e3&&o<s+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let i=[];for(let r of t)e.touchesRange(r.from,r.to)||i.push(new hs(e.mapPos(r.from),e.mapPos(r.to),r.size));return i}ensureLineGaps(t,e){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,o=r>>1,n=r<<1;if(this.defaultTextDirection!=no.LTR&&!i)return[];let s=[],a=(r,n,l,h)=>{if(n-r<o)return;let c=this.state.selection.main,d=[c.from];c.empty||d.push(c.to);for(let t of d)if(t>r&&t<n)return a(r,t-10,l,h),void a(t+10,n,l,h);let u=function(t,e){for(let i of t)if(e(i))return i}(t,(t=>t.from>=l.from&&t.to<=l.to&&Math.abs(t.from-r)<o&&Math.abs(t.to-n)<o&&!d.some((e=>t.from<e&&t.to>e))));if(!u){if(n<l.to&&e&&i&&e.visibleRanges.some((t=>t.from<=n&&t.to>=n))){let t=e.moveToLineBoundary(Te.cursor(n),!1,!0).head;t>r&&(n=t)}u=new hs(r,n,this.gapSize(l,r,n,h))}s.push(u)};for(let t of this.viewportLines){if(t.length<n)continue;let e=fs(t.from,t.to,this.stateDeco);if(e.total<n)continue;let o,s,l=this.scrollTarget?this.scrollTarget.range.head:null;if(i){let i,n,a=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=l){let r=Os(e,l),o=((this.visibleBottom-this.visibleTop)/2+a)/t.height;i=r-o,n=r+o}else i=(this.visibleTop-t.top-a)/t.height,n=(this.visibleBottom-t.top+a)/t.height;o=ps(e,i),s=ps(e,n)}else{let t,i,n=e.total*this.heightOracle.charWidth,a=r*this.heightOracle.charWidth;if(null!=l){let r=Os(e,l),o=((this.pixelViewport.right-this.pixelViewport.left)/2+a)/n;t=r-o,i=r+o}else t=(this.pixelViewport.left-a)/n,i=(this.pixelViewport.right+a)/n;o=ps(e,t),s=ps(e,i)}o>t.from&&a(t.from,o,t,e),s<t.to&&a(s,t.to,t,e)}return s}gapSize(t,e,i,r){let o=Os(r,i)-Os(r,e);return this.heightOracle.lineWrapping?t.height*o:r.total*this.heightOracle.charWidth*o}updateLineGaps(t){hs.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Hr.set(t.map((t=>t.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];yi.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||bs(this.heightMap.lineAt(t,Fn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||bs(this.heightMap.lineAt(this.scaler.fromDOM(t),Fn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return bs(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class us{constructor(t,e){this.from=t,this.to=e}}function fs(t,e,i){let r=[],o=t,n=0;return yi.spans(i,t,e,{span(){},point(t,e){t>o&&(r.push({from:o,to:t}),n+=t-o),o=e}},20),o<e&&(r.push({from:o,to:e}),n+=e-o),{total:n,ranges:r}}function ps({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let r=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:o}=e[t],n=o-i;if(r<=n)return i+r;r-=n}}function Os(t,e){let i=0;for(let{from:r,to:o}of t.ranges){if(e<=o){i+=e-r;break}i+=o-r}return i/t.total}const gs={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class ms{constructor(t,e,i){let r=0,o=0,n=0;this.viewports=i.map((({from:i,to:o})=>{let n=e.lineAt(i,Fn.ByPos,t,0,0).top,s=e.lineAt(o,Fn.ByPos,t,0,0).bottom;return r+=s-n,{from:i,to:o,top:n,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=n+(t.top-o)*this.scale,n=t.domBottom=t.domTop+(t.bottom-t.top),o=t.bottom}toDOM(t){for(let e=0,i=0,r=0;;e++){let o=e<this.viewports.length?this.viewports[e]:null;if(!o||t<o.top)return r+(t-i)*this.scale;if(t<=o.bottom)return o.domTop+(t-o.top);i=o.bottom,r=o.domBottom}}fromDOM(t){for(let e=0,i=0,r=0;;e++){let o=e<this.viewports.length?this.viewports[e]:null;if(!o||t<o.domTop)return i+(t-r)/this.scale;if(t<=o.domBottom)return o.top+(t-o.domTop);i=o.bottom,r=o.domBottom}}eq(t){return t instanceof ms&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every(((e,i)=>e.from==t.viewports[i].from&&e.to==t.viewports[i].to))}}function bs(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Hn(t.from,t.length,i,r-i,Array.isArray(t._content)?t._content.map((t=>bs(t,e))):t._content)}const vs=Ce.define({combine:t=>t.join(" ")}),ws=Ce.define({combine:t=>t.indexOf(!0)>-1}),ys=zi.newName(),xs=zi.newName(),Ss=zi.newName(),ks={"&light":"."+xs,"&dark":"."+Ss};function Qs(t,e,i){return new zi(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const $s=Qs("."+ys,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},ks),Ps="";class Zs{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(Oi.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=Ps}readRange(t,e){if(!t)return this;let i=t.parentNode;for(let r=t;;){this.findPointBefore(i,r);let t=this.text.length;this.readNode(r);let o=r.nextSibling;if(o==e)break;let n=mr.get(r),s=mr.get(o);(n&&s?n.breakAfter:(n?n.breakAfter:Ji(r))||Ji(o)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&this.lineBreak(),r=o}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o,n=-1,s=1;if(this.lineSeparator?(n=e.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(o=r.exec(e))&&(n=o.index,s=o[0].length),this.append(e.slice(i,n<0?e.length:n)),n<0)break;if(this.lineBreak(),s>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=s-1);i=n+s}}readNode(t){if(t.cmIgnore)return;let e=mr.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(Ts(t,i.node,i.offset)?e:0))}}function Ts(t,e,i){for(;;){if(!e||i<er(e))return!1;if(e==t)return!0;i=Ki(e)+1,e=e.parentNode}}class Rs{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class As{constructor(t,e,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:o,impreciseAnchor:n}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=o||n?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:n}=t.observer.selectionRange;return i&&(e.push(new Rs(i,r)),o==i&&n==r||e.push(new Rs(o,n))),e}(t),i=new Zs(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,r=2==t.length?t[1].pos:i;return i>-1&&r>-1?Te.single(i+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=o&&o.node==e.focusNode&&o.offset==e.focusOffset||!Gi(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=n&&n.node==e.anchorNode&&n.offset==e.anchorOffset||!Gi(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),s=t.viewport;if((Xr.ios||Xr.chrome)&&t.state.selection.main.empty&&i!=r&&(s.from>0||s.to<t.state.doc.length)){let e=Math.min(i,r),o=Math.max(i,r),n=s.from-e,a=s.to-o;0!=n&&1!=n&&0!=e||0!=a&&-1!=a&&o!=t.state.doc.length||(i=0,r=t.state.doc.length)}this.newSel=Te.single(r,i)}}}function Cs(t,e){let i,{newSel:r}=e,o=t.state.selection.main,n=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:s}=e.bounds,a=o.from,l=null;(8===n||Xr.android&&e.text.length<s-r)&&(a=o.to,l="end");let h=function(t,e,i,r){let o=Math.min(t.length,e.length),n=0;for(;n<o&&t.charCodeAt(n)==e.charCodeAt(n);)n++;if(n==o&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;return"end"==r&&(i-=s+Math.max(0,n-Math.min(s,a))-n),s<n&&t.length<e.length?(n-=i<=n&&i>=s?n-i:0,a=n+(a-s),s=n):a<n&&(n-=i<=n&&i>=a?n-i:0,s=n+(s-a),a=n),{from:n,toA:s,toB:a}}(t.state.doc.sliceString(r,s,Ps),e.text,a-r,l);h&&(Xr.chrome&&13==n&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==Ps+Ps&&h.toB--,i={from:r+h.from,to:r+h.toA,insert:Ht.of(e.text.slice(h.from,h.toB).split(Ps))})}else r&&(!t.hasFocus&&t.state.facet(zo)||r.main.eq(o))&&(r=null);if(!i&&!r)return!1;if(!i&&e.typeOver&&!o.empty&&r&&r.main.empty?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:i&&i.from>=o.from&&i.to<=o.to&&(i.from!=o.from||i.to!=o.to)&&o.to-o.from-(i.to-i.from)<=4?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,o.to))}:(Xr.mac||Xr.android)&&i&&i.from==i.to&&i.from==o.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==i.insert.length&&(r=Te.single(r.main.anchor-1,r.main.head-1)),i={from:o.from,to:o.to,insert:Ht.of([" "])}):Xr.chrome&&i&&i.from==i.to&&i.from==o.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(r&&(r=Te.single(r.main.anchor-1,r.main.head-1)),i={from:o.from,to:o.to,insert:Ht.of([" "])}),i){if(Xr.ios&&t.inputState.flushIOSKey(i))return!0;if(Xr.android&&(i.to==o.to&&(i.from==o.from||i.from==o.from-1&&" "==t.state.sliceDoc(i.from,o.from))&&1==i.insert.length&&2==i.insert.lines&&cr(t.contentDOM,"Enter",13)||(i.from==o.from-1&&i.to==o.to&&0==i.insert.length||8==n&&i.insert.length<i.to-i.from&&i.to>o.head)&&cr(t.contentDOM,"Backspace",8)||i.from==o.from&&i.to==o.to+1&&0==i.insert.length&&cr(t.contentDOM,"Delete",46)))return!0;let e,s=i.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>e||(e=function(t,e,i){let r,o=t.state,n=o.selection.main;if(e.from>=n.from&&e.to<=n.to&&e.to-e.from>=(n.to-n.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=n.from<e.from?o.sliceDoc(n.from,e.from):"",s=n.to>e.to?o.sliceDoc(e.to,n.to):"";r=o.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+s))}else{let s=o.changes(e),a=i&&i.main.to<=s.newLength?i.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=n.to&&e.to>=n.to-10){let l,h=t.state.sliceDoc(e.from,e.to),c=i&&on(t,i.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(n.head);let d=n.to-e.to,u=n.to-n.from;r=o.changeByRange((i=>{if(i.from==n.from&&i.to==n.to)return{changes:s,range:a||i.map(s)};let r=i.to-d,c=r-h.length;if(i.to-i.from!=u||t.state.sliceDoc(c,r)!=h||i.to>=l.from&&i.from<=l.to)return{range:i};let f=o.changes({from:c,to:r,insert:e.insert}),p=i.to-n.to;return{changes:f,range:a?Te.range(Math.max(0,a.anchor+p),Math.max(0,a.head+p)):i.map(f)}}))}else r={changes:s,selection:a&&o.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),o.update(r,{userEvent:s,scrollIntoView:!0})}(t,i,r));return t.state.facet(Ro).some((e=>e(t,i.from,i.to,s,a)))||t.dispatch(a()),!0}if(r&&!r.main.eq(o)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:i}),!0}return!1}const Xs={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ms=Xr.ie&&Xr.ie_version<=11;class _s{constructor(t){this.view=t,this.active=!1,this.selectionRange=new nr,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(Xr.ie&&Xr.ie_version<=11||Xr.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),Ms&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(zo)?i.root.activeElement!=this.dom:!Li(i.dom,r))return;let o=r.anchorNode&&i.docView.nearest(r.anchorNode);o&&o.ignoreEvent(t)?e||(this.selectionChanged=!1):(Xr.ie&&Xr.ie_version<=11||Xr.android&&Xr.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Fi(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=Bi(t.root);if(!e)return!1;let i=Xr.safari&&11==t.root.nodeType&&function(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}(this.dom.ownerDocument)==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Ws(t,i)}let i=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),i?Ws(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let r=Li(this.dom,i);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let i=e.focusNode,r=e.focusOffset;if(!i||e.anchorNode!=i||e.anchorOffset!=r)return!1;for(r=Math.min(r,er(i));;)if(r){if(1!=i.nodeType)return!1;let t=i.childNodes[r-1];"false"==t.contentEditable?r--:(i=t,r=er(i))}else{if(i==t)return!0;r=Ki(i),i=i.parentNode}}(this.dom,i)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==i?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Xs),Ms&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ms&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var i;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&cr(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(i=this.delayedAndroidKey)||void 0===i?void 0:i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,r=!1;for(let o of t){let t=this.readMutation(o);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:r}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Li(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new As(this.view,t,e,i);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,r=Cs(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let i=qs(e,t.previousSibling||t.target.previousSibling,-1),r=qs(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener("change",this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener("change",this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function qs(t,e,i){for(;e;){let r=mr.get(e);if(r&&r.parent==t)return r;let o=e.parentNode;e=o!=t.dom?o:i>0?e.nextSibling:e.previousSibling}return null}function Ws(t,e){let i=e.startContainer,r=e.startOffset,o=e.endContainer,n=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return Fi(s.node,s.offset,o,n)&&([i,r,o,n]=[o,n,i,r]),{anchorNode:i,anchorOffset:r,focusNode:o,focusOffset:n}}class zs{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:e}=t;this.dispatchTransactions=t.dispatchTransactions||e&&(t=>t.forEach((t=>e(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new ds(t.state||Oi.create(t)),t.scrollTo&&t.scrollTo.is(qo)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Yo).map((t=>new Do(t)));for(let t of this.plugins)t.update(this);this.observer=new _s(this),this.inputState=new vn(this),this.inputState.ensureHandlers(this.plugins),this.docView=new en(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure()}dispatch(...t){let e=1==t.length&&t[0]instanceof ni?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,r=!1,o=this.state;for(let e of t){if(e.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=e.state}if(this.destroyed)return void(this.viewState.state=o);let n=this.hasFocus,s=0,a=null;t.some((t=>t.annotation(jn)))?(this.inputState.notifiedFocused=n,s=1):n!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=n,a=Un(o,n),a||(s=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(h=null)):this.observer.clear(),o.facet(Oi.phrases)!=this.state.facet(Oi.phrases))return this.setState(o);e=tn.create(this,o,t),e.flags|=s;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new _o(t.empty?t:Te.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(qo)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Vs.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(Ko)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(vs)!=e.state.facet(vs)&&(this.viewState.mustMeasureContent=!0),(i||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(To))try{t(e)}catch(t){Wo(this.state,t,"update listener")}(a||h)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!Cs(this,h)&&l.force&&cr(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new ds(t),this.plugins=t.facet(Yo).map((t=>new Do(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new en(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Yo),i=t.state.facet(Yo);if(e!=i){let r=[];for(let o of i){let i=e.indexOf(o);if(i<0)r.push(new Do(o));else{let e=this.plugins[i];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){Wo(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:n}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(n=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(n<0)if(ur(i))o=-1,n=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);o=t.from,n=t.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((t=>{try{return t.read(this)}catch(t){return Wo(this.state,t),Ys}})),h=tn.create(this,this.state,[]),c=!1;h.flags|=s,e?e.flags|=s:e=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),c=this.docView.update(h),c&&this.docViewUpdate());for(let t=0;t<a.length;t++)if(l[t]!=Ys)try{let e=a[t];e.write&&e.write(l[t],this)}catch(t){Wo(this.state,t)}if(c&&this.docView.updateSelection(!0),!h.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,n=-1;continue}{let t=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)-n;if(t>1||t<-1){r+=t,i.scrollTop=r/this.scaleY,n=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(To))t(e)}get themeClasses(){return ys+" "+(this.state.facet(ws)?Ss:xs)+" "+this.state.facet(vs)}updateAttrs(){let t=Ds(this,jo,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(zo)?"true":"false",class:"cm-content",style:`${Xr.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),Ds(this,Uo,e);let i=this.observer.ignore((()=>{let i=Ur(this.contentDOM,this.contentAttrs,e),r=Ur(this.dom,this.editorAttrs,t);return i||r}));return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)t.is(zs.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(Ko);let t=this.state.facet(zs.cspNonce);zi.mount(this.root,this.styleModules.concat($s).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.spec!=t)&&this.pluginMap.set(t,e=this.plugins.find((e=>e.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return bn(this,t,gn(this,t,e,i))}moveByGroup(t,e){return bn(this,t,gn(this,t,e,(e=>function(t,e,i){let r=t.state.charCategorizer(e),o=r(i);return t=>{let e=r(t);return o==ui.Space&&(o=e),o==e}}(this,t.head,e))))}visualLineSide(t,e){let i=this.bidiSpans(t),r=this.textDirectionAt(t.from),o=i[e?i.length-1:0];return Te.cursor(o.side(e,r)+t.from,o.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,r){let o=On(t,e.head),n=r&&o.type==Lr.Text&&(t.lineWrapping||o.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head):null;if(n){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(o.from),s=t.posAtCoords({x:i==(r==no.LTR)?e.right-1:e.left+1,y:(n.top+n.bottom)/2});if(null!=s)return Te.cursor(s,i?-1:1)}return Te.cursor(i?o.to:o.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return bn(this,t,function(t,e,i,r){let o=e.head,n=i?1:-1;if(o==(i?t.state.doc.length:0))return Te.cursor(o,e.assoc);let s,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(o,e.assoc||-1),c=t.documentTop;if(h)null==a&&(a=h.left-l.left),s=n<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(o);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(o-e.from))),s=(n<0?e.top:e.bottom)+c}let d=l.left+a,u=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let i=s+(u+e)*n,r=fn(t,{x:d,y:i},!1,n);if(i<l.top||i>l.bottom||(n<0?r<o:r>o)){let e=t.docView.coordsForChar(r),o=!e||i<e.top?-1:1;return Te.cursor(r,o,void 0,a)}}}(this,t,e,i))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),fn(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(t),o=this.bidiSpans(r);return ir(i,o[go.find(o,t-r.from,-1,e)].dir==no.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(Co)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Es)return yo(t.length);let e,i=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==i&&(r.fresh||mo(r.isolates,e=Lo(this,t))))return r.order;e||(e=Lo(this,t));let r=function(t,e,i){if(!t)return[new go(0,0,e==ao?1:0)];if(e==so&&!i.length&&!Oo.test(t))return yo(t.length);if(i.length)for(;t.length>bo.length;)bo[bo.length]=256;let r=[],o=e==so?0:1;return wo(t,o,o,i,0,t.length,r),r}(t.text,i,e);return this.bidiCache.push(new Vs(t.from,t.to,i,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||Xr.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{lr(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return qo.of(new _o("number"==typeof t?Te.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return qo.of(new _o(Te.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Vo.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return Vo.define((()=>({})),{eventObservers:t})}static theme(t,e){let i=zi.newName(),r=[vs.of(i),Ko.of(Qs(`.${i}`,t))];return e&&e.dark&&r.push(ws.of(!0)),r}static baseTheme(t){return Ve.lowest(Ko.of(Qs("."+ys,t,ks)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),r=i&&mr.get(i)||mr.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}zs.styleModule=Ko,zs.inputHandler=Ro,zs.scrollHandler=Mo,zs.focusChangeEffect=Ao,zs.perLineTextDirection=Co,zs.exceptionSink=Zo,zs.updateListener=To,zs.editable=zo,zs.mouseSelectionStyle=Po,zs.dragMovesSelection=$o,zs.clickAddsSelectionRange=Qo,zs.decorations=No,zs.outerDecorations=Io,zs.atomicRanges=Bo,zs.bidiIsolatedRanges=Go,zs.scrollMargins=Ho,zs.darkTheme=ws,zs.cspNonce=Ce.define({combine:t=>t.length?t[0]:""}),zs.contentAttributes=Uo,zs.editorAttributes=jo,zs.lineWrapping=zs.contentAttributes.of({class:"cm-lineWrapping"}),zs.announce=oi.define();const Es=4096,Ys={};class Vs{constructor(t,e,i,r,o,n){this.from=t,this.to=e,this.dir=i,this.isolates=r,this.fresh=o,this.order=n}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let i=[],r=t.length?t[t.length-1].dir:no.LTR;for(let o=Math.max(0,t.length-10);o<t.length;o++){let n=t[o];n.dir!=r||e.touchesRange(n.from,n.to)||i.push(new Vs(e.mapPos(n.from,1),e.mapPos(n.to,-1),n.dir,n.isolates,!1,n.order))}return i}}function Ds(t,e,i){for(let r=t.state.facet(e),o=r.length-1;o>=0;o--){let e=r[o],n="function"==typeof e?e(t):e;n&&Vr(n,i)}return i}const js=Xr.mac?"mac":Xr.windows?"win":Xr.linux?"linux":"key";function Us(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const Ns=Ve.default(zs.domEventHandlers({keydown:(t,e)=>Ks(Gs(e.state),t,e,"editor")})),Is=Ce.define({enables:Ns}),Bs=new WeakMap;function Gs(t){let e=t.facet(Is),i=Bs.get(e);return i||Bs.set(e,i=function(t,e=js){let i=Object.create(null),r=Object.create(null),o=(t,e)=>{let i=r[t];if(null==i)r[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},n=(t,r,n,s,a)=>{var l,h;let c=i[t]||(i[t]=Object.create(null)),d=r.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let r,o,n,s,a=i[i.length-1];"Space"==a&&(a=" ");for(let t=0;t<i.length-1;++t){const a=i[t];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))o=!0;else if(/^s(hift)?$/i.test(a))n=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==e?s=!0:o=!0}}return r&&(a="Alt-"+a),o&&(a="Ctrl-"+a),s&&(a="Meta-"+a),n&&(a="Shift-"+a),a}(t,e)));for(let e=1;e<d.length;e++){let i=d.slice(0,e).join(" ");o(i,!0),c[i]||(c[i]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=Ls={view:e,prefix:i,scope:t};return setTimeout((()=>{Ls==r&&(Ls=null)}),Hs),!0}]})}let u=d.join(" ");o(u,!1);let f=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===h?void 0:h.slice())||[]});n&&f.run.push(n),s&&(f.preventDefault=!0),a&&(f.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:o}=r;for(let e in t)t[e].run.push((t=>o(t,Fs)))}let o=r[e]||r.key;if(o)for(let e of t)n(e,o,r.run,r.preventDefault,r.stopPropagation),r.shift&&n(e,"Shift-"+o,r.shift,r.preventDefault,r.stopPropagation)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}let Ls=null;const Hs=4e3;let Fs=null;function Ks(t,e,i,r){Fs=e;let o=function(t){var e=!(ji&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Ui&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Di:Vi)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),n=me(Oe(o,0))==o.length&&" "!=o,s="",a=!1,l=!1,h=!1;Ls&&Ls.view==i&&Ls.scope==r&&(s=Ls.prefix+" ",kn.indexOf(e.keyCode)<0&&(l=!0,Ls=null));let c,d,u=new Set,f=t=>{if(t){for(let e of t.run)if(!u.has(e)&&(u.add(e),e(i)))return t.stopPropagation&&(h=!0),!0;t.preventDefault&&(t.stopPropagation&&(h=!0),l=!0)}return!1},p=t[r];return p&&(f(p[s+Us(o,e,!n)])?a=!0:n&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Xr.windows&&e.ctrlKey&&e.altKey)&&(c=Vi[e.keyCode])&&c!=o?(f(p[s+Us(c,e,!0)])||e.shiftKey&&(d=Di[e.keyCode])!=o&&d!=c&&f(p[s+Us(d,e,!1)]))&&(a=!0):n&&e.shiftKey&&f(p[s+Us(o,e,!0)])&&(a=!0),!a&&f(p._any)&&(a=!0)),l&&(a=!0),a&&h&&e.stopPropagation(),Fs=null,a}class Js{constructor(t,e,i,r,o){this.className=t,this.left=e,this.top=i,this.width=r,this.height=o}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let r=t.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let o=ta(t);return[new Js(e,r.left-o.left,r.top-o.top,null,r.bottom-r.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let r=Math.max(i.from,t.viewport.from),o=Math.min(i.to,t.viewport.to),n=t.textDirection==no.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=ta(t),h=s.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),d=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=a.right-(c?parseInt(c.paddingRight):0),f=On(t,r),p=On(t,o),O=f.type==Lr.Text?f:null,g=p.type==Lr.Text?p:null;if(O&&(t.lineWrapping||f.widgetLineBreaks)&&(O=ea(t,r,1,O)),g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=ea(t,o,-1,g)),O&&g&&O.from==g.from&&O.to==g.to)return b(v(i.from,i.to,O));{let e=O?v(i.from,null,O):w(f,!1),r=g?v(null,i.to,g):w(p,!0),o=[];return(O||f).to<(g||p).from-(O&&g?1:0)||f.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?o.push(m(d,e.bottom,u,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==Lr.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),b(e).concat(o).concat(b(r))}function m(t,i,r,o){return new Js(e,t-l.left,i-l.top-.01,r-t,o-i+.01)}function b({top:t,bottom:e,horizontal:i}){let r=[];for(let o=0;o<i.length;o+=2)r.push(m(i[o],t,i[o+1],e));return r}function v(e,i,r){let o=1e9,s=-1e9,a=[];function l(e,i,l,h,c){let f=t.coordsAtPos(e,e==r.to?-2:2),p=t.coordsAtPos(l,l==r.from?2:-2);f&&p&&(o=Math.min(f.top,p.top,o),s=Math.max(f.bottom,p.bottom,s),c==no.LTR?a.push(n&&i?d:f.left,n&&h?u:p.right):a.push(!n&&h?d:p.left,!n&&i?u:f.right))}let h=null!=e?e:r.from,c=null!=i?i:r.to;for(let r of t.visibleRanges)if(r.to>h&&r.from<c)for(let o=Math.max(r.from,h),n=Math.min(r.to,c);;){let r=t.state.doc.lineAt(o);for(let s of t.bidiSpans(r)){let t=s.from+r.from,a=s.to+r.from;if(t>=n)break;a>o&&l(Math.max(t,o),null==e&&t<=h,Math.min(a,n),null==i&&a>=c,s.dir)}if(o=r.to+1,o>=n)break}return 0==a.length&&l(h,null==e,c,null==i,t.textDirection),{top:o,bottom:s,horizontal:a}}function w(t,e){let i=a.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function ta(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==no.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function ea(t,e,i,r){let o=t.coordsAtPos(e,2*i);if(!o)return r;let n=t.dom.getBoundingClientRect(),s=(o.top+o.bottom)/2,a=t.posAtCoords({x:n.left+1,y:s}),l=t.posAtCoords({x:n.right-1,y:s});return null==a||null==l?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}class ia{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(ra)!=t.state.facet(ra)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(ra);for(;e<i.length&&i[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e])))){let e=this.dom.firstChild,i=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[i].constructor&&r.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const ra=Ce.define();function oa(t){return[Vo.define((e=>new ia(e,t))),ra.of(t)]}const na=!Xr.ios,sa=Ce.define({combine:t=>gi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function aa(t={}){return[sa.of(t),ha,da,fa,Xo.of(!0)]}function la(t){return t.startState.facet(sa)!=t.state.facet(sa)}const ha=oa({above:!0,markers(t){let{state:e}=t,i=e.facet(sa),r=[];for(let o of e.selection.ranges){let n=o==e.selection.main;if(o.empty?!n||na:i.drawRangeCursor){let e=n?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=o.empty?o:Te.cursor(o.head,o.head>o.anchor?-1:1);for(let o of Js.forRange(t,e,i))r.push(o)}}return r},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=la(t);return i&&ca(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){ca(e.state,t)},class:"cm-cursorLayer"});function ca(t,e){e.style.animationDuration=t.facet(sa).cursorBlinkRate+"ms"}const da=oa({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:Js.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||la(t),class:"cm-selectionLayer"}),ua={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};na&&(ua[".cm-line"].caretColor=ua[".cm-content"].caretColor="transparent !important");const fa=Ve.highest(zs.theme(ua)),pa=oi.define({map:(t,e)=>null==t?null:e.mapPos(t)}),Oa=Ee.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(pa)?e.value:t),t))}),ga=Vo.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(Oa);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Oa)!=i||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Oa),i=null!=e&&t.coordsAtPos(e);if(!i)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:i.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:i.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:i.bottom-i.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:i}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/i+"px",this.cursor.style.height=t.height/i+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Oa)!=t&&this.view.dispatch({effects:pa.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function ma(t,e,i,r,o){e.lastIndex=0;for(let n,s=t.iterRange(i,r),a=i;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;n=e.exec(s.value);)o(a+n.index,n)}class ba{constructor(t){const{regexp:e,decoration:i,decorate:r,boundary:o,maxLength:n=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=(t,e,i,o)=>r(o,i,i+t[0].length,t,e);else if("function"==typeof i)this.addMatch=(t,e,r,o)=>{let n=i(t,e,r);n&&o(r,r+t[0].length,n)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,r,o)=>o(r,r+t[0].length,i)}this.boundary=o,this.maxLength=n}createDeco(t){let e=new xi,i=e.add.bind(e);for(let{from:e,to:r}of function(t,e){let i=t.visibleRanges;if(1==i.length&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let r=[];for(let{from:o,to:n}of i)o=Math.max(t.state.doc.lineAt(o).from,o-e),n=Math.min(t.state.doc.lineAt(n).to,n+e),r.length&&r[r.length-1].to>=o?r[r.length-1].to=n:r.push({from:o,to:n});return r}(t,this.maxLength))ma(t.state.doc,this.regexp,e,r,((e,r)=>this.addMatch(r,t,e,i)));return e.finish()}updateDeco(t,e){let i=1e9,r=-1;return t.docChanged&&t.changes.iterChanges(((e,o,n,s)=>{s>t.view.viewport.from&&n<t.view.viewport.to&&(i=Math.min(n,i),r=Math.max(s,r))})),t.viewportChanged||r-i>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),i,r):e}updateRange(t,e,i,r){for(let o of t.visibleRanges){let n=Math.max(o.from,i),s=Math.min(o.to,r);if(s>n){let i=t.state.doc.lineAt(n),r=i.to<s?t.state.doc.lineAt(s):i,a=Math.max(o.from,i.from),l=Math.min(o.to,r.to);if(this.boundary){for(;n>i.from;n--)if(this.boundary.test(i.text[n-1-i.from])){a=n;break}for(;s<r.to;s++)if(this.boundary.test(r.text[s-r.from])){l=s;break}}let h,c=[],d=(t,e,i)=>c.push(i.range(t,e));if(i==r)for(this.regexp.lastIndex=a-i.from;(h=this.regexp.exec(i.text))&&h.index<l-i.from;)this.addMatch(h,t,h.index+i.from,d);else ma(t.state.doc,this.regexp,a,l,((e,i)=>this.addMatch(i,t,e,d)));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>t<a||e>l,add:c})}}return e}}const va=null!=/x/.unicode?"gu":"g",wa=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",va),ya={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let xa=null;const Sa=Ce.define({combine(t){let e=gi(t,{render:null,specialChars:wa,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==xa&&"undefined"!=typeof document&&document.body){let e=document.body.style;xa=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return xa||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,va)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,va)),e}});function ka(t={}){return[Sa.of(t),Qa||(Qa=Vo.fromClass(class{constructor(t){this.view=t,this.decorations=Hr.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Sa)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new ba({regexp:t.specialChars,decoration:(e,i,r)=>{let{doc:o}=i.state,n=Oe(e[0],0);if(9==n){let t=o.lineAt(r),e=i.state.tabSize,n=Xi(t.text,e,r-t.from);return Hr.replace({widget:new Pa((e-n%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[n]||(this.decorationCache[n]=Hr.replace({widget:new $a(t,n)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Sa);t.startState.facet(Sa)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let Qa=null;class $a extends Gr{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(ya[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,e);if(r)return r;let o=document.createElement("span");return o.textContent=e,o.title=i,o.setAttribute("aria-label",i),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class Pa extends Gr{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const Za=Hr.line({class:"cm-activeLine"}),Ta=Vo.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let r of t.state.selection.ranges){let o=t.lineBlockAt(r.head);o.from>e&&(i.push(Za.range(o.from)),e=o.from)}return Hr.set(i)}},{decorations:t=>t.decorations}),Ra=2e3;function Aa(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(i),o=i-r.from,n=o>Ra?-1:o==r.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):Xi(r.text,t.state.tabSize,i-r.from);return{line:r.number,col:n,off:o}}function Ca(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return zs.mouseSelectionStyle.of(((t,i)=>e(i)?function(t,e){let i=Aa(t,e),r=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),o=t.state.doc.lineAt(e);i={line:o.number,col:i.col,off:Math.min(i.off,o.length)},r=r.map(t.changes)}},get(e,o,n){let s=Aa(t,e);if(!s)return r;let a=function(t,e,i){let r=Math.min(e.line,i.line),o=Math.max(e.line,i.line),n=[];if(e.off>Ra||i.off>Ra||e.col<0||i.col<0){let s=Math.min(e.off,i.off),a=Math.max(e.off,i.off);for(let e=r;e<=o;e++){let i=t.doc.line(e);i.length<=a&&n.push(Te.range(i.from+s,i.to+a))}}else{let s=Math.min(e.col,i.col),a=Math.max(e.col,i.col);for(let e=r;e<=o;e++){let i=t.doc.line(e),r=Mi(i.text,s,t.tabSize,!0);if(r<0)n.push(Te.cursor(i.to));else{let e=Mi(i.text,a,t.tabSize);n.push(Te.range(i.from+r,i.from+e))}}}return n}(t.state,i,s);return a.length?n?Te.create(a.concat(r.ranges)):Te.create(a):r}}:null}(t,i):null))}const Xa={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Ma={style:"cursor: crosshair"};function _a(t={}){let[e,i]=Xa[t.key||"Alt"],r=Vo.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||i(t))},keyup(t){t.keyCode!=e&&i(t)||this.set(!1)},mousemove(t){this.set(i(t))}}});return[r,zs.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.isDown)?Ma:null}))]}const qa="-10000px";class Wa{constructor(t,e,i,r){this.facet=e,this.createTooltipView=i,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let o=null;this.tooltipViews=this.tooltips.map((t=>o=i(t,o)))}update(t,e){var i;let r=t.state.facet(this.facet),o=r.filter((t=>t));if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let n=[],s=e?[]:null;for(let i=0;i<o.length;i++){let r=o[i],a=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(a=t)}if(a<0)n[i]=this.createTooltipView(r,i?n[i-1]:null),s&&(s[i]=!!r.above);else{let r=n[i]=this.tooltipViews[a];s&&(s[i]=e[a]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)n.indexOf(t)<0&&(this.removeTooltipView(t),null===(i=t.destroy)||void 0===i||i.call(t));return e&&(s.forEach(((t,i)=>e[i]=t)),e.length=s.length),this.input=r,this.tooltips=o,this.tooltipViews=n,!0}}function za(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Ea=Ce.define({combine:t=>{var e,i,r;return{position:Xr.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(r=t.find((t=>t.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||za}}}),Ya=new WeakMap,Va=Vo.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Ea);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Wa(t,Ua,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,r=t.state.facet(Ea);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),r=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=qa,i.dom.style.left="0px",this.container.insertBefore(i.dom,r),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,i=1,r=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(Xr.gecko)r=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==qa&&"0px"==t.style.left){let e=t.getBoundingClientRect();r=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(r||"absolute"==this.position)if(this.parent){let t=this.parent.getBoundingClientRect();t.width&&t.height&&(e=t.width/this.parent.offsetWidth,i=t.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:i}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(Ea).tooltipSpace(this.view),scaleX:e,scaleY:i,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{editor:i,space:r,scaleX:o,scaleY:n}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:c}=h,d=t.pos[a],u=t.size[a];if(!d||d.bottom<=Math.max(i.top,r.top)||d.top>=Math.min(i.bottom,r.bottom)||d.right<Math.max(i.left,r.left)-.1||d.left>Math.min(i.right,r.right)+.1){c.style.top=qa;continue}let f=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=f?7:0,O=u.right-u.left,g=null!==(e=Ya.get(h))&&void 0!==e?e:u.bottom-u.top,m=h.offset||ja,b=this.view.textDirection==no.LTR,v=u.width>r.right-r.left?b?r.left:r.right-u.width:b?Math.min(d.left-(f?14:0)+m.x,r.right-O):Math.max(r.left,d.left-O+(f?14:0)-m.x),w=this.above[a];!l.strictSide&&(w?d.top-(u.bottom-u.top)-m.y<r.top:d.bottom+(u.bottom-u.top)+m.y>r.bottom)&&w==r.bottom-d.bottom>d.top-r.top&&(w=this.above[a]=!w);let y=(w?d.top-r.top:r.bottom-d.bottom)-p;if(y<g&&!1!==h.resize){if(y<this.view.defaultLineHeight){c.style.top=qa;continue}Ya.set(h,g),c.style.height=(g=y)/n+"px"}else c.style.height&&(c.style.height="");let x=w?d.top-g-p-m.y:d.bottom+p+m.y,S=v+O;if(!0!==h.overlap)for(let t of s)t.left<S&&t.right>v&&t.top<x+g&&t.bottom>x&&(x=w?t.top-g-2-p:t.bottom+p+2);if("absolute"==this.position?(c.style.top=(x-t.parent.top)/n+"px",c.style.left=(v-t.parent.left)/o+"px"):(c.style.top=x/n+"px",c.style.left=v/o+"px"),f){let t=d.left+(b?m.x:-m.x)-(v+14-7);f.style.left=t/o+"px"}!0!==h.overlap&&s.push({left:v,top:x,right:S,bottom:x+g}),c.classList.toggle("cm-tooltip-above",w),c.classList.toggle("cm-tooltip-below",!w),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=qa}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Da=zs.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),ja={x:0,y:0},Ua=Ce.define({enables:[Va,Da]}),Na=Ce.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class Ia{static create(t){return new Ia(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Wa(t,Na,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let r=i[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Ba=Ua.compute([Na],(t=>{let e=t.facet(Na);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:Ia.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Ga{constructor(t,e,i,r,o){this.view=t,this.source=e,this.field=i,this.setHover=r,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,i=t.docView.nearest(e.target);if(!i)return;let r,o=1;if(i instanceof qr)r=i.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let i=t.coordsAtPos(r);if(!i||e.y<i.top||e.y>i.bottom||e.x<i.left-t.defaultCharacterWidth||e.x>i.right+t.defaultCharacterWidth)return;let n=t.bidiSpans(t.state.doc.lineAt(r)).find((t=>t.from<=r&&t.to>=r)),s=n&&n.dir==no.RTL?-1:1;o=e.x<i.left?-s:s}let n=this.source(t,r,o);if(null==n?void 0:n.then){let e=this.pending={pos:r};n.then((i=>{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))}),(e=>Wo(t.state,e,"hover tooltip")))}else!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])})}get tooltip(){let t=this.view.plugin(Va),e=t?t.manager.tooltips.findIndex((t=>t.create==Ia.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:o}=this;if(r.length&&o&&!function(t,e){let i=t.getBoundingClientRect();return e.clientX>=i.left-La&&e.clientX<=i.right+La&&e.clientY>=i.top-La&&e.clientY<=i.bottom+La}(o.dom,t)||this.pending){let{pos:o}=r[0]||this.pending,n=null!==(i=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==i?i:o;(o==n?this.view.posAtCoords(this.lastMove)==o:function(t,e,i,r,o,n){let s=t.scrollDOM.getBoundingClientRect(),a=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>o||Math.min(s.bottom,a)<o)return!1;let l=t.posAtCoords({x:r,y:o},!1);return l>=e&&l<=i}(this.view,o,n,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const La=4;function Ha(t,e={}){let i=oi.define(),r=Ee.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(r,t)))),r.docChanged)){let e=[];for(let i of t){let t=r.changes.mapPos(i.pos,-1,ve.TrackDel);if(null!=t){let o=Object.assign(Object.create(null),i);o.pos=t,null!=o.end&&(o.end=r.changes.mapPos(o.end)),e.push(o)}}t=e}for(let e of r.effects)e.is(i)&&(t=e.value),e.is(Ka)&&(t=[]);return t},provide:t=>Na.from(t)});return[r,Vo.define((o=>new Ga(o,t,r,i,e.hoverTime||300))),Ba]}function Fa(t,e){let i=t.plugin(Va);if(!i)return null;let r=i.manager.tooltips.indexOf(e);return r<0?null:i.manager.tooltipViews[r]}const Ka=oi.define(),Ja=Ce.define({combine(t){let e,i;for(let r of t)e=e||r.topContainer,i=i||r.bottomContainer;return{topContainer:e,bottomContainer:i}}});function tl(t,e){let i=t.plugin(el),r=i?i.specs.indexOf(e):-1;return r>-1?i.panels[r]:null}const el=Vo.fromClass(class{constructor(t){this.input=t.state.facet(ol),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(Ja);this.top=new il(t,!0,e.topContainer),this.bottom=new il(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(Ja);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new il(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new il(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(ol);if(i!=this.input){let e=i.filter((t=>t)),r=[],o=[],n=[],s=[];for(let i of e){let e,a=this.specs.indexOf(i);a<0?(e=i(t.view),s.push(e)):(e=this.panels[a],e.update&&e.update(t)),r.push(e),(e.top?o:n).push(e)}this.specs=e,this.panels=r,this.top.sync(o),this.bottom.sync(n);for(let t of s)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>zs.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class il{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=rl(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=rl(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function rl(t){let e=t.nextSibling;return t.remove(),e}const ol=Ce.define({enables:el});class nl extends mi{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}nl.prototype.elementClass="",nl.prototype.toDOM=void 0,nl.prototype.mapMode=ve.TrackBefore,nl.prototype.startSide=nl.prototype.endSide=-1,nl.prototype.point=!0;const sl=Ce.define(),al={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>yi.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},ll=Ce.define();function hl(t){return[dl(),ll.of(Object.assign(Object.assign({},al),t))]}const cl=Ce.define({combine:t=>t.some((t=>t))});function dl(t){let e=[ul];return t&&!1===t.fixed&&e.push(cl.of(!0)),e}const ul=Vo.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(ll).map((e=>new gl(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(cl),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,r=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(r<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(cl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=yi.iter(this.view.state.facet(sl),this.view.viewport.from),r=[],o=this.gutters.map((t=>new Ol(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==Lr.Text&&e){pl(i,r,n.from);for(let t of o)t.line(this.view,n,r);e=!1}else if(n.widget)for(let t of o)t.widget(this.view,n)}else if(t.type==Lr.Text){pl(i,r,t.from);for(let e of o)e.line(this.view,t,r)}else if(t.widget)for(let e of o)e.widget(this.view,t);for(let t of o)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(ll),i=t.state.facet(ll),r=t.docChanged||t.heightChanged||t.viewportChanged||!yi.eq(t.startState.facet(sl),t.state.facet(sl),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(r=!0);else{r=!0;let o=[];for(let r of i){let i=e.indexOf(r);i<0?o.push(new gl(this.view,r)):(this.gutters[i].update(t),o.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),o.indexOf(t)<0&&t.destroy();for(let t of o)this.dom.appendChild(t.dom);this.gutters=o}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>zs.scrollMargins.of((e=>{let i=e.plugin(t);return i&&0!=i.gutters.length&&i.fixed?e.textDirection==no.LTR?{left:i.dom.offsetWidth*e.scaleX}:{right:i.dom.offsetWidth*e.scaleX}:null}))});function fl(t){return Array.isArray(t)?t:[t]}function pl(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class Ol{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=yi.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:r}=this,o=(e.top-this.height)/t.scaleY,n=e.height/t.scaleY;if(this.i==r.elements.length){let e=new ml(t,n,o,i);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,n,o,i);this.height=e.bottom,this.i++}line(t,e,i){let r=[];pl(this.cursor,r,e.from),i.length&&(r=r.concat(i));let o=this.gutter.config.lineMarker(t,e,r);o&&r.unshift(o);let n=this.gutter;(0!=r.length||n.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e);i&&this.addElement(t,e,[i])}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class gl{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(r=>{let o,n=r.target;if(n!=this.dom&&this.dom.contains(n)){for(;n.parentNode!=this.dom;)n=n.parentNode;let t=n.getBoundingClientRect();o=(t.top+t.bottom)/2}else o=r.clientY;let s=t.lineBlockAtHeight(o-t.documentTop);e.domEventHandlers[i](t,s,r)&&r.preventDefault()}));this.markers=fl(e.markers(t)),e.initialSpacer&&(this.spacer=new ml(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=fl(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!yi.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class ml{constructor(t,e,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,r)}update(t,e,i,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].compare(e[i]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let i="cm-gutterElement",r=this.dom.firstChild;for(let o=0,n=0;;){let s=n,a=o<e.length?e[o++]:null,l=!1;if(a){let t=a.elementClass;t&&(i+=" "+t);for(let t=n;t<this.markers.length;t++)if(this.markers[t].compare(a)){s=t,l=!0;break}}else s=this.markers.length;for(;n<s;){let t=this.markers[n++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(t),r)),l&&n++}this.dom.className=i,this.markers=e}destroy(){this.setMarkers(null,[])}}const bl=Ce.define(),vl=Ce.define({combine:t=>gi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let r=i[t],o=e[t];i[t]=r?(t,e,i)=>r(t,e,i)||o(t,e,i):o}return i}})});class wl extends nl{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function yl(t,e){return t.state.facet(vl).formatNumber(e,t.state)}const xl=ll.compute([vl],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(bl),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new wl(yl(t,t.state.doc.lineAt(e.from).number)),widgetMarker:()=>null,lineMarkerChange:t=>t.startState.facet(vl)!=t.state.facet(vl),initialSpacer:t=>new wl(yl(t,kl(t.state.doc.lines))),updateSpacer(t,e){let i=yl(e.view,kl(e.view.state.doc.lines));return i==t.number?t:new wl(i)},domEventHandlers:t.facet(vl).domEventHandlers})));function Sl(t={}){return[vl.of(t),dl(),xl]}function kl(t){let e=9;for(;e<t;)e=10*e+9;return e}const Ql=new class extends nl{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},$l=sl.compute(["selection"],(t=>{let e=[],i=-1;for(let r of t.selection.ranges){let o=t.doc.lineAt(r.head).from;o>i&&(i=o,e.push(Ql.range(o)))}return yi.of(e)})),Pl=1024;let Zl=0;class Tl{constructor(t,e){this.from=t,this.to=e}}class Rl{constructor(t={}){this.id=Zl++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=Xl.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}Rl.closedBy=new Rl({deserialize:t=>t.split(" ")}),Rl.openedBy=new Rl({deserialize:t=>t.split(" ")}),Rl.group=new Rl({deserialize:t=>t.split(" ")}),Rl.isolate=new Rl({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),Rl.contextHash=new Rl({perNode:!0}),Rl.lookAhead=new Rl({perNode:!0}),Rl.mounted=new Rl({perNode:!0});class Al{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}static get(t){return t&&t.props&&t.props[Rl.mounted.id]}}const Cl=Object.create(null);class Xl{constructor(t,e,i,r=0){this.name=t,this.props=e,this.id=i,this.flags=r}static define(t){let e=t.props&&t.props.length?Object.create(null):Cl,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),r=new Xl(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(r)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return r}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(Rl.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let r of i.split(" "))e[r]=t[i];return t=>{for(let i=t.prop(Rl.group),r=-1;r<(i?i.length:0);r++){let o=e[r<0?t.name:i[r]];if(o)return o}}}}Xl.none=new Xl("",Object.create(null),0,8);class Ml{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let i of this.types){let r=null;for(let e of t){let t=e(i);t&&(r||(r=Object.assign({},i.props)),r[t[0].id]=t[1])}e.push(r?new Xl(i.name,r,i.id,i.flags):i)}return new Ml(e)}}const _l=new WeakMap,ql=new WeakMap;var Wl;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(Wl||(Wl={}));class zl{constructor(t,e,i,r,o){if(this.type=t,this.children=e,this.positions=i,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[t,e]of o)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=Al.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let i=t.toString();i&&(e&&(e+=","),e+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new Fl(this.topNode,t)}cursorAt(t,e=0,i=0){let r=_l.get(this)||this.topNode,o=new Fl(r);return o.moveTo(t,e),_l.set(this,o._tree),o}get topNode(){return new Ul(this,0,0,null)}resolve(t,e=0){let i=Dl(_l.get(this)||this.topNode,t,e,!1);return _l.set(this,i),i}resolveInner(t,e=0){let i=Dl(ql.get(this)||this.topNode,t,e,!0);return ql.set(this,i),i}resolveStack(t,e=0){return function(t,e,i){let r=t.resolveInner(e,i),o=null;for(let t=r instanceof Ul?r:r.context.parent;t;t=t.parent)if(t.index<0){let n=t.parent;(o||(o=[r])).push(n.resolve(e,i)),t=n}else{let n=Al.get(t.tree);if(n&&n.overlay&&n.overlay[0].from<=e&&n.overlay[n.overlay.length-1].to>=e){let s=new Ul(n.tree,n.overlay[0].from+t.from,-1,t);(o||(o=[r])).push(Dl(s,e,i,!1))}}return o?Ll(o):r}(this,t,e)}iterate(t){let{enter:e,leave:i,from:r=0,to:o=this.length}=t,n=t.mode||0,s=(n&Wl.IncludeAnonymous)>0;for(let t=this.cursor(n|Wl.IncludeAnonymous);;){let n=!1;if(t.from<=o&&t.to>=r&&(!s&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;n=!0}for(;n&&i&&(s||!t.type.isAnonymous)&&i(t),!t.nextSibling();){if(!t.parent())return;n=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:eh(Xl.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new zl(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new zl(Xl.none,t,e,i)))}static build(t){return function(t){var e;let{buffer:i,nodeSet:r,maxBufferLength:o=Pl,reused:n=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(i)?new El(i,i.length):i,l=r.types,h=0,c=0;function d(t,e,i,g,m,b){let{id:v,start:w,end:y,size:x}=a,S=c;for(;x<0;){if(a.next(),-1==x){let e=n[v];return i.push(e),void g.push(w-t)}if(-3==x)return void(h=v);if(-4==x)return void(c=v);throw new RangeError(`Unrecognized record size: ${x}`)}let k,Q,$=l[v],P=w-t;if(y-w<=o&&(Q=function(t,e){let i=a.fork(),r=0,n=0,l=0,h=i.end-o,c={size:0,start:0,skip:0};t:for(let o=i.pos-t;i.pos>o;){let t=i.size;if(i.id==e&&t>=0){c.size=r,c.start=n,c.skip=l,l+=4,r+=4,i.next();continue}let a=i.pos-t;if(t<0||a<o||i.start<h)break;let d=i.id>=s?4:0,u=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break t;d+=4}else i.id>=s&&(d+=4);i.next()}n=u,r+=t,l+=d}return(e<0||r==t)&&(c.size=r,c.start=n,c.skip=l),c.size>4?c:void 0}(a.pos-e,m))){let e=new Uint16Array(Q.size-Q.skip),i=a.pos-Q.size,o=e.length;for(;a.pos>i;)o=O(Q.start,e,o);k=new Yl(e,y-Q.start,r),P=Q.start-t}else{let t=a.pos-x;a.next();let e=[],i=[],r=v>=s?v:-1,n=0,l=y;for(;a.pos>t;)r>=0&&a.id==r&&a.size>=0?(a.end<=l-o&&(f(e,i,w,n,a.end,l,r,S),n=e.length,l=a.end),a.next()):b>2500?u(w,t,e,i):d(w,t,e,i,r,b+1);if(r>=0&&n>0&&n<e.length&&f(e,i,w,n,w,l,r,S),e.reverse(),i.reverse(),r>-1&&n>0){let t=function(t){return(e,i,r)=>{let o,n,s=0,a=e.length-1;if(a>=0&&(o=e[a])instanceof zl){if(!a&&o.type==t&&o.length==r)return o;(n=o.prop(Rl.lookAhead))&&(s=i[a]+o.length+n)}return p(t,e,i,r,s)}}($);k=eh($,e,i,0,e.length,0,y-w,t,t)}else k=p($,e,i,y-w,S-y)}i.push(k),g.push(P)}function u(t,e,i,n){let s=[],l=0,h=-1;for(;a.pos>e;){let{id:t,start:e,end:i,size:r}=a;if(r>4)a.next();else{if(h>-1&&e<h)break;h<0&&(h=i-o),s.push(t,e,i),l++,a.next()}}if(l){let e=new Uint16Array(4*l),o=s[s.length-2];for(let t=s.length-3,i=0;t>=0;t-=3)e[i++]=s[t],e[i++]=s[t+1]-o,e[i++]=s[t+2]-o,e[i++]=i;i.push(new Yl(e,s[2]-o,r)),n.push(o-t)}}function f(t,e,i,o,n,s,a,l){let h=[],c=[];for(;t.length>o;)h.push(t.pop()),c.push(e.pop()+i-n);t.push(p(r.types[a],h,c,s-n,l-s)),e.push(n-i)}function p(t,e,i,r,o=0,n){if(h){let t=[Rl.contextHash,h];n=n?[t].concat(n):[t]}if(o>25){let t=[Rl.lookAhead,o];n=n?[t].concat(n):[t]}return new zl(t,e,i,r,n)}function O(t,e,i){let{id:r,start:o,end:n,size:l}=a;if(a.next(),l>=0&&r<s){let s=i;if(l>4){let r=a.pos-(l-4);for(;a.pos>r;)i=O(t,e,i)}e[--i]=s,e[--i]=n-t,e[--i]=o-t,e[--i]=r}else-3==l?h=r:-4==l&&(c=r);return i}let g=[],m=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,g,m,-1,0);let b=null!==(e=t.length)&&void 0!==e?e:g.length?m[0]+g[0].length:0;return new zl(l[t.topID],g.reverse(),m.reverse(),b)}(t)}}zl.empty=new zl(Xl.none,[],[],0);class El{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new El(this.buffer,this.index)}}class Yl{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return Xl.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],i=this.buffer[t+3],r=this.set.types[e],o=r.name;if(/\W/.test(o)&&!r.isError&&(o=JSON.stringify(o)),i==(t+=4))return o;let n=[];for(;t<i;)n.push(this.childString(t)),t=this.buffer[t+3];return o+"("+n.join(",")+")"}findChild(t,e,i,r,o){let{buffer:n}=this,s=-1;for(let a=t;a!=e&&!(Vl(o,r,n[a+1],n[a+2])&&(s=a,i>0));a=n[a+3]);return s}slice(t,e,i){let r=this.buffer,o=new Uint16Array(e-t),n=0;for(let s=t,a=0;s<e;){o[a++]=r[s++],o[a++]=r[s++]-i;let e=o[a++]=r[s++]-i;o[a++]=r[s++]-t,n=Math.max(n,e)}return new Yl(o,n,this.set)}}function Vl(t,e,i,r){switch(t){case-2:return i<e;case-1:return r>=e&&i<e;case 0:return i<e&&r>e;case 1:return i<=e&&r>e;case 2:return r>e;case 4:return!0}}function Dl(t,e,i,r){for(var o;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof Ul&&t.index<0?null:t.parent;if(!e)return t;t=e}let n=r?0:Wl.IgnoreOverlays;if(r)for(let r=t,s=r.parent;s;r=s,s=r.parent)r instanceof Ul&&r.index<0&&(null===(o=s.enter(e,i,n))||void 0===o?void 0:o.from)!=r.from&&(t=s);for(;;){let r=t.enter(e,i,n);if(!r)return t;t=r}}class jl{cursor(t=0){return new Fl(this,t)}getChild(t,e=null,i=null){let r=Nl(this,t,e,i);return r.length?r[0]:null}getChildren(t,e=null,i=null){return Nl(this,t,e,i)}resolve(t,e=0){return Dl(this,t,e,!1)}resolveInner(t,e=0){return Dl(this,t,e,!0)}matchContext(t){return Il(this,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),i=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(i=e,e=t.prevSibling):e=t}return i}get node(){return this}get next(){return this.parent}}class Ul extends jl{constructor(t,e,i,r){super(),this._tree=t,this.from=e,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,i,r,o=0){for(let n=this;;){for(let{children:s,positions:a}=n._tree,l=e>0?s.length:-1;t!=l;t+=e){let l=s[t],h=a[t]+n.from;if(Vl(r,i,h,h+l.length))if(l instanceof Yl){if(o&Wl.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,e,i-h,r);if(s>-1)return new Gl(new Bl(n,l,t,h),null,s)}else if(o&Wl.IncludeAnonymous||!l.type.isAnonymous||Kl(l)){let s;if(!(o&Wl.IgnoreMounts)&&(s=Al.get(l))&&!s.overlay)return new Ul(s.tree,h,t,n);let a=new Ul(l,h,t,n);return o&Wl.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(e<0?l.children.length-1:0,e,i,r)}}if(o&Wl.IncludeAnonymous||!n.type.isAnonymous)return null;if(t=n.index>=0?n.index+e:e<0?-1:n._parent._tree.children.length,n=n._parent,!n)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,i=0){let r;if(!(i&Wl.IgnoreOverlays)&&(r=Al.get(this._tree))&&r.overlay){let i=t-this.from;for(let{from:t,to:o}of r.overlay)if((e>0?t<=i:t<i)&&(e<0?o>=i:o>i))return new Ul(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Nl(t,e,i,r){let o=t.cursor(),n=[];if(!o.firstChild())return n;if(null!=i)for(let t=!1;!t;)if(t=o.type.is(i),!o.nextSibling())return n;for(;;){if(null!=r&&o.type.is(r))return n;if(o.type.is(e)&&n.push(o.node),!o.nextSibling())return null==r?n:[]}}function Il(t,e,i=e.length-1){for(let r=t.parent;i>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[i]&&e[i]!=r.name)return!1;i--}}return!0}class Bl{constructor(t,e,i,r){this.parent=t,this.buffer=e,this.index=i,this.start=r}}class Gl extends jl{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.context.start,i);return o<0?null:new Gl(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i=0){if(i&Wl.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return o<0?null:new Gl(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new Gl(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new Gl(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,r=this.index+4,o=i.buffer[this.index+3];if(o>r){let n=i.buffer[this.index+1];t.push(i.slice(r,o,n)),e.push(0)}return new zl(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Ll(t){if(!t.length)return null;let e=0,i=t[0];for(let r=1;r<t.length;r++){let o=t[r];(o.from>i.from||o.to<i.to)&&(i=o,e=r)}let r=i instanceof Ul&&i.index<0?null:i.parent,o=t.slice();return r?o[e]=r:o.splice(e,1),new Hl(o,i)}class Hl{constructor(t,e){this.heads=t,this.node=e}get next(){return Ll(this.heads)}}class Fl{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof Ul)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[t]],this.from=i+r.buffer[t+1],this.to=i+r.buffer[t+2],!0}yield(t){return!!t&&(t instanceof Ul?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,i,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,i);return!(o<0)&&(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=this.mode){return this.buffer?!(i&Wl.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Wl.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&Wl.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:i}=r)}else({index:e,_parent:i}=this._tree);for(;i;({index:e,_parent:i}=i))if(e>-1)for(let r=e+t,o=t<0?-1:i._tree.children.length;r!=o;r+=t){let t=i._tree.children[r];if(this.mode&Wl.IncludeAnonymous||t instanceof Yl||!t.type.isAnonymous||Kl(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,i=0;if(t&&t.context==this.buffer)t:for(let r=this.index,o=this.stack.length;o>=0;){for(let n=t;n;n=n._parent)if(n.index==r){if(r==this.index)return n;e=n,i=o+1;break t}r=this.stack[--o]}for(let t=i;t<this.stack.length;t++)e=new Gl(this.buffer,e,this.stack[t]);return this.bufferNode=new Gl(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let i=0;;){let r=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;r&&e&&e(this),r=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,r=!0}}}matchContext(t){if(!this.buffer)return Il(this.node,t);let{buffer:e}=this.buffer,{types:i}=e.set;for(let r=t.length-1,o=this.stack.length-1;r>=0;o--){if(o<0)return Il(this.node,t,r);let n=i[e.buffer[this.stack[o]]];if(!n.isAnonymous){if(t[r]&&t[r]!=n.name)return!1;r--}}return!0}}function Kl(t){return t.children.some((t=>t instanceof Yl||!t.type.isAnonymous||Kl(t)))}const Jl=new WeakMap;function th(t,e){if(!t.isAnonymous||e instanceof Yl||e.type!=t)return 1;let i=Jl.get(e);if(null==i){i=1;for(let r of e.children){if(r.type!=t||!(r instanceof zl)){i=1;break}i+=th(t,r)}Jl.set(e,i)}return i}function eh(t,e,i,r,o,n,s,a,l){let h=0;for(let i=r;i<o;i++)h+=th(t,e[i]);let c=Math.ceil(1.5*h/8),d=[],u=[];return function e(i,r,o,s,a){for(let h=o;h<s;){let o=h,f=r[h],p=th(t,i[h]);for(h++;h<s;h++){let e=th(t,i[h]);if(p+e>=c)break;p+=e}if(h==o+1){if(p>c){let t=i[o];e(t.children,t.positions,0,t.children.length,r[o]+a);continue}d.push(i[o])}else{let e=r[h-1]+i[h-1].length-f;d.push(eh(t,i,r,o,h,f,e,null,l))}u.push(f+a-n)}}(e,i,r,o,0),(a||l)(d,u,s)}class ih{constructor(){this.map=new WeakMap}setBuffer(t,e,i){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(e,i)}getBuffer(t,e){let i=this.map.get(t);return i&&i.get(e)}set(t,e){t instanceof Gl?this.setBuffer(t.context.buffer,t.index,e):t instanceof Ul&&this.map.set(t.tree,e)}get(t){return t instanceof Gl?this.getBuffer(t.context.buffer,t.index):t instanceof Ul?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class rh{constructor(t,e,i,r,o=!1,n=!1){this.from=t,this.to=e,this.tree=i,this.offset=r,this.open=(o?1:0)|(n?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let r=[new rh(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&r.push(i);return r}static applyChanges(t,e,i=128){if(!e.length)return t;let r=[],o=1,n=t.length?t[0]:null;for(let s=0,a=0,l=0;;s++){let h=s<e.length?e[s]:null,c=h?h.fromA:1e9;if(c-a>=i)for(;n&&n.from<c;){let e=n;if(a>=e.from||c<=e.to||l){let t=Math.max(e.from,a)-l,i=Math.min(e.to,c)-l;e=t>=i?null:new rh(t,i,e.tree,e.offset+l,s>0,!!h)}if(e&&r.push(e),n.to>c)break;n=o<t.length?t[o++]:null}if(!h)break;a=h.toA,l=h.toA-h.toB}return r}}class oh{startParse(t,e,i){return"string"==typeof t&&(t=new nh(t)),i=i?i.length?i.map((t=>new Tl(t.from,t.to))):[new Tl(0,0)]:[new Tl(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let r=this.startParse(t,e,i);for(;;){let t=r.advance();if(t)return t}}}class nh{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class sh{constructor(t,e,i,r,o){this.parser=t,this.parse=e,this.overlay=i,this.target=r,this.from=o}}function ah(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class lh{constructor(t,e,i,r,o,n,s){this.parser=t,this.predicate=e,this.mounts=i,this.index=r,this.start=o,this.target=n,this.prev=s,this.depth=0,this.ranges=[]}}const hh=new Rl({perNode:!0});class ch{constructor(t,e,i,r,o){this.nest=e,this.input=i,this.fragments=r,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new zl(t.type,t.children,t.positions,t.length,t.propValues.concat([[hh,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[Rl.mounted.id]=new Al(e,t.overlay,t.parser),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new Oh(this.fragments),e=null,i=null,r=new Fl(new Ul(this.baseTree,this.ranges[0].from,0,null),Wl.IncludeAnonymous|Wl.IgnoreMounts);t:for(let o,n;;){let s,a=!0;if(null!=this.stoppedAt&&r.from>=this.stoppedAt)a=!1;else if(t.hasNode(r)){if(e){let t=e.mounts.find((t=>t.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay));if(t)for(let i of t.mount.overlay){let o=i.from+t.pos,n=i.to+t.pos;o>=r.from&&n<=r.to&&!e.ranges.some((t=>t.from<n&&t.to>o))&&e.ranges.push({from:o,to:n})}}a=!1}else if(i&&(n=dh(i.ranges,r.from,r.to)))a=2!=n;else if(!r.type.isAnonymous&&(o=this.nest(r,this.input))&&(r.from<r.to||!o.overlay)){r.tree||fh(r);let n=t.findMounts(r.from,o.parser);if("function"==typeof o.overlay)e=new lh(o.parser,o.overlay,n,this.inner.length,r.from,r.tree,e);else{let t=gh(this.ranges,o.overlay||(r.from<r.to?[new Tl(r.from,r.to)]:[]));t.length&&ah(t),!t.length&&o.overlay||this.inner.push(new sh(o.parser,t.length?o.parser.startParse(this.input,bh(n,t),t):o.parser.startParse(""),o.overlay?o.overlay.map((t=>new Tl(t.from-r.from,t.to-r.from))):null,r.tree,t.length?t[0].from:r.from)),o.overlay?t.length&&(i={ranges:t,depth:0,prev:i}):a=!1}}else e&&(s=e.predicate(r))&&(!0===s&&(s=new Tl(r.from,r.to)),s.from<s.to&&e.ranges.push(s));if(a&&r.firstChild())e&&e.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break t;if(e&&! --e.depth){let t=gh(this.ranges,e.ranges);t.length&&(ah(t),this.inner.splice(e.index,0,new sh(e.parser,e.parser.startParse(this.input,bh(e.mounts,t),t),e.ranges.map((t=>new Tl(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}i&&! --i.depth&&(i=i.prev)}}}}function dh(t,e,i){for(let r of t){if(r.from>=i)break;if(r.to>e)return r.from<=e&&r.to>=i?2:1}return 0}function uh(t,e,i,r,o,n){if(e<i){let s=t.buffer[e+1];r.push(t.slice(e,i,s)),o.push(s-n)}}function fh(t){let{node:e}=t,i=[],r=e.context.buffer;do{i.push(t.index),t.parent()}while(!t.tree);let o=t.tree,n=o.children.indexOf(r),s=o.children[n],a=s.buffer,l=[n];o.children[n]=function t(r,o,n,h,c,d){let u=i[d],f=[],p=[];uh(s,r,u,f,p,h);let O=a[u+1],g=a[u+2];l.push(f.length);let m=d?t(u+4,a[u+3],s.set.types[a[u]],O,g-O,d-1):e.toTree();return f.push(m),p.push(O-h),uh(s,a[u+3],o,f,p,h),new zl(n,f,p,c)}(0,a.length,Xl.none,0,s.length,i.length-1);for(let e of l){let i=t.tree.children[e],r=t.tree.positions[e];t.yield(new Ul(i,r+t.from,e,t._tree))}}class ph{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(Wl.IncludeAnonymous|Wl.IgnoreMounts)}moveTo(t){let{cursor:e}=this,i=t-this.offset;for(;!this.done&&e.from<i;)e.to>=t&&e.enter(i,1,Wl.IgnoreOverlays|Wl.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof zl))break;e=e.children[0]}return!1}}class Oh{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(e=i.tree.prop(hh))&&void 0!==e?e:i.to,this.inner=new ph(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(hh))&&void 0!==t?t:e.to,this.inner=new ph(e.tree,-e.offset)}}findMounts(t,e){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let o=null===(i=t.tree)||void 0===i?void 0:i.prop(Rl.mounted);if(o&&o.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let i=this.fragments[e];if(i.from>=t.to)break;i.tree==this.curFrag.tree&&r.push({frag:i,pos:t.from-i.offset,mount:o})}}}return r}}function gh(t,e){let i=null,r=e;for(let o=1,n=0;o<t.length;o++){let s=t[o-1].to,a=t[o].from;for(;n<r.length;n++){let t=r[n];if(t.from>=a)break;t.to<=s||(i||(r=i=e.slice()),t.from<s?(i[n]=new Tl(t.from,s),t.to>a&&i.splice(n+1,0,new Tl(a,t.to))):t.to>a?i[n--]=new Tl(a,t.to):i.splice(n--,1))}}return r}function mh(t,e,i,r){let o=0,n=0,s=!1,a=!1,l=-1e9,h=[];for(;;){let c=o==t.length?1e9:s?t[o].to:t[o].from,d=n==e.length?1e9:a?e[n].to:e[n].from;if(s!=a){let t=Math.max(l,i),e=Math.min(c,d,r);t<e&&h.push(new Tl(t,e))}if(l=Math.min(c,d),1e9==l)break;c==l&&(s?(s=!1,o++):s=!0),d==l&&(a?(a=!1,n++):a=!0)}return h}function bh(t,e){let i=[];for(let{pos:r,mount:o,frag:n}of t){let t=r+(o.overlay?o.overlay[0].from:0),s=t+o.tree.length,a=Math.max(n.from,t),l=Math.min(n.to,s);if(o.overlay){let s=mh(e,o.overlay.map((t=>new Tl(t.from+r,t.to+r))),a,l);for(let e=0,r=a;;e++){let a=e==s.length,h=a?l:s[e].from;if(h>r&&i.push(new rh(r,h,o.tree,-t,n.from>=r||n.openStart,n.to<=h||n.openEnd)),a)break;r=s[e].to}}else i.push(new rh(a,l,o.tree,-t,n.from>=t||n.openStart,n.to<=s||n.openEnd))}return i}let vh=0;class wh{constructor(t,e,i){this.set=t,this.base=e,this.modified=i,this.id=vh++}static define(t){if(null==t?void 0:t.base)throw new Error("Can not derive from a modified tag");let e=new wh([],null,[]);if(e.set.push(e),t)for(let i of t.set)e.set.push(i);return e}static defineModifier(){let t=new xh;return e=>e.modified.indexOf(t)>-1?e:xh.get(e.base||e,e.modified.concat(t).sort(((t,e)=>t.id-e.id)))}}let yh=0;class xh{constructor(){this.instances=[],this.id=yh++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>i.base==t&&function(t,e){return t.length==e.length&&t.every(((t,i)=>t==e[i]))}(e,i.modified)));if(i)return i;let r=[],o=new wh(r,t,e);for(let t of e)t.instances.push(o);let n=function(t){let e=[[]];for(let i=0;i<t.length;i++)for(let r=0,o=e.length;r<o;r++)e.push(e[r].concat(t[i]));return e.sort(((t,e)=>e.length-t.length))}(e);for(let e of t.set)if(!e.modified.length)for(let t of n)r.push(xh.get(e,t));return o}}function Sh(t){let e=Object.create(null);for(let i in t){let r=t[i];Array.isArray(r)||(r=[r]);for(let t of i.split(" "))if(t){let i=[],o=2,n=t;for(let e=0;;){if("..."==n&&e>0&&e+3==t.length){o=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(n);if(!r)throw new RangeError("Invalid path: "+t);if(i.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),e+=r[0].length,e==t.length)break;let s=t[e++];if(e==t.length&&"!"==s){o=0;break}if("/"!=s)throw new RangeError("Invalid path: "+t);n=t.slice(e)}let s=i.length-1,a=i[s];if(!a)throw new RangeError("Invalid path: "+t);let l=new Qh(r,o,s>0?i.slice(0,s):null);e[a]=l.sort(e[a])}}return kh.add(e)}const kh=new Rl;class Qh{constructor(t,e,i,r){this.tags=t,this.mode=e,this.context=i,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function $h(t,e){let i=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)i[t.id]=e.class;else i[e.tag.id]=e.class;let{scope:r,all:o=null}=e||{};return{style:t=>{let e=o;for(let r of t)for(let t of r.set){let r=i[t.id];if(r){e=e?e+" "+r:r;break}}return e},scope:r}}function Ph(t,e,i,r=0,o=t.length){let n=new Zh(r,Array.isArray(e)?e:[e],i);n.highlightRange(t.cursor(),r,o,"",n.highlighters),n.flush(o)}Qh.empty=new Qh([],2,null);class Zh{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,r,o){let{type:n,from:s,to:a}=t;if(s>=i||a<=e)return;n.isTop&&(o=this.highlighters.filter((t=>!t.scope||t.scope(n))));let l=r,h=function(t){let e=t.type.prop(kh);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||Qh.empty,c=function(t,e){let i=null;for(let r of t){let t=r.style(e);t&&(i=i?i+" "+t:t)}return i}(o,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,s),l),h.opaque)return;let d=t.tree&&t.tree.prop(Rl.mounted);if(d&&d.overlay){let n=t.node.enter(d.overlay[0].from+s,1),h=this.highlighters.filter((t=>!t.scope||t.scope(d.tree.type))),c=t.firstChild();for(let u=0,f=s;;u++){let p=u<d.overlay.length?d.overlay[u]:null,O=p?p.from+s:a,g=Math.max(e,f),m=Math.min(i,O);if(g<m&&c)for(;t.from<m&&(this.highlightRange(t,g,m,r,o),this.startSpan(Math.min(m,t.to),l),!(t.to>=O)&&t.nextSibling()););if(!p||O>i)break;f=p.to+s,f>e&&(this.highlightRange(n.cursor(),Math.max(e,p.from+s),Math.min(i,f),"",h),this.startSpan(Math.min(i,f),l))}c&&t.parent()}else if(t.firstChild()){d&&(r="");do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,r,o),this.startSpan(Math.min(i,t.to),l)}}while(t.nextSibling());t.parent()}}}const Th=wh.define,Rh=Th(),Ah=Th(),Ch=Th(Ah),Xh=Th(Ah),Mh=Th(),_h=Th(Mh),qh=Th(Mh),Wh=Th(),zh=Th(Wh),Eh=Th(),Yh=Th(),Vh=Th(),Dh=Th(Vh),jh=Th(),Uh={comment:Rh,lineComment:Th(Rh),blockComment:Th(Rh),docComment:Th(Rh),name:Ah,variableName:Th(Ah),typeName:Ch,tagName:Th(Ch),propertyName:Xh,attributeName:Th(Xh),className:Th(Ah),labelName:Th(Ah),namespace:Th(Ah),macroName:Th(Ah),literal:Mh,string:_h,docString:Th(_h),character:Th(_h),attributeValue:Th(_h),number:qh,integer:Th(qh),float:Th(qh),bool:Th(Mh),regexp:Th(Mh),escape:Th(Mh),color:Th(Mh),url:Th(Mh),keyword:Eh,self:Th(Eh),null:Th(Eh),atom:Th(Eh),unit:Th(Eh),modifier:Th(Eh),operatorKeyword:Th(Eh),controlKeyword:Th(Eh),definitionKeyword:Th(Eh),moduleKeyword:Th(Eh),operator:Yh,derefOperator:Th(Yh),arithmeticOperator:Th(Yh),logicOperator:Th(Yh),bitwiseOperator:Th(Yh),compareOperator:Th(Yh),updateOperator:Th(Yh),definitionOperator:Th(Yh),typeOperator:Th(Yh),controlOperator:Th(Yh),punctuation:Vh,separator:Th(Vh),bracket:Dh,angleBracket:Th(Dh),squareBracket:Th(Dh),paren:Th(Dh),brace:Th(Dh),content:Wh,heading:zh,heading1:Th(zh),heading2:Th(zh),heading3:Th(zh),heading4:Th(zh),heading5:Th(zh),heading6:Th(zh),contentSeparator:Th(Wh),list:Th(Wh),quote:Th(Wh),emphasis:Th(Wh),strong:Th(Wh),link:Th(Wh),monospace:Th(Wh),strikethrough:Th(Wh),inserted:Th(),deleted:Th(),changed:Th(),invalid:Th(),meta:jh,documentMeta:Th(jh),annotation:Th(jh),processingInstruction:Th(jh),definition:wh.defineModifier(),constant:wh.defineModifier(),function:wh.defineModifier(),standard:wh.defineModifier(),local:wh.defineModifier(),special:wh.defineModifier()};var Nh;$h([{tag:Uh.link,class:"tok-link"},{tag:Uh.heading,class:"tok-heading"},{tag:Uh.emphasis,class:"tok-emphasis"},{tag:Uh.strong,class:"tok-strong"},{tag:Uh.keyword,class:"tok-keyword"},{tag:Uh.atom,class:"tok-atom"},{tag:Uh.bool,class:"tok-bool"},{tag:Uh.url,class:"tok-url"},{tag:Uh.labelName,class:"tok-labelName"},{tag:Uh.inserted,class:"tok-inserted"},{tag:Uh.deleted,class:"tok-deleted"},{tag:Uh.literal,class:"tok-literal"},{tag:Uh.string,class:"tok-string"},{tag:Uh.number,class:"tok-number"},{tag:[Uh.regexp,Uh.escape,Uh.special(Uh.string)],class:"tok-string2"},{tag:Uh.variableName,class:"tok-variableName"},{tag:Uh.local(Uh.variableName),class:"tok-variableName tok-local"},{tag:Uh.definition(Uh.variableName),class:"tok-variableName tok-definition"},{tag:Uh.special(Uh.variableName),class:"tok-variableName2"},{tag:Uh.definition(Uh.propertyName),class:"tok-propertyName tok-definition"},{tag:Uh.typeName,class:"tok-typeName"},{tag:Uh.namespace,class:"tok-namespace"},{tag:Uh.className,class:"tok-className"},{tag:Uh.macroName,class:"tok-macroName"},{tag:Uh.propertyName,class:"tok-propertyName"},{tag:Uh.operator,class:"tok-operator"},{tag:Uh.comment,class:"tok-comment"},{tag:Uh.meta,class:"tok-meta"},{tag:Uh.invalid,class:"tok-invalid"},{tag:Uh.punctuation,class:"tok-punctuation"}]);const Ih=new Rl;function Bh(t){return Ce.define({combine:t?e=>e.concat(t):void 0})}const Gh=new Rl;class Lh{constructor(t,e,i=[],r=""){this.data=t,this.name=r,Oi.prototype.hasOwnProperty("tree")||Object.defineProperty(Oi.prototype,"tree",{get(){return Kh(this)}}),this.parser=e,this.extension=[ac.of(this),Oi.languageData.of(((t,e,i)=>{let r=Hh(t,e,i),o=r.type.prop(Ih);if(!o)return[];let n=t.facet(o),s=r.type.prop(Gh);if(s){let o=r.resolve(e-r.from,i);for(let e of s)if(e.test(o,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(n)}}return n}))].concat(i)}isActiveAt(t,e,i=-1){return Hh(t,e,i).type.prop(Ih)==this.data}findRegions(t){let e=t.facet(ac);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],r=(t,e)=>{if(t.prop(Ih)==this.data)return void i.push({from:e,to:e+t.length});let o=t.prop(Rl.mounted);if(o){if(o.tree.prop(Ih)==this.data){if(o.overlay)for(let t of o.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(o.overlay){let t=i.length;if(r(o.tree,o.overlay[0].from+e),i.length>t)return}}for(let i=0;i<t.children.length;i++){let o=t.children[i];o instanceof zl&&r(o,t.positions[i]+e)}};return r(Kh(t),0),i}get allowsNesting(){return!0}}function Hh(t,e,i){let r=t.facet(ac),o=Kh(t).topNode;if(!r||r.allowsNesting)for(let t=o;t;t=t.enter(e,i,Wl.ExcludeBuffers))t.type.isTop&&(o=t);return o}Lh.setState=oi.define();class Fh extends Lh{constructor(t,e,i){super(t,e,[],i),this.parser=e}static define(t){let e=Bh(t.languageData);return new Fh(e,t.parser.configure({props:[Ih.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new Fh(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Kh(t){let e=t.field(Lh.state,!1);return e?e.tree:zl.empty}class Jh{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t<i||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let tc=null;class ec{constructor(t,e,i=[],r,o,n,s,a){this.parser=t,this.state=e,this.fragments=i,this.tree=r,this.treeLen=o,this.viewport=n,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new ec(t,e,[],zl.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Jh(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=zl.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(rh.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(i=this.parse.stoppedAt)&&void 0!==i?i:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(rh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=tc;tc=this;try{return t()}finally{tc=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=ic(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:r,treeLen:o,viewport:n,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,r,o)=>e.push({fromA:t,toA:i,fromB:r,toB:o}))),i=rh.applyChanges(i,e),r=zl.empty,o=0,n={from:t.mapPos(n.from,-1),to:t.mapPos(n.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);i<r&&s.push({from:i,to:r})}}}return new ec(this.parser,e,i,r,o,n,s,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:i,to:r}=this.skipped[e];i<t.to&&r>t.from&&(this.fragments=ic(this.fragments,i,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends oh{createParse(e,i,r){let o=r[0].from,n=r[r.length-1].to;return{parsedPos:o,advance(){let e=tc;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=n,new zl(Xl.none,[],[],n-o)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return tc}}function ic(t,e,i){return rh.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class rc{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new rc(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=ec.create(t.facet(ac).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new rc(i)}}Lh.state=Ee.define({create:rc.init,update(t,e){for(let t of e.effects)if(t.is(Lh.setState))return t.value;return e.startState.facet(ac)!=e.state.facet(ac)?rc.init(e.state):t.apply(e)}});let oc=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(oc=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const nc="undefined"!=typeof navigator&&(null===(Nh=navigator.scheduling)||void 0===Nh?void 0:Nh.isInputPending)?()=>navigator.scheduling.isInputPending():null,sc=Vo.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(Lh.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(Lh.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=oc(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,o=i.field(Lh.state);if(o.tree==o.context.tree&&o.context.isDone(r+1e5))return;let n=Date.now()+Math.min(this.chunkBudget,100,t&&!nc?Math.max(25,t.timeRemaining()-5):1e9),s=o.context.treeLen<r&&i.doc.length>r+1e3,a=o.context.work((()=>nc&&nc()||Date.now()>n),r+(s?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Lh.setState.of(new rc(o.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>Wo(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ac=Ce.define({combine:t=>t.length?t[0]:null,enables:t=>[Lh.state,sc,zs.contentAttributes.compute([t],(e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}}))]});class lc{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const hc=Ce.define(),cc=Ce.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function dc(t){let e=t.facet(cc);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function uc(t,e){let i="",r=t.tabSize,o=t.facet(cc)[0];if("\t"==o){for(;e>=r;)i+="\t",e-=r;o=" "}for(let t=0;t<e;t++)i+=o;return i}function fc(t,e){t instanceof Oi&&(t=new pc(t));for(let i of t.state.facet(hc)){let r=i(t,e);if(void 0!==r)return r}let i=Kh(t.state);return i.length>=e?function(t,e,i){let r=e.resolveStack(i),o=r.node.enterUnfinishedNodesBefore(i);if(o!=r.node){let t=[];for(let e=o;e!=r.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return gc(r,t,i)}(t,i,e):null}class pc{constructor(t,e={}){this.state=t,this.options=e,this.unit=dc(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:o}=this.options;return null!=r&&r>=i.from&&r<=i.to?o&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(t,e);return i.slice(t-r,Math.min(i.length,t+100-r))}column(t,e=1){let{text:i,from:r}=this.lineAt(t,e),o=this.countColumn(i,t-r),n=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return n>-1&&(o+=n-this.countColumn(i,i.search(/\S|$/))),o}countColumn(t,e=t.length){return Xi(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:r}=this.lineAt(t,e),o=this.options.overrideIndentation;if(o){let t=o(r);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Oc=new Rl;function gc(t,e,i){for(let r=t;r;r=r.next){let t=mc(r.node);if(t)return t(vc.create(e,i,r))}return 0}function mc(t){let e=t.type.prop(Oc);if(e)return e;let i,r=t.firstChild;if(r&&(i=r.type.prop(Rl.closedBy))){let e=t.lastChild,r=e&&i.indexOf(e.name)>-1;return t=>xc(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?bc:null}function bc(){return 0}class vc extends pc{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new vc(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(wc(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return gc(this.context.next,this.base,this.pos)}}function wc(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function yc({closing:t,align:e=!0,units:i=1}){return r=>xc(r,e,i,t)}function xc(t,e,i,r,o){let n=t.textAfter,s=n.match(/^\s*/)[0].length,a=r&&n.slice(s,s+r.length)==r||o==t.pos+s,l=e?function(t){let e=t.node,i=e.childAfter(e.from),r=e.lastChild;if(!i)return null;let o=t.options.simulateBreak,n=t.state.doc.lineAt(i.from),s=null==o||o<=n.from?n.to:Math.min(n.to,o);for(let t=i.to;;){let o=e.childAfter(t);if(!o||o==r)return null;if(!o.type.isSkipped)return o.from<s?i:null;t=o.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*i)}function Sc({except:t,units:e=1}={}){return i=>{let r=t&&t.test(i.textAfter);return i.baseIndent+(r?0:e*i.unit)}}const kc=Ce.define(),Qc=new Rl;function $c(t){let e=t.firstChild,i=t.lastChild;return e&&e.to<i.from?{from:e.to,to:i.type.isError?t.to:i.from}:null}function Pc(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Zc(t,e,i){for(let r of t.facet(kc)){let o=r(t,e,i);if(o)return o}return function(t,e,i){let r=Kh(t);if(r.length<i)return null;let o=null;for(let n=r.resolveStack(i,1);n;n=n.next){let s=n.node;if(s.to<=i||s.from>i)continue;if(o&&s.from<e)break;let a=s.type.prop(Qc);if(a&&(s.to<r.length-50||r.length==t.doc.length||!Pc(s))){let r=a(s,t);r&&r.from<=i&&r.from>=e&&r.to>i&&(o=r)}}return o}(t,e,i)}function Tc(t,e){let i=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return i>=r?void 0:{from:i,to:r}}const Rc=oi.define({map:Tc}),Ac=oi.define({map:Tc});function Cc(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some((t=>t.from<=i&&t.to>=i))||e.push(t.lineBlockAt(i));return e}const Xc=Ee.define({create:()=>Hr.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)if(i.is(Rc)&&!_c(t,i.value.from,i.value.to)){let{preparePlaceholder:r}=e.state.facet(Yc),o=r?Hr.replace({widget:new Uc(r(e.state,i.value))}):jc;t=t.update({add:[o.range(i.value.from,i.value.to)]})}else i.is(Ac)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:r}=e.selection.main;t.between(r,r,((t,e)=>{t<r&&e>r&&(i=!0)})),i&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>zs.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,((t,e)=>{i.push(t,e)})),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i<t.length;){let r=t[i++],o=t[i++];if("number"!=typeof r||"number"!=typeof o)throw new RangeError("Invalid JSON for fold state");e.push(jc.range(r,o))}return Hr.set(e,!0)}});function Mc(t,e,i){var r;let o=null;return null===(r=t.field(Xc,!1))||void 0===r||r.between(e,i,((t,e)=>{(!o||o.from>t)&&(o={from:t,to:e})})),o}function _c(t,e,i){let r=!1;return t.between(e,e,((t,o)=>{t==e&&o==i&&(r=!0)})),r}function qc(t,e){return t.field(Xc,!1)?e:e.concat(oi.appendConfig.of(Vc()))}function Wc(t,e,i=!0){let r=t.state.doc.lineAt(e.from).number,o=t.state.doc.lineAt(e.to).number;return zs.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${o}.`)}const zc=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of Cc(t)){let i=Zc(t.state,e.from,e.to);if(i)return t.dispatch({effects:qc(t.state,[Rc.of(i),Wc(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Xc,!1))return!1;let e=[];for(let i of Cc(t)){let r=Mc(t.state,i.from,i.to);r&&e.push(Ac.of(r),Wc(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let r=0;r<e.doc.length;){let o=t.lineBlockAt(r),n=Zc(e,o.from,o.to);n&&i.push(Rc.of(n)),r=(n?t.lineBlockAt(n.to):o).to+1}return i.length&&t.dispatch({effects:qc(t.state,i)}),!!i.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(Xc,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,((t,e)=>{i.push(Ac.of({from:t,to:e}))})),t.dispatch({effects:i}),!0}}],Ec={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Yc=Ce.define({combine:t=>gi(t,Ec)});function Vc(t){let e=[Xc,Gc];return t&&e.push(Yc.of(t)),e}function Dc(t,e){let{state:i}=t,r=i.facet(Yc),o=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),r=Mc(t.state,i.from,i.to);r&&t.dispatch({effects:Ac.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,o,e);let n=document.createElement("span");return n.textContent=r.placeholderText,n.setAttribute("aria-label",i.phrase("folded code")),n.title=i.phrase("unfold"),n.className="cm-foldPlaceholder",n.onclick=o,n}const jc=Hr.replace({widget:new class extends Gr{toDOM(t){return Dc(t,null)}}});class Uc extends Gr{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return Dc(t,this.value)}}const Nc={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Ic extends nl{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function Bc(t={}){let e=Object.assign(Object.assign({},Nc),t),i=new Ic(e,!0),r=new Ic(e,!1),o=Vo.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(ac)!=t.state.facet(ac)||t.startState.field(Xc,!1)!=t.state.field(Xc,!1)||Kh(t.startState)!=Kh(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new xi;for(let o of t.viewportLineBlocks){let n=Mc(t.state,o.from,o.to)?r:Zc(t.state,o.from,o.to)?i:null;n&&e.add(o.from,o.from,n)}return e.finish()}}),{domEventHandlers:n}=e;return[o,hl({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(o))||void 0===e?void 0:e.markers)||yi.empty},initialSpacer:()=>new Ic(e,!1),domEventHandlers:Object.assign(Object.assign({},n),{click:(t,e,i)=>{if(n.click&&n.click(t,e,i))return!0;let r=Mc(t.state,e.from,e.to);if(r)return t.dispatch({effects:Ac.of(r)}),!0;let o=Zc(t.state,e.from,e.to);return!!o&&(t.dispatch({effects:Rc.of(o)}),!0)}})}),Vc()]}const Gc=zs.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Lc{constructor(t,e){let i;function r(t){let e=zi.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const o="string"==typeof e.all?e.all:e.all?r(e.all):void 0,n=e.scope;this.scope=n instanceof Lh?t=>t.prop(Ih)==n.data:n?t=>t==n:void 0,this.style=$h(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:o}).style,this.module=i?new zi(i):null,this.themeType=e.themeType}static define(t,e){return new Lc(t,e||{})}}const Hc=Ce.define(),Fc=Ce.define({combine:t=>t.length?[t[0]]:null});function Kc(t){let e=t.facet(Hc);return e.length?e:t.facet(Fc)}function Jc(t,e){let i,r=[ed];return t instanceof Lc&&(t.module&&r.push(zs.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?r.push(Fc.of(t)):i?r.push(Hc.computeN([zs.darkTheme],(e=>e.facet(zs.darkTheme)==("dark"==i)?[t]:[]))):r.push(Hc.of(t)),r}class td{constructor(t){this.markCache=Object.create(null),this.tree=Kh(t.state),this.decorations=this.buildDeco(t,Kc(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=Kh(t.state),i=Kc(t.state),r=i!=Kc(t.startState),{viewport:o}=t.view,n=t.changes.mapPos(this.decoratedTo,1);e.length<o.to&&!r&&e.type==this.tree.type&&n>=o.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=n):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=o.to)}buildDeco(t,e){if(!e||!this.tree.length)return Hr.none;let i=new xi;for(let{from:r,to:o}of t.visibleRanges)Ph(this.tree,e,((t,e,r)=>{i.add(t,e,this.markCache[r]||(this.markCache[r]=Hr.mark({class:r})))}),r,o);return i.finish()}}const ed=Ve.high(Vo.fromClass(td,{decorations:t=>t.decorations})),id=Lc.define([{tag:Uh.meta,color:"#404740"},{tag:Uh.link,textDecoration:"underline"},{tag:Uh.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Uh.emphasis,fontStyle:"italic"},{tag:Uh.strong,fontWeight:"bold"},{tag:Uh.strikethrough,textDecoration:"line-through"},{tag:Uh.keyword,color:"#708"},{tag:[Uh.atom,Uh.bool,Uh.url,Uh.contentSeparator,Uh.labelName],color:"#219"},{tag:[Uh.literal,Uh.inserted],color:"#164"},{tag:[Uh.string,Uh.deleted],color:"#a11"},{tag:[Uh.regexp,Uh.escape,Uh.special(Uh.string)],color:"#e40"},{tag:Uh.definition(Uh.variableName),color:"#00f"},{tag:Uh.local(Uh.variableName),color:"#30a"},{tag:[Uh.typeName,Uh.namespace],color:"#085"},{tag:Uh.className,color:"#167"},{tag:[Uh.special(Uh.variableName),Uh.macroName],color:"#256"},{tag:Uh.definition(Uh.propertyName),color:"#00c"},{tag:Uh.comment,color:"#940"},{tag:Uh.invalid,color:"#f00"}]),rd=zs.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),od=1e4,nd="()[]{}",sd=Ce.define({combine:t=>gi(t,{afterCursor:!0,brackets:nd,maxScanDistance:od,renderMatch:hd})}),ad=Hr.mark({class:"cm-matchingBracket"}),ld=Hr.mark({class:"cm-nonmatchingBracket"});function hd(t){let e=[],i=t.matched?ad:ld;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const cd=Ee.define({create:()=>Hr.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],r=e.state.facet(sd);for(let t of e.state.selection.ranges){if(!t.empty)continue;let o=gd(e.state,t.head,-1,r)||t.head>0&&gd(e.state,t.head-1,1,r)||r.afterCursor&&(gd(e.state,t.head,1,r)||t.head<e.state.doc.length&&gd(e.state,t.head+1,-1,r));o&&(i=i.concat(r.renderMatch(o,e.state)))}return Hr.set(i,!0)},provide:t=>zs.decorations.from(t)}),dd=[cd,rd];function ud(t={}){return[sd.of(t),dd]}const fd=new Rl;function pd(t,e,i){let r=t.prop(e<0?Rl.openedBy:Rl.closedBy);if(r)return r;if(1==t.name.length){let r=i.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[i[r+e]]}return null}function Od(t){let e=t.type.prop(fd);return e?e(t.node):t}function gd(t,e,i,r={}){let o=r.maxScanDistance||od,n=r.brackets||nd,s=Kh(t),a=s.resolveInner(e,i);for(let t=a;t;t=t.parent){let r=pd(t.type,i,n);if(r&&t.from<t.to){let o=Od(t);if(o&&(i>0?e>=o.from&&e<o.to:e>o.from&&e<=o.to))return md(0,0,i,t,o,r,n)}}return function(t,e,i,r,o,n,s){let a=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),d=0;for(let t=0;!c.next().done&&t<=n;){let n=c.value;i<0&&(t+=n.length);let a=e+t*i;for(let t=i>0?0:n.length-1,e=i>0?n.length:-1;t!=e;t+=i){let e=s.indexOf(n[t]);if(!(e<0||r.resolveInner(a+t,1).type!=o))if(e%2==0==i>0)d++;else{if(1==d)return{start:h,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};d--}}i>0&&(t+=n.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,s,a.type,o,n)}function md(t,e,i,r,o,n,s){let a=r.parent,l={from:o.from,to:o.to},h=0,c=null==a?void 0:a.cursor();if(c&&(i<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(i<0?c.to<=r.from:c.from>=r.to){if(0==h&&n.indexOf(c.type.name)>-1&&c.from<c.to){let t=Od(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(pd(c.type,i,s))h++;else if(pd(c.type,-i,s)){if(0==h){let t=Od(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}h--}}}while(i<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const bd=Object.create(null),vd=[Xl.none],wd=[],yd=Object.create(null),xd=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])xd[t]=kd(bd,e);function Sd(t,e){wd.indexOf(t)>-1||(wd.push(t),console.warn(e))}function kd(t,e){let i=[];for(let r of e.split(" ")){let e=[];for(let i of r.split(".")){let r=t[i]||Uh[i];r?"function"==typeof r?e.length?e=e.map(r):Sd(i,`Modifier ${i} used at start of tag`):e.length?Sd(i,`Tag ${i} used as modifier`):e=Array.isArray(r)?r:[r]:Sd(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let r=e.replace(/ /g,"_"),o=r+" "+i.map((t=>t.id)),n=yd[o];if(n)return n.id;let s=yd[o]=Xl.define({id:vd.length,name:r,props:[Sh({[r]:i})]});return vd.push(s),s.id}function Qd(t,e){return({state:i,dispatch:r})=>{if(i.readOnly)return!1;let o=t(e,i);return!!o&&(r(i.update(o)),!0)}}no.RTL,no.LTR;const $d=Qd(Cd,0),Pd=Qd(Ad,0),Zd=Qd(((t,e)=>Ad(t,e,function(t){let e=[];for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),o=i.to<=r.to?r:t.doc.lineAt(i.to),n=e.length-1;n>=0&&e[n].to>r.from?e[n].to=o.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return e}(e))),0);function Td(t,e){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}const Rd=50;function Ad(t,e,i=e.selection.ranges){let r=i.map((t=>Td(e,t.from).block));if(!r.every((t=>t)))return null;let o=i.map(((t,i)=>function(t,{open:e,close:i},r,o){let n,s,a=t.sliceDoc(r-Rd,r),l=t.sliceDoc(o,o+Rd),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,d=a.length-h;if(a.slice(d-e.length,d)==e&&l.slice(c,c+i.length)==i)return{open:{pos:r-h,margin:h&&1},close:{pos:o+c,margin:c&&1}};o-r<=2*Rd?n=s=t.sliceDoc(r,o):(n=t.sliceDoc(r,r+Rd),s=t.sliceDoc(o-Rd,o));let u=/^\s*/.exec(n)[0].length,f=/\s*$/.exec(s)[0].length,p=s.length-f-i.length;return n.slice(u,u+e.length)==e&&s.slice(p,p+i.length)==i?{open:{pos:r+u+e.length,margin:/\s/.test(n.charAt(u+e.length))?1:0},close:{pos:o-f-i.length,margin:/\s/.test(s.charAt(p-1))?1:0}}:null}(e,r[i],t.from,t.to)));if(2!=t&&!o.every((t=>t)))return{changes:e.changes(i.map(((t,e)=>o[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}])))};if(1!=t&&o.some((t=>t))){let t=[];for(let e,i=0;i<o.length;i++)if(e=o[i]){let o=r[i],{open:n,close:s}=e;t.push({from:n.pos-o.open.length,to:n.pos+n.margin},{from:s.pos-s.margin,to:s.pos+o.close.length})}return{changes:t}}return null}function Cd(t,e,i=e.selection.ranges){let r=[],o=-1;for(let{from:t,to:n}of i){let i=r.length,s=1e9,a=Td(e,t).line;if(a){for(let i=t;i<=n;){let l=e.doc.lineAt(i);if(l.from>o&&(t==n||n>l.from)){o=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,i=l.text.slice(t,t+a.length)==a?t:-1;t<l.text.length&&t<s&&(s=t),r.push({line:l,comment:i,token:a,indent:t,empty:e,single:!1})}i=l.to+1}if(s<1e9)for(let t=i;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=s);r.length==i+1&&(r[i].single=!0)}}if(2!=t&&r.some((t=>t.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:i,indent:o,empty:n,single:s}of r)!s&&n||t.push({from:e.from+o,insert:i+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&r.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:o}of r)if(i>=0){let r=e.from+i,n=r+o.length;" "==e.text[n-e.from]&&n++,t.push({from:r,to:n})}return{changes:t}}return null}const Xd=ei.define(),Md=ei.define(),_d=Ce.define(),qd=Ce.define({combine:t=>gi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,r)=>t(i,r)||e(i,r)})}),Wd=Ee.define({create:()=>tu.empty,update(t,e){let i=e.state.facet(qd),r=e.annotation(Xd);if(r){let o=Ud.fromTransaction(e,r.selection),n=r.side,s=0==n?t.undone:t.done;return s=o?Nd(s,s.length,i.minDepth,o):Ld(s,e.startState.selection),new tu(0==n?r.rest:s,0==n?s:r.rest)}let o=e.annotation(Md);if("full"!=o&&"before"!=o||(t=t.isolate()),!1===e.annotation(ni.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let n=Ud.fromTransaction(e),s=e.annotation(ni.time),a=e.annotation(ni.userEvent);return n?t=t.addChanges(n,s,a,i,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,i.newGroupDelay)),"full"!=o&&"after"!=o||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new tu(t.done.map(Ud.fromJSON),t.undone.map(Ud.fromJSON))});function zd(t={}){return[Wd,qd.of(t),zs.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?Yd:"historyRedo"==t.inputType?Vd:null;return!!i&&(t.preventDefault(),i(e))}})]}function Ed(t,e){return function({state:i,dispatch:r}){if(!e&&i.readOnly)return!1;let o=i.field(Wd,!1);if(!o)return!1;let n=o.pop(t,i,e);return!!n&&(r(n),!0)}}const Yd=Ed(0,!1),Vd=Ed(1,!1),Dd=Ed(0,!0),jd=Ed(1,!0);class Ud{constructor(t,e,i,r,o){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=o}setSelAfter(t){return new Ud(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new Ud(t.changes&&ye.fromJSON(t.changes),[],t.mapped&&we.fromJSON(t.mapped),t.startSelection&&Te.fromJSON(t.startSelection),t.selectionsAfter.map(Te.fromJSON))}static fromTransaction(t,e){let i=Bd;for(let e of t.startState.facet(_d)){let r=e(t);r.length&&(i=i.concat(r))}return!i.length&&t.changes.empty?null:new Ud(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,Bd)}static selection(t){return new Ud(void 0,Bd,void 0,void 0,t)}}function Nd(t,e,i,r){let o=e+1>i+20?e-i-1:0,n=t.slice(o,e);return n.push(r),n}function Id(t,e){return t.length?e.length?t.concat(e):t:e}const Bd=[],Gd=200;function Ld(t,e){if(t.length){let i=t[t.length-1],r=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-Gd));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Nd(t,t.length-1,1e9,i.setSelAfter(r)))}return[Ud.selection([e])]}function Hd(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function Fd(t,e){if(!t.length)return t;let i=t.length,r=Bd;for(;i;){let o=Kd(t[i-1],e,r);if(o.changes&&!o.changes.empty||o.effects.length){let e=t.slice(0,i);return e[i-1]=o,e}e=o.mapped,i--,r=o.selectionsAfter}return r.length?[Ud.selection(r)]:Bd}function Kd(t,e,i){let r=Id(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):Bd,i);if(!t.changes)return Ud.selection(r);let o=t.changes.map(e),n=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(n):n;return new Ud(o,oi.mapEffects(t.effects,e),s,t.startSelection.map(n),r)}const Jd=/^(input\.type|delete)($|\.)/;class tu{constructor(t,e,i=0,r=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new tu(this.done,this.undone):this}addChanges(t,e,i,r,o){let n=this.done,s=n[n.length-1];return n=s&&s.changes&&!s.changes.empty&&t.changes&&(!i||Jd.test(i))&&(!s.selectionsAfter.length&&e-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,function(t,e){let i=[],r=!1;return t.iterChangedRanges(((t,e)=>i.push(t,e))),e.iterChangedRanges(((t,e,o,n)=>{for(let t=0;t<i.length;){let e=i[t++],s=i[t++];n>=e&&o<=s&&(r=!0)}})),r}(s.changes,t.changes))||"input.type.compose"==i)?Nd(n,n.length-1,r.minDepth,new Ud(t.changes.compose(s.changes),Id(t.effects,s.effects),s.mapped,s.startSelection,Bd)):Nd(n,n.length,r.minDepth,t),new tu(n,Bd,e,i)}addSelection(t,e,i,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:Bd;return o.length>0&&e-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&function(t,e){return t.ranges.length==e.ranges.length&&0===t.ranges.filter(((t,i)=>t.empty!=e.ranges[i].empty)).length}(o[o.length-1],t)?this:new tu(Ld(this.done,t),this.undone,e,i)}addMapping(t){return new tu(Fd(this.done,t),Fd(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let r=0==t?this.done:this.undone;if(0==r.length)return null;let o=r[r.length-1],n=o.selectionsAfter[0]||e.selection;if(i&&o.selectionsAfter.length)return e.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:Xd.of({side:t,rest:Hd(r),selection:n}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(o.changes){let i=1==r.length?Bd:r.slice(0,r.length-1);return o.mapped&&(i=Fd(i,o.mapped)),e.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:Xd.of({side:t,rest:i,selection:n}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}tu.empty=new tu(Bd,Bd);const eu=[{key:"Mod-z",run:Yd,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Vd,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Vd,preventDefault:!0},{key:"Mod-u",run:Dd,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:jd,preventDefault:!0}];function iu(t,e){return Te.create(t.ranges.map(e),t.mainIndex)}function ru(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ou({state:t,dispatch:e},i){let r=iu(t.selection,i);return!r.eq(t.selection,!0)&&(e(ru(t,r)),!0)}function nu(t,e){return Te.cursor(e?t.to:t.from)}function su(t,e){return ou(t,(i=>i.empty?t.moveByChar(i,e):nu(i,e)))}function au(t){return t.textDirectionAt(t.state.selection.main.head)==no.LTR}const lu=t=>su(t,!au(t)),hu=t=>su(t,au(t));function cu(t,e){return ou(t,(i=>i.empty?t.moveByGroup(i,e):nu(i,e)))}function du(t,e,i){if(e.type.prop(i))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function uu(t,e,i){let r,o,n=Kh(t).resolveInner(e.head),s=i?Rl.closedBy:Rl.openedBy;for(let r=e.head;;){let e=i?n.childAfter(r):n.childBefore(r);if(!e)break;du(t,e,s)?n=e:r=i?e.to:e.from}return o=n.type.prop(s)&&(r=i?gd(t,n.from,1):gd(t,n.to,-1))&&r.matched?i?r.end.to:r.end.from:i?n.to:n.from,Te.cursor(o,i?-1:1)}function fu(t,e){return ou(t,(i=>{if(!i.empty)return nu(i,e);let r=t.moveVertically(i,e);return r.head!=i.head?r:t.moveToLineBoundary(i,e)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const pu=t=>fu(t,!1),Ou=t=>fu(t,!0);function gu(t){let e,i=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,o=0;if(i){for(let e of t.state.facet(zs.scrollMargins)){let i=e(t);(null==i?void 0:i.top)&&(r=Math.max(null==i?void 0:i.top,r)),(null==i?void 0:i.bottom)&&(o=Math.max(null==i?void 0:i.bottom,o))}e=t.scrollDOM.clientHeight-r-o}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:o,selfScroll:i,height:Math.max(t.defaultLineHeight,e-5)}}function mu(t,e){let i,r=gu(t),{state:o}=t,n=iu(o.selection,(i=>i.empty?t.moveVertically(i,e,r.height):nu(i,e)));if(n.eq(o.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(o.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;e&&e.top>a&&e.bottom<l&&(i=zs.scrollIntoView(n.main.head,{y:"start",yMargin:e.top-a}))}return t.dispatch(ru(o,n),{effects:i}),!0}const bu=t=>mu(t,!1),vu=t=>mu(t,!0);function wu(t,e,i){let r=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,i);if(o.head==e.head&&o.head!=(i?r.to:r.from)&&(o=t.moveToLineBoundary(e,i,!1)),!i&&o.head==r.from&&r.length){let i=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;i&&e.head!=r.from+i&&(o=Te.cursor(r.from+i))}return o}function yu(t,e){let i=iu(t.state.selection,(t=>{let i=e(t);return Te.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(t.state.selection)&&(t.dispatch(ru(t.state,i)),!0)}function xu(t,e){return yu(t,(i=>t.moveByChar(i,e)))}const Su=t=>xu(t,!au(t)),ku=t=>xu(t,au(t));function Qu(t,e){return yu(t,(i=>t.moveByGroup(i,e)))}function $u(t,e){return yu(t,(i=>t.moveVertically(i,e)))}const Pu=t=>$u(t,!1),Zu=t=>$u(t,!0);function Tu(t,e){return yu(t,(i=>t.moveVertically(i,e,gu(t).height)))}const Ru=t=>Tu(t,!1),Au=t=>Tu(t,!0),Cu=({state:t,dispatch:e})=>(e(ru(t,{anchor:0})),!0),Xu=({state:t,dispatch:e})=>(e(ru(t,{anchor:t.doc.length})),!0),Mu=({state:t,dispatch:e})=>(e(ru(t,{anchor:t.selection.main.anchor,head:0})),!0),_u=({state:t,dispatch:e})=>(e(ru(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function qu(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:r}=t,o=r.changeByRange((r=>{let{from:o,to:n}=r;if(o==n){let s=e(r);s<o?(i="delete.backward",s=Wu(t,s,!1)):s>o&&(i="delete.forward",s=Wu(t,s,!0)),o=Math.min(o,s),n=Math.max(n,s)}else o=Wu(t,o,!1),n=Wu(t,n,!0);return o==n?{range:r}:{changes:{from:o,to:n},range:Te.cursor(o,o<r.head?-1:1)}}));return!o.changes.empty&&(t.dispatch(r.update(o,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?zs.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Wu(t,e,i){if(t instanceof zs)for(let r of t.state.facet(zs.atomicRanges).map((e=>e(t))))r.between(e,e,((t,r)=>{t<e&&r>e&&(e=i?r:t)}));return e}const zu=(t,e,i)=>qu(t,(r=>{let o,n,s=r.from,{state:a}=t,l=a.doc.lineAt(s);if(i&&!e&&s>l.from&&s<l.from+200&&!/[^ \t]/.test(o=l.text.slice(0,s-l.from))){if("\t"==o[o.length-1])return s-1;let t=Xi(o,a.tabSize)%dc(a)||dc(a);for(let e=0;e<t&&" "==o[o.length-1-e];e++)s--;n=s}else n=ce(l.text,s-l.from,e,e)+l.from,n==s&&l.number!=(e?a.doc.lines:1)?n+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(n-l.from,s-l.from))&&(n=ce(l.text,n-l.from,!1,!1)+l.from);return n})),Eu=t=>zu(t,!1,!0),Yu=t=>zu(t,!0,!1),Vu=(t,e)=>qu(t,(i=>{let r=i.head,{state:o}=t,n=o.doc.lineAt(r),s=o.charCategorizer(r);for(let t=null;;){if(r==(e?n.to:n.from)){r==i.head&&n.number!=(e?o.doc.lines:1)&&(r+=e?1:-1);break}let a=ce(n.text,r-n.from,e)+n.from,l=n.text.slice(Math.min(r,a)-n.from,Math.max(r,a)-n.from),h=s(l);if(null!=t&&h!=t)break;" "==l&&r==i.head||(t=h),r=a}return r})),Du=t=>Vu(t,!1);function ju(t){let e=[],i=-1;for(let r of t.selection.ranges){let o=t.doc.lineAt(r.from),n=t.doc.lineAt(r.to);if(r.empty||r.to!=n.from||(n=t.doc.lineAt(r.to-1)),i>=o.number){let t=e[e.length-1];t.to=n.to,t.ranges.push(r)}else e.push({from:o.from,to:n.to,ranges:[r]});i=n.number+1}return e}function Uu(t,e,i){if(t.readOnly)return!1;let r=[],o=[];for(let e of ju(t)){if(i?e.to==t.doc.length:0==e.from)continue;let n=t.doc.lineAt(i?e.to+1:e.from-1),s=n.length+1;if(i){r.push({from:e.to,to:n.to},{from:e.from,insert:n.text+t.lineBreak});for(let i of e.ranges)o.push(Te.range(Math.min(t.doc.length,i.anchor+s),Math.min(t.doc.length,i.head+s)))}else{r.push({from:n.from,to:e.from},{from:e.to,insert:t.lineBreak+n.text});for(let t of e.ranges)o.push(Te.range(t.anchor-s,t.head-s))}}return!!r.length&&(e(t.update({changes:r,scrollIntoView:!0,selection:Te.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Nu(t,e,i){if(t.readOnly)return!1;let r=[];for(let e of ju(t))i?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Iu=Gu(!1),Bu=Gu(!0);function Gu(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let r=e.changeByRange((i=>{let{from:r,to:o}=i,n=e.doc.lineAt(r),s=!t&&r==o&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,r=Kh(t).resolveInner(e),o=r.childBefore(e),n=r.childAfter(e);return o&&n&&o.to<=e&&n.from>=e&&(i=o.type.prop(Rl.closedBy))&&i.indexOf(n.name)>-1&&t.doc.lineAt(o.to).from==t.doc.lineAt(n.from).from&&!/\S/.test(t.sliceDoc(o.to,n.from))?{from:o.to,to:n.from}:null}(e,r);t&&(r=o=(o<=n.to?n:e.doc.lineAt(o)).to);let a=new pc(e,{simulateBreak:r,simulateDoubleBreak:!!s}),l=fc(a,r);for(null==l&&(l=Xi(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));o<n.to&&/\s/.test(n.text[o-n.from]);)o++;s?({from:r,to:o}=s):r>n.from&&r<n.from+100&&!/\S/.test(n.text.slice(0,r))&&(r=n.from);let h=["",uc(e,l)];return s&&h.push(uc(e,a.lineIndent(n.from,-1))),{changes:{from:r,to:o,insert:Ht.of(h)},range:Te.cursor(r+1+h[1].length)}}));return i(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Lu(t,e){let i=-1;return t.changeByRange((r=>{let o=[];for(let n=r.from;n<=r.to;){let s=t.doc.lineAt(n);s.number>i&&(r.empty||r.to>s.from)&&(e(s,o,r),i=s.number),n=s.to+1}let n=t.changes(o);return{changes:o,range:Te.range(n.mapPos(r.anchor,1),n.mapPos(r.head,1))}}))}const Hu=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Lu(t,((e,i)=>{i.push({from:e.from,insert:t.facet(cc)})})),{userEvent:"input.indent"})),!0),Fu=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Lu(t,((e,i)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let o=Xi(r,t.tabSize),n=0,s=uc(t,Math.max(0,o-dc(t)));for(;n<r.length&&n<s.length&&r.charCodeAt(n)==s.charCodeAt(n);)n++;i.push({from:e.from+n,to:e.from+r.length,insert:s.slice(n)})})),{userEvent:"delete.dedent"})),!0),Ku=[{key:"ArrowLeft",run:lu,shift:Su,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>cu(t,!au(t)),shift:t=>Qu(t,!au(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>ou(t,(e=>wu(t,e,!au(t)))),shift:t=>yu(t,(e=>wu(t,e,!au(t)))),preventDefault:!0},{key:"ArrowRight",run:hu,shift:ku,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>cu(t,au(t)),shift:t=>Qu(t,au(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>ou(t,(e=>wu(t,e,au(t)))),shift:t=>yu(t,(e=>wu(t,e,au(t)))),preventDefault:!0},{key:"ArrowUp",run:pu,shift:Pu,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Cu,shift:Mu},{mac:"Ctrl-ArrowUp",run:bu,shift:Ru},{key:"ArrowDown",run:Ou,shift:Zu,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Xu,shift:_u},{mac:"Ctrl-ArrowDown",run:vu,shift:Au},{key:"PageUp",run:bu,shift:Ru},{key:"PageDown",run:vu,shift:Au},{key:"Home",run:t=>ou(t,(e=>wu(t,e,!1))),shift:t=>yu(t,(e=>wu(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:Cu,shift:Mu},{key:"End",run:t=>ou(t,(e=>wu(t,e,!0))),shift:t=>yu(t,(e=>wu(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:Xu,shift:_u},{key:"Enter",run:Iu},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Eu,shift:Eu},{key:"Delete",run:Yu},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Du},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Vu(t,!0)},{mac:"Mod-Backspace",run:t=>qu(t,(e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>qu(t,(e=>{let i=t.moveToLineBoundary(e,!0).head;return e.head<i?i:Math.min(t.state.doc.length,e.head+1)}))}].concat([{key:"Ctrl-b",run:lu,shift:Su,preventDefault:!0},{key:"Ctrl-f",run:hu,shift:ku},{key:"Ctrl-p",run:pu,shift:Pu},{key:"Ctrl-n",run:Ou,shift:Zu},{key:"Ctrl-a",run:t=>ou(t,(e=>Te.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>yu(t,(e=>Te.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>ou(t,(e=>Te.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>yu(t,(e=>Te.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:Yu},{key:"Ctrl-h",run:Eu},{key:"Ctrl-k",run:t=>qu(t,(e=>{let i=t.lineBlockAt(e.head).to;return e.head<i?i:Math.min(t.state.doc.length,e.head+1)}))},{key:"Ctrl-Alt-h",run:Du},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:Ht.of(["",""])},range:Te.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,r=t.doc.lineAt(i),o=i==r.from?i-1:ce(r.text,i-r.from,!1)+r.from,n=i==r.to?i+1:ce(r.text,i-r.from,!0)+r.from;return{changes:{from:o,to:n,insert:t.doc.slice(i,n).append(t.doc.slice(o,i))},range:Te.cursor(n)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:vu}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))),Ju=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>ou(t,(e=>uu(t.state,e,!au(t)))),shift:t=>yu(t,(e=>uu(t.state,e,!au(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>ou(t,(e=>uu(t.state,e,au(t)))),shift:t=>yu(t,(e=>uu(t.state,e,au(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Uu(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Nu(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Uu(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Nu(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,r=null;return i.ranges.length>1?r=Te.create([i.main]):i.main.empty||(r=Te.create([Te.cursor(i.main.head)])),!!r&&(e(ru(t,r)),!0)}},{key:"Mod-Enter",run:Bu},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=ju(t).map((({from:e,to:i})=>Te.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:Te.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=iu(t.selection,(e=>{var i;for(let r=Kh(t).resolveStack(e.from,1);r;r=r.next){let{node:t}=r;if((t.from<e.from&&t.to>=e.to||t.to>e.to&&t.from<=e.from)&&(null===(i=t.parent)||void 0===i?void 0:i.parent))return Te.range(t.to,t.from)}return e}));return e(ru(t,i)),!0},preventDefault:!0},{key:"Mod-[",run:Fu},{key:"Mod-]",run:Hu},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),r=new pc(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),o=Lu(t,((e,o,n)=>{let s=fc(r,e.from);if(null==s)return;/\S/.test(e.text)||(s=0);let a=/^\s*/.exec(e.text)[0],l=uc(t,s);(a!=l||n.from<e.from+a.length)&&(i[e.from]=s,o.push({from:e.from,to:e.from+a.length,insert:l}))}));return o.changes.empty||e(t.update(o,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(ju(e).map((({from:t,to:i})=>(t>0?t--:i<e.doc.length&&i++,{from:t,to:i})))),r=iu(e.selection,(e=>{let i;if(t.lineWrapping){let r=t.lineBlockAt(e.head),o=t.coordsAtPos(e.head,e.assoc||1);o&&(i=r.bottom+t.documentTop-o.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)})).map(i);return t.dispatch({changes:i,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,i){let r=!1,o=iu(t.selection,(e=>{let o=gd(t,e.head,-1)||gd(t,e.head,1)||e.head>0&&gd(t,e.head-1,1)||e.head<t.doc.length&&gd(t,e.head+1,-1);if(!o||!o.end)return e;r=!0;let n=o.start.from==e.head?o.end.to:o.end.from;return i?Te.range(e.anchor,n):Te.cursor(n)}));return!!r&&(e(ru(t,o)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),r=Td(t.state,i.from);return r.line?$d(t):!!r.block&&Zd(t)}},{key:"Alt-A",run:Pd},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat(Ku),tf={key:"Tab",run:Hu,shift:Fu};class ef{constructor(t,e,i,r,o,n,s,a,l,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=r,this.pos=o,this.score=n,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let r=t.parser.context;return new ef(t,[],e,i,i,0,[],0,r?new rf(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,r=65535&t,{parser:o}=this.p;this.reducePos<this.pos-25&&this.setLookAhead(this.pos);let n=o.dynamicPrecedence(r);if(n&&(this.score+=n),0==i)return this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r<o.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,4,!0),void this.reduceContext(r,this.reducePos);let s=this.stack.length-3*(i-1)-(262144&t?6:0),a=s?this.stack[s-2]:this.p.ranges[0].from,l=this.reducePos-a;l>=2e3&&!(null===(e=this.p.parser.nodeSet.types[r])||void 0===e?void 0:e.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSize<l&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=a,this.p.lastBigReductionSize=l));let h=s?this.stack[s-1]:0,c=this.bufferBase+this.buffer.length-h;if(r<o.minRepeatTerm||131072&t){let t=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,a,t,c+4,!0)}if(262144&t)this.state=this.stack[s];else{let t=this.stack[s-3];this.state=o.getGoto(t,r,!0)}for(;this.stack.length>s;)this.stack.pop();this.reduceContext(r,a)}storeNode(t,e,i,r=4,o=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,r=this.buffer.length;if(0==r&&t.parent&&(r=t.bufferBase-t.parent.bufferBase,t=t.parent),r>0&&0==t.buffer[r-4]&&t.buffer[r-1]>-1){if(e==i)return;if(t.buffer[r-2]>=e)return void(t.buffer[r-2]=i)}}if(o&&this.pos!=i){let o=this.buffer.length;if(o>0&&0!=this.buffer[o-4])for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4);this.buffer[o]=t,this.buffer[o+1]=e,this.buffer[o+2]=i,this.buffer[o+3]=r}else this.buffer.push(t,e,i,r)}shift(t,e,i,r){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,r,4);else{let o=t,{parser:n}=this.p;(r>this.pos||e<=n.maxNode)&&(this.pos=r,n.stateFlag(o,1)||(this.reducePos=r)),this.pushState(o,i),this.shiftContext(e,i),e<=n.maxNode&&this.buffer.push(e,i,r,4)}}apply(t,e,i,r){65536&t?this.reduce(t):this.shift(t,e,i,r)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),r=t.bufferBase+e;for(;t&&r==t.bufferBase;)t=t.parent;return new ef(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new of(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==i)return!1;if(!(65536&i))return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let r,o=0;o<e.length;o+=2)(r=e[o+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[o],r);if(this.stack.length<120)for(let t=0;i.length<8&&t<e.length;t+=2){let r=e[t+1];i.some(((t,e)=>1&e&&t==r))||i.push(e[t],r)}e=i}let i=[];for(let t=0;t<e.length&&i.length<4;t+=2){let r=e[t+1];if(r==this.state)continue;let o=this.split();o.pushState(r,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(e[t],this.pos),o.reducePos=this.pos,o.score-=200,i.push(o)}return i}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let i=e>>19,r=65535&e,o=this.stack.length-3*i;if(o<0||t.getGoto(this.stack[o],r,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(r,o)=>{if(!e.includes(r))return e.push(r),t.allActions(r,(e=>{if(393216&e);else if(65536&e){let i=(e>>19)-o;if(i>1){let r=65535&e,o=this.stack.length-3*i;if(o>=0&&t.getGoto(this.stack[o],r,!1)>=0)return i<<19|65536|r}}else{let t=i(e,o+1);if(null!=t)return t}}))};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new rf(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class rf{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class of{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class nf{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new nf(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new nf(this.stack,this.pos,this.index)}}function sf(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let r=0,o=0;r<t.length;){let n=0;for(;;){let e=t.charCodeAt(r++),i=!1;if(126==e){n=65535;break}e>=92&&e--,e>=34&&e--;let o=e-32;if(o>=46&&(o-=46,i=!0),n+=o,i)break;n*=46}i?i[o++]=n:i=new e(n)}return i}class af{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const lf=new af;class hf{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=lf,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,r=this.rangeIndex,o=this.pos+t;for(;o<i.from;){if(!r)return null;let t=this.ranges[--r];o-=i.from-t.to,i=t}for(;e<0?o>i.to:o>=i.to;){if(r==this.ranges.length-1)return null;let t=this.ranges[++r];o+=t.from-i.to,i=t}return o}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,i,r=this.chunkOff+t;if(r>=0&&r<this.chunk.length)e=this.pos+t,i=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(t,1);if(null==r)return-1;if(e=r,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,r=this.range;for(;r.to<=e;)r=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=i}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=lf,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let r of this.ranges){if(r.from>=e)break;r.to>t&&(i+=this.input.read(Math.max(r.from,t),Math.min(r.to,e)))}return i}}class cf{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;ff(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}cf.prototype.contextual=cf.prototype.fallback=cf.prototype.extend=!1;class df{constructor(t,e,i){this.precTable=e,this.elseToken=i,this.data="string"==typeof t?sf(t):t}token(t,e){let i=t.pos,r=0;for(;;){let i=t.next<0,o=t.resolveOffset(1,1);if(ff(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(i||r++,null==o)break;t.reset(o,t.token)}r&&(t.reset(i,t.token),t.acceptToken(this.elseToken,r))}}df.prototype.contextual=cf.prototype.fallback=cf.prototype.extend=!1;class uf{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function ff(t,e,i,r,o,n){let s=0,a=1<<r,{dialect:l}=i.p.parser;t:for(;a&t[s];){let i=t[s+1];for(let r=s+3;r<i;r+=2)if((t[r+1]&a)>0){let i=t[r];if(l.allows(i)&&(-1==e.token.value||e.token.value==i||Of(i,e.token.value,o,n))){e.acceptToken(i);break}}let r=e.next,h=0,c=t[s+2];if(!(e.next<0&&c>h&&65535==t[i+3*c-3])){for(;h<c;){let o=h+c>>1,n=i+o+(o<<1),a=t[n],l=t[n+1]||65536;if(r<a)c=o;else{if(!(r>=l)){s=t[n+2],e.advance();continue t}h=o+1}}break}s=t[i+3*c-1]}}function pf(t,e,i){for(let r,o=e;65535!=(r=t[o]);o++)if(r==i)return o-e;return-1}function Of(t,e,i,r){let o=pf(i,r,e);return o<0||pf(i,r,t)<o}const gf="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let mf=null;function bf(t,e,i){let r=t.cursor(Wl.IncludeAnonymous);for(r.moveTo(e);;)if(!(i<0?r.childBefore(e):r.childAfter(e)))for(;;){if((i<0?r.to<e:r.from>e)&&!r.type.isError)return i<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(i<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return i<0?0:t.length}}class vf{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?bf(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?bf(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let i=this.trees[e],r=this.index[e];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=i.children[r],n=this.start[e]+i.positions[r];if(n>t)return this.nextStart=n,null;if(o instanceof zl){if(n==t){if(n<this.safeFrom)return null;let t=n+o.length;if(t<=this.safeTo){let e=o.prop(Rl.lookAhead);if(!e||t+e<this.fragment.to)return o}}this.index[e]++,n+o.length>=Math.max(this.safeFrom,t)&&(this.trees.push(o),this.start.push(n),this.index.push(0))}else this.index[e]++,this.nextStart=n+o.length}}}class wf{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new af))}getActions(t){let e=0,i=null,{parser:r}=t.p,{tokenizers:o}=r,n=r.stateSlot(t.state,3),s=t.curContext?t.curContext.hash:0,a=0;for(let r=0;r<o.length;r++){if(!(1<<r&n))continue;let l=o[r],h=this.tokens[r];if((!i||l.fallback)&&((l.contextual||h.start!=t.pos||h.mask!=n||h.context!=s)&&(this.updateCachedToken(h,l,t),h.mask=n,h.context=s),h.lookAhead>h.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let r=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!l.extend&&(i=h,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),i||t.pos!=this.stream.end||(i=new af,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new af,{pos:i,p:r}=t;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(t,e,i){let r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,t),i),t.value>-1){let{parser:e}=i.p;for(let r=0;r<e.specialized.length;r++)if(e.specialized[r]==t.value){let o=e.specializers[r](this.stream.read(t.start,t.end),i);if(o>=0&&i.p.parser.dialect.allows(o>>1)){1&o?t.extended=o>>1:t.value=o>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,e,i,r){for(let e=0;e<r;e+=3)if(this.actions[e]==t)return r;return this.actions[r++]=t,this.actions[r++]=e,this.actions[r++]=i,r}addActions(t,e,i,r){let{state:o}=t,{parser:n}=t.p,{data:s}=n;for(let t=0;t<2;t++)for(let a=n.stateSlot(o,t?2:1);;a+=3){if(65535==s[a]){if(1!=s[a+1]){0==r&&2==s[a+1]&&(r=this.putAction(Pf(s,a+2),e,i,r));break}a=Pf(s,a+2)}s[a]==e&&(r=this.putAction(Pf(s,a+1),e,i,r))}return r}}class yf{constructor(t,e,i,r){this.parser=t,this.input=e,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new hf(e,r),this.tokens=new wf(t,this.stream),this.topTerm=t.top[1];let{from:o}=r[0];this.stacks=[ef.start(this,t.top[0],o)],this.fragments=i.length&&this.stream.end-o>4*t.bufferLength?new vf(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,r=this.minStackPos,o=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[t]=i;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let n=0;n<i.length;n++){let s=i[n];for(;;){if(this.tokens.mainToken=null,s.pos>r)o.push(s);else{if(this.advanceStack(s,o,i))continue;{t||(t=[],e=[]),t.push(s);let i=this.tokens.getMainToken(s);e.push(i.value,i.end)}}break}}if(!o.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.score<i.score)&&(e=i)}return e}(t);if(e)return gf&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw gf&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&t){let i=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,o);if(i)return gf&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(o.length>t)for(o.sort(((t,e)=>e.score-t.score));o.length>t;)o.pop();o.some((t=>t.reducePos>r))&&this.recovering--}else if(o.length>1){t:for(let t=0;t<o.length-1;t++){let e=o[t];for(let i=t+1;i<o.length;i++){let r=o[i];if(e.sameState(r)||e.buffer.length>500&&r.buffer.length>500){if(!((e.score-r.score||e.buffer.length-r.buffer.length)>0)){o.splice(t--,1);continue t}o.splice(i--,1)}}}o.length>12&&o.splice(12,o.length-12)}this.minStackPos=o[0].pos;for(let t=1;t<o.length;t++)o[t].pos<this.minStackPos&&(this.minStackPos=o[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,i){let r=t.pos,{parser:o}=this,n=gf?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let s=this.fragments.nodeAt(r);s;){let r=this.parser.nodeSet.types[s.type.id]==s.type?o.getGoto(t.state,s.type.id):-1;if(r>-1&&s.length&&(!e||(s.prop(Rl.contextHash)||0)==i))return t.useNode(s,r),gf&&console.log(n+this.stackID(t)+` (via reuse of ${o.getName(s.type.id)})`),!0;if(!(s instanceof zl)||0==s.children.length||s.positions[0]>0)break;let a=s.children[0];if(!(a instanceof zl&&0==s.positions[0]))break;s=a}}let s=o.stateSlot(t.state,4);if(s>0)return t.reduce(s),gf&&console.log(n+this.stackID(t)+` (via always-reduce ${o.getName(65535&s)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let a=this.tokens.getActions(t);for(let s=0;s<a.length;){let l=a[s++],h=a[s++],c=a[s++],d=s==a.length||!i,u=d?t:t.split(),f=this.tokens.mainToken;if(u.apply(l,h,f?f.start:u.pos,c),gf&&console.log(n+this.stackID(u)+` (via ${65536&l?`reduce of ${o.getName(65535&l)}`:"shift"} for ${o.getName(h)} @ ${r}${u==t?"":", split"})`),d)return!0;u.pos>r?e.push(u):i.push(u)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return xf(t,e),!0}}runRecovery(t,e,i){let r=null,o=!1;for(let n=0;n<t.length;n++){let s=t[n],a=e[n<<1],l=e[1+(n<<1)],h=gf?this.stackID(s)+" -> ":"";if(s.deadEnd){if(o)continue;if(o=!0,s.restart(),gf&&console.log(h+this.stackID(s)+" (restarted)"),this.advanceFully(s,i))continue}let c=s.split(),d=h;for(let t=0;c.forceReduce()&&t<10&&(gf&&console.log(d+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));t++)gf&&(d=this.stackID(c)+" -> ");for(let t of s.recoverByInsert(a))gf&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),gf&&console.log(h+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),xf(s,i)):(!r||r.score<s.score)&&(r=s)}return r}stackToTree(t){return t.close(),zl.build({buffer:nf.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(mf||(mf=new WeakMap)).get(t);return e||mf.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function xf(t,e){for(let i=0;i<e.length;i++){let r=e[i];if(r.pos==t.pos&&r.sameState(t))return void(e[i].score<t.score&&(e[i]=t))}e.push(t)}class Sf{constructor(t,e,i){this.source=t,this.flags=e,this.disabled=i}allows(t){return!this.disabled||0==this.disabled[t]}}const kf=t=>t;class Qf{constructor(t){this.start=t.start,this.shift=t.shift||kf,this.reduce=t.reduce||kf,this.reuse=t.reuse||kf,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class $f extends oh{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let i=0;i<t.repeatNodeCount;i++)e.push("");let i=Object.keys(t.topRules).map((e=>t.topRules[e][1])),r=[];for(let t=0;t<e.length;t++)r.push([]);function o(t,e,i){r[t].push([e,e.deserialize(String(i))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=Rl[t]);for(let i=1;i<e.length;){let r=e[i++];if(r>=0)o(r,t,e[i++]);else{let n=e[i+-r];for(let s=-r;s>0;s--)o(e[i++],t,n);i++}}}this.nodeSet=new Ml(e.map(((e,o)=>Xl.define({name:o>=this.minRepeatTerm?void 0:e,id:o,props:r[o],top:i.indexOf(o)>-1,error:0==o,skipped:t.skippedNodes&&t.skippedNodes.indexOf(o)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=Pl;let n=sf(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(Zf),this.states=sf(t.states,Uint32Array),this.data=sf(t.stateData),this.goto=sf(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map((t=>"number"==typeof t?new cf(n,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let r=new yf(this,t,e,i);for(let o of this.wrappers)r=o(r,t,e,i);return r}getGoto(t,e,i=!1){let r=this.goto;if(e>=r[0])return-1;for(let o=r[e+1];;){let e=r[o++],n=1&e,s=r[o++];if(n&&i)return s;for(let i=o+(e>>1);o<i;o++)if(r[o]==t)return s;if(n)return-1}}hasAction(t,e){let i=this.data;for(let r=0;r<2;r++)for(let o,n=this.stateSlot(t,r?2:1);;n+=3){if(65535==(o=i[n])){if(1!=i[n+1]){if(2==i[n+1])return Pf(i,n+2);break}o=i[n=Pf(i,n+2)]}if(o==e||0==o)return Pf(i,n+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let i=this.stateSlot(t,4),r=i?e(i):void 0;for(let i=this.stateSlot(t,1);null==r;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=Pf(this.data,i+2)}r=e(Pf(this.data,i+1))}return r}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=Pf(this.data,i+2)}if(!(1&this.data[i+2])){let t=this.data[i+1];e.some(((e,i)=>1&i&&e==t))||e.push(this.data[i],t)}}return e}configure(t){let e=Object.assign(Object.create($f.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let i=t.tokenizers.find((t=>t.from==e));return i?i.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((i,r)=>{let o=t.specializers.find((t=>t.from==i.external));if(!o)return i;let n=Object.assign(Object.assign({},i),{external:o.to});return e.specializers[r]=Zf(n),n}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map((()=>!1));if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(i[t]=!0)}let r=null;for(let t=0;t<e.length;t++)if(!i[t])for(let i,o=this.dialects[e[t]];65535!=(i=this.data[o++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new Sf(t,i,r)}static deserialize(t){return new $f(t)}}function Pf(t,e){return t[e]|t[e+1]<<16}function Zf(t){if(t.external){let e=t.extend?1:0;return(i,r)=>t.external(i,r)<<1|e}return t.get}const Tf=20,Rf=22,Af=23,Cf=24,Xf=26,Mf=27,_f=28,qf=31,Wf=34,zf=37,Ef={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Yf={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Vf={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Df(t){return 9==t||10==t||13==t||32==t}let jf=null,Uf=null,Nf=0;function If(t,e){let i=t.pos+e;if(Nf==i&&Uf==t)return jf;let r=t.peek(e);for(;Df(r);)r=t.peek(++e);let o="";for(;45==(n=r)||46==n||58==n||n>=65&&n<=90||95==n||n>=97&&n<=122||n>=161;)o+=String.fromCharCode(r),r=t.peek(++e);var n;return Uf=t,Nf=i,jf=o?o.toLowerCase():r==Bf||r==Gf?void 0:null}const Bf=63,Gf=33;function Lf(t,e){this.name=t,this.parent=e}const Hf=[6,10,7,8,9],Ff=new Qf({start:null,shift:(t,e,i,r)=>Hf.indexOf(e)>-1?new Lf(If(r,1)||"",t):t,reduce:(t,e)=>e==Tf&&t?t.parent:t,reuse(t,e,i,r){let o=e.type.id;return 6==o||36==o?new Lf(If(r,1)||"",t):t},strict:!1}),Kf=new uf(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(57));t.advance();let i=47==t.next;i&&t.advance();let r=If(t,0);if(void 0===r)return;if(!r)return t.acceptToken(i?14:6);let o=e.context?e.context.name:null;if(i){if(r==o)return t.acceptToken(11);if(o&&Yf[o])return t.acceptToken(57,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==r)return;t.acceptToken(13)}else{if("script"==r)return t.acceptToken(7);if("style"==r)return t.acceptToken(8);if("textarea"==r)return t.acceptToken(9);if(Ef.hasOwnProperty(r))return t.acceptToken(10);o&&Vf[o]&&Vf[o][r]?t.acceptToken(57,-1):t.acceptToken(6)}}),{contextual:!0}),Jf=new uf((t=>{for(let e=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(58);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){i>=3&&t.acceptToken(58,-2);break}e=0}t.advance()}})),tp=new uf(((t,e)=>{if(47==t.next&&62==t.peek(1)){let i=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(i?5:4,2)}else 62==t.next&&t.acceptToken(4,1)}));function ep(t,e,i){let r=2+t.length;return new uf((o=>{for(let n=0,s=0,a=0;;a++){if(o.next<0){a&&o.acceptToken(e);break}if(0==n&&60==o.next||1==n&&47==o.next||n>=2&&n<r&&o.next==t.charCodeAt(n-2))n++,s++;else if(2!=n&&n!=r||!Df(o.next)){if(n==r&&62==o.next){a>s?o.acceptToken(e,-s):o.acceptToken(i,-(s-2));break}if((10==o.next||13==o.next)&&a){o.acceptToken(e,1);break}n=s=0}else s++;o.advance()}}))}const ip=ep("script",54,1),rp=ep("style",55,2),op=ep("textarea",56,3),np=Sh({"Text RawText":Uh.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":Uh.angleBracket,TagName:Uh.tagName,"MismatchedCloseTag/TagName":[Uh.tagName,Uh.invalid],AttributeName:Uh.attributeName,"AttributeValue UnquotedAttributeValue":Uh.attributeValue,Is:Uh.definitionOperator,"EntityReference CharacterReference":Uh.character,Comment:Uh.blockComment,ProcessingInst:Uh.processingInstruction,DoctypeDecl:Uh.documentMeta}),sp=$f.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%ZQ&rO,59fO%fQ&rO,59iO%qQ&rO,59lO%|Q&rO,59nOOOa'#D^'#D^O&XOaO'#C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~OS}OT}OhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXTgXhgX~OS!fOT!gOhyO~OS!hOT!gOhyO~OS!iOT!gOhyO~OS!jOT!gOhyO~OS!gOT!gOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Ff,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[np],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%l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!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[ip,rp,op,tp,Kf,Jf,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function ap(t,e){let i=Object.create(null);for(let r of t.getChildren(Af)){let t=r.getChild(Cf),o=r.getChild(Xf)||r.getChild(Mf);t&&(i[e.read(t.from,t.to)]=o?o.type.id==Xf?e.read(o.from+1,o.to-1):e.read(o.from,o.to):"")}return i}function lp(t,e){let i=t.getChild(Rf);return i?e.read(i.from,i.to):" "}function hp(t,e,i){let r;for(let o of i)if(!o.attrs||o.attrs(r||(r=ap(t.node.parent.firstChild,e))))return{parser:o.parser};return null}function cp(t=[],e=[]){let i=[],r=[],o=[],n=[];for(let e of t)("script"==e.tag?i:"style"==e.tag?r:"textarea"==e.tag?o:n).push(e);let s=e.length?Object.create(null):null;for(let t of e)(s[t.name]||(s[t.name]=[])).push(t);return a=(t,e)=>{let a=t.type.id;if(a==_f)return hp(t,e,i);if(a==qf)return hp(t,e,r);if(a==Wf)return hp(t,e,o);if(a==Tf&&n.length){let i,r=t.node,o=r.firstChild,s=o&&lp(o,e);if(s)for(let t of n)if(t.tag==s&&(!t.attrs||t.attrs(i||(i=ap(o,e))))){let e=r.lastChild,i=e.type.id==zf?e.from:r.to;if(i>o.to)return{parser:t.parser,overlay:[{from:o.to,to:i}]}}}if(s&&a==Af){let i,r=t.node;if(i=r.firstChild){let t=s[e.read(i.from,i.to)];if(t)for(let i of t){if(i.tagName&&i.tagName!=lp(r.parent,e))continue;let t=r.lastChild;if(t.type.id==Xf){let e=t.from+1,r=t.lastChild,o=t.to-(r&&r.isError?0:1);if(o>e)return{parser:i.parser,overlay:[{from:e,to:o}]}}else if(t.type.id==Mf)return{parser:i.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,i,r)=>new ch(t,a,e,i,r);var a}const dp=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function up(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function fp(t){return t>=48&&t<=57}const pp=new uf(((t,e)=>{for(let i=!1,r=0,o=0;;o++){let{next:n}=t;if(up(n)||45==n||95==n||i&&fp(n))!i&&(45!=n||o>0)&&(i=!0),r===o&&45==n&&r++,t.advance();else{if(92!=n||10==t.peek(1)){i&&t.acceptToken(40==n?100:2==r&&e.canShift(2)?2:101);break}t.advance(),t.next>-1&&t.advance(),i=!0}}})),Op=new uf((t=>{if(dp.includes(t.peek(-1))){let{next:e}=t;(up(e)||95==e||35==e||46==e||91==e||58==e&&up(t.peek(1))||45==e||38==e)&&t.acceptToken(99)}})),gp=new uf((t=>{if(!dp.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),up(e)){do{t.advance()}while(up(t.next)||fp(t.next));t.acceptToken(1)}}})),mp=Sh({"AtKeyword import charset namespace keyframes media supports":Uh.definitionKeyword,"from to selector":Uh.keyword,NamespaceName:Uh.namespace,KeyframeName:Uh.labelName,KeyframeRangeName:Uh.operatorKeyword,TagName:Uh.tagName,ClassName:Uh.className,PseudoClassName:Uh.constant(Uh.className),IdName:Uh.labelName,"FeatureName PropertyName":Uh.propertyName,AttributeName:Uh.attributeName,NumberLiteral:Uh.number,KeywordQuery:Uh.keyword,UnaryQueryOp:Uh.operatorKeyword,"CallTag ValueName":Uh.atom,VariableName:Uh.variableName,Callee:Uh.operatorKeyword,Unit:Uh.unit,"UniversalSelector NestingSelector":Uh.definitionOperator,MatchOp:Uh.compareOperator,"ChildOp SiblingOp, LogicOp":Uh.logicOperator,BinOp:Uh.arithmeticOperator,Important:Uh.modifier,Comment:Uh.blockComment,ColorLiteral:Uh.color,"ParenthesizedContent StringLiteral":Uh.string,":":Uh.punctuation,"PseudoOp #":Uh.derefOperator,"; ,":Uh.separator,"( )":Uh.paren,"[ ]":Uh.squareBracket,"{ }":Uh.brace}),bp={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},vp={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},wp={__proto__:null,not:132,only:132},yp=$f.deserialize({version:14,states:":^QYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#EmO${QdO'#DgO%jQ[O'#DtO${QdO'#DvO%{Q[O'#DxO&WQ[O'#D{O&`Q[O'#ERO&nQ[O'#ETOOQS'#El'#ElOOQS'#EW'#EWQYQ[OOO&uQXO'#CdO'jQWO'#DcO'oQWO'#EsO'zQ[O'#EsQOQWOOP(UO#tO'#C_POOO)C@[)C@[OOQP'#Cg'#CgOOQP,59Q,59QO#kQ[O,59QO(aQ[O'#E[O({QWO,58{O)TQ[O,59SO$qQ[O,59oO$vQ[O,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$p$P$v%SQ$v$YR%S$qQ#_!ZR$W#_Q$r$PR%T$rQpUS!vp$nR$n#|Q$j#qR%P$jQ!ogS#t!o#uR#u!pQ#f!_R$^#fQ$f#mR$|$fQ$z$eR%W$z_cOPdhw!n#s^UOPdhw!n#sQ!uoQ!}tQ#OuQ#PvQ#|#RR$_#hR$Q#SQ!VZQ!d]Q#V!TQ#q!m[$O#S$P$Y$q$v%SQ$R#UQ$T#XS$h#q$jQ$m#zR%O$iR#}#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$[#dR$]#e",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports AtRule Styles",maxTerm:117,nodeProps:[["isolate",-2,3,24,""],["openedBy",17,"(",32,"[",50,"{"],["closedBy",18,")",33,"]",51,"}"]],propSources:[mp],skippedNodes:[0,3,87],repeatNodeCount:11,tokenData:"J^~R!^OX$}X^%u^p$}pq%uqr)Xrs.Rst/utu6duv$}vw7^wx7oxy9^yz9oz{9t{|:_|}?Q}!O?c!O!P@Q!P!Q@i!Q![Ab![!]B]!]!^CX!^!_$}!_!`Cj!`!aC{!a!b$}!b!cDw!c!}$}!}#OFa#O#P$}#P#QFr#Q#R6d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^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[Op,gp,pp,1,2,3,4,new df("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>bp[t]||-1},{term:58,get:t=>vp[t]||-1},{term:101,get:t=>wp[t]||-1}],tokenPrec:1200});let xp=null;function Sp(){if(!xp&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],i=new Set;for(let r in t)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof t[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),i.has(r)||(e.push(r),i.add(r)));xp=e.sort().map((t=>({type:"property",label:t})))}return xp||[]}const kp=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),Qp=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),$p=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),Pp=/^(\w[\w-]*|-\w[\w-]*|)$/,Zp=/^-(-[\w-]*)?$/,Tp=new ih,Rp=["Declaration"];function Ap(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function Cp(t,e,i){if(e.to-e.from>4096){let r=Tp.get(e);if(r)return r;let o=[],n=new Set,s=e.cursor(Wl.IncludeAnonymous);if(s.firstChild())do{for(let e of Cp(t,s.node,i))n.has(e.label)||(n.add(e.label),o.push(e))}while(s.nextSibling());return Tp.set(e,o),o}{let r=[],o=new Set;return e.cursor().iterate((e=>{var n;if(i(e)&&e.matchContext(Rp)&&":"==(null===(n=e.node.nextSibling)||void 0===n?void 0:n.name)){let i=t.sliceString(e.from,e.to);o.has(i)||(o.add(i),r.push({label:i,type:"variable"}))}})),r}}const Xp=t=>e=>{let{state:i,pos:r}=e,o=Kh(i).resolveInner(r,-1),n=o.type.isError&&o.from==o.to-1&&"-"==i.doc.sliceString(o.from,o.to);if("PropertyName"==o.name||(n||"TagName"==o.name)&&/^(Block|Styles)$/.test(o.resolve(o.to).name))return{from:o.from,options:Sp(),validFor:Pp};if("ValueName"==o.name)return{from:o.from,options:Qp,validFor:Pp};if("PseudoClassName"==o.name)return{from:o.from,options:kp,validFor:Pp};if(t(o)||(e.explicit||n)&&function(t,e){var i;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let r=null===(i=t.parent)||void 0===i?void 0:i.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==e.sliceString(r.from,r.to)}(o,i.doc))return{from:t(o)||n?o.from:r,options:Cp(i.doc,Ap(o),t),validFor:Zp};if("TagName"==o.name){for(let{parent:t}=o;t;t=t.parent)if("Block"==t.name)return{from:o.from,options:Sp(),validFor:Pp};return{from:o.from,options:$p,validFor:Pp}}if(!e.explicit)return null;let s=o.resolve(r),a=s.childBefore(r);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:r,options:kp,validFor:Pp}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:r,options:Qp,validFor:Pp}:"Block"==s.name||"Styles"==s.name?{from:r,options:Sp(),validFor:Pp}:null},Mp=Xp((t=>"VariableName"==t.name)),_p=Fh.define({name:"css",parser:yp.configure({props:[Oc.add({Declaration:Sc()}),Qc.add({"Block KeyframeList":$c})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function qp(){return new lc(_p,_p.data.of({autocomplete:Mp}))}const Wp=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],zp=new Qf({start:!1,shift:(t,e)=>5==e||6==e||315==e?t:316==e,strict:!1}),Ep=new uf(((t,e)=>{let{next:i}=t;(125==i||-1==i||e.context)&&t.acceptToken(313)}),{contextual:!0,fallback:!0}),Yp=new uf(((t,e)=>{let i,{next:r}=t;Wp.indexOf(r)>-1||(47!=r||47!=(i=t.peek(1))&&42!=i)&&(125==r||59==r||-1==r||e.context||t.acceptToken(312))}),{contextual:!0}),Vp=new uf(((t,e)=>{let{next:i}=t;if(43==i||45==i){if(t.advance(),i==t.next){t.advance();let i=!e.context&&e.canShift(1);t.acceptToken(i?1:2)}}else 63==i&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))}),{contextual:!0});function Dp(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const jp=new uf(((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let i=0;for(;Wp.indexOf(t.next)>-1;)t.advance(),i++;if(Dp(t.next,!0)){for(t.advance(),i++;Dp(t.next,!1);)t.advance(),i++;for(;Wp.indexOf(t.next)>-1;)t.advance(),i++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!Dp(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),i++}}t.acceptToken(4,-i)})),Up=Sh({"get set async static":Uh.modifier,"for while do if else switch try catch finally return throw break continue default case":Uh.controlKeyword,"in of await yield void typeof delete instanceof":Uh.operatorKeyword,"let var const using function class extends":Uh.definitionKeyword,"import export from":Uh.moduleKeyword,"with debugger as new":Uh.keyword,TemplateString:Uh.special(Uh.string),super:Uh.atom,BooleanLiteral:Uh.bool,this:Uh.self,null:Uh.null,Star:Uh.modifier,VariableName:Uh.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Uh.function(Uh.variableName),VariableDefinition:Uh.definition(Uh.variableName),Label:Uh.labelName,PropertyName:Uh.propertyName,PrivatePropertyName:Uh.special(Uh.propertyName),"CallExpression/MemberExpression/PropertyName":Uh.function(Uh.propertyName),"FunctionDeclaration/VariableDefinition":Uh.function(Uh.definition(Uh.variableName)),"ClassDeclaration/VariableDefinition":Uh.definition(Uh.className),PropertyDefinition:Uh.definition(Uh.propertyName),PrivatePropertyDefinition:Uh.definition(Uh.special(Uh.propertyName)),UpdateOp:Uh.updateOperator,"LineComment Hashbang":Uh.lineComment,BlockComment:Uh.blockComment,Number:Uh.number,String:Uh.string,Escape:Uh.escape,ArithOp:Uh.arithmeticOperator,LogicOp:Uh.logicOperator,BitOp:Uh.bitwiseOperator,CompareOp:Uh.compareOperator,RegExp:Uh.regexp,Equals:Uh.definitionOperator,Arrow:Uh.function(Uh.punctuation),": Spread":Uh.punctuation,"( )":Uh.paren,"[ ]":Uh.squareBracket,"{ }":Uh.brace,"InterpolationStart InterpolationEnd":Uh.special(Uh.brace),".":Uh.derefOperator,", ;":Uh.separator,"@":Uh.meta,TypeName:Uh.typeName,TypeDefinition:Uh.definition(Uh.typeName),"type enum interface implements namespace module declare":Uh.definitionKeyword,"abstract global Privacy readonly override":Uh.modifier,"is keyof unique infer":Uh.operatorKeyword,JSXAttributeValue:Uh.attributeValue,JSXText:Uh.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Uh.angleBracket,"JSXIdentifier JSXNameSpacedName":Uh.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Uh.attributeName,"JSXBuiltin/JSXIdentifier":Uh.standard(Uh.tagName)}),Np={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Ip={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Bp={__proto__:null,"<":187},Gp=$f.deserialize({version:14,states:"$=dO%TQ^OOO%[Q^OOO'_Q`OOP(lOWOOO*zQ?NdO'#CiO+RO!bO'#CjO+aO#tO'#CjO+oO!0LbO'#D^O.QQ^O'#DdO.bQ^O'#DoO%[Q^O'#DwO0fQ^O'#EPOOQ?Mr'#EX'#EXO1PQWO'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQWO'#GpO1dQWO'#ElO1iQWO'#ElO3hQ?NdO'#JmO6[Q?NdO'#JnO6uQWO'#F[O6zQ&jO'#FsOOQ?Mr'#Fe'#FeO7VO,YO'#FeO7eQ7[O'#FzO9RQWO'#FyOOQ?Mr'#Jn'#JnOOQ?Mp'#Jm'#JmO9WQWO'#GtOOQU'#KZ'#KZO9cQWO'#IUO9hQ?MxO'#IVOOQU'#JZ'#JZOOQU'#IZ'#IZQ`Q^OOO`Q^OOO9pQMnO'#DsO9wQ^O'#D{O:OQ^O'#D}O9^QWO'#GpO:VQ7[O'#CoO:eQWO'#EkO:pQWO'#EvO:uQ7[O'#FdO;dQWO'#GpOOQO'#K['#K[O;iQWO'#K[O;wQWO'#GxO;wQWO'#GyO;wQWO'#G{O9^QWO'#HOO<nQWO'#HRO>VQWO'#CeO>gQWO'#H_O>oQWO'#HeO>oQWO'#HgO`Q^O'#HiO>oQWO'#HkO>oQWO'#HnO>tQW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!v!y!z']'i'j'k-]-m1a5d5fS'S!e-TS-Q'T'[R2g-ZR(w#xQ!fQT-[']-]]!qQ!r']-]1a5dQ#p]R'f:lR)b$dY!uQ']-]1a5dQ'h!rS'r!v!yS't!z5fS-l'i'jQ-n'kR2u-mT#kZ%cS#jZ%cS%im,gU(c#h#i#lS.Q(d(eQ.U(fQ0i+WQ2z.RU2{.S.T.VS6j2|2}R8o6kd#^W#W#Z%f(P(Y*V+T-{/er#gZm#h#i#l%c(d(e(f+W.R.S.T.V2|2}6kS*Y$y*^Q/l*ZQ1v,gQ2^,}Q4P/hQ6X2UQ7Y4QQ8g6YT<R'U+UV#aW%f*VU#`W%f*VS(Q#W(YU(V#Z+T/eS-S'U+UT-v(P-{V'Z!e%g*WQ$lfR)t$qT)i$l)jR3w.|T*[$y*^T*d$|*VQ0l+`Q3P.^Q5g1cQ6o3TQ8R5jQ8r6nQ9b8QQ9t8qQ:V9dQ:_9vQ:d:WR:g:`nqOXst!Z#d%k&o&q&r&t,k,p1|2PQ&i!VR,`&ftmOXst!U!V!Z#d%k&f&o&q&r&t,k,p1|2PR,g&lT%jm,gR1],PR,_&dQ&S|R+w&TR+m%}T&m!W&pT&n!W&pT2O,p2P",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:376,context:zp,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Up],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Rp(U!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(U!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(U!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[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!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(^~~",141,335),new df("j~RQYZXz{^~^O'{~~aP!P!Qd~iO'|~~",25,318)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14769},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:322,get:t=>Np[t]||-1},{term:338,get:t=>Ip[t]||-1},{term:92,get:t=>Bp[t]||-1}],tokenPrec:14793});class Lp{constructor(t,e,i){this.state=t,this.pos=e,this.explicit=i,this.abortListeners=[]}tokenBefore(t){let e=Kh(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),o=r.search(tO(t,!1));return o<0?null:{from:i+o,to:this.pos,text:r.slice(o)}}get aborted(){return null==this.abortListeners}addEventListener(t,e){"abort"==t&&this.abortListeners&&this.abortListeners.push(e)}}function Hp(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function Fp(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,r]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)i[r[t]]=!0}let r=Hp(e)+Hp(i)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let o=t.matchBefore(r);return o||t.explicit?{from:o?o.from:t.pos,options:e,validFor:i}:null}}class Kp{constructor(t,e,i,r){this.completion=t,this.source=e,this.match=i,this.score=r}}function Jp(t){return t.selection.main.from}function tO(t,e){var i;let{source:r}=t,o=e&&"^"!=r[0],n="$"!=r[r.length-1];return o||n?new RegExp(`${o?"^":""}(?:${r})${n?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const eO=ei.define(),iO=new WeakMap;function rO(t){if(!Array.isArray(t))return t;let e=iO.get(t);return e||iO.set(t,e=Fp(t)),e}const oO=oi.define(),nO=oi.define();class sO{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let i=Oe(t,e),r=me(i);this.chars.push(i);let o=t.slice(e,e+r),n=o.toUpperCase();this.folded.push(Oe(n==o?o.toLowerCase():n,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:i,any:r,precise:o,byWord:n}=this;if(1==e.length){let r=Oe(t,0),o=me(r),n=o==t.length?0:-100;if(r==e[0]);else{if(r!=i[0])return null;n+=-200}return this.ret(n,[0,o])}let s=t.indexOf(this.pattern);if(0==s)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=e.length,l=0;if(s<0){for(let o=0,n=Math.min(t.length,200);o<n&&l<a;){let n=Oe(t,o);n!=e[l]&&n!=i[l]||(r[l++]=o),o+=me(n)}if(l<a)return null}let h=0,c=0,d=!1,u=0,f=-1,p=-1,O=/[a-z]/.test(t),g=!0;for(let r=0,l=Math.min(t.length,200),m=0;r<l&&c<a;){let l=Oe(t,r);s<0&&(h<a&&l==e[h]&&(o[h++]=r),u<a&&(l==e[u]||l==i[u]?(0==u&&(f=r),p=r+1,u++):u=0));let b,v=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(b=ge(l))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!r||1==v&&O||0==m&&0!=v)&&(e[c]==l||i[c]==l&&(d=!0)?n[c++]=r:n.length&&(g=!1)),m=v,r+=me(l)}return c==a&&0==n[0]&&g?this.result((d?-200:0)-100,n,t):u==a&&0==f?this.ret(-200-t.length+(p==t.length?0:-100),[0,p]):s>-1?this.ret(-700-t.length,[s,s+this.pattern.length]):u==a?this.ret(-900-t.length,[f,p]):c==a?this.result((d?-200:0)-100-700+(g?0:-1100),n,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,i){let r=[],o=0;for(let t of e){let e=t+(this.astral?me(Oe(i,t)):1);o&&r[o-1]==t?r[o-1]=e:(r[o++]=t,r[o++]=e)}return this.ret(t-i.length,r)}}class aO{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),i=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==i?null:(this.matched=[0,e.length],this.score=i+(t.length==this.pattern.length?0:-100),this)}}const lO=Ce.define({combine:t=>gi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:cO,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>hO(t(i),e(i)),optionClass:(t,e)=>i=>hO(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function hO(t,e){return t?e?t+" "+e:t:e}function cO(t,e,i,r,o,n){let s,a,l=t.textDirection==no.RTL,h=l,c=!1,d="top",u=e.left-o.left,f=o.right-e.right,p=r.right-r.left,O=r.bottom-r.top;if(h&&u<Math.min(p,f)?h=!1:!h&&f<Math.min(p,u)&&(h=!0),p<=(h?u:f))s=Math.max(o.top,Math.min(i.top,o.bottom-O))-e.top,a=Math.min(400,h?u:f);else{c=!0,a=Math.min(400,(l?e.right:o.right-e.left)-30);let t=o.bottom-e.bottom;t>=O||t>e.top?s=i.bottom-e.top:(d="bottom",s=e.bottom-i.top)}return{style:`${d}: ${s/((e.bottom-e.top)/n.offsetHeight)}px; max-width: ${a/((e.right-e.left)/n.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":h?"left":"right")}}function dO(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let r=Math.floor((t-e)/i);return{from:t-(r+1)*i,to:t-r*i}}class uO{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:o,selected:n}=r.open,s=t.state.facet(lO);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,r){let o=document.createElement("span");o.className="cm-completionLabel";let n=t.displayLabel||t.label,s=0;for(let t=0;t<r.length;){let e=r[t++],i=r[t++];e>s&&o.appendChild(document.createTextNode(n.slice(s,e)));let a=o.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(n.slice(e,i))),a.className="cm-completionMatchedText",s=i}return s<n.length&&o.appendChild(document.createTextNode(n.slice(s))),o},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort(((t,e)=>t.position-e.position)).map((t=>t.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=dO(o.length,n,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(i=>{let{options:r}=t.state.field(e).open;for(let e,o=i.target;o&&o!=this.dom;o=o.parentNode)if("LI"==o.nodeName&&(e=/-(\d+)$/.exec(o.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void i.preventDefault()})),this.dom.addEventListener("focusout",(e=>{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(lO).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:nO.of(null)})})),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let i=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=r){let{options:o,selected:n,disabled:s}=i.open;r.open&&r.open.options==o||(this.range=dO(o.length,n,t.state.facet(lO).maxRenderedOptions),this.showOptions(o,i.id)),this.updateSel(),s!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=dO(e.options.length,e.selected,this.view.state.facet(lO).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:i}=e.options[e.selected],{info:r}=i;if(!r)return;let o="string"==typeof r?document.createTextNode(r):r(i);if(!o)return;"then"in o?o.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,i)})).catch((t=>Wo(this.view.state,t,"completion info"))):this.addInfoPane(o,i)}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;i.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)"LI"==i.nodeName&&i.id?r==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):r--;return e&&function(t,e){let i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),o=i.height/t.offsetHeight;r.top<i.top?t.scrollTop-=(i.top-r.top)/o:r.bottom>i.bottom&&(t.scrollTop+=(r.bottom-i.bottom)/o)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),o=this.space;if(!o){let t=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return r.top>Math.min(o.bottom,e.bottom)-10||r.bottom<Math.max(o.top,e.top)+10?null:this.view.state.facet(lO).positionInfo(this.view,e,r,i,o,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,i){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));let o=null;for(let n=i.from;n<i.to;n++){let{completion:s,match:a}=t[n],{section:l}=s;if(l){let t="string"==typeof l?l:l.name;t!=o&&(n>i.from||0==i.from)&&(o=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const h=r.appendChild(document.createElement("li"));h.id=e+"-"+n,h.setAttribute("role","option");let c=this.optionClass(s);c&&(h.className=c);for(let t of this.optionContent){let e=t(s,this.view.state,this.view,a);e&&h.appendChild(e)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function fO(t,e){return i=>new uO(i,t,e)}function pO(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class OO{constructor(t,e,i,r,o,n){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=r,this.selected=o,this.disabled=n}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new OO(this.options,bO(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,r,o){let n=function(t,e){let i=[],r=null,o=t=>{i.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some((e=>e.name==t))||r.push("string"==typeof e?{name:t}:e)}},n=e.facet(lO);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)o(new Kp(e,r.source,t?t(e):[],1e9-i.length));else{let i,s=e.sliceDoc(r.from,r.to),a=n.filterStrict?new aO(s):new sO(s);for(let e of r.result.options)if(i=a.match(e.label)){let n=e.displayLabel?t?t(e,i.matched):[]:i.matched;o(new Kp(e,r.source,n,i.score+(e.boost||0)))}}}if(r){let t=Object.create(null),e=0,o=(t,e)=>{var i,r;return(null!==(i=t.rank)&&void 0!==i?i:1e9)-(null!==(r=e.rank)&&void 0!==r?r:1e9)||(t.name<e.name?-1:1)};for(let i of r.sort(o))e-=1e5,t[i.name]=e;for(let e of i){let{section:i}=e.completion;i&&(e.score+=t["string"==typeof i?i:i.name])}}let s=[],a=null,l=n.compareCompletions;for(let t of i.sort(((t,e)=>e.score-t.score||l(t.completion,e.completion)))){let e=t.completion;!a||a.label!=e.label||a.detail!=e.detail||null!=a.type&&null!=e.type&&a.type!=e.type||a.apply!=e.apply||a.boost!=e.boost?s.push(t):pO(t.completion)>pO(a)&&(s[s.length-1]=t),a=t.completion}return s}(t,e);if(!n.length)return r&&t.some((t=>1==t.state))?new OO(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=e.facet(lO).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<n.length;e++)if(n[e].completion==t){s=e;break}}return new OO(n,bO(i,s),{pos:t.reduce(((t,e)=>e.hasResult()?Math.min(t,e.from):t),1e8),create:PO,above:o.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(t){return new OO(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class gO{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new gO(vO,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(lO),r=(i.override||e.languageDataAt("autocomplete",Jp(e)).map(rO)).map((e=>{let r=this.active.find((t=>t.source==e))||new yO(e,this.active.some((t=>0!=t.state))?1:0);return r.update(t,i)}));r.length==this.active.length&&r.every(((t,e)=>t==this.active[e]))&&(r=this.active);let o=this.open;o&&t.docChanged&&(o=o.map(t.changes)),t.selection||r.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,r=0;;){for(;i<t.length&&!t[i].hasResult;)i++;for(;r<e.length&&!e[r].hasResult;)r++;let o=i==t.length,n=r==e.length;if(o||n)return o==n;if(t[i++].result!=e[r++].result)return!1}}(r,this.active)?o=OO.build(r,e,this.id,o,i):o&&o.disabled&&!r.some((t=>1==t.state))&&(o=null),!o&&r.every((t=>1!=t.state))&&r.some((t=>t.hasResult()))&&(r=r.map((t=>t.hasResult()?new yO(t.source,0):t)));for(let e of t.effects)e.is(kO)&&(o=o&&o.setSelected(e.value,this.id));return r==this.active&&o==this.open?this:new gO(r,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:mO}}const mO={"aria-autocomplete":"list"};function bO(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const vO=[];function wO(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(eO);if(i&&e.activateOnCompletion(i))return"input"}return t.isUserEvent("input.type")?"input":t.isUserEvent("delete.backward")?"delete":null}class yO{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=wO(t,e),r=this;i?r=r.handleUserEvent(t,i,e):t.docChanged?r=r.handleChange(t):t.selection&&0!=r.state&&(r=new yO(r.source,0));for(let e of t.effects)if(e.is(oO))r=new yO(r.source,1,e.value?Jp(t.state):-1);else if(e.is(nO))r=new yO(r.source,0);else if(e.is(SO))for(let t of e.value)t.source==r.source&&(r=t);return r}handleUserEvent(t,e,i){return"delete"!=e&&i.activateOnTyping?new yO(this.source,1):this.map(t.changes)}handleChange(t){return t.changes.touchesRange(Jp(t.startState))?new yO(this.source,0):this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new yO(this.source,this.state,t.mapPos(this.explicitPos))}}class xO extends yO{constructor(t,e,i,r,o){super(t,2,e),this.result=i,this.from=r,this.to=o}hasResult(){return!0}handleUserEvent(t,e,i){var r;let o=this.result;o.map&&!t.changes.empty&&(o=o.map(o,t.changes));let n=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),a=Jp(t.state);if((this.explicitPos<0?a<=n:a<this.from)||a>s||!o||"delete"==e&&Jp(t.startState)==this.from)return new yO(this.source,"input"==e&&i.activateOnTyping?1:0);let l=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return function(t,e,i,r){if(!t)return!1;let o=e.sliceDoc(i,r);return"function"==typeof t?t(o,i,r,e):tO(t,!0).test(o)}(o.validFor,t.state,n,s)?new xO(this.source,l,o,n,s):o.update&&(o=o.update(o,n,s,new Lp(t.state,a,l>=0)))?new xO(this.source,l,o,o.from,null!==(r=o.to)&&void 0!==r?r:Jp(t.state)):new yO(this.source,1,l)}handleChange(t){return t.changes.touchesRange(this.from,this.to)?new yO(this.source,0):this.map(t.changes)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new xO(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new yO(this.source,0)}}const SO=oi.define({map:(t,e)=>t.map((t=>t.map(e)))}),kO=oi.define(),QO=Ee.define({create:()=>gO.start(),update:(t,e)=>t.update(e),provide:t=>[Ua.from(t,(t=>t.tooltip)),zs.contentAttributes.from(t,(t=>t.attrs))]});function $O(t,e){const i=e.completion.apply||e.completion.label;let r=t.state.field(QO).active.find((t=>t.source==e.source));return r instanceof xO&&("string"==typeof i?t.dispatch(Object.assign(Object.assign({},function(t,e,i,r){let{main:o}=t.selection,n=i-o.from,s=r-o.from;return Object.assign(Object.assign({},t.changeByRange((a=>a!=o&&i!=r&&t.sliceDoc(a.from+n,a.from+s)!=t.sliceDoc(i,r)?{range:a}:{changes:{from:a.from+n,to:r==o.from?a.to:a.from+s,insert:e},range:Te.cursor(a.from+n+e.length)}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,i,r.from,r.to)),{annotations:eO.of(e.completion)})):i(t,e.completion,r.from,r.to),!0)}const PO=fO(QO,$O);function ZO(t,e="option"){return i=>{let r=i.state.field(QO,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<i.state.facet(lO).interactionDelay)return!1;let o,n=1;"page"==e&&(o=Fa(i,r.open.tooltip))&&(n=Math.max(2,Math.floor(o.dom.offsetHeight/o.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+n*(t?1:-1):t?0:s-1;return a<0?a="page"==e?0:s-1:a>=s&&(a="page"==e?s-1:0),i.dispatch({effects:kO.of(a)}),!0}}class TO{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const RO=Vo.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(QO).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(QO),i=t.state.facet(lO);if(!t.selectionSet&&!t.docChanged&&t.startState.field(QO)==e)return;let r=t.transactions.some((t=>(t.selection||t.docChanged)&&!wO(t,i)));for(let e=0;e<this.running.length;e++){let i=this.running[e];if(r||i.updates.length+t.transactions.length>50&&Date.now()-i.time>1e3){for(let t of i.context.abortListeners)try{t()}catch(t){Wo(this.view.state,t)}i.context.abortListeners=null,this.running.splice(e--,1)}else i.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(oO)))))&&(this.pendingStart=!0);let o=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),o):-1,0!=this.composing)for(let e of t.transactions)"input"==wO(e,i)?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(QO);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,i=Jp(e),r=new Lp(e,i,t.explicitPos==i),o=new TO(t,r);this.running.push(o),Promise.resolve(t.source(r)).then((t=>{o.context.aborted||(o.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:nO.of(null)}),Wo(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(lO).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(lO);for(let r=0;r<this.running.length;r++){let o=this.running[r];if(void 0===o.done)continue;if(this.running.splice(r--,1),o.done){let r=new xO(o.active.source,o.active.explicitPos,o.done,o.done.from,null!==(t=o.done.to)&&void 0!==t?t:Jp(o.updates.length?o.updates[0].startState:this.view.state));for(let t of o.updates)r=r.update(t,i);if(r.hasResult()){e.push(r);continue}}let n=this.view.state.field(QO).active.find((t=>t.source==o.active.source));if(n&&1==n.state)if(null==o.done){let t=new yO(o.active.source,0);for(let e of o.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(n)}e.length&&this.view.dispatch({effects:SO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(QO,!1);if(e&&e.tooltip&&this.view.state.facet(lO).closeOnBlur){let i=e.open&&Fa(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:nO.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:oO.of(!1)})),20),this.composing=0}}}),AO="object"==typeof navigator&&/Win/.test(navigator.platform),CO=Ve.highest(zs.domEventHandlers({keydown(t,e){let i=e.state.field(QO,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!AO||!t.altKey)||t.metaKey)return!1;let r=i.open.options[i.open.selected],o=i.active.find((t=>t.source==r.source)),n=r.completion.commitCharacters||o.result.commitCharacters;return n&&n.indexOf(t.key)>-1&&$O(e,r),!1}})),XO=zs.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class MO{constructor(t,e,i,r){this.field=t,this.line=e,this.from=i,this.to=r}}class _O{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){let e=t.mapPos(this.from,-1,ve.TrackDel),i=t.mapPos(this.to,1,ve.TrackDel);return null==e||null==i?null:new _O(this.field,e,i)}}class qO{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],r=[e],o=t.doc.lineAt(e),n=/^\s*/.exec(o.text)[0];for(let o of this.lines){if(i.length){let i=n,s=/^\t*/.exec(o)[0].length;for(let e=0;e<s;e++)i+=t.facet(cc);r.push(e+i.length-s),o=i+o.slice(s)}i.push(o),e+=o.length+1}let s=this.fieldPositions.map((t=>new _O(t.field,r[t.line]+t.from,r[t.line]+t.to)));return{text:i,ranges:s}}static parse(t){let e,i=[],r=[],o=[];for(let n of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(n);){let t=e[1]?+e[1]:null,s=e[2]||e[3]||"",a=-1,l=s.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e<i.length;e++)(null!=t?i[e].seq==t:l&&i[e].name==l)&&(a=e);if(a<0){let e=0;for(;e<i.length&&(null==t||null!=i[e].seq&&i[e].seq<t);)e++;i.splice(e,0,{seq:t,name:l}),a=e;for(let t of o)t.field>=a&&t.field++}o.push(new MO(a,r.length,e.index,e.index+l.length)),n=n.slice(0,e.index)+s+n.slice(e.index+e[0].length)}n=n.replace(/\\([{}])/g,((t,e,i)=>{for(let t of o)t.line==r.length&&t.from>i&&(t.from--,t.to--);return e})),r.push(n)}return new qO(r,o)}}let WO=Hr.widget({widget:new class extends Gr{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),zO=Hr.mark({class:"cm-snippetField"});class EO{constructor(t,e){this.ranges=t,this.active=e,this.deco=Hr.set(t.map((t=>(t.from==t.to?WO:zO).range(t.from,t.to))))}map(t){let e=[];for(let i of this.ranges){let r=i.map(t);if(!r)return null;e.push(r)}return new EO(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const YO=oi.define({map:(t,e)=>t&&t.map(e)}),VO=oi.define(),DO=Ee.define({create:()=>null,update(t,e){for(let i of e.effects){if(i.is(YO))return i.value;if(i.is(VO)&&t)return new EO(t.ranges,i.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>zs.decorations.from(t,(t=>t?t.deco:Hr.none))});function jO(t,e){return Te.create(t.filter((t=>t.field==e)).map((t=>Te.range(t.from,t.to))))}function UO(t){let e=qO.parse(t);return(t,i,r,o)=>{let{text:n,ranges:s}=e.instantiate(t.state,r),a={changes:{from:r,to:o,insert:Ht.of(n)},scrollIntoView:!0,annotations:i?[eO.of(i),ni.userEvent.of("input.complete")]:void 0};if(s.length&&(a.selection=jO(s,0)),s.some((t=>t.field>0))){let e=new EO(s,0),i=a.effects=[YO.of(e)];void 0===t.state.field(DO,!1)&&i.push(oi.appendConfig.of([DO,GO,HO,XO]))}t.dispatch(t.state.update(a))}}function NO(t){return({state:e,dispatch:i})=>{let r=e.field(DO,!1);if(!r||t<0&&0==r.active)return!1;let o=r.active+t,n=t>0&&!r.ranges.some((e=>e.field==o+t));return i(e.update({selection:jO(r.ranges,o),effects:YO.of(n?null:new EO(r.ranges,o)),scrollIntoView:!0})),!0}}const IO=[{key:"Tab",run:NO(1),shift:NO(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(DO,!1)&&(e(t.update({effects:YO.of(null)})),!0)}],BO=Ce.define({combine:t=>t.length?t[0]:IO}),GO=Ve.highest(Is.compute([BO],(t=>t.facet(BO))));function LO(t,e){return Object.assign(Object.assign({},e),{apply:UO(t)})}const HO=zs.domEventHandlers({mousedown(t,e){let i,r=e.state.field(DO,!1);if(!r||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let o=r.ranges.find((t=>t.from<=i&&t.to>=i));return!(!o||o.field==r.active||(e.dispatch({selection:jO(r.ranges,o.field),effects:YO.of(r.ranges.some((t=>t.field>o.field))?new EO(r.ranges,o.field):null),scrollIntoView:!0}),0))}}),FO={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},KO=oi.define({map(t,e){let i=e.mapPos(t,-1,ve.TrackAfter);return null==i?void 0:i}}),JO=new class extends mi{};JO.startSide=1,JO.endSide=-1;const tg=Ee.define({create:()=>yi.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(KO)&&(t=t.update({add:[JO.range(i.value,i.value+1)]}));return t}}),eg="()[]{}<>";function ig(t){for(let e=0;e<8;e+=2)if(eg.charCodeAt(e)==t)return eg.charAt(e+1);return ge(t<128?t:t+1)}function rg(t,e){return t.languageDataAt("closeBrackets",e)[0]||FO}const og="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),ng=zs.inputHandler.of(((t,e,i,r)=>{if((og?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(r.length>2||2==r.length&&1==me(Oe(r,0))||e!=o.from||i!=o.to)return!1;let n=function(t,e){let i=rg(t,t.selection.main.head),r=i.brackets||FO.brackets;for(let o of r){let n=ig(Oe(o,0));if(e==o)return n==o?dg(t,o,r.indexOf(o+o+o)>-1,i):hg(t,o,n,i.before||FO.before);if(e==n&&ag(t,t.selection.main.from))return cg(t,0,n)}return null}(t.state,r);return!!n&&(t.dispatch(n),!0)})),sg=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=rg(t,t.selection.main.head).brackets||FO.brackets,r=null,o=t.changeByRange((e=>{if(e.empty){let r=function(t,e){let i=t.sliceString(e-2,e);return me(Oe(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let o of i)if(o==r&&lg(t.doc,e.head)==ig(Oe(o,0)))return{changes:{from:e.head-o.length,to:e.head+o.length},range:Te.cursor(e.head-o.length)}}return{range:r=e}}));return r||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function ag(t,e){let i=!1;return t.field(tg).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function lg(t,e){let i=t.sliceString(e,e+2);return i.slice(0,me(Oe(i,0)))}function hg(t,e,i,r){let o=null,n=t.changeByRange((n=>{if(!n.empty)return{changes:[{insert:e,from:n.from},{insert:i,from:n.to}],effects:KO.of(n.to+e.length),range:Te.range(n.anchor+e.length,n.head+e.length)};let s=lg(t.doc,n.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+i,from:n.head},effects:KO.of(n.head+e.length),range:Te.cursor(n.head+e.length)}:{range:o=n}}));return o?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function cg(t,e,i){let r=null,o=t.changeByRange((e=>e.empty&&lg(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:Te.cursor(e.head+i.length)}:r={range:e}));return r?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function dg(t,e,i,r){let o=r.stringPrefixes||FO.stringPrefixes,n=null,s=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:KO.of(r.to+e.length),range:Te.range(r.anchor+e.length,r.head+e.length)};let s,a=r.head,l=lg(t.doc,a);if(l==e){if(ug(t,a))return{changes:{insert:e+e,from:a},effects:KO.of(a+e.length),range:Te.cursor(a+e.length)};if(ag(t,a)){let r=i&&t.sliceDoc(a,a+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+r.length,insert:r},range:Te.cursor(a+r.length)}}}else{if(i&&t.sliceDoc(a-2*e.length,a)==e+e&&(s=fg(t,a-2*e.length,o))>-1&&ug(t,s))return{changes:{insert:e+e+e+e,from:a},effects:KO.of(a+e.length),range:Te.cursor(a+e.length)};if(t.charCategorizer(a)(l)!=ui.Word&&fg(t,a,o)>-1&&!function(t,e,i,r){let o=Kh(t).resolveInner(e,-1),n=r.reduce(((t,e)=>Math.max(t,e.length)),0);for(let s=0;s<5;s++){let s=t.sliceDoc(o.from,Math.min(o.to,o.from+i.length+n)),a=s.indexOf(i);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let e=o.firstChild;for(;e&&e.from==o.from&&e.to-e.from>i.length+a;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let l=o.to==e&&o.parent;if(!l)break;o=l}return!1}(t,a,e,o))return{changes:{insert:e+e,from:a},effects:KO.of(a+e.length),range:Te.cursor(a+e.length)}}return{range:n=r}}));return n?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ug(t,e){let i=Kh(t).resolveInner(e+1);return i.parent&&i.from==e}function fg(t,e,i){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=ui.Word)return e;for(let o of i){let i=e-o.length;if(t.sliceDoc(i,e)==o&&r(t.sliceDoc(i-1,i))!=ui.Word)return i}return-1}function pg(t={}){return[CO,QO,lO.of(t),RO,gg,XO]}const Og=[{key:"Ctrl-Space",run:t=>!!t.state.field(QO,!1)&&(t.dispatch({effects:oO.of(!0)}),!0)},{key:"Escape",run:t=>{let e=t.state.field(QO,!1);return!(!e||!e.active.some((t=>0!=t.state))||(t.dispatch({effects:nO.of(null)}),0))}},{key:"ArrowDown",run:ZO(!0)},{key:"ArrowUp",run:ZO(!1)},{key:"PageDown",run:ZO(!0,"page")},{key:"PageUp",run:ZO(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(QO,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(lO).interactionDelay)&&$O(t,e.open.options[e.open.selected])}}],gg=Ve.highest(Is.computeN([lO],(t=>t.facet(lO).defaultKeymap?[Og]:[]))),mg=[LO("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),LO("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),LO("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),LO("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),LO("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),LO("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),LO("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),LO("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),LO("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),LO('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),LO('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],bg=mg.concat([LO("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),LO("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),LO("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),vg=new ih,wg=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function yg(t){return(e,i)=>{let r=e.node.getChild("VariableDefinition");return r&&i(r,t),!0}}const xg=["FunctionDeclaration"],Sg={FunctionDeclaration:yg("function"),ClassDeclaration:yg("class"),ClassExpression:()=>!0,EnumDeclaration:yg("constant"),TypeAliasDeclaration:yg("type"),NamespaceDeclaration:yg("namespace"),VariableDefinition(t,e){t.matchContext(xg)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function kg(t,e){let i=vg.get(e);if(i)return i;let r=[],o=!0;function n(e,i){let o=t.sliceString(e.from,e.to);r.push({label:o,type:i})}return e.cursor(Wl.IncludeAnonymous).iterate((e=>{if(o)o=!1;else if(e.name){let t=Sg[e.name];if(t&&t(e,n)||wg.has(e.name))return!1}else if(e.to-e.from>8192){for(let i of kg(t,e.node))r.push(i);return!1}})),vg.set(e,r),r}const Qg=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,$g=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Pg(t){let e=Kh(t.state).resolveInner(t.pos,-1);if($g.indexOf(e.name)>-1)return null;let i="VariableName"==e.name||e.to-e.from<20&&Qg.test(t.state.sliceDoc(e.from,e.to));if(!i&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)wg.has(i.name)&&(r=r.concat(kg(t.state.doc,i)));return{options:r,from:i?e.from:t.pos,validFor:Qg}}const Zg=Fh.define({name:"javascript",parser:Gp.configure({props:[Oc.add({IfStatement:Sc({except:/^\s*({|else\b)/}),TryStatement:Sc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,i=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(i?0:r?1:2)*t.unit},Block:yc({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Sc({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),Qc.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":$c,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Tg={test:t=>/^JSX/.test(t.name),facet:Bh({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Rg=Zg.configure({dialect:"ts"},"typescript"),Ag=Zg.configure({dialect:"jsx",props:[Gh.add((t=>t.isTop?[Tg]:void 0))]}),Cg=Zg.configure({dialect:"jsx ts",props:[Gh.add((t=>t.isTop?[Tg]:void 0))]},"typescript");let Xg=t=>({label:t,type:"keyword"});const Mg="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Xg),_g=Mg.concat(["declare","implements","private","protected","public"].map(Xg));function qg(t={}){let e=t.jsx?t.typescript?Cg:Ag:t.typescript?Rg:Zg,i=t.typescript?bg.concat(_g):mg.concat(Mg);return new lc(e,[Zg.data.of({autocomplete:(r=$g,o=Fp(i),t=>{for(let e=Kh(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(r.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return o(t)})}),Zg.data.of({autocomplete:Pg}),t.jsx?Eg:[]]);var r,o}function Wg(t,e,i=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,i));return""}const zg="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Eg=zs.inputHandler.of(((t,e,i,r,o)=>{if((zg?t.composing:t.compositionStarted)||t.state.readOnly||e!=i||">"!=r&&"/"!=r||!Zg.isActiveAt(t.state,e,-1))return!1;let n=o(),{state:s}=n,a=s.changeByRange((t=>{var e;let i,{head:o}=t,n=Kh(s).resolveInner(o-1,-1);if("JSXStartTag"==n.name&&(n=n.parent),s.doc.sliceString(o-1,o)!=r||"JSXAttributeValue"==n.name&&n.to>o);else{if(">"==r&&"JSXFragmentTag"==n.name)return{range:t,changes:{from:o,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==n.name){let t=n.parent,r=t.parent;if(r&&t.from==o-2&&((i=Wg(s.doc,r.firstChild,o))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${i}>`;return{range:Te.cursor(o+t.length,-1),changes:{from:o,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(n);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(s.doc.sliceString(o,o+2))&&(i=Wg(s.doc,e,o)))return{range:t,changes:{from:o,insert:`</${i}>`}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([n,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),Yg=["_blank","_self","_top","_parent"],Vg=["ascii","utf-8","utf-16","latin1","latin1"],Dg=["get","post","put","delete"],jg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ug=["true","false"],Ng={},Ig={a:{attrs:{href:null,ping:null,type:null,media:null,target:Yg,hreflang:null}},abbr:Ng,address:Ng,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ng,aside:Ng,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ng,base:{attrs:{href:null,target:Yg}},bdi:Ng,bdo:Ng,blockquote:{attrs:{cite:null}},body:Ng,br:Ng,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:jg,formmethod:Dg,formnovalidate:["novalidate"],formtarget:Yg,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ng,center:Ng,cite:Ng,code:Ng,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ng,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ng,div:Ng,dl:Ng,dt:Ng,em:Ng,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ng,figure:Ng,footer:Ng,form:{attrs:{action:null,name:null,"accept-charset":Vg,autocomplete:["on","off"],enctype:jg,method:Dg,novalidate:["novalidate"],target:Yg}},h1:Ng,h2:Ng,h3:Ng,h4:Ng,h5:Ng,h6:Ng,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ng,hgroup:Ng,hr:Ng,html:{attrs:{manifest:null}},i:Ng,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:jg,formmethod:Dg,formnovalidate:["novalidate"],formtarget:Yg,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ng,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ng,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ng,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Vg,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ng,noscript:Ng,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ng,param:{attrs:{name:null,value:null}},pre:Ng,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ng,rt:Ng,ruby:Ng,samp:Ng,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Vg}},section:Ng,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ng,source:{attrs:{src:null,type:null,media:null}},span:Ng,strong:Ng,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ng,summary:Ng,sup:Ng,table:Ng,tbody:Ng,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ng,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ng,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ng,time:{attrs:{datetime:null}},title:Ng,tr:Ng,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ng,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ng},Bg={accesskey:null,class:null,contenteditable:Ug,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ug,autocorrect:Ug,autocapitalize:Ug,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ug,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ug,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ug,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ug,"aria-hidden":Ug,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ug,"aria-multiselectable":Ug,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ug,"aria-relevant":null,"aria-required":Ug,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Gg="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t=>"on"+t));for(let t of Gg)Bg[t]=null;class Lg{constructor(t,e){this.tags=Object.assign(Object.assign({},Ig),t),this.globalAttrs=Object.assign(Object.assign({},Bg),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function Hg(t,e,i=t.length){if(!e)return"";let r=e.firstChild,o=r&&r.getChild("TagName");return o?t.sliceString(o.from,Math.min(o.to,i)):""}function Fg(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function Kg(t,e,i){let r=i.tags[Hg(t,Fg(e))];return(null==r?void 0:r.children)||i.allTags}function Jg(t,e){let i=[];for(let r=Fg(e);r&&!r.type.isTop;r=Fg(r.parent)){let o=Hg(t,r);if(o&&"CloseTag"==r.lastChild.name)break;o&&i.indexOf(o)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&i.push(o)}return i}Lg.default=new Lg;const tm=/^[:\-\.\w\u00b7-\uffff]*$/;function em(t,e,i,r,o){let n=/\s*>/.test(t.sliceDoc(o,o+5))?"":">",s=Fg(i,!0);return{from:r,to:o,options:Kg(t.doc,s,e).map((t=>({label:t,type:"type"}))).concat(Jg(t.doc,i).map(((t,e)=>({label:"/"+t,apply:"/"+t+n,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function im(t,e,i,r){let o=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:i,to:r,options:Jg(t.doc,e).map(((t,e)=>({label:t,apply:t+o,type:"type",boost:99-e}))),validFor:tm}}function rm(t){let{extraTags:e,extraGlobalAttributes:i}=t,r=i||e?new Lg(e,i):Lg.default;return t=>function(t,e){let{state:i,pos:r}=e,o=Kh(i).resolveInner(r,-1),n=o.resolve(r);for(let t,e=r;n==o&&(t=o.childBefore(e));){let i=t.lastChild;if(!i||!i.type.isError||i.from<i.to)break;n=o=t,e=i.from}return"TagName"==o.name?o.parent&&/CloseTag$/.test(o.parent.name)?im(i,o,o.from,r):em(i,t,o,o.from,r):"StartTag"==o.name?em(i,t,o,r,r):"StartCloseTag"==o.name||"IncompleteCloseTag"==o.name?im(i,o,r,r):"OpenTag"==o.name||"SelfClosingTag"==o.name||"AttributeName"==o.name?function(t,e,i,r,o){let n=Fg(i),s=n?e.tags[Hg(t.doc,n)]:null,a=s&&s.attrs?Object.keys(s.attrs):[];return{from:r,to:o,options:(s&&!1===s.globalAttrs?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames).map((t=>({label:t,type:"property"}))),validFor:tm}}(i,t,o,"AttributeName"==o.name?o.from:r,r):"Is"==o.name||"AttributeValue"==o.name||"UnquotedAttributeValue"==o.name?function(t,e,i,r,o){var n;let s,a=null===(n=i.parent)||void 0===n?void 0:n.getChild("AttributeName"),l=[];if(a){let n=t.sliceDoc(a.from,a.to),h=e.globalAttrs[n];if(!h){let r=Fg(i),o=r?e.tags[Hg(t.doc,r)]:null;h=(null==o?void 0:o.attrs)&&o.attrs[n]}if(h){let e=t.sliceDoc(r,o).toLowerCase(),i='"',n='"';/^['"]/.test(e)?(s='"'==e[0]?/^[^"]*$/:/^[^']*$/,i="",n=t.sliceDoc(o,o+1)==e[0]?"":e[0],e=e.slice(1),r++):s=/^[^\s<>='"]*$/;for(let t of h)l.push({label:t,apply:i+t+n,type:"constant"})}}return{from:r,to:o,options:l,validFor:s}}(i,t,o,"Is"==o.name?r:o.from,r):!e.explicit||"Element"!=n.name&&"Text"!=n.name&&"Document"!=n.name?null:function(t,e,i,r){let o=[],n=0;for(let r of Kg(t.doc,i,e))o.push({label:"<"+r,type:"type"});for(let e of Jg(t.doc,i))o.push({label:"</"+e+">",type:"type",boost:99-n++});return{from:r,to:r,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(i,t,o,r)}(r,t)}const om=Zg.parser.configure({top:"SingleExpression"}),nm=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:Rg.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:Ag.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:Cg.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:om},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:Zg.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:_p.parser}],sm=[{name:"style",parser:_p.parser.configure({top:"Styles"})}].concat(Gg.map((t=>({name:t,parser:Zg.parser})))),am=Fh.define({name:"html",parser:sp.configure({props:[Oc.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e,i=null;for(let e=t.node;;){let t=e.lastChild;if(!t||"Element"!=t.name||t.to!=e.to)break;i=e=t}return i&&(!(e=i.lastChild)||"CloseTag"!=e.name&&"SelfClosingTag"!=e.name)?t.lineIndent(i.from)+t.unit:null}}),Qc.add({Element(t){let e=t.firstChild,i=t.lastChild;return e&&"OpenTag"==e.name?{from:e.to,to:"CloseTag"==i.name?i.from:t.to}:null}}),fd.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),lm=am.configure({wrap:cp(nm,sm)});function hm(t={}){let e,i="";!1===t.matchClosingTags&&(i="noMatch"),!0===t.selfClosingTags&&(i=(i?i+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=cp((t.nestedLanguages||[]).concat(nm),(t.nestedAttributes||[]).concat(sm)));let r=e?am.configure({wrap:e,dialect:i}):i?lm.configure({dialect:i}):lm;return new lc(r,[lm.data.of({autocomplete:rm(t)}),!1!==t.autoCloseTags?dm:[],qg().support,qp().support])}const cm=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),dm=zs.inputHandler.of(((t,e,i,r,o)=>{if(t.composing||t.state.readOnly||e!=i||">"!=r&&"/"!=r||!lm.isActiveAt(t.state,e,-1))return!1;let n=o(),{state:s}=n,a=s.changeByRange((t=>{var e,i,o;let n,a=s.doc.sliceString(t.from-1,t.to)==r,{head:l}=t,h=Kh(s).resolveInner(l,-1);if(a&&">"==r&&"EndTag"==h.name){let r=h.parent;if("CloseTag"!=(null===(i=null===(e=r.parent)||void 0===e?void 0:e.lastChild)||void 0===i?void 0:i.name)&&(n=Hg(s.doc,r.parent,l))&&!cm.has(n))return{range:t,changes:{from:l,to:l+(">"===s.doc.sliceString(l,l+1)?1:0),insert:`</${n}>`}}}else if(a&&"/"==r&&"IncompleteCloseTag"==h.name){let t=h.parent;if(h.from==l-2&&"CloseTag"!=(null===(o=t.lastChild)||void 0===o?void 0:o.name)&&(n=Hg(s.doc,t,l))&&!cm.has(n)){let t=l+(">"===s.doc.sliceString(l,l+1)?1:0),e=`${n}>`;return{range:Te.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([n,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function um(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)){var o=i[r];"string"==typeof o?t.setAttribute(r,o):null!=o&&(t[r]=o)}e++}for(;e<arguments.length;e++)fm(t,arguments[e]);return t}function fm(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var i=0;i<e.length;i++)fm(t,e[i])}}const pm="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class Om{constructor(t,e,i=0,r=t.length,o,n){this.test=n,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,r),this.bufferStart=i,this.normalize=o?t=>o(pm(t)):pm,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Oe(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=ge(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=me(t);let r=this.normalize(e);for(let t=0,o=i;;t++){let n=r.charCodeAt(t),s=this.match(n,o,this.bufferPos+this.bufferStart);if(t==r.length-1){if(s)return this.value=s,this;break}o==i&&t<e.length&&e.charCodeAt(t)==n&&o++}}}match(t,e,i){let r=null;for(let e=0;e<this.matches.length;e+=2){let o=this.matches[e],n=!1;this.query.charCodeAt(o)==t&&(o==this.query.length-1?r={from:this.matches[e+1],to:i}:(this.matches[e]++,n=!0)),n||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?r={from:e,to:i}:this.matches.push(1,e)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(Om.prototype[Symbol.iterator]=function(){return this});const gm={from:-1,to:-1,match:/.*/.exec("")},mm="gm"+(null==/x/.unicode?"":"u");class bm{constructor(t,e,i,r=0,o=t.length){if(this.text=t,this.to=o,this.curLine="",this.done=!1,this.value=gm,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new ym(t,e,i,r,o);this.re=new RegExp(e,mm+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.iter=t.iter();let n=t.lineAt(r);this.curLineStart=n.from,this.matchPos=xm(t,r),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=xm(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const vm=new WeakMap;class wm{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,i){let r=vm.get(t);if(!r||r.from>=i||r.to<=e){let r=new wm(e,t.sliceString(e,i));return vm.set(t,r),r}if(r.from==e&&r.to==i)return r;let{text:o,from:n}=r;return n>e&&(o=t.sliceString(e,n)+o,n=e),r.to<i&&(o+=t.sliceString(r.to,i)),vm.set(t,new wm(n,o)),new wm(e,o.slice(e-n,i-n))}}class ym{constructor(t,e,i,r,o){this.text=t,this.to=o,this.done=!1,this.value=gm,this.matchPos=xm(t,r),this.re=new RegExp(e,mm+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.flat=wm.get(t,r,this.chunkEnd(r+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=xm(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=wm.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function xm(t,e){if(e>=t.length)return e;let i,r=t.lineAt(e);for(;e<r.to&&(i=r.text.charCodeAt(e-r.from))>=56320&&i<57344;)e++;return e}function Sm(t){let e=um("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:r}=t,o=r.doc.lineAt(r.selection.main.head),[,n,s,a,l]=i,h=a?+a.slice(1):0,c=s?+s:o.number;if(s&&l){let t=c/100;n&&(t=t*("-"==n?-1:1)+o.number/r.doc.lines),c=Math.round(r.doc.lines*t)}else s&&n&&(c=c*("-"==n?-1:1)+o.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),u=Te.cursor(d.from+Math.max(0,Math.min(h,d.length)));t.dispatch({effects:[km.of(!1),zs.scrollIntoView(u.from,{y:"center"})],selection:u}),t.focus()}return{dom:um("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:km.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},um("label",t.state.phrase("Go to line"),": ",e)," ",um("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(bm.prototype[Symbol.iterator]=ym.prototype[Symbol.iterator]=function(){return this});const km=oi.define(),Qm=Ee.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(km)&&(t=i.value);return t},provide:t=>ol.from(t,(t=>t?Sm:null))}),$m=zs.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Pm={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Zm=Ce.define({combine:t=>gi(t,Pm,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function Tm(t){let e=[Mm,Xm];return t&&e.push(Zm.of(t)),e}const Rm=Hr.mark({class:"cm-selectionMatch"}),Am=Hr.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Cm(t,e,i,r){return!(0!=i&&t(e.sliceDoc(i-1,i))==ui.Word||r!=e.doc.length&&t(e.sliceDoc(r,r+1))==ui.Word)}const Xm=Vo.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Zm),{state:i}=t,r=i.selection;if(r.ranges.length>1)return Hr.none;let o,n=r.main,s=null;if(n.empty){if(!e.highlightWordAroundCursor)return Hr.none;let t=i.wordAt(n.head);if(!t)return Hr.none;s=i.charCategorizer(n.head),o=i.sliceDoc(t.from,t.to)}else{let t=n.to-n.from;if(t<e.minSelectionLength||t>200)return Hr.none;if(e.wholeWords){if(o=i.sliceDoc(n.from,n.to),s=i.charCategorizer(n.head),!Cm(s,i,n.from,n.to)||!function(t,e,i,r){return t(e.sliceDoc(i,i+1))==ui.Word&&t(e.sliceDoc(r-1,r))==ui.Word}(s,i,n.from,n.to))return Hr.none}else if(o=i.sliceDoc(n.from,n.to),!o)return Hr.none}let a=[];for(let r of t.visibleRanges){let t=new Om(i.doc,o,r.from,r.to);for(;!t.next().done;){let{from:r,to:o}=t.value;if((!s||Cm(s,i,r,o))&&(n.empty&&r<=n.from&&o>=n.to?a.push(Am.range(r,o)):(r>=n.to||o<=n.from)&&a.push(Rm.range(r,o)),a.length>e.maxMatches))return Hr.none}}return Hr.set(a)}},{decorations:t=>t.decorations}),Mm=zs.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),_m=Ce.define({combine:t=>gi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new cb(t),scrollToMatch:t=>zs.scrollIntoView(t)})});class qm{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,mm),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new jm(this):new Em(this)}getCursor(t,e=0,i){let r=t.doc?t:Oi.create({doc:t});return null==i&&(i=r.doc.length),this.regexp?Ym(this,r,e,i):zm(this,r,e,i)}}class Wm{constructor(t){this.spec=t}}function zm(t,e,i,r){return new Om(e.doc,t.unquoted,i,r,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(i,r,o,n)=>((n>i||n+o.length<r)&&(n=Math.max(0,i-2),o=t.sliceString(n,Math.min(t.length,r+2))),!(e(Vm(o,i-n))==ui.Word&&e(Dm(o,i-n))==ui.Word||e(Dm(o,r-n))==ui.Word&&e(Vm(o,r-n))==ui.Word))}(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}class Em extends Wm{constructor(t){super(t)}nextMatch(t,e,i){let r=zm(this.spec,t,i,t.doc.length).nextOverlapping();return r.done&&(r=zm(this.spec,t,0,e).nextOverlapping()),r.done?null:r.value}prevMatchInRange(t,e,i){for(let r=i;;){let i=Math.max(e,r-1e4-this.spec.unquoted.length),o=zm(this.spec,t,i,r),n=null;for(;!o.nextOverlapping().done;)n=o.value;if(n)return n;if(i==e)return null;r-=1e4}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let i=zm(this.spec,t,0,t.doc.length),r=[];for(;!i.next().done;){if(r.length>=e)return null;r.push(i.value)}return r}highlight(t,e,i,r){let o=zm(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}function Ym(t,e,i,r){return new bm(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(o=e.charCategorizer(e.selection.main.head),(t,e,i)=>!i[0].length||(o(Vm(i.input,i.index))!=ui.Word||o(Dm(i.input,i.index))!=ui.Word)&&(o(Dm(i.input,i.index+i[0].length))!=ui.Word||o(Vm(i.input,i.index+i[0].length))!=ui.Word)):void 0},i,r);var o}function Vm(t,e){return t.slice(ce(t,e,!1),e)}function Dm(t,e){return t.slice(e,ce(t,e))}class jm extends Wm{nextMatch(t,e,i){let r=Ym(this.spec,t,i,t.doc.length).next();return r.done&&(r=Ym(this.spec,t,0,e).next()),r.done?null:r.value}prevMatchInRange(t,e,i){for(let r=1;;r++){let o=Math.max(e,i-1e4*r),n=Ym(this.spec,t,o,i),s=null;for(;!n.next().done;)s=n.value;if(s&&(o==e||s.from>o+10))return s;if(o==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i<t.match.length?t.match[i]:e))}matchAll(t,e){let i=Ym(this.spec,t,0,t.doc.length),r=[];for(;!i.next().done;){if(r.length>=e)return null;r.push(i.value)}return r}highlight(t,e,i,r){let o=Ym(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!o.next().done;)r(o.value.from,o.value.to)}}const Um=oi.define(),Nm=oi.define(),Im=Ee.define({create:t=>new Bm(ob(t).create(),null),update(t,e){for(let i of e.effects)i.is(Um)?t=new Bm(i.value.create(),t.panel):i.is(Nm)&&(t=new Bm(t.query,i.value?rb:null));return t},provide:t=>ol.from(t,(t=>t.panel))});class Bm{constructor(t,e){this.query=t,this.panel=e}}const Gm=Hr.mark({class:"cm-searchMatch"}),Lm=Hr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),Hm=Vo.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Im))}update(t){let e=t.state.field(Im);(e!=t.startState.field(Im)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Hr.none;let{view:i}=this,r=new xi;for(let e=0,o=i.visibleRanges,n=o.length;e<n;e++){let{from:s,to:a}=o[e];for(;e<n-1&&a>o[e+1].from-500;)a=o[++e].to;t.highlight(i.state,s,a,((t,e)=>{let o=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));r.add(t,e,o?Lm:Gm)}))}return r.finish()}},{decorations:t=>t.decorations});function Fm(t){return e=>{let i=e.state.field(Im,!1);return i&&i.query.spec.valid?t(e,i):ab(e)}}const Km=Fm(((t,{query:e})=>{let{to:i}=t.state.selection.main,r=e.nextMatch(t.state,i,i);if(!r)return!1;let o=Te.single(r.from,r.to),n=t.state.facet(_m);return t.dispatch({selection:o,effects:[pb(t,r),n.scrollToMatch(o.main,t)],userEvent:"select.search"}),sb(t),!0})),Jm=Fm(((t,{query:e})=>{let{state:i}=t,{from:r}=i.selection.main,o=e.prevMatch(i,r,r);if(!o)return!1;let n=Te.single(o.from,o.to),s=t.state.facet(_m);return t.dispatch({selection:n,effects:[pb(t,o),s.scrollToMatch(n.main,t)],userEvent:"select.search"}),sb(t),!0})),tb=Fm(((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length||(t.dispatch({selection:Te.create(i.map((t=>Te.range(t.from,t.to)))),userEvent:"select.search.matches"}),0))})),eb=Fm(((t,{query:e})=>{let{state:i}=t,{from:r,to:o}=i.selection.main;if(i.readOnly)return!1;let n=e.nextMatch(i,r,r);if(!n)return!1;let s,a,l=[],h=[];if(n.from==r&&n.to==o&&(a=i.toText(e.getReplacement(n)),l.push({from:n.from,to:n.to,insert:a}),n=e.nextMatch(i,n.from,n.to),h.push(zs.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(r).number)+"."))),n){let e=0==l.length||l[0].from>=n.to?0:n.to-n.from-a.length;s=Te.single(n.from-e,n.to-e),h.push(pb(t,n)),h.push(i.facet(_m).scrollToMatch(s.main,t))}return t.dispatch({changes:l,selection:s,effects:h,userEvent:"input.replace"}),!0})),ib=Fm(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map((t=>{let{from:i,to:r}=t;return{from:i,to:r,insert:e.getReplacement(t)}}));if(!i.length)return!1;let r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:zs.announce.of(r),userEvent:"input.replace.all"}),!0}));function rb(t){return t.state.facet(_m).createPanel(t)}function ob(t,e){var i,r,o,n,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let h=t.facet(_m);return new qm({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==e?void 0:e.caseSensitive)&&void 0!==r?r:h.caseSensitive,literal:null!==(o=null==e?void 0:e.literal)&&void 0!==o?o:h.literal,regexp:null!==(n=null==e?void 0:e.regexp)&&void 0!==n?n:h.regexp,wholeWord:null!==(s=null==e?void 0:e.wholeWord)&&void 0!==s?s:h.wholeWord})}function nb(t){let e=tl(t,rb);return e&&e.dom.querySelector("[main-field]")}function sb(t){let e=nb(t);e&&e==t.root.activeElement&&e.select()}const ab=t=>{let e=t.state.field(Im,!1);if(e&&e.panel){let i=nb(t);if(i&&i!=t.root.activeElement){let r=ob(t.state,e.query.spec);r.valid&&t.dispatch({effects:Um.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[Nm.of(!0),e?Um.of(ob(t.state,e.query.spec)):oi.appendConfig.of(gb)]});return!0},lb=t=>{let e=t.state.field(Im,!1);if(!e||!e.panel)return!1;let i=tl(t,rb);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Nm.of(!1)}),!0},hb=[{key:"Mod-f",run:ab,scope:"editor search-panel"},{key:"F3",run:Km,shift:Jm,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Km,shift:Jm,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:lb,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:r,to:o}=i.main,n=[],s=0;for(let e=new Om(t.doc,t.sliceDoc(r,o));!e.next().done;){if(n.length>1e3)return!1;e.value.from==r&&(s=n.length),n.push(Te.range(e.value.from,e.value.to))}return e(t.update({selection:Te.create(n,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=tl(t,Sm);if(!e){let i=[km.of(!0)];null==t.state.field(Qm,!1)&&i.push(oi.appendConfig.of([Qm,$m])),t.dispatch({effects:i}),e=tl(t,Sm)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,r=Te.create(i.ranges.map((e=>t.wordAt(e.head)||Te.cursor(e.head))),i.mainIndex);return!r.eq(i)&&(e(t.update({selection:r})),!0)})({state:t,dispatch:e});let r=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=r)))return!1;let o=function(t,e){let{main:i,ranges:r}=t.selection,o=t.wordAt(i.head),n=o&&o.from==i.from&&o.to==i.to;for(let i=!1,o=new Om(t.doc,e,r[r.length-1].to);;){if(o.next(),!o.done){if(i&&r.some((t=>t.from==o.value.from)))continue;if(n){let e=t.wordAt(o.value.from);if(!e||e.from!=o.value.from||e.to!=o.value.to)continue}return o.value}if(i)return null;o=new Om(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),i=!0}}(t,r);return!!o&&(e(t.update({selection:t.selection.addRange(Te.range(o.from,o.to),!1),effects:zs.scrollIntoView(o.to)})),!0)},preventDefault:!0}];class cb{constructor(t){this.view=t;let e=this.query=t.state.field(Im).query.spec;function i(t,e,i){return um("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=um("input",{value:e.search,placeholder:db(t,"Find"),"aria-label":db(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=um("input",{value:e.replace,placeholder:db(t,"Replace"),"aria-label":db(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=um("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=um("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=um("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=um("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>Km(t)),[db(t,"next")]),i("prev",(()=>Jm(t)),[db(t,"previous")]),i("select",(()=>tb(t)),[db(t,"all")]),um("label",null,[this.caseField,db(t,"match case")]),um("label",null,[this.reField,db(t,"regexp")]),um("label",null,[this.wordField,db(t,"by word")]),...t.state.readOnly?[]:[um("br"),this.replaceField,i("replace",(()=>eb(t)),[db(t,"replace")]),i("replaceAll",(()=>ib(t)),[db(t,"replace all")])],um("button",{name:"close",onclick:()=>lb(t),"aria-label":db(t,"close"),type:"button"},["×"])])}commit(){let t=new qm({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Um.of(t)}))}keydown(t){var e,i;i=t,Ks(Gs((e=this.view).state),i,e,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?Jm:Km)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),eb(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Um)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(_m).top}}function db(t,e){return t.state.phrase(e)}const ub=30,fb=/[\s\.,:;?!]/;function pb(t,{from:e,to:i}){let r=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,n=Math.max(r.from,e-ub),s=Math.min(o,i+ub),a=t.state.sliceDoc(n,s);if(n!=r.from)for(let t=0;t<ub;t++)if(!fb.test(a[t+1])&&fb.test(a[t])){a=a.slice(t);break}if(s!=o)for(let t=a.length-1;t>a.length-ub;t--)if(!fb.test(a[t-1])&&fb.test(a[t])){a=a.slice(0,t);break}return zs.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const Ob=zs.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),gb=[Im,Ve.low(Hm),Ob];class mb{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class bb{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let r=t,o=i.facet(Tb).markerFilter;o&&(r=o(r,i));let n=Hr.set(r.map((t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?Hr.widget({widget:new Cb(t),diagnostic:t}).range(t.from):Hr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t,inclusive:!0}).range(t.from,t.to))),!0);return new bb(n,e,vb(n))}}function vb(t,e=null,i=0){let r=null;return t.between(i,1e9,((t,i,{spec:o})=>{if(!e||o.diagnostic==e)return r=new mb(t,i,o.diagnostic),!1})),r}const wb=oi.define(),yb=oi.define(),xb=oi.define(),Sb=Ee.define({create:()=>new bb(Hr.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),r=null,o=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=vb(i,t.selected.diagnostic,o)||vb(i,null,o)}!i.size&&o&&e.state.facet(Tb).autoPanel&&(o=null),t=new bb(i,o,r)}for(let i of e.effects)if(i.is(wb)){let r=e.state.facet(Tb).autoPanel?i.value.length?Mb.open:null:t.panel;t=bb.init(i.value,r,e.state)}else i.is(yb)?t=new bb(t.diagnostics,i.value?Mb.open:null,t.selected):i.is(xb)&&(t=new bb(t.diagnostics,t.panel,i.value));return t},provide:t=>[ol.from(t,(t=>t.panel)),zs.decorations.from(t,(t=>t.diagnostics))]}),kb=Hr.mark({class:"cm-lintRange cm-lintRange-active",inclusive:!0});function Qb(t,e,i){let{diagnostics:r}=t.state.field(Sb),o=[],n=2e8,s=0;r.between(e-(i<0?1:0),e+(i>0?1:0),((t,r,{spec:a})=>{e>=t&&e<=r&&(t==r||(e>t||i>0)&&(e<r||i<0))&&(o.push(a.diagnostic),n=Math.min(t,n),s=Math.max(r,s))}));let a=t.state.facet(Tb).tooltipFilter;return a&&(o=a(o,t.state)),o.length?{pos:n,end:s,above:t.state.doc.lineAt(n).to<s,create:()=>({dom:$b(t,o)})}:null}function $b(t,e){return um("ul",{class:"cm-tooltip-lint"},e.map((e=>Ab(t,e,!1))))}const Pb=t=>{let e=t.state.field(Sb,!1);return!(!e||!e.panel||(t.dispatch({effects:yb.of(!1)}),0))},Zb=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Sb,!1);var i,r;e&&e.panel||t.dispatch({effects:(i=t.state,r=[yb.of(!0)],i.field(Sb,!1)?r:r.concat(oi.appendConfig.of(Wb)))});let o=tl(t,Mb.open);return o&&o.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Sb,!1);if(!e)return!1;let i=t.state.selection.main,r=e.diagnostics.iter(i.to+1);return!(!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==i.from&&r.to==i.to)||(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],Tb=Ce.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},gi(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e}))});function Rb(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;t<i.length;t++){let r=i[t];if(/[a-zA-Z]/.test(r)&&!e.some((t=>t.toLowerCase()==r.toLowerCase()))){e.push(r);continue t}}e.push("")}return e}function Ab(t,e,i){var r;let o=i?Rb(e.actions):[];return um("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},um("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map(((i,r)=>{let n=!1,s=r=>{if(r.preventDefault(),n)return;n=!0;let o=vb(t.state.field(Sb).diagnostics,e);o&&i.apply(t,o.from,o.to)},{name:a}=i,l=o[r]?a.indexOf(o[r]):-1,h=l<0?a:[a.slice(0,l),um("u",a.slice(l,l+1)),a.slice(l+1)];return um("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${o[r]})"`}.`},h)})),e.source&&um("div",{class:"cm-diagnosticSource"},e.source))}class Cb extends Gr{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return um("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Xb{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=Ab(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Mb{constructor(t){this.view=t,this.items=[],this.list=um("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Pb(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],r=Rb(i.actions);for(let o=0;o<r.length;o++)if(r[o].toUpperCase().charCodeAt(0)==e.keyCode){let e=vb(this.view.state.field(Sb).diagnostics,i);e&&i.actions[o].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=um("div",{class:"cm-panel-lint"},this.list,um("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Pb(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Sb).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Sb),i=0,r=!1,o=null;for(t.between(0,this.view.state.doc.length,((t,n,{spec:s})=>{let a,l=-1;for(let t=i;t<this.items.length;t++)if(this.items[t].diagnostic==s.diagnostic){l=t;break}l<0?(a=new Xb(this.view,s.diagnostic),this.items.splice(i,0,a),r=!0):(a=this.items[l],l>i&&(this.items.splice(i,l-i),r=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),o=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new Xb(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),o?(this.list.setAttribute("aria-activedescendant",o.id),this.view.requestMeasure({key:this,read:()=>({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/i:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=vb(this.view.state.field(Sb).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:xb.of(e)})}static open(t){return new Mb(t)}}function _b(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const qb=zs.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:_b("#d11")},".cm-lintRange-warning":{backgroundImage:_b("orange")},".cm-lintRange-info":{backgroundImage:_b("#999")},".cm-lintRange-hint":{backgroundImage:_b("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Wb=[Sb,zs.decorations.compute([Sb],(t=>{let{selected:e,panel:i}=t.field(Sb);return e&&i&&e.from!=e.to?Hr.set([kb.range(e.from,e.to)]):Hr.none})),Ha(Qb,{hideOn:function(t,e){let i=e.pos,r=e.end||i,o=t.state.facet(Tb).hideOn(t,i,r);if(null!=o)return o;let n=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(wb)))&&!t.changes.touchesRange(n.from,Math.max(n.to,r)))}}),qb],zb=(()=>[Sl(),$l,ka(),zd(),Bc(),aa(),[Oa,ga],Oi.allowMultipleSelections.of(!0),Oi.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:r}=t.newSelection.main,o=i.lineAt(r);if(r>o.from+200)return t;let n=i.sliceString(o.from,r);if(!e.some((t=>t.test(n))))return t;let{state:s}=t,a=-1,l=[];for(let{head:t}of s.selection.ranges){let e=s.doc.lineAt(t);if(e.from==a)continue;a=e.from;let i=fc(s,e.from);if(null==i)continue;let r=/^\s*/.exec(e.text)[0],o=uc(s,i);r!=o&&l.push({from:e.from,to:e.from+r.length,insert:o})}return l.length?[t,{changes:l,sequential:!0}]:t})),Jc(id,{fallback:!0}),ud(),[ng,tg],pg(),Ca(),_a(),Ta,Tm(),Is.of([...sg,...Ju,...hb,...eu,...zc,...Og,...Zb])])(),Eb=a`@charset "UTF-8";/*!
|
|
25
|
-
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
|
26
|
-
* Copyright 2011-2024 The Bootstrap Authors
|
|
27
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
28
|
-
*/:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.figure{display:inline-block}.container{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}@media (min-width:1400px){.container{max-width:1320px}}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.offset-1{margin-left:8.33333333%}.table{--bs-table-color-type:initial;--bs-table-bg-type:initial;--bs-table-color-state:initial;--bs-table-bg-state:initial;--bs-table-color:var(--bs-emphasis-color);--bs-table-bg:var(--bs-body-bg);--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-emphasis-color);--bs-table-striped-bg:rgba(var(--bs-emphasis-color-rgb), 0.05);--bs-table-active-color:var(--bs-emphasis-color);--bs-table-active-bg:rgba(var(--bs-emphasis-color-rgb), 0.1);--bs-table-hover-color:var(--bs-emphasis-color);--bs-table-hover-bg:rgba(var(--bs-emphasis-color-rgb), 0.075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;color:var(--bs-table-color-state,var(--bs-table-color-type,var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state,var(--bs-table-bg-type,var(--bs-table-accent-bg)))}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.form-control,.qbo-code input{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-clip:padding-box;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control,.qbo-code input{transition:none}}.form-control[type=file],.qbo-code input[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]),.qbo-code input[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus,.qbo-code input:focus{color:var(--bs-body-color);background-color:var(--bs-body-bg);border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value,.qbo-code input::-webkit-date-and-time-value{min-width:85px;height:1.5em;margin:0}.form-control::-webkit-datetime-edit,.qbo-code input::-webkit-datetime-edit{display:block;padding:0}.form-control::-moz-placeholder,.qbo-code input::-moz-placeholder{color:var(--bs-secondary-color);opacity:1}.form-control::placeholder,.qbo-code input::placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:disabled,.qbo-code input:disabled{background-color:var(--bs-secondary-bg);opacity:1}.form-control::file-selector-button,.qbo-code input::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;margin-inline-end:.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::file-selector-button,.qbo-code input::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button,.qbo-code input:hover:not(:disabled):not([readonly])::file-selector-button{background-color:var(--bs-secondary-bg)}textarea.form-control{min-height:calc(1.5em + .75rem + calc(var(--bs-border-width) * 2))}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{--bs-form-check-bg:var(--bs-body-bg);flex-shrink:0;width:1em;height:1em;margin-top:.25em;vertical-align:top;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-repeat:no-repeat;background-position:center;background-size:contain;border:var(--bs-border-width) solid var(--bs-border-color);-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:#86b7fe;outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");width:2em;margin-left:-2.5em;background-image:var(--bs-form-switch-bg);background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%2386b7fe'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn,.qbo-code .btn-check:disabled+button,.qbo-code .btn-check[disabled]+button{pointer-events:none;filter:none;opacity:.65}.form-floating{position:relative}.form-floating>.form-control,.qbo-code .form-floating>input{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;z-index:2;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.qbo-code .form-floating>input{padding:1rem .75rem}.form-floating>.form-control::-moz-placeholder,.qbo-code .form-floating>input::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder,.qbo-code .form-floating>input::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown),.qbo-code .form-floating>input:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown),.qbo-code .form-floating>input:focus,.qbo-code .form-floating>input:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill,.qbo-code .form-floating>input:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label,.qbo-code .form-floating>input:not(:-moz-placeholder-shown)~label{color:rgba(var(--bs-body-color-rgb),.65);transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.qbo-code .form-floating>input:focus~label,.qbo-code .form-floating>input:not(:placeholder-shown)~label{color:rgba(var(--bs-body-color-rgb),.65);transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:not(:-moz-placeholder-shown)~label::after,.qbo-code .form-floating>input:not(:-moz-placeholder-shown)~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:"";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>.form-control:focus~label::after,.form-floating>.form-control:not(:placeholder-shown)~label::after,.qbo-code .form-floating>input:focus~label::after,.qbo-code .form-floating>input:not(:placeholder-shown)~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:"";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>.form-control:-webkit-autofill~label,.qbo-code .form-floating>input:-webkit-autofill~label{color:rgba(var(--bs-body-color-rgb),.65);transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:disabled~label,.form-floating>:disabled~label{color:#6c757d}.form-floating>.form-control:disabled~label::after,.form-floating>:disabled~label::after{background-color:var(--bs-secondary-bg)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.qbo-code .input-group>input{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.qbo-code .input-group>input:focus{z-index:5}.input-group .btn,.input-group .qbo-code button,.qbo-code .input-group button{position:relative;z-index:2}.input-group .btn:focus,.input-group .qbo-code button:focus,.qbo-code .input-group button:focus{z-index:5}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.qbo-code .input-group:not(.has-validation)>.form-floating:not(:last-child)>input{border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.qbo-code .input-group.has-validation>.form-floating:nth-last-child(n+3)>input{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(var(--bs-border-width) * -1);border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.qbo-code .input-group>.form-floating:not(:first-child)>input{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-valid-color)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-invalid-color)}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-danger);border-radius:var(--bs-border-radius)}.btn,.qbo-code button{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:var(--bs-body-color);--bs-btn-bg:transparent;--bs-btn-border-width:var(--bs-border-width);--bs-btn-border-color:transparent;--bs-btn-border-radius:var(--bs-border-radius);--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn,.qbo-code button{transition:none}}.btn:hover,.qbo-code button:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover,.qbo-code .btn-check+button:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible,.qbo-code button:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn,.qbo-code .btn-check:focus-visible+button{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,.qbo-code .btn-check:checked+button,.qbo-code :not(.btn-check)+button:active,.qbo-code button.active,.qbo-code button.show,.qbo-code button:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,.qbo-code .btn-check:checked+button:focus-visible,.qbo-code :not(.btn-check)+button:active:focus-visible,.qbo-code button.active:focus-visible,.qbo-code button.show:focus-visible,.qbo-code button:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked:focus-visible+.btn,.qbo-code .btn-check:checked:focus-visible+button{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,.qbo-code button.disabled,.qbo-code button:disabled,.qbo-code fieldset:disabled button,fieldset:disabled .btn,fieldset:disabled .qbo-code button{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.qbo-code button[type=submit]{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0b5ed7;--bs-btn-hover-border-color:#0a58ca;--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0a58ca;--bs-btn-active-border-color:#0a53be;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#5c636a;--bs-btn-hover-border-color:#565e64;--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:#565e64;--bs-btn-active-border-color:#51585e;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#157347;--bs-btn-hover-border-color:#146c43;--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:#146c43;--bs-btn-active-border-color:#13653f;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.qbo-code button[type=reset]{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:#d3d4d5;--bs-btn-hover-border-color:#c6c7c8;--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:#c6c7c8;--bs-btn-active-border-color:#babbbc;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:var(--bs-body-color);--bs-dropdown-bg:var(--bs-body-bg);--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:var(--bs-border-radius);--bs-dropdown-border-width:var(--bs-border-width);--bs-dropdown-inner-border-radius:calc(var(--bs-border-radius) - var(--bs-border-width));--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:var(--bs-box-shadow);--bs-dropdown-link-color:var(--bs-body-color);--bs-dropdown-link-hover-color:var(--bs-body-color);--bs-dropdown-link-hover-bg:var(--bs-tertiary-bg);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:var(--bs-tertiary-color);--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu.show{display:block}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.alert,.error{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:var(--bs-border-width) solid var(--bs-alert-border-color);--bs-alert-border-radius:var(--bs-border-radius);--bs-alert-link-color:inherit;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.working{--bs-alert-color:var(--bs-success-text-emphasis);--bs-alert-bg:var(--bs-success-bg-subtle);--bs-alert-border-color:var(--bs-success-border-subtle);--bs-alert-link-color:var(--bs-success-text-emphasis)}.error{--bs-alert-color:var(--bs-danger-text-emphasis);--bs-alert-bg:var(--bs-danger-bg-subtle);--bs-alert-border-color:var(--bs-danger-border-subtle);--bs-alert-link-color:var(--bs-danger-text-emphasis)}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:var(--bs-secondary-bg);--bs-progress-border-radius:var(--bs-border-radius);--bs-progress-box-shadow:var(--bs-box-shadow-inset);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:var(--bs-body-bg);--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:var(--bs-border-width);--bs-modal-border-radius:var(--bs-border-radius-lg);--bs-modal-box-shadow:var(--bs-box-shadow-sm);--bs-modal-inner-border-radius:calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:var(--bs-border-width);--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.show .modal-dialog{transform:none}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .qbo-code{max-height:100%;overflow:hidden}.modal-dialog-scrollable .qbo-code section,.qbo-code .modal-dialog-scrollable section{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.qbo-code{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.qbo-code header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.qbo-code section{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.qbo-code footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.qbo-code footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:var(--bs-box-shadow)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:var(--bs-body-bg);--bs-tooltip-bg:var(--bs-emphasis-color);--bs-tooltip-border-radius:var(--bs-border-radius);--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before,.qbo-code button.placeholder::before{display:inline-block;content:""}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:.25}.shadow{box-shadow:var(--bs-box-shadow)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.flex-wrap{flex-wrap:wrap!important}.mb-3{margin-bottom:1rem!important}.p-1{padding:.25rem!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.qbo-code{position:fixed;top:100px;left:100px;width:60%;height:50%;background:#fff;box-shadow:0 4px 8px rgba(0,0,0,.1);border:1px solid #ddd;z-index:1000;resize:both;overflow:auto}.qbo-code header{cursor:move}.qbo-code footer{display:flex;gap:.5em}.working{opacity:1;cursor:not-allowed}`;var Yb=function(t,e,i,r){var o,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(n<3?o(s):n>3?o(e,i,s):o(e,i))||s);return n>3&&s&&Object.defineProperty(e,i,s),s},Vb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const Db={},jb=new Map;function Ub(t){return(e,i)=>{const r=e.prefix??e.constructor?.name;if(!r)return console.error("Template prefix and constructor name not defined.",e,i);const o=jb.get(r)||new Map;o.set(t??i,e[i]),jb.set(r,o)}}const Nb=t=>{class e extends t{static{this.styles=[Eb,a`
|
|
29
|
-
:host {
|
|
30
|
-
display: block;
|
|
31
|
-
position: relative;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
:host-context(.qbo-design):host(:hover) {
|
|
35
|
-
outline: 1px dashed #0078d4;
|
|
36
|
-
background-color: #f0f8ff;
|
|
37
|
-
cursor: pointer;
|
|
38
|
-
}
|
|
39
|
-
input.working {
|
|
40
|
-
background-color: #f3f3f3;
|
|
41
|
-
cursor: wait;
|
|
42
|
-
}
|
|
43
|
-
`]}constructor(...t){super(...t),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.regex=/`(.*?)`/s,this.editorError=null,this.type=null,this.editing=!1,this.defaultTemplate=t=>
|
|
44
|
-
<dialog class="qbo-code" open>
|
|
45
|
-
<header>
|
|
46
|
-
<h5>Edit Template</h5>
|
|
47
|
-
</header>
|
|
48
|
-
<section class="content">
|
|
49
|
-
<input list="${t}" .value=${this.type} @change=${this.resetTemplate} ?disabled="${this.editorCoding}">
|
|
50
|
-
<datalist id="${t}">
|
|
51
|
-
${Array.from(this.map?.keys()??[]).map((t=>
|
|
52
|
-
</datalist>
|
|
53
|
-
<div class="editor"></div>
|
|
54
|
-
${this.editorError?
|
|
55
|
-
${this.editorCoding?
|
|
56
|
-
</section>
|
|
57
|
-
<footer>
|
|
58
|
-
<input @change=${this.code} ?disabled="${this.editorCoding}" class="${this.editorCoding?"working":""}" placeholder="Ask AI to code..." />
|
|
59
|
-
<button type="submit" @click=${this.save} ?disabled="${this.editorCoding}">Save</button>
|
|
60
|
-
<button type="reset" @click=${this.cancel} ?disabled="${this.editorCoding}">Cancel</button>
|
|
61
|
-
</footer>
|
|
62
|
-
</dialog>`}cancel(){this.toggleEdit(!1)}async save(){try{if(null==this.editor)return;const t=new FormData;t.append("htmlTemplate",this.editor.state.doc.toString());const e=await fetch(`${this.templateEndpoint}/save/${this.prefix}/${this.editorType}`,{method:"POST",body:t});if(e.ok)return this.map?.set(this.editorType,this.testTemplate),this.type=this.editorType,void this.toggleEdit(!1);throw new Error(`Failed to save template: ${e.statusText}`)}catch(t){throw t}}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,i=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({HtmlTemplate:this.editor.state.doc.toString(),Component:this.getComponent(),Prompt:e})});if(this.editorCoding=!1,i.ok){const t=await i.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${i.statusText}`)}catch(t){throw this.editorCoding=!1,t}}render(){let t=this.defaultTemplate;return this.type&&this.prefix&&!this.map?.has(this.type)&&(this.map=
|
|
63
|
-
<dialog class="qbo-code" open>
|
|
64
|
-
<header>
|
|
65
|
-
<h5>Edit Css</h5>
|
|
66
|
-
</header>
|
|
67
|
-
<section class="content">
|
|
68
|
-
<div class="editor"></div>
|
|
69
|
-
${this.editorError?
|
|
70
|
-
</section>
|
|
71
|
-
<footer>
|
|
72
|
-
<input @change=${this.code} ?disabled="${this.editorCoding}" class="${this.editorCoding?"working":""}" placeholder="Ask AI to code..." />
|
|
73
|
-
<button type="submit" @click=${this.save}>Save</button>
|
|
74
|
-
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
75
|
-
</footer>
|
|
76
|
-
</dialog>`}render(){return
|
|
1
|
+
/*! For license information please see qbo4.configuration.min.js.LICENSE.txt */
|
|
2
|
+
var t={630:(t,e,i)=>{var r;!function(t){!function(){var e="object"==typeof globalThis?globalThis:"object"==typeof i.g?i.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(t){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(t){}}(),r=n(t);function n(t,e){return function(i,r){Object.defineProperty(t,i,{configurable:!0,writable:!0,value:r}),e&&e(i,r)}}void 0!==e.Reflect&&(r=n(e.Reflect,r)),function(t,e){var i=Object.prototype.hasOwnProperty,r="function"==typeof Symbol,n=r&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",o=r&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",s="function"==typeof Object.create,a={__proto__:[]}instanceof Array,l=!s&&!a,h={create:s?function(){return D(Object.create(null))}:a?function(){return D({__proto__:null})}:function(){return D({})},has:l?function(t,e){return i.call(t,e)}:function(t,e){return e in t},get:l?function(t,e){return i.call(t,e)?t[e]:void 0}:function(t,e){return t[e]}},c=Object.getPrototypeOf(Function),d="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var t={},e=[],i=function(){function t(t,e,i){this._index=0,this._keys=t,this._values=e,this._selector=i}return t.prototype["@@iterator"]=function(){return this},t.prototype[o]=function(){return this},t.prototype.next=function(){var t=this._index;if(t>=0&&t<this._keys.length){var i=this._selector(this._keys[t],this._values[t]);return t+1>=this._keys.length?(this._index=-1,this._keys=e,this._values=e):this._index++,{value:i,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this._index>=0&&(this._index=-1,this._keys=e,this._values=e),t},t.prototype.return=function(t){return this._index>=0&&(this._index=-1,this._keys=e,this._values=e),{value:t,done:!0}},t}(),r=function(){function e(){this._keys=[],this._values=[],this._cacheKey=t,this._cacheIndex=-2}return Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.has=function(t){return this._find(t,!1)>=0},e.prototype.get=function(t){var e=this._find(t,!1);return e>=0?this._values[e]:void 0},e.prototype.set=function(t,e){var i=this._find(t,!0);return this._values[i]=e,this},e.prototype.delete=function(e){var i=this._find(e,!1);if(i>=0){for(var r=this._keys.length,n=i+1;n<r;n++)this._keys[n-1]=this._keys[n],this._values[n-1]=this._values[n];return this._keys.length--,this._values.length--,q(e,this._cacheKey)&&(this._cacheKey=t,this._cacheIndex=-2),!0}return!1},e.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=t,this._cacheIndex=-2},e.prototype.keys=function(){return new i(this._keys,this._values,n)},e.prototype.values=function(){return new i(this._keys,this._values,s)},e.prototype.entries=function(){return new i(this._keys,this._values,a)},e.prototype["@@iterator"]=function(){return this.entries()},e.prototype[o]=function(){return this.entries()},e.prototype._find=function(t,e){if(!q(this._cacheKey,t)){this._cacheIndex=-1;for(var i=0;i<this._keys.length;i++)if(q(this._keys[i],t)){this._cacheIndex=i;break}}return this._cacheIndex<0&&e&&(this._cacheIndex=this._keys.length,this._keys.push(t),this._values.push(void 0)),this._cacheIndex},e}();return r;function n(t,e){return t}function s(t,e){return e}function a(t,e){return[t,e]}}(),u="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function t(){this._map=new d}return Object.defineProperty(t.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this._map.has(t)},t.prototype.add=function(t){return this._map.set(t,t),this},t.prototype.delete=function(t){return this._map.delete(t)},t.prototype.clear=function(){this._map.clear()},t.prototype.keys=function(){return this._map.keys()},t.prototype.values=function(){return this._map.keys()},t.prototype.entries=function(){return this._map.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[o]=function(){return this.keys()},t}(),f="function"==typeof WeakMap?WeakMap:function(){var t=h.create(),e=r();return function(){function t(){this._key=r()}return t.prototype.has=function(t){var e=n(t,!1);return void 0!==e&&h.has(e,this._key)},t.prototype.get=function(t){var e=n(t,!1);return void 0!==e?h.get(e,this._key):void 0},t.prototype.set=function(t,e){return n(t,!0)[this._key]=e,this},t.prototype.delete=function(t){var e=n(t,!1);return void 0!==e&&delete e[this._key]},t.prototype.clear=function(){this._key=r()},t}();function r(){var e;do{e="@@WeakMap@@"+s()}while(h.has(t,e));return t[e]=!0,e}function n(t,r){if(!i.call(t,e)){if(!r)return;Object.defineProperty(t,e,{value:h.create()})}return t[e]}function o(t,e){for(var i=0;i<e;++i)t[i]=255*Math.random()|0;return t}function s(){var t=function(t){if("function"==typeof Uint8Array){var e=new Uint8Array(t);return"undefined"!=typeof crypto?crypto.getRandomValues(e):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(e):o(e,t),e}return o(new Array(t),t)}(16);t[6]=79&t[6]|64,t[8]=191&t[8]|128;for(var e="",i=0;i<16;++i){var r=t[i];4!==i&&6!==i&&8!==i||(e+="-"),r<16&&(e+="0"),e+=r.toString(16).toLowerCase()}return e}}(),p=r?Symbol.for("@reflect-metadata:registry"):void 0,O=function(){var t;return!k(p)&&P(e.Reflect)&&Object.isExtensible(e.Reflect)&&(t=e.Reflect[p]),k(t)&&(t=function(){var t,i,r,n;k(p)||void 0===e.Reflect||p in e.Reflect||"function"!=typeof e.Reflect.defineMetadata||(t=function(t){var e=t.defineMetadata,i=t.hasOwnMetadata,r=t.getOwnMetadata,n=t.getOwnMetadataKeys,o=t.deleteMetadata,s=new f,a={isProviderFor:function(t,e){var i=s.get(t);return!(k(i)||!i.has(e))||!!n(t,e).length&&(k(i)&&(i=new u,s.set(t,i)),i.add(e),!0)},OrdinaryDefineOwnMetadata:e,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:r,OrdinaryOwnMetadataKeys:n,OrdinaryDeleteMetadata:o};return a}(e.Reflect));var o=new f,s={registerProvider:a,getProvider:h,setProvider:O};return s;function a(e){if(!Object.isExtensible(s))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case t===e:break;case k(i):i=e;break;case i===e:break;case k(r):r=e;break;case r===e:break;default:void 0===n&&(n=new u),n.add(e)}}function l(e,o){if(!k(i)){if(i.isProviderFor(e,o))return i;if(!k(r)){if(r.isProviderFor(e,o))return i;if(!k(n))for(var s=_(n);;){var a=z(s);if(!a)return;var l=E(a);if(l.isProviderFor(e,o))return V(s),l}}}if(!k(t)&&t.isProviderFor(e,o))return t}function h(t,e){var i,r=o.get(t);return k(r)||(i=r.get(e)),k(i)?(k(i=l(t,e))||(k(r)&&(r=new d,o.set(t,r)),r.set(e,i)),i):i}function c(t){if(k(t))throw new TypeError;return i===t||r===t||!k(n)&&n.has(t)}function O(t,e,i){if(!c(i))throw new Error("Metadata provider not registered.");var r=h(t,e);if(r!==i){if(!k(r))return!1;var n=o.get(t);k(n)&&(n=new d,o.set(t,n)),n.set(e,i)}return!0}}()),!k(p)&&P(e.Reflect)&&Object.isExtensible(e.Reflect)&&Object.defineProperty(e.Reflect,p,{enumerable:!1,configurable:!1,writable:!1,value:t}),t}(),g=function(t){var e=new f,i={isProviderFor:function(t,i){var r=e.get(t);return!k(r)&&r.has(i)},OrdinaryDefineOwnMetadata:function(t,e,i,n){r(i,n,!0).set(t,e)},OrdinaryHasOwnMetadata:function(t,e,i){var n=r(e,i,!1);return!k(n)&&T(n.has(t))},OrdinaryGetOwnMetadata:function(t,e,i){var n=r(e,i,!1);if(!k(n))return n.get(t)},OrdinaryOwnMetadataKeys:function(t,e){var i=[],n=r(t,e,!1);if(k(n))return i;for(var o=_(n.keys()),s=0;;){var a=z(o);if(!a)return i.length=s,i;var l=E(a);try{i[s]=l}catch(t){try{V(o)}finally{throw t}}s++}},OrdinaryDeleteMetadata:function(t,i,n){var o=r(i,n,!1);if(k(o))return!1;if(!o.delete(t))return!1;if(0===o.size){var s=e.get(i);k(s)||(s.delete(n),0===s.size&&e.delete(s))}return!0}};return O.registerProvider(i),i;function r(r,n,o){var s=e.get(r),a=!1;if(k(s)){if(!o)return;s=new d,e.set(r,s),a=!0}var l=s.get(n);if(k(l)){if(!o)return;if(l=new d,s.set(n,l),!t.setProvider(r,n,i))throw s.delete(n),a&&e.delete(r),new Error("Wrong provider for target.")}return l}}(O);function m(t,e,i){if(b(t,e,i))return!0;var r=Y(e);return!$(r)&&m(t,r,i)}function b(t,e,i){var r=j(e,i,!1);return!k(r)&&T(r.OrdinaryHasOwnMetadata(t,e,i))}function v(t,e,i){if(b(t,e,i))return y(t,e,i);var r=Y(e);return $(r)?void 0:v(t,r,i)}function y(t,e,i){var r=j(e,i,!1);if(!k(r))return r.OrdinaryGetOwnMetadata(t,e,i)}function w(t,e,i,r){j(i,r,!0).OrdinaryDefineOwnMetadata(t,e,i,r)}function S(t,e){var i=x(t,e),r=Y(t);if(null===r)return i;var n=S(r,e);if(n.length<=0)return i;if(i.length<=0)return n;for(var o=new u,s=[],a=0,l=i;a<l.length;a++){var h=l[a];o.has(h)||(o.add(h),s.push(h))}for(var c=0,d=n;c<d.length;c++)h=d[c],o.has(h)||(o.add(h),s.push(h));return s}function x(t,e){var i=j(t,e,!1);return i?i.OrdinaryOwnMetadataKeys(t,e):[]}function Q(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function k(t){return void 0===t}function $(t){return null===t}function P(t){return"object"==typeof t?null!==t:"function"==typeof t}function Z(t,e){switch(Q(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var i=3===e?"string":5===e?"number":"default",r=X(t,n);if(void 0!==r){var o=r.call(t,i);if(P(o))throw new TypeError;return o}return function(t,e){if("string"===e){var i=t.toString;if(R(i)&&!P(n=i.call(t)))return n;if(R(r=t.valueOf)&&!P(n=r.call(t)))return n}else{var r;if(R(r=t.valueOf)&&!P(n=r.call(t)))return n;var n,o=t.toString;if(R(o)&&!P(n=o.call(t)))return n}throw new TypeError}(t,"default"===i?"number":i)}function T(t){return!!t}function C(t){var e=Z(t,3);return function(t){return"symbol"==typeof t}(e)?e:function(t){return""+t}(e)}function A(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function R(t){return"function"==typeof t}function M(t){return"function"==typeof t}function q(t,e){return t===e||t!=t&&e!=e}function X(t,e){var i=t[e];if(null!=i){if(!R(i))throw new TypeError;return i}}function _(t){var e=X(t,o);if(!R(e))throw new TypeError;var i=e.call(t);if(!P(i))throw new TypeError;return i}function E(t){return t.value}function z(t){var e=t.next();return!e.done&&e}function V(t){var e=t.return;e&&e.call(t)}function Y(t){var e=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return e;if(e!==c)return e;var i=t.prototype,r=i&&Object.getPrototypeOf(i);if(null==r||r===Object.prototype)return e;var n=r.constructor;return"function"!=typeof n||n===t?e:n}function j(t,e,i){var r=O.getProvider(t,e);if(!k(r))return r;if(i){if(O.setProvider(t,e,g))return g;throw new Error("Illegal state.")}}function D(t){return t.__=void 0,delete t.__,t}t("decorate",(function(t,e,i,r){if(k(i)){if(!A(t))throw new TypeError;if(!M(e))throw new TypeError;return function(t,e){for(var i=t.length-1;i>=0;--i){var r=(0,t[i])(e);if(!k(r)&&!$(r)){if(!M(r))throw new TypeError;e=r}}return e}(t,e)}if(!A(t))throw new TypeError;if(!P(e))throw new TypeError;if(!P(r)&&!k(r)&&!$(r))throw new TypeError;return $(r)&&(r=void 0),function(t,e,i,r){for(var n=t.length-1;n>=0;--n){var o=(0,t[n])(e,i,r);if(!k(o)&&!$(o)){if(!P(o))throw new TypeError;r=o}}return r}(t,e,i=C(i),r)})),t("metadata",(function(t,e){return function(i,r){if(!P(i))throw new TypeError;if(!k(r)&&!function(t){switch(Q(t)){case 3:case 4:return!0;default:return!1}}(r))throw new TypeError;w(t,e,i,r)}})),t("defineMetadata",(function(t,e,i,r){if(!P(i))throw new TypeError;return k(r)||(r=C(r)),w(t,e,i,r)})),t("hasMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return k(i)||(i=C(i)),m(t,e,i)})),t("hasOwnMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return k(i)||(i=C(i)),b(t,e,i)})),t("getMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return k(i)||(i=C(i)),v(t,e,i)})),t("getOwnMetadata",(function(t,e,i){if(!P(e))throw new TypeError;return k(i)||(i=C(i)),y(t,e,i)})),t("getMetadataKeys",(function(t,e){if(!P(t))throw new TypeError;return k(e)||(e=C(e)),S(t,e)})),t("getOwnMetadataKeys",(function(t,e){if(!P(t))throw new TypeError;return k(e)||(e=C(e)),x(t,e)})),t("deleteMetadata",(function(t,e,i){if(!P(e))throw new TypeError;if(k(i)||(i=C(i)),!P(e))throw new TypeError;k(i)||(i=C(i));var r=j(e,i,!1);return!k(r)&&r.OrdinaryDeleteMetadata(t,e,i)}))}(r,e),void 0===e.Reflect&&(e.Reflect=t)}()}(r||(r={}))}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,i),o.exports}i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};i.d(r,{Vk:()=>Lt,CA:()=>Dt,F2:()=>jt,KY:()=>Et,jm:()=>zt,uH:()=>Yt,U7:()=>Jt,wy:()=>tv,lk:()=>Fb,_N:()=>Hb,xC:()=>Xt,qy:()=>B,JZ:()=>Vt,$p:()=>_t,vs:()=>Nb,kT:()=>Gb}),i(630);const n=globalThis,o=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),a=new WeakMap;class l{constructor(t,e,i){if(this._$cssResult$=!0,i!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=a.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&a.set(e,t))}return t}toString(){return this.cssText}}const h=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new l(i,t,s)},c=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new l("string"==typeof t?t:t+"",void 0,s))(e)})(t):t,{is:d,defineProperty:u,getOwnPropertyDescriptor:f,getOwnPropertyNames:p,getOwnPropertySymbols:O,getPrototypeOf:g}=Object,m=globalThis,b=m.trustedTypes,v=b?b.emptyScript:"",y=m.reactiveElementPolyfillSupport,w=(t,e)=>t,S={toAttribute(t,e){switch(e){case Boolean:t=t?v:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},x=(t,e)=>!d(t,e),Q={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:x};Symbol.metadata??=Symbol("metadata"),m.litPropertyMetadata??=new WeakMap;class k extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,e);void 0!==r&&u(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){const{get:r,set:n}=f(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return r?.call(this)},set(e){const o=r?.call(this);n.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Q}static _$Ei(){if(this.hasOwnProperty(w("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(w("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(w("properties"))){const t=this.properties,e=[...p(t),...O(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(c(t))}else void 0!==t&&e.push(c(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(o)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),r=n.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,i);if(void 0!==r&&!0===i.reflect){const n=(void 0!==i.converter?.toAttribute?i.converter:S).toAttribute(e,i.type);this._$Em=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){const i=this.constructor,r=i._$Eh.get(t);if(void 0!==r&&this._$Em!==r){const t=i.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:S;this._$Em=r,this[r]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??x)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}k.elementStyles=[],k.shadowRootOptions={mode:"open"},k[w("elementProperties")]=new Map,k[w("finalized")]=new Map,y?.({ReactiveElement:k}),(m.reactiveElementVersions??=[]).push("2.0.4");const $=globalThis,P=$.trustedTypes,Z=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,T="$lit$",C=`lit$${Math.random().toFixed(9).slice(2)}$`,A="?"+C,R=`<${A}>`,M=document,q=()=>M.createComment(""),X=t=>null===t||"object"!=typeof t&&"function"!=typeof t,_=Array.isArray,E="[ \t\n\f\r]",z=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,Y=/>/g,j=RegExp(`>|${E}(?:([^\\s"'>=/]+)(${E}*=${E}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),D=/'/g,L=/"/g,W=/^(?:script|style|textarea|title)$/i,U=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),B=U(1),I=(U(2),U(3),Symbol.for("lit-noChange")),G=Symbol.for("lit-nothing"),N=new WeakMap,H=M.createTreeWalker(M,129);function F(t,e){if(!_(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==Z?Z.createHTML(e):e}const K=(t,e)=>{const i=t.length-1,r=[];let n,o=2===e?"<svg>":3===e?"<math>":"",s=z;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(s.lastIndex=c,l=s.exec(i),null!==l);)c=s.lastIndex,s===z?"!--"===l[1]?s=V:void 0!==l[1]?s=Y:void 0!==l[2]?(W.test(l[2])&&(n=RegExp("</"+l[2],"g")),s=j):void 0!==l[3]&&(s=j):s===j?">"===l[0]?(s=n??z,h=-1):void 0===l[1]?h=-2:(h=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?j:'"'===l[3]?L:D):s===L||s===D?s=j:s===V||s===Y?s=z:(s=j,n=void 0);const d=s===j&&t[e+1].startsWith("/>")?" ":"";o+=s===z?i+R:h>=0?(r.push(a),i.slice(0,h)+T+i.slice(h)+C+d):i+C+(-2===h?e:d)}return[F(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]};class J{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let n=0,o=0;const s=t.length-1,a=this.parts,[l,h]=K(t,e);if(this.el=J.createElement(l,i),H.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=H.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(const t of r.getAttributeNames())if(t.endsWith(T)){const e=h[o++],i=r.getAttribute(t).split(C),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:n,name:s[2],strings:i,ctor:"."===s[1]?nt:"?"===s[1]?ot:"@"===s[1]?st:rt}),r.removeAttribute(t)}else t.startsWith(C)&&(a.push({type:6,index:n}),r.removeAttribute(t));if(W.test(r.tagName)){const t=r.textContent.split(C),e=t.length-1;if(e>0){r.textContent=P?P.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],q()),H.nextNode(),a.push({type:2,index:++n});r.append(t[e],q())}}}else if(8===r.nodeType)if(r.data===A)a.push({type:2,index:n});else{let t=-1;for(;-1!==(t=r.data.indexOf(C,t+1));)a.push({type:7,index:n}),t+=C.length-1}n++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function tt(t,e,i=t,r){if(e===I)return e;let n=void 0!==r?i._$Co?.[r]:i._$Cl;const o=X(e)?void 0:e._$litDirective$;return n?.constructor!==o&&(n?._$AO?.(!1),void 0===o?n=void 0:(n=new o(t),n._$AT(t,i,r)),void 0!==r?(i._$Co??=[])[r]=n:i._$Cl=n),void 0!==n&&(e=tt(t,n._$AS(t,e.values),n,r)),e}class et{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,r=(t?.creationScope??M).importNode(e,!0);H.currentNode=r;let n=H.nextNode(),o=0,s=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new it(n,n.nextSibling,this,t):1===a.type?e=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(e=new at(n,this,t)),this._$AV.push(e),a=i[++s]}o!==a?.index&&(n=H.nextNode(),o++)}return H.currentNode=M,r}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class it{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,r){this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=tt(this,t,e),X(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==I&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>_(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==G&&X(this._$AH)?this._$AA.nextSibling.data=t:this.T(M.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=J.createElement(F(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(e);else{const t=new et(r,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=N.get(t.strings);return void 0===e&&N.set(t.strings,e=new J(t)),e}k(t){_(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const n of t)r===e.length?e.push(i=new it(this.O(q()),this.O(q()),this,this.options)):i=e[r],i._$AI(n),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class rt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,r,n){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=n,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}_$AI(t,e=this,i,r){const n=this.strings;let o=!1;if(void 0===n)t=tt(this,t,e,0),o=!X(t)||t!==this._$AH&&t!==I,o&&(this._$AH=t);else{const r=t;let s,a;for(t=n[0],s=0;s<n.length-1;s++)a=tt(this,r[i+s],e,s),a===I&&(a=this._$AH[s]),o||=!X(a)||a!==this._$AH[s],a===G?t=G:t!==G&&(t+=(a??"")+n[s+1]),this._$AH[s]=a}o&&!r&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class nt extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}class ot extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==G)}}class st extends rt{constructor(t,e,i,r,n){super(t,e,i,r,n),this.type=5}_$AI(t,e=this){if((t=tt(this,t,e,0)??G)===I)return;const i=this._$AH,r=t===G&&i!==G||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,n=t!==G&&(i===G||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class at{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){tt(this,t)}}const lt=$.litHtmlPolyfillSupport;lt?.(J,it),($.litHtmlVersions??=[]).push("3.2.1");class ht extends k{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const r=i?.renderBefore??e;let n=r._$litPart$;if(void 0===n){const t=i?.renderBefore??null;r._$litPart$=n=new it(e.insertBefore(q(),t),t,void 0,i??{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return I}}ht._$litElement$=!0,ht.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:ht});const ct=globalThis.litElementPolyfillSupport;var dt;ct?.({LitElement:ht}),(globalThis.litElementVersions??=[]).push("4.1.1"),function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(dt||(dt={}));const ut=dt;var ft=function(t,e){return ft=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},ft(t,e)};function pt(t,e){function i(){this.constructor=t}ft(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function Ot(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function gt(t,e){var i="function"==typeof Symbol&&t[Symbol.iterator];if(!i)return t;var r,n,o=i.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){n={error:t}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s}function mt(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(gt(arguments[e]));return t}function bt(t){return!!t.useClass}function vt(t){return!!t.useFactory}var yt=function(){function t(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(t){var e,i=this,r=!1;return new Proxy({},this.createHandler((function(){return r||(e=t(i.wrap()),r=!0),e})))},t.prototype.createHandler=function(t){var e={};return this.reflectMethods.forEach((function(i){e[i]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e[0]=t(),Reflect[i].apply(void 0,mt(e))}})),e},t}();function wt(t){return"string"==typeof t||"symbol"==typeof t}function St(t){return"object"==typeof t&&"token"in t&&"transform"in t}function xt(t){return!!t.useToken}function Qt(t){return null!=t.useValue}const kt=function(){function t(){this._registryMap=new Map}return t.prototype.entries=function(){return this._registryMap.entries()},t.prototype.getAll=function(t){return this.ensure(t),this._registryMap.get(t)},t.prototype.get=function(t){this.ensure(t);var e=this._registryMap.get(t);return e[e.length-1]||null},t.prototype.set=function(t,e){this.ensure(t),this._registryMap.get(t).push(e)},t.prototype.setAll=function(t,e){this._registryMap.set(t,e)},t.prototype.has=function(t){return this.ensure(t),this._registryMap.get(t).length>0},t.prototype.clear=function(){this._registryMap.clear()},t.prototype.ensure=function(t){this._registryMap.has(t)||this._registryMap.set(t,[])},t}(),$t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e}(kt),Pt=function(){this.scopedResolutions=new Map};var Zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e}(kt),Tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return pt(e,t),e}(kt);const Ct=function(){this.preResolution=new Zt,this.postResolution=new Tt};var At=new Map,Rt=function(){function t(t){this.parent=t,this._registry=new $t,this.interceptors=new Ct,this.disposed=!1,this.disposables=new Set}return t.prototype.register=function(t,e,i){var r;if(void 0===i&&(i={lifecycle:ut.Transient}),this.ensureNotDisposed(),r=function(t){return bt(t)||Qt(t)||xt(t)||vt(t)}(e)?e:{useClass:e},xt(r))for(var n=[t],o=r;null!=o;){var s=o.useToken;if(n.includes(s))throw new Error("Token registration cycle detected! "+mt(n,[s]).join(" -> "));n.push(s);var a=this._registry.get(s);o=a&&xt(a.provider)?a.provider:null}if((i.lifecycle===ut.Singleton||i.lifecycle==ut.ContainerScoped||i.lifecycle==ut.ResolutionScoped)&&(Qt(r)||vt(r)))throw new Error('Cannot use lifecycle "'+ut[i.lifecycle]+'" with ValueProviders or FactoryProviders');return this._registry.set(t,{provider:r,options:i}),this},t.prototype.registerType=function(t,e){return this.ensureNotDisposed(),wt(e)?this.register(t,{useToken:e}):this.register(t,{useClass:e})},t.prototype.registerInstance=function(t,e){return this.ensureNotDisposed(),this.register(t,{useValue:e})},t.prototype.registerSingleton=function(t,e){if(this.ensureNotDisposed(),wt(t)){if(wt(e))return this.register(t,{useToken:e},{lifecycle:ut.Singleton});if(e)return this.register(t,{useClass:e},{lifecycle:ut.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var i=t;return e&&!wt(e)&&(i=e),this.register(t,{useClass:i},{lifecycle:ut.Singleton})},t.prototype.resolve=function(t,e){void 0===e&&(e=new Pt),this.ensureNotDisposed();var i=this.getRegistration(t);if(!i&&wt(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),i){var r=this.resolveRegistration(i,e);return this.executePostResolutionInterceptor(t,r,"Single"),r}if(function(t){return"function"==typeof t||t instanceof yt}(t))return r=this.construct(t,e),this.executePostResolutionInterceptor(t,r,"Single"),r;throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,e){var i,r;if(this.interceptors.preResolution.has(t)){var n=[];try{for(var o=Ot(this.interceptors.preResolution.getAll(t)),s=o.next();!s.done;s=o.next()){var a=s.value;"Once"!=a.options.frequency&&n.push(a),a.callback(t,e)}}catch(t){i={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}this.interceptors.preResolution.setAll(t,n)}},t.prototype.executePostResolutionInterceptor=function(t,e,i){var r,n;if(this.interceptors.postResolution.has(t)){var o=[];try{for(var s=Ot(this.interceptors.postResolution.getAll(t)),a=s.next();!a.done;a=s.next()){var l=a.value;"Once"!=l.options.frequency&&o.push(l),l.callback(t,e,i)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}this.interceptors.postResolution.setAll(t,o)}},t.prototype.resolveRegistration=function(t,e){if(this.ensureNotDisposed(),t.options.lifecycle===ut.ResolutionScoped&&e.scopedResolutions.has(t))return e.scopedResolutions.get(t);var i,r=t.options.lifecycle===ut.Singleton,n=t.options.lifecycle===ut.ContainerScoped,o=r||n;return i=Qt(t.provider)?t.provider.useValue:xt(t.provider)?o?t.instance||(t.instance=this.resolve(t.provider.useToken,e)):this.resolve(t.provider.useToken,e):bt(t.provider)?o?t.instance||(t.instance=this.construct(t.provider.useClass,e)):this.construct(t.provider.useClass,e):vt(t.provider)?t.provider.useFactory(this):this.construct(t.provider,e),t.options.lifecycle===ut.ResolutionScoped&&e.scopedResolutions.set(t,i),i},t.prototype.resolveAll=function(t,e){var i=this;void 0===e&&(e=new Pt),this.ensureNotDisposed();var r=this.getAllRegistrations(t);if(!r&&wt(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),r){var n=r.map((function(t){return i.resolveRegistration(t,e)}));return this.executePostResolutionInterceptor(t,n,"All"),n}var o=[this.construct(t,e)];return this.executePostResolutionInterceptor(t,o,"All"),o},t.prototype.isRegistered=function(t,e){return void 0===e&&(e=!1),this.ensureNotDisposed(),this._registry.has(t)||e&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,e;this.ensureNotDisposed();try{for(var i=Ot(this._registry.entries()),r=i.next();!r.done;r=i.next()){var n=gt(r.value,2),o=n[0],s=n[1];this._registry.setAll(o,s.filter((function(t){return!Qt(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var e,i;this.ensureNotDisposed();var r=new t(this);try{for(var n=Ot(this._registry.entries()),o=n.next();!o.done;o=n.next()){var s=gt(o.value,2),a=s[0],l=s[1];l.some((function(t){return t.options.lifecycle===ut.ContainerScoped}))&&r._registry.setAll(a,l.map((function(t){return t.options.lifecycle===ut.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(i=n.return)&&i.call(n)}finally{if(e)throw e.error}}return r},t.prototype.beforeResolution=function(t,e,i){void 0===i&&(i={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:e,options:i})},t.prototype.afterResolution=function(t,e,i){void 0===i&&(i={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:e,options:i})},t.prototype.dispose=function(){return function(t,e,i,r){return new(i||(i=Promise))((function(n,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?n(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(s,a)}l((r=r.apply(t,e||[])).next())}))}(this,void 0,void 0,(function(){var t;return function(t,e){var i,r,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,r&&(n=2&o[0]?r.return:o[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,o[1])).done)return n;switch(r=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]<n[3])){s.label=o[1];break}if(6===o[0]&&s.label<n[1]){s.label=n[1],n=o;break}if(n&&s.label<n[2]){s.label=n[2],s.ops.push(o);break}n[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{i=n=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}(this,(function(e){switch(e.label){case 0:return this.disposed=!0,t=[],this.disposables.forEach((function(e){var i=e.dispose();i&&t.push(i)})),[4,Promise.all(t)];case 1:return e.sent(),[2]}}))}))},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,e){var i=this;if(t instanceof yt)return t.createProxy((function(t){return i.resolve(t,e)}));var r,n=function(){var r=At.get(t);if(!r||0===r.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var n=r.map(i.resolveParams(e,t));return new(t.bind.apply(t,mt([void 0],n)))}();return"function"!=typeof(r=n).dispose||r.dispose.length>0||this.disposables.add(n),n},t.prototype.resolveParams=function(t,e){var i=this;return function(r,n){var o,s,a,l;try{return"object"==typeof(l=r)&&"token"in l&&"multiple"in l?St(r)?r.multiple?(o=i.resolve(r.transform)).transform.apply(o,mt([i.resolveAll(r.token)],r.transformArgs)):(s=i.resolve(r.transform)).transform.apply(s,mt([i.resolve(r.token,t)],r.transformArgs)):r.multiple?i.resolveAll(r.token):i.resolve(r.token,t):St(r)?(a=i.resolve(r.transform,t)).transform.apply(a,mt([i.resolve(r.token,t)],r.transformArgs)):i.resolve(r,t)}catch(t){throw new Error(function(t,e,i){var r,n,o=gt(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1];return function(t,e,i){return void 0===i&&(i=" "),mt([t],e.message.split("\n").map((function(t){return i+t}))).join("\n")}("Cannot inject the dependency "+(n=e,(null===(r=void 0===o?null:o)?"at position #"+n:'"'+r.split(",")[n].trim()+'" at position #'+n)+' of "')+t.name+'" constructor. Reason:',i)}(e,n,t))}}},t.prototype.ensureNotDisposed=function(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")},t}(),Mt=new Rt,qt="injectionTokens";if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class Xt{constructor(t,e){this.container=t,this.options=e}getService(t){return this.container.resolve(t)}}const _t=window?.qbo4?.services||new Xt(Mt.createChildContainer(),{});"undefined"!=typeof window&&(window.qbo4=window.qbo4||{},window.qbo4.services=window.qbo4.services||new Xt(Mt.createChildContainer(),{}),window.qbo4.services);const Et="IConfigurationSourceToken",zt="IConfigurationToken";function*Vt(t,e=""){for(const[i,r]of Object.entries(t)){const t=e?`${e}:${i}`:i;if(Array.isArray(r))for(let e=0;e<r.length;e++){const i=r[e];"object"==typeof i&&null!==i?yield*Vt(i,`${t}:${e}`):yield{key:`${t}:${e}`,value:i}}else"object"==typeof r&&null!==r?yield*Vt(r,t):yield{key:t,value:r}}}class Yt{constructor(t){this.jsonConfig=t}getData(){return this.jsonConfig}*getValues(){yield*Vt(this.jsonConfig)}}class jt{getData(){return{}}*getValues(){yield*Vt({})}}class Dt{constructor(t){this.data=t}getSection(t){const e=t.split(":");let i=this.data;for(const t of e){if(!(t in i))return new Dt({});i=i[t]}return new Dt(i)}get(t){const e=t.split(":");let i=this.data;for(const t of e){if(!i||!(t in i))return{};i=i[t]}return i}bind(t){const e=new t;for(const t in this.data)this.data.hasOwnProperty(t)&&(e[t]=this.data[t]);return e}*getValues(){yield*Vt(this.data)}}let Lt=class extends Dt{constructor(t){super({}),this.sources=t,this.mergeConfigurations(t)}mergeConfigurations(t){t.forEach((t=>{const e=t.getData();this.data={...this.data,...e}}))}};var Wt,Ut,Bt,It;Lt=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s}([function(t){At.set(t,function(t){var e=Reflect.getMetadata("design:paramtypes",t)||[],i=Reflect.getOwnMetadata(qt,t)||{};return Object.keys(i).forEach((function(t){e[+t]=i[t]})),e}(t))},(Wt=0,Bt=Et,It={token:Bt,multiple:!0},Ut=function(t,e,i){var r=Reflect.getOwnMetadata(qt,t)||{};r[i]=It,Reflect.defineMetadata(qt,r,t)},function(t,e){Ut(t,e,Wt)}),function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}("design:paramtypes",[Array])],Lt),_t.container.register(zt,{useClass:Lt},{lifecycle:ut.Singleton}),_t.container.register(Et,{useClass:jt},{lifecycle:ut.Singleton});const Gt={attribute:!0,type:String,converter:S,reflect:!1,hasChanged:x},Nt=(t=Gt,e,i)=>{const{kind:r,metadata:n}=i;let o=globalThis.litPropertyMetadata.get(n);if(void 0===o&&globalThis.litPropertyMetadata.set(n,o=new Map),o.set(i.name,t),"accessor"===r){const{name:r}=i;return{set(i){const n=e.get.call(this);e.set.call(this,i),this.requestUpdate(r,n,t)},init(e){return void 0!==e&&this.P(r,void 0,t),e}}}if("setter"===r){const{name:r}=i;return function(i){const n=this[r];e.call(this,i),this.requestUpdate(r,n,t)}}throw Error("Unsupported decorator location: "+r)};function Ht(t){return(e,i)=>"object"==typeof i?Nt(t,e,i):((t,e,i)=>{const r=e.hasOwnProperty(i);return e.constructor.createProperty(i,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}var Ft=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Kt=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};class Jt extends ht{static get formAssociated(){return!0}static{this.styles=h`
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
padding: 16px;
|
|
6
|
+
}
|
|
7
|
+
.form-group {
|
|
8
|
+
margin-bottom: 10px;
|
|
9
|
+
}
|
|
10
|
+
`}constructor(){super(),this.apiEndpoint=new URL("repository/search",this.baseURI),this.configData={},this._internals=this.attachInternals()}_handleInput(t){this.value=t.target.value,this._internals.setFormValue(this.value)}async kc_connectedCallback(){super.connectedCallback(),this.value&&(this.configData=JSON.parse(this.value))}handleInputChange(t,e){e.preventDefault();const i=e.target;this.configData[t]=i.value,this.requestUpdate()}updateConfigData(t,e,i,r=!1){if(i.preventDefault(),r){const i=this.configData[t];delete this.configData[t],this.configData[e]=i}else this.configData[t]=e;this.requestUpdate()}addKeyValuePair(t){t.preventDefault();const e=`newKey${Object.keys(this.configData).length}`;this.configData[e]="newValue",this.requestUpdate()}deleteKeyValuePair(t,e){e.preventDefault(),delete this.configData[t],this.requestUpdate()}saveChanges(t){t.preventDefault(),console.log("Saving changes:",this.configData)}cancelChanges(t){t.preventDefault(),console.log("Cancelling changes")}render(){const t=new Yt(this.configData);return B`<slot></slot>
|
|
11
|
+
<form>
|
|
12
|
+
${Array.from(t.getValues()).map((({key:t,value:e})=>B`
|
|
13
|
+
<div class="input-group mb-3">
|
|
14
|
+
<input type="text" class="form-control" .value="${t}" @input="${e=>this.updateConfigData(t,e.target.value,e,!0)}">
|
|
15
|
+
<input type="text" class="form-control" .value="${e}" @input="${e=>this.updateConfigData(t,e.target.value,e)}">
|
|
16
|
+
<button class="btn btn-outline-danger" @click="${e=>this.deleteKeyValuePair(t,e)}">Delete</button>
|
|
17
|
+
</div>`))}
|
|
18
|
+
<div>
|
|
19
|
+
<button class="btn btn-outline-primary" @click="${this.addKeyValuePair}">Add Entry</button>
|
|
20
|
+
<button class="btn btn-success" @click="${this.saveChanges}">Save</button>
|
|
21
|
+
<button class="btn btn-secondary" @click="${this.cancelChanges}">Cancel</button>
|
|
22
|
+
</div>
|
|
23
|
+
</form>
|
|
24
|
+
`}}Ft([Ht({type:String}),Kt("design:type",Object)],Jt.prototype,"value",void 0),Ft([Ht({type:URL}),Kt("design:type",Object)],Jt.prototype,"apiEndpoint",void 0),customElements.define("qbo-config-editor",Jt);class te{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=he(this,t,e);let r=[];return this.decompose(0,t,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(e,this.length,r,1),ie.from(r,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=he(this,t,e);let i=[];return this.decompose(t,e,i,0),ie.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),r=new oe(this),n=new oe(t);for(let t=e,o=e;;){if(r.next(t),n.next(t),t=0,r.lineBreak!=n.lineBreak||r.done!=n.done||r.value!=n.value)return!1;if(o+=r.value.length,r.done||o>=i)return!0}}iter(t=1){return new oe(this,t)}iterRange(t,e=this.length){return new se(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;i=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new ae(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new ee(t):ie.from(ee.split(t,[])):te.empty}}class ee extends te{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,r){for(let n=0;;n++){let o=this.text[n],s=r+o.length;if((e?i:s)>=t)return new le(r,s,i,o);r=s+1,i++}}decompose(t,e,i,r){let n=t<=0&&e>=this.length?this:new ee(ne(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=i.pop(),e=re(n.text,t.text.slice(),0,n.length);if(e.length<=32)i.push(new ee(e,t.length+n.length));else{let t=e.length>>1;i.push(new ee(e.slice(0,t)),new ee(e.slice(t)))}}else i.push(n)}replace(t,e,i){if(!(i instanceof ee))return super.replace(t,e,i);[t,e]=he(this,t,e);let r=re(this.text,re(i.text,ne(this.text,0,t)),e),n=this.length+i.length-(e-t);return r.length<=32?new ee(r,n):ie.from(ee.split(r,[]),n)}sliceString(t,e=this.length,i="\n"){[t,e]=he(this,t,e);let r="";for(let n=0,o=0;n<=e&&o<this.text.length;o++){let s=this.text[o],a=n+s.length;n>t&&o&&(r+=i),t<a&&e>n&&(r+=s.slice(Math.max(0,t-n),e-n)),n=a+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],r=-1;for(let n of t)i.push(n),r+=n.length+1,32==i.length&&(e.push(new ee(i,r)),i=[],r=-1);return r>-1&&e.push(new ee(i,r)),e}}class ie extends te{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,r){for(let n=0;;n++){let o=this.children[n],s=r+o.length,a=i+o.lines-1;if((e?a:s)>=t)return o.lineInner(t,e,i,r);r=s+1,i=a+1}}decompose(t,e,i,r){for(let n=0,o=0;o<=e&&n<this.children.length;n++){let s=this.children[n],a=o+s.length;if(t<=a&&e>=o){let n=r&((o<=t?1:0)|(a>=e?2:0));o>=t&&a<=e&&!n?i.push(s):s.decompose(t-o,e-o,i,n)}o=a+1}}replace(t,e,i){if([t,e]=he(this,t,e),i.lines<this.lines)for(let r=0,n=0;r<this.children.length;r++){let o=this.children[r],s=n+o.length;if(t>=n&&e<=s){let a=o.replace(t-n,e-n,i),l=this.lines-o.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let n=this.children.slice();return n[r]=a,new ie(n,this.length-(e-t)+i.length)}return super.replace(n,s,a)}n=s+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=he(this,t,e);let r="";for(let n=0,o=0;n<this.children.length&&o<=e;n++){let s=this.children[n],a=o+s.length;o>t&&n&&(r+=i),t<a&&e>o&&(r+=s.sliceString(t-o,e-o,i)),o=a+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof ie))return 0;let i=0,[r,n,o,s]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,n+=e){if(r==o||n==s)return i;let a=this.children[r],l=t.children[n];if(a!=l)return i+a.scanIdentical(l,e);i+=a.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new ee(i,e)}let r=Math.max(32,i>>5),n=r<<1,o=r>>1,s=[],a=0,l=-1,h=[];function c(t){let e;if(t.lines>n&&t instanceof ie)for(let e of t.children)c(e);else t.lines>o&&(a>o||!a)?(d(),s.push(t)):t instanceof ee&&a&&(e=h[h.length-1])instanceof ee&&t.lines+e.lines<=32?(a+=t.lines,l+=t.length+1,h[h.length-1]=new ee(e.text.concat(t.text),e.length+1+t.length)):(a+t.lines>r&&d(),a+=t.lines,l+=t.length+1,h.push(t))}function d(){0!=a&&(s.push(1==h.length?h[0]:ie.from(h,l)),l=-1,a=h.length=0)}for(let e of t)c(e);return d(),1==s.length?s[0]:new ie(s,e)}}function re(t,e,i=0,r=1e9){for(let n=0,o=0,s=!0;o<t.length&&n<=r;o++){let a=t[o],l=n+a.length;l>=i&&(l>r&&(a=a.slice(0,r-n)),n<i&&(a=a.slice(i-n)),s?(e[e.length-1]+=a,s=!1):e.push(a)),n=l+1}return e}function ne(t,e,i){return re(t,[""],e,i)}te.empty=new ee([""],0);class oe{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof ee?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],n=this.offsets[i],o=n>>1,s=r instanceof ee?r.text.length:r.children.length;if(o==(e>0?s:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&n)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof ee){let n=r.text[o+(e<0?-1:0)];if(this.offsets[i]+=e,n.length>Math.max(0,t))return this.value=0==t?n:e>0?n.slice(t):n.slice(0,n.length-t),this;t-=n.length}else{let n=r.children[o+(e<0?-1:0)];t>n.length?(t-=n.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(n),this.offsets.push(e>0?1:(n instanceof ee?n.text.length:n.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class se{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new oe(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=i?r:e<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class ae{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(te.prototype[Symbol.iterator]=function(){return this.iter()},oe.prototype[Symbol.iterator]=se.prototype[Symbol.iterator]=ae.prototype[Symbol.iterator]=function(){return this});class le{constructor(t,e,i,r){this.from=t,this.to=e,this.number=i,this.text=r}get length(){return this.to-this.from}}function he(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}let ce="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let t=1;t<ce.length;t++)ce[t]+=ce[t-1];function de(t){for(let e=1;e<ce.length;e+=2)if(ce[e]>t)return ce[e-1]<=t;return!1}function ue(t){return t>=127462&&t<=127487}function fe(t,e,i=!0,r=!0){return(i?pe:Oe)(t,e,r)}function pe(t,e,i){if(e==t.length)return e;e&&ge(t.charCodeAt(e))&&me(t.charCodeAt(e-1))&&e--;let r=be(t,e);for(e+=ye(r);e<t.length;){let n=be(t,e);if(8205==r||8205==n||i&&de(n))e+=ye(n),r=n;else{if(!ue(n))break;{let i=0,r=e-2;for(;r>=0&&ue(be(t,r));)i++,r-=2;if(i%2==0)break;e+=2}}}return e}function Oe(t,e,i){for(;e>0;){let r=pe(t,e-2,i);if(r<e)return r;e--}return 0}function ge(t){return t>=56320&&t<57344}function me(t){return t>=55296&&t<56320}function be(t,e){let i=t.charCodeAt(e);if(!me(i)||e+1==t.length)return i;let r=t.charCodeAt(e+1);return ge(r)?r-56320+(i-55296<<10)+65536:i}function ve(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function ye(t){return t<65536?1:2}const we=/\r\n?|\n/;var Se=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(Se||(Se={}));class xe{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,r=0;e<this.sections.length;){let n=this.sections[e++],o=this.sections[e++];o<0?(t(i,r,n),r+=n):r+=o,i+=n}}iterChangedRanges(t,e=!1){Pe(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],r=this.sections[e++];r<0?t.push(i,r):t.push(r,i)}return new xe(t)}composeDesc(t){return this.empty?t:t.empty?this:Te(this,t)}mapDesc(t,e=!1){return t.empty?this:Ze(this,t,e)}mapPos(t,e=-1,i=Se.Simple){let r=0,n=0;for(let o=0;o<this.sections.length;){let s=this.sections[o++],a=this.sections[o++],l=r+s;if(a<0){if(l>t)return n+(t-r);n+=s}else{if(i!=Se.Simple&&l>=t&&(i==Se.TrackDel&&r<t&&l>t||i==Se.TrackBefore&&r<t||i==Se.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!s)return t==r||e<0?n:n+a;n+=a}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return n}touchesRange(t,e=t){for(let i=0,r=0;i<this.sections.length&&r<=e;){let n=r+this.sections[i++];if(this.sections[i++]>=0&&r<=e&&n>=t)return!(r<t&&n>e)||"cover";r=n}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+i+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new xe(t)}static create(t){return new xe(t)}}class Qe extends xe{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return Pe(this,((e,i,r,n,o)=>t=t.replace(r,r+(i-e),o)),!1),t}mapDesc(t,e=!1){return Ze(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let r=0,n=0;r<e.length;r+=2){let o=e[r],s=e[r+1];if(s>=0){e[r]=s,e[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(te.empty);i.push(o?t.slice(n,n+o):te.empty)}n+=o}return new Qe(e,i)}compose(t){return this.empty?t:t.empty?this:Te(this,t,!0)}map(t,e=!1){return t.empty?this:Ze(this,t,e,!0)}iterChanges(t,e=!1){Pe(this,t,e)}get desc(){return xe.create(this.sections)}filter(t){let e=[],i=[],r=[],n=new Ce(this);t:for(let o=0,s=0;;){let a=o==t.length?1e9:t[o++];for(;s<a||s==a&&0==n.len;){if(n.done)break t;let t=Math.min(n.len,a-s);ke(r,t,-1);let o=-1==n.ins?-1:0==n.off?n.ins:0;ke(e,t,o),o>0&&$e(i,e,n.text),n.forward(t),s+=t}let l=t[o++];for(;s<l;){if(n.done)break t;let t=Math.min(n.len,l-s);ke(e,t,-1),ke(r,t,-1==n.ins?-1:0==n.off?n.ins:0),n.forward(t),s+=t}}return{changes:new Qe(e,i),filtered:xe.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],r=this.sections[e+1];r<0?t.push(i):0==r?t.push([i]):t.push([i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let r=[],n=[],o=0,s=null;function a(t=!1){if(!t&&!r.length)return;o<e&&ke(r,e-o,-1);let i=new Qe(r,n);s=s?s.compose(i.map(s)):i,r=[],n=[],o=0}return function t(l){if(Array.isArray(l))for(let e of l)t(e);else if(l instanceof Qe){if(l.length!=e)throw new RangeError(`Mismatched change set length (got ${l.length}, expected ${e})`);a(),s=s?s.compose(l.map(s)):l}else{let{from:t,to:s=t,insert:h}=l;if(t>s||t<0||s>e)throw new RangeError(`Invalid change range ${t} to ${s} (in doc of length ${e})`);let c=h?"string"==typeof h?te.of(h.split(i||we)):h:te.empty,d=c.length;if(t==s&&0==d)return;t<o&&a(),t>o&&ke(r,t-o,-1),ke(r,s-t,d),$e(n,r,c),o=s}}(t),a(!s),s}static empty(t){return new Qe(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let r=0;r<t.length;r++){let n=t[r];if("number"==typeof n)e.push(n,-1);else{if(!Array.isArray(n)||"number"!=typeof n[0]||n.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==n.length)e.push(n[0],0);else{for(;i.length<r;)i.push(te.empty);i[r]=te.of(n.slice(1)),e.push(n[0],i[r].length)}}}return new Qe(e,i)}static createSet(t,e){return new Qe(t,e)}}function ke(t,e,i,r=!1){if(0==e&&i<=0)return;let n=t.length-2;n>=0&&i<=0&&i==t[n+1]?t[n]+=e:0==e&&0==t[n]?t[n+1]+=i:r?(t[n]+=e,t[n+1]+=i):t.push(e,i)}function $e(t,e,i){if(0==i.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(i);else{for(;t.length<r;)t.push(te.empty);t.push(i)}}function Pe(t,e,i){let r=t.inserted;for(let n=0,o=0,s=0;s<t.sections.length;){let a=t.sections[s++],l=t.sections[s++];if(l<0)n+=a,o+=a;else{let h=n,c=o,d=te.empty;for(;h+=a,c+=l,l&&r&&(d=d.append(r[s-2>>1])),!(i||s==t.sections.length||t.sections[s+1]<0);)a=t.sections[s++],l=t.sections[s++];e(n,h,o,c,d),n=h,o=c}}}function Ze(t,e,i,r=!1){let n=[],o=r?[]:null,s=new Ce(t),a=new Ce(e);for(let t=-1;;)if(-1==s.ins&&-1==a.ins){let t=Math.min(s.len,a.len);ke(n,t,-1),s.forward(t),a.forward(t)}else if(a.ins>=0&&(s.ins<0||t==s.i||0==s.off&&(a.len<s.len||a.len==s.len&&!i))){let e=a.len;for(ke(n,a.ins,-1);e;){let i=Math.min(s.len,e);s.ins>=0&&t<s.i&&s.len<=i&&(ke(n,0,s.ins),o&&$e(o,n,s.text),t=s.i),s.forward(i),e-=i}a.next()}else{if(!(s.ins>=0)){if(s.done&&a.done)return o?Qe.createSet(n,o):xe.create(n);throw new Error("Mismatched change set lengths")}{let e=0,i=s.len;for(;i;)if(-1==a.ins){let t=Math.min(i,a.len);e+=t,i-=t,a.forward(t)}else{if(!(0==a.ins&&a.len<i))break;i-=a.len,a.next()}ke(n,e,t<s.i?s.ins:0),o&&t<s.i&&$e(o,n,s.text),t=s.i,s.forward(s.len-i)}}}function Te(t,e,i=!1){let r=[],n=i?[]:null,o=new Ce(t),s=new Ce(e);for(let t=!1;;){if(o.done&&s.done)return n?Qe.createSet(r,n):xe.create(r);if(0==o.ins)ke(r,o.len,0,t),o.next();else if(0!=s.len||s.done){if(o.done||s.done)throw new Error("Mismatched change set lengths");{let e=Math.min(o.len2,s.len),i=r.length;if(-1==o.ins){let i=-1==s.ins?-1:s.off?0:s.ins;ke(r,e,i,t),n&&i&&$e(n,r,s.text)}else-1==s.ins?(ke(r,o.off?0:o.len,e,t),n&&$e(n,r,o.textBit(e))):(ke(r,o.off?0:o.len,s.off?0:s.ins,t),n&&!s.off&&$e(n,r,s.text));t=(o.ins>e||s.ins>=0&&s.len>e)&&(t||r.length>i),o.forward2(e),s.forward(e)}}else ke(r,0,s.ins,t),n&&$e(n,r,s.text),s.next()}}class Ce{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?te.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?te.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class Ae{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,r;return this.empty?i=r=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Ae(i,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return Re.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return Re.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return Re.range(t.anchor,t.head)}static create(t,e,i){return new Ae(t,e,i)}}class Re{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:Re.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(t.ranges[i],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new Re([this.main],0)}addRange(t,e=!0){return Re.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();return i[e]=t,Re.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new Re(t.ranges.map((t=>Ae.fromJSON(t))),t.main)}static single(t,e=t){return new Re([Re.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<t.length;r++){let n=t[r];if(n.empty?n.from<=i:n.from<i)return Re.normalized(t.slice(),e);i=n.to}return new Re(t,e)}static cursor(t,e=0,i,r){return Ae.create(t,t,(0==e?0:e<0?8:16)|(null==i?7:Math.min(6,i))|(null!=r?r:16777215)<<6)}static range(t,e,i,r){let n=(null!=i?i:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?Ae.create(e,t,48|n):Ae.create(t,e,(e>t?8:0)|n)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;i<t.length;i++){let r=t[i],n=t[i-1];if(r.empty?r.from<=n.to:r.from<n.to){let o=n.from,s=Math.max(r.to,n.to);i<=e&&e--,t.splice(--i,2,r.anchor>r.head?Re.range(s,o):Re.range(o,s))}}return new Re(t,e)}}function Me(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let qe=0;class Xe{constructor(t,e,i,r,n){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=r,this.id=qe++,this.default=t([]),this.extensions="function"==typeof n?n(this):n}get reader(){return this}static define(t={}){return new Xe(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:_e),!!t.static,t.enables)}of(t){return new Ee([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ee(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new Ee(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function _e(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class Ee{constructor(t,e,i,r){this.dependencies=t,this.facet=e,this.type=i,this.value=r,this.id=qe++}dynamicSlot(t){var e;let i=this.value,r=this.facet.compareInput,n=this.id,o=t[n]>>1,s=2==this.type,a=!1,l=!1,h=[];for(let i of this.dependencies)"doc"==i?a=!0:"selection"==i?l=!0:1&(null!==(e=t[i.id])&&void 0!==e?e:1)||h.push(t[i.id]);return{create:t=>(t.values[o]=i(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||Ve(t,h)){let e=i(t);if(s?!ze(e,t.values[o],r):!r(e,t.values[o]))return t.values[o]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[n];if(null!=l){let n=He(e,l);if(this.dependencies.every((i=>i instanceof Xe?e.facet(i)===t.facet(i):!(i instanceof De)||e.field(i,!1)==t.field(i,!1)))||(s?ze(a=i(t),n,r):r(a=i(t),n)))return t.values[o]=n,0}else a=i(t);return t.values[o]=a,1}}}}function ze(t,e,i){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!i(t[r],e[r]))return!1;return!0}function Ve(t,e){let i=!1;for(let r of e)1&Ne(t,r)&&(i=!0);return i}function Ye(t,e,i){let r=i.map((e=>t[e.id])),n=i.map((t=>t.type)),o=r.filter((t=>!(1&t))),s=t[e.id]>>1;function a(t){let i=[];for(let e=0;e<r.length;e++){let o=He(t,r[e]);if(2==n[e])for(let t of o)i.push(t);else i.push(o)}return e.combine(i)}return{create(t){for(let e of r)Ne(t,e);return t.values[s]=a(t),1},update(t,i){if(!Ve(t,o))return 0;let r=a(t);return e.compare(r,t.values[s])?0:(t.values[s]=r,1)},reconfigure(t,n){let o=Ve(t,r),l=n.config.facets[e.id],h=n.facet(e);if(l&&!o&&_e(i,l))return t.values[s]=h,0;let c=a(t);return e.compare(c,h)?(t.values[s]=h,0):(t.values[s]=c,1)}}}const je=Xe.define({static:!0});class De{constructor(t,e,i,r,n){this.id=t,this.createF=e,this.updateF=i,this.compareF=r,this.spec=n,this.provides=void 0}static define(t){let e=new De(qe++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(je).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let r=t.values[e],n=this.updateF(r,i);return this.compareF(r,n)?0:(t.values[e]=n,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,je.of({field:this,create:t})]}get extension(){return this}}function Le(t){return e=>new Ue(e,t)}const We={highest:Le(0),high:Le(1),default:Le(2),low:Le(3),lowest:Le(4)};class Ue{constructor(t,e){this.inner=t,this.prec=e}}class Be{of(t){return new Ie(this,t)}reconfigure(t){return Be.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Ie{constructor(t,e){this.compartment=t,this.inner=e}}class Ge{constructor(t,e,i,r,n,o){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=r,this.staticValues=n,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let r=[],n=Object.create(null),o=new Map;for(let i of function(t,e,i){let r=[[],[],[],[],[]],n=new Map;return function t(o,s){let a=n.get(o);if(null!=a){if(a<=s)return;let t=r[a].indexOf(o);t>-1&&r[a].splice(t,1),o instanceof Ie&&i.delete(o.compartment)}if(n.set(o,s),Array.isArray(o))for(let e of o)t(e,s);else if(o instanceof Ie){if(i.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(o.compartment)||o.inner;i.set(o.compartment,r),t(r,s)}else if(o instanceof Ue)t(o.inner,o.prec);else if(o instanceof De)r[s].push(o),o.provides&&t(o.provides,s);else if(o instanceof Ee)r[s].push(o),o.facet.extensions&&t(o.facet.extensions,2);else{let e=o.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,s)}}(t,2),r.reduce(((t,e)=>t.concat(e)))}(t,e,o))i instanceof De?r.push(i):(n[i.facet.id]||(n[i.facet.id]=[])).push(i);let s=Object.create(null),a=[],l=[];for(let t of r)s[t.id]=l.length<<1,l.push((e=>t.slot(e)));let h=null==i?void 0:i.config.facets;for(let t in n){let e=n[t],r=e[0].facet,o=h&&h[t]||[];if(e.every((t=>0==t.type)))if(s[r.id]=a.length<<1|1,_e(o,e))a.push(i.facet(r));else{let t=r.combine(e.map((t=>t.value)));a.push(i&&r.compare(t,i.facet(r))?i.facet(r):t)}else{for(let t of e)0==t.type?(s[t.id]=a.length<<1|1,a.push(t.value)):(s[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));s[r.id]=l.length<<1,l.push((t=>Ye(t,r,e)))}}let c=l.map((t=>t(s)));return new Ge(t,o,c,s,a,n)}}function Ne(t,e){if(1&e)return 2;let i=e>>1,r=t.status[i];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[i]=4;let n=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|n}function He(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const Fe=Xe.define(),Ke=Xe.define({combine:t=>t.some((t=>t)),static:!0}),Je=Xe.define({combine:t=>t.length?t[0]:void 0,static:!0}),ti=Xe.define(),ei=Xe.define(),ii=Xe.define(),ri=Xe.define({combine:t=>!!t.length&&t[0]});class ni{constructor(t,e){this.type=t,this.value=e}static define(){return new oi}}class oi{of(t){return new ni(this,t)}}class si{constructor(t){this.map=t}of(t){return new ai(this,t)}}class ai{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new ai(this.type,e)}is(t){return this.type==t}static define(t={}){return new si(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let r of t){let t=r.map(e);t&&i.push(t)}return i}}ai.reconfigure=ai.define(),ai.appendConfig=ai.define();class li{constructor(t,e,i,r,n,o){this.startState=t,this.changes=e,this.selection=i,this.effects=r,this.annotations=n,this.scrollIntoView=o,this._doc=null,this._state=null,i&&Me(i,e.newLength),n.some((t=>t.type==li.time))||(this.annotations=n.concat(li.time.of(Date.now())))}static create(t,e,i,r,n,o){return new li(t,e,i,r,n,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(li.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function hi(t,e){let i=[];for(let r=0,n=0;;){let o,s;if(r<t.length&&(n==e.length||e[n]>=t[r]))o=t[r++],s=t[r++];else{if(!(n<e.length))return i;o=e[n++],s=e[n++]}!i.length||i[i.length-1]<o?i.push(o,s):i[i.length-1]<s&&(i[i.length-1]=s)}}function ci(t,e,i){var r;let n,o,s;return i?(n=e.changes,o=Qe.empty(e.changes.length),s=t.changes.compose(e.changes)):(n=e.changes.map(t.changes),o=t.changes.mapDesc(e.changes,!0),s=t.changes.compose(n)),{changes:s,selection:e.selection?e.selection.map(o):null===(r=t.selection)||void 0===r?void 0:r.map(n),effects:ai.mapEffects(t.effects,n).concat(ai.mapEffects(e.effects,o)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function di(t,e,i){let r=e.selection,n=pi(e.annotations);return e.userEvent&&(n=n.concat(li.userEvent.of(e.userEvent))),{changes:e.changes instanceof Qe?e.changes:Qe.of(e.changes||[],i,t.facet(Je)),selection:r&&(r instanceof Re?r:Re.single(r.anchor,r.head)),effects:pi(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}function ui(t,e,i){let r=di(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(i=!1);for(let n=1;n<e.length;n++){!1===e[n].filter&&(i=!1);let o=!!e[n].sequential;r=ci(r,di(t,e[n],o?r.changes.newLength:t.doc.length),o)}let n=li.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,i=e.facet(ii),r=t;for(let n=i.length-1;n>=0;n--){let o=i[n](t);o&&Object.keys(o).length&&(r=ci(r,di(e,o,t.changes.newLength),!0))}return r==t?t:li.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let r of e.facet(ti)){let e=r(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:hi(i,e))}if(!0!==i){let r,n;if(!1===i)n=t.changes.invertedDesc,r=Qe.empty(e.doc.length);else{let e=t.changes.filter(i);r=e.changes,n=e.filtered.mapDesc(e.changes).invertedDesc}t=li.create(e,r,t.selection&&t.selection.map(n),ai.mapEffects(t.effects,n),t.annotations,t.scrollIntoView)}let r=e.facet(ei);for(let i=r.length-1;i>=0;i--){let n=r[i](t);t=n instanceof li?n:Array.isArray(n)&&1==n.length&&n[0]instanceof li?n[0]:ui(e,pi(n),!1)}return t}(n):n)}li.time=ni.define(),li.userEvent=ni.define(),li.addToHistory=ni.define(),li.remote=ni.define();const fi=[];function pi(t){return null==t?fi:Array.isArray(t)?t:[t]}var Oi=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(Oi||(Oi={}));const gi=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let mi;try{mi=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Y){}class bi{constructor(t,e,i,r,n,o){this.config=t,this.doc=e,this.selection=i,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=n,o&&(o._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)Ne(this,t<<1);this.computeSlot=null}field(t,e=!0){let i=this.config.address[t.id];if(null!=i)return Ne(this,i),He(this,i);if(e)throw new RangeError("Field is not present in this state")}update(...t){return ui(this,t,!0)}applyTransaction(t){let e,i=this.config,{base:r,compartments:n}=i;for(let e of t.effects)e.is(Be.reconfigure)?(i&&(n=new Map,i.compartments.forEach(((t,e)=>n.set(e,t))),i=null),n.set(e.value.compartment,e.value.extension)):e.is(ai.reconfigure)?(i=null,r=e.value):e.is(ai.appendConfig)&&(i=null,r=pi(r).concat(e.value));i?e=t.startState.values.slice():(i=Ge.resolve(r,n,this),e=new bi(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let o=t.startState.facet(Ke)?t.newSelection:t.newSelection.asSingle();new bi(i,t.newDoc,o,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:Re.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),r=this.changes(i.changes),n=[i.range],o=pi(i.effects);for(let i=1;i<e.ranges.length;i++){let s=t(e.ranges[i]),a=this.changes(s.changes),l=a.map(r);for(let t=0;t<i;t++)n[t]=n[t].map(l);let h=r.mapDesc(a,!0);n.push(s.range.map(h)),r=r.compose(l),o=ai.mapEffects(o,l).concat(ai.mapEffects(pi(s.effects),h))}return{changes:r,selection:Re.create(n,e.mainIndex),effects:o}}changes(t=[]){return t instanceof Qe?t:Qe.of(t,this.doc.length,this.facet(bi.lineSeparator))}toText(t){return te.of(t.split(this.facet(bi.lineSeparator)||we))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(Ne(this,e),He(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let r=t[i];r instanceof De&&null!=this.config.address[r.id]&&(e[i]=r.spec.toJSON(this.field(t[i]),this))}return e}static fromJSON(t,e={},i){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i)for(let e in i)if(Object.prototype.hasOwnProperty.call(t,e)){let n=i[e],o=t[e];r.push(n.init((t=>n.spec.fromJSON(o,t))))}return bi.create({doc:t.doc,selection:Re.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=Ge.resolve(t.extensions||[],new Map),i=t.doc instanceof te?t.doc:te.of((t.doc||"").split(e.staticFacet(bi.lineSeparator)||we)),r=t.selection?t.selection instanceof Re?t.selection:Re.single(t.selection.anchor,t.selection.head):Re.single(0);return Me(r,i.length),e.staticFacet(Ke)||(r=r.asSingle()),new bi(e,i,r,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(bi.tabSize)}get lineBreak(){return this.facet(bi.lineSeparator)||"\n"}get readOnly(){return this.facet(ri)}phrase(t,...e){for(let e of this.facet(bi.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let r=+(i||1);return!r||r>e.length?t:e[r-1]}))),t}languageDataAt(t,e,i=-1){let r=[];for(let n of this.facet(Fe))for(let o of n(this,e,i))Object.prototype.hasOwnProperty.call(o,t)&&r.push(o[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return Oi.Space;if(function(t){if(mi)return mi.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||gi.test(i)))return!0}return!1}(t))return Oi.Word;for(let i=0;i<e.length;i++)if(t.indexOf(e[i])>-1)return Oi.Word;return Oi.Other};var e}wordAt(t){let{text:e,from:i,length:r}=this.doc.lineAt(t),n=this.charCategorizer(t),o=t-i,s=t-i;for(;o>0;){let t=fe(e,o,!1);if(n(e.slice(t,o))!=Oi.Word)break;o=t}for(;s<r;){let t=fe(e,s);if(n(e.slice(s,t))!=Oi.Word)break;s=t}return o==s?null:Re.range(o+i,s+i)}}function vi(t,e,i={}){let r={};for(let e of t)for(let t of Object.keys(e)){let n=e[t],o=r[t];if(void 0===o)r[t]=n;else if(o===n||void 0===n);else{if(!Object.hasOwnProperty.call(i,t))throw new Error("Config merge conflict for field "+t);r[t]=i[t](o,n)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}bi.allowMultipleSelections=Ke,bi.tabSize=Xe.define({combine:t=>t.length?t[0]:4}),bi.lineSeparator=Je,bi.readOnly=ri,bi.phrases=Xe.define({compare(t,e){let i=Object.keys(t),r=Object.keys(e);return i.length==r.length&&i.every((i=>t[i]==e[i]))}}),bi.languageData=Fe,bi.changeFilter=ti,bi.transactionFilter=ei,bi.transactionExtender=ii,Be.reconfigure=ai.define();class yi{eq(t){return this==t}range(t,e=t){return wi.create(t,e,this)}}yi.prototype.startSide=yi.prototype.endSide=0,yi.prototype.point=!1,yi.prototype.mapMode=Se.TrackDel;class wi{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new wi(t,e,i)}}function Si(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class xi{constructor(t,e,i,r){this.from=t,this.to=e,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,r=0){let n=i?this.to:this.from;for(let o=r,s=n.length;;){if(o==s)return o;let r=o+s>>1,a=n[r]-t||(i?this.value[r].endSide:this.value[r].startSide)-e;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(t,e,i,r){for(let n=this.findIndex(e,-1e9,!0),o=this.findIndex(i,1e9,!1,n);n<o;n++)if(!1===r(this.from[n]+t,this.to[n]+t,this.value[n]))return!1}map(t,e){let i=[],r=[],n=[],o=-1,s=-1;for(let a=0;a<this.value.length;a++){let l,h,c=this.value[a],d=this.from[a]+t,u=this.to[a]+t;if(d==u){let t=e.mapPos(d,c.startSide,c.mapMode);if(null==t)continue;if(l=h=t,c.startSide!=c.endSide&&(h=e.mapPos(d,c.endSide),h<l))continue}else if(l=e.mapPos(d,c.startSide),h=e.mapPos(u,c.endSide),l>h||l==h&&c.startSide>0&&c.endSide<=0)continue;(h-l||c.endSide-c.startSide)<0||(o<0&&(o=l),c.point&&(s=Math.max(s,h-l)),i.push(c),r.push(l-o),n.push(h-o))}return{mapped:i.length?new xi(r,n,i,s):null,pos:o}}}class Qi{constructor(t,e,i,r){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=r}static create(t,e,i,r){return new Qi(t,e,i,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:r=0,filterTo:n=this.length}=t,o=t.filter;if(0==e.length&&!o)return this;if(i&&(e=e.slice().sort(Si)),this.isEmpty)return e.length?Qi.of(e):this;let s=new Pi(this,null,-1).goto(0),a=0,l=[],h=new ki;for(;s.value||a<e.length;)if(a<e.length&&(s.from-e[a].from||s.startSide-e[a].value.startSide)>=0){let t=e[a++];h.addInner(t.from,t.to,t.value)||l.push(t)}else 1==s.rangeIndex&&s.chunkIndex<this.chunk.length&&(a==e.length||this.chunkEnd(s.chunkIndex)<e[a].from)&&(!o||r>this.chunkEnd(s.chunkIndex)||n<this.chunkPos[s.chunkIndex])&&h.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex])?s.nextChunk():((!o||r>s.to||n<s.from||o(s.from,s.to,s.value))&&(h.addInner(s.from,s.to,s.value)||l.push(wi.create(s.from,s.to,s.value))),s.next());return h.finishInner(this.nextLayer.isEmpty&&!l.length?Qi.empty:this.nextLayer.update({add:l,filter:o,filterFrom:r,filterTo:n}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],i=[],r=-1;for(let n=0;n<this.chunk.length;n++){let o=this.chunkPos[n],s=this.chunk[n],a=t.touchesRange(o,o+s.length);if(!1===a)r=Math.max(r,s.maxPoint),e.push(s),i.push(t.mapPos(o));else if(!0===a){let{mapped:n,pos:a}=s.map(o,t);n&&(r=Math.max(r,n.maxPoint),e.push(n),i.push(a))}}let n=this.nextLayer.map(t);return 0==e.length?n:new Qi(i,e,n||Qi.empty,r)}between(t,e,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let n=this.chunkPos[r],o=this.chunk[r];if(e>=n&&t<=n+o.length&&!1===o.between(n,t-n,e-n,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Zi.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Zi.from(t).goto(e)}static compare(t,e,i,r,n=-1){let o=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=n)),s=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=n)),a=$i(o,s,i),l=new Ci(o,a,n),h=new Ci(s,a,n);i.iterGaps(((t,e,i)=>Ai(l,t,h,e,i,r))),i.empty&&0==i.length&&Ai(l,0,h,0,0,r)}static eq(t,e,i=0,r){null==r&&(r=999999999);let n=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(n.length!=o.length)return!1;if(!n.length)return!0;let s=$i(n,o),a=new Ci(n,s,0).goto(i),l=new Ci(o,s,0).goto(i);for(;;){if(a.to!=l.to||!Ri(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(t,e,i,r,n=-1){let o=new Ci(t,null,n).goto(e),s=e,a=o.openStart;for(;;){let t=Math.min(o.to,i);if(o.point){let i=o.activeForPoint(o.to),n=o.pointFrom<e?i.length+1:o.point.startSide<0?i.length:Math.min(i.length,a);r.point(s,t,o.point,i,n,o.pointRank),a=Math.min(o.openEnd(t),i.length)}else t>s&&(r.span(s,t,o.active,a),a=o.openEnd(t));if(o.to>i)return a+(o.point&&o.to>i?1:0);s=o.to,o.next()}}static of(t,e=!1){let i=new ki;for(let r of t instanceof wi?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i<t.length;i++){let r=t[i];if(Si(e,r)>0)return t.slice().sort(Si);e=r}return t}(t):t)i.add(r.from,r.to,r.value);return i.finish()}static join(t){if(!t.length)return Qi.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let r=t[i];r!=Qi.empty;r=r.nextLayer)e=new Qi(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}Qi.empty=new Qi([],[],null,-1),Qi.empty.nextLayer=Qi.empty;class ki{finishChunk(t){this.chunks.push(new xi(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new ki)).add(t,e,i)}addInner(t,e,i){let r=t-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Qi.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Qi.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function $i(t,e,i){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let n=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let o=r.get(t.chunk[e]);null==o||(i?i.mapPos(o):o)!=t.chunkPos[e]||(null==i?void 0:i.touchesRange(o,o+t.chunk[e].length))||n.add(t.chunk[e])}return n}class Pi{constructor(t,e,i,r=0){this.layer=t,this.skip=e,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,i){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],i=t+e.from[this.rangeIndex];if(this.from=i,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Zi{constructor(t){this.heap=t}static from(t,e=null,i=-1){let r=[];for(let n=0;n<t.length;n++)for(let o=t[n];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&r.push(new Pi(o,e,i,n));return 1==r.length?r[0]:new Zi(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ti(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ti(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ti(this.heap,0)}}}function Ti(t,e){for(let i=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let n=t[r];if(r+1<t.length&&n.compare(t[r+1])>=0&&(n=t[r+1],r++),i.compare(n)<0)break;t[r]=i,t[e]=n,e=r}}class Ci{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Zi.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){Mi(this.active,t),Mi(this.activeTo,t),Mi(this.activeRank,t),this.minActive=Xi(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:r,rank:n}=this.cursor;for(;e<this.activeRank.length&&(n-this.activeRank[e]||r-this.activeTo[e])>0;)e++;qi(this.active,e,i),qi(this.activeTo,e,r),qi(this.activeRank,e,n),t&&qi(t,e,this.cursor.from),this.minActive=Xi(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Mi(i,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(i),this.cursor.next()}}}if(i){this.openStart=0;for(let e=i.length-1;e>=0&&i[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function Ai(t,e,i,r,n,o){t.goto(e),i.goto(r);let s=r+n,a=r,l=r-e;for(;;){let e=t.to+l-i.to||t.endSide-i.endSide,r=e<0?t.to+l:i.to,n=Math.min(r,s);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Ri(t.activeForPoint(t.to),i.activeForPoint(i.to))||o.comparePoint(a,n,t.point,i.point):n>a&&!Ri(t.active,i.active)&&o.compareRange(a,n,t.active,i.active),r>s)break;a=r,e<=0&&t.next(),e>=0&&i.next()}}function Ri(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!=e[i]&&!t[i].eq(e[i]))return!1;return!0}function Mi(t,e){for(let i=e,r=t.length-1;i<r;i++)t[i]=t[i+1];t.pop()}function qi(t,e,i){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=i}function Xi(t,e){let i=-1,r=1e9;for(let n=0;n<e.length;n++)(e[n]-r||t[n].endSide-t[i].endSide)<0&&(i=n,r=e[n]);return i}function _i(t,e,i=t.length){let r=0;for(let n=0;n<i;)9==t.charCodeAt(n)?(r+=e-r%e,n++):(r++,n=fe(t,n));return r}function Ei(t,e,i,r){for(let r=0,n=0;;){if(n>=e)return r;if(r==t.length)break;n+=9==t.charCodeAt(r)?i-n%i:1,r=fe(t,r)}return!0===r?-1:t.length}const zi="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Vi="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Yi="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class ji{constructor(t,e){this.rules=[];let{finish:i}=e||{};function r(t){return/^@/.test(t)?[t]:t.split(/,\s*/)}function n(t,e,o,s){let a=[],l=/^@(\w+)\b/.exec(t[0]),h=l&&"keyframes"==l[1];if(l&&null==e)return o.push(t[0]+";");for(let i in e){let s=e[i];if(/&/.test(i))n(i.split(/,\s*/).map((e=>t.map((t=>e.replace(/&/,t))))).reduce(((t,e)=>t.concat(e))),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+i+") should be a primitive value.");n(r(i),s,a,h)}else null!=s&&a.push(i.replace(/_.*/,"").replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))+": "+s+";")}(a.length||h)&&o.push((!i||l||s?t:t.map(i)).join(", ")+" {"+a.join(" ")+"}")}for(let e in t)n(r(e),t[e],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let t=Yi[zi]||1;return Yi[zi]=t+1,"ͼ"+t.toString(36)}static mount(t,e,i){let r=t[Vi],n=i&&i.nonce;r?n&&r.setNonce(n):r=new Li(t,n),r.mount(Array.isArray(e)?e:[e],t)}}let Di=new Map;class Li{constructor(t,e){let i=t.ownerDocument||t,r=i.defaultView;if(!t.head&&t.adoptedStyleSheets&&r.CSSStyleSheet){let e=Di.get(i);if(e)return t[Vi]=e;this.sheet=new r.CSSStyleSheet,Di.set(i,this)}else this.styleTag=i.createElement("style"),e&&this.styleTag.setAttribute("nonce",e);this.modules=[],t[Vi]=this}mount(t,e){let i=this.sheet,r=0,n=0;for(let e=0;e<t.length;e++){let o=t[e],s=this.modules.indexOf(o);if(s<n&&s>-1&&(this.modules.splice(s,1),n--,s=-1),-1==s){if(this.modules.splice(n++,0,o),i)for(let t=0;t<o.rules.length;t++)i.insertRule(o.rules[t],r++)}else{for(;n<s;)r+=this.modules[n++].rules.length;r+=o.rules.length,n++}}if(i)e.adoptedStyleSheets.indexOf(this.sheet)<0&&(e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets]);else{let t="";for(let e=0;e<this.modules.length;e++)t+=this.modules[e].getRules()+"\n";this.styleTag.textContent=t;let i=e.head||e;this.styleTag.parentNode!=i&&i.insertBefore(this.styleTag,i.firstChild)}}setNonce(t){this.styleTag&&this.styleTag.getAttribute("nonce")!=t&&this.styleTag.setAttribute("nonce",t)}}for(var Wi={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:"'"},Ui={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Bi="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),Ii="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Gi=0;Gi<10;Gi++)Wi[48+Gi]=Wi[96+Gi]=String(Gi);for(Gi=1;Gi<=24;Gi++)Wi[Gi+111]="F"+Gi;for(Gi=65;Gi<=90;Gi++)Wi[Gi]=String.fromCharCode(Gi+32),Ui[Gi]=String.fromCharCode(Gi);for(var Ni in Wi)Ui.hasOwnProperty(Ni)||(Ui[Ni]=Wi[Ni]);function Hi(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function Fi(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function Ki(t,e){if(!e.anchorNode)return!1;try{return Fi(t,e.anchorNode)}catch(t){return!1}}function Ji(t){return 3==t.nodeType?ur(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function tr(t,e,i,r){return!!i&&(rr(t,e,i,r,-1)||rr(t,e,i,r,1))}function er(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function ir(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function rr(t,e,i,r,n){for(;;){if(t==i&&e==r)return!0;if(e==(n<0?0:nr(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=er(t)+(n<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(n<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=n<0?nr(t):0}}}function nr(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function or(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function sr(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function ar(t,e){let i=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:i,scaleY:r}}class lr{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?nr(e):0),i,Math.min(t.focusOffset,i?nr(i):0))}set(t,e,i,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=r}}let hr,cr=null;function dr(t){if(t.setActive)return t.setActive();if(cr)return t.focus(cr);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==cr?{get preventScroll(){return cr={preventScroll:!0},!0}}:void 0),!cr){cr=!1;for(let t=0;t<e.length;){let i=e[t++],r=e[t++],n=e[t++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=n&&(i.scrollLeft=n)}}}function ur(t,e,i=e){let r=hr||(hr=document.createRange());return r.setEnd(t,i),r.setStart(t,e),r}function fr(t,e,i,r){let n={key:e,code:e,keyCode:i,which:i,cancelable:!0};r&&({altKey:n.altKey,ctrlKey:n.ctrlKey,shiftKey:n.shiftKey,metaKey:n.metaKey}=r);let o=new KeyboardEvent("keydown",n);o.synthetic=!0,t.dispatchEvent(o);let s=new KeyboardEvent("keyup",n);return s.synthetic=!0,t.dispatchEvent(s),o.defaultPrevented||s.defaultPrevented}function pr(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function Or(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function gr(t,e){for(let i=t,r=e;;){if(3==i.nodeType&&r>0)return{node:i,offset:r};if(1==i.nodeType&&r>0){if("false"==i.contentEditable)return null;i=i.childNodes[r-1],r=nr(i)}else{if(!i.parentNode||ir(i))return null;r=er(i),i=i.parentNode}}}function mr(t,e){for(let i=t,r=e;;){if(3==i.nodeType&&r<i.nodeValue.length)return{node:i,offset:r};if(1==i.nodeType&&r<i.childNodes.length){if("false"==i.contentEditable)return null;i=i.childNodes[r],r=0}else{if(!i.parentNode||ir(i))return null;r=er(i)+1,i=i.parentNode}}}class br{constructor(t,e,i=!0){this.node=t,this.offset=e,this.precise=i}static before(t,e){return new br(t.parentNode,er(t),e)}static after(t,e){return new br(t.parentNode,er(t)+1,e)}}const vr=[];class yr{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let i of this.children){if(i==t)return e;e+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let i,r=this.dom,n=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(i=n?n.nextSibling:r.firstChild)){let t=yr.get(i);(!t||!t.parent&&t.canReuseDOM(o))&&o.reuseDOM(i)}o.sync(t,e),o.flags&=-8}if(i=n?n.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&i!=o.dom&&(e.written=!0),o.dom.parentNode==r)for(;i&&i!=o.dom;)i=wr(i);else r.insertBefore(o.dom,i);n=o.dom}for(i=n?n.nextSibling:r.firstChild,i&&e&&e.node==r&&(e.written=!0);i;)i=wr(i)}else if(1&this.flags)for(let i of this.children)7&i.flags&&(i.sync(t,e),i.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let i;if(t==this.dom)i=this.dom.childNodes[e];else{let r=0==nr(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}i=r<0?t:t.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!yr.get(i);)i=i.nextSibling;if(!i)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==i)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,i=0){let r=-1,n=-1,o=-1,s=-1;for(let a=0,l=i,h=i;a<this.children.length;a++){let i=this.children[a],c=l+i.length;if(l<t&&c>e)return i.domBoundsAround(t,e,l);if(c>=t&&-1==r&&(r=a,n=l),l>e&&i.dom.parentNode==this.dom){o=a,s=h;break}h=c,l=c+i.breakAfter}return{from:n,to:s<0?i+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=vr){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&i.indexOf(t)<0&&t.destroy()}i.length<250?this.children.splice(t,e-t,...i):this.children=[].concat(this.children.slice(0,t),i,this.children.slice(e));for(let t=0;t<i.length;t++)i[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new Sr(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,i,r,n,o){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function wr(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}yr.prototype.breakAfter=0;class Sr{constructor(t,e,i){this.children=t,this.pos=e,this.i=i,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function xr(t,e,i,r,n,o,s,a,l){let{children:h}=t,c=h.length?h[e]:null,d=o.length?o[o.length-1]:null,u=d?d.breakAfter:s;if(!(e==r&&c&&!s&&!u&&o.length<2&&c.merge(i,n,o.length?d:null,0==i,a,l))){if(r<h.length){let t=h[r];t&&(n<t.length||t.breakAfter&&(null==d?void 0:d.breakAfter))?(e==r&&(t=t.split(n),n=0),!u&&d&&t.merge(0,n,d,!0,0,l)?o[o.length-1]=t:((n||t.children.length&&!t.children[0].length)&&t.merge(0,n,null,!1,0,l),o.push(t))):(null==t?void 0:t.breakAfter)&&(d?d.breakAfter=1:s=1),r++}for(c&&(c.breakAfter=s,i>0&&(!s&&o.length&&c.merge(i,c.length,o[0],!1,a,0)?c.breakAfter=o.shift().breakAfter:(i<c.length||c.children.length&&0==c.children[c.children.length-1].length)&&c.merge(i,c.length,null,!1,a,0),e++));e<r&&o.length;)if(h[r-1].become(o[o.length-1]))r--,o.pop(),l=o.length?0:a;else{if(!h[e].become(o[0]))break;e++,o.shift(),a=o.length?0:l}!o.length&&e&&r<h.length&&!h[e-1].breakAfter&&h[r].merge(0,0,h[e-1],!1,a,l)&&e--,(e<r||o.length)&&t.replaceChildren(e,r,o)}}function Qr(t,e,i,r,n,o){let s=t.childCursor(),{i:a,off:l}=s.findPos(i,1),{i:h,off:c}=s.findPos(e,-1),d=e-i;for(let t of r)d+=t.length;t.length+=d,xr(t,h,c,a,l,r,0,n,o)}let kr="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},$r="undefined"!=typeof document?document:{documentElement:{style:{}}};const Pr=/Edge\/(\d+)/.exec(kr.userAgent),Zr=/MSIE \d/.test(kr.userAgent),Tr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(kr.userAgent),Cr=!!(Zr||Tr||Pr),Ar=!Cr&&/gecko\/(\d+)/i.test(kr.userAgent),Rr=!Cr&&/Chrome\/(\d+)/.exec(kr.userAgent),Mr="webkitFontSmoothing"in $r.documentElement.style,qr=!Cr&&/Apple Computer/.test(kr.vendor),Xr=qr&&(/Mobile\/\w+/.test(kr.userAgent)||kr.maxTouchPoints>2);var _r={mac:Xr||/Mac/.test(kr.platform),windows:/Win/.test(kr.platform),linux:/Linux|X11/.test(kr.platform),ie:Cr,ie_version:Zr?$r.documentMode||6:Tr?+Tr[1]:Pr?+Pr[1]:0,gecko:Ar,gecko_version:Ar?+(/Firefox\/(\d+)/.exec(kr.userAgent)||[0,0])[1]:0,chrome:!!Rr,chrome_version:Rr?+Rr[1]:0,ios:Xr,android:/Android\b/.test(kr.userAgent),webkit:Mr,safari:qr,webkit_version:Mr?+(/\bAppleWebKit\/(\d+)/.exec(kr.userAgent)||[0,0])[1]:0,tabSize:null!=$r.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Er extends yr{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return!(8&this.flags||i&&(!(i instanceof Er)||this.length-(e-t)+i.length>256||8&i.flags)||(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new Er(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new br(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,i){let r=t.nodeValue.length;e>r&&(e=r);let n=e,o=e,s=0;0==e&&i<0||e==r&&i>=0?_r.chrome||_r.gecko||(e?(n--,s=1):o<r&&(o++,s=-1)):i<0?n--:o<r&&o++;let a=ur(t,n,o).getClientRects();if(!a.length)return null;let l=a[(s?s<0:i>=0)?0:a.length-1];return _r.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l),s?or(l,s<0):l||null}(this.dom,t,e)}}class zr extends yr{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}setAttrs(t){if(pr(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,i,r,n,o){return!(i&&(!(i instanceof zr&&i.mark.eq(this.mark))||t&&n<=0||e<this.length&&o<=0)||(Qr(this,t,e,i?i.children.slice():[],n-1,o-1),this.markDirty(),0))}split(t){let e=[],i=0,r=-1,n=0;for(let o of this.children){let s=i+o.length;s>t&&e.push(i<t?o.split(t-i):o),r<0&&i>=t&&(r=n),i=s,n++}let o=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new zr(this.mark,e,o)}domAtPos(t){return jr(this,t)}coordsAt(t,e){return Lr(this,t,e)}}class Vr extends yr{static create(t,e,i){return new Vr(t,e,i)}constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}split(t){let e=Vr.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,i,r,n,o){return!(i&&(!(i instanceof Vr&&this.widget.compare(i.widget))||t>0&&n<=0||e<this.length&&o<=0)||(this.length=t+(i?i.length:0)+(this.length-e),0))}become(t){return t instanceof Vr&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return te.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,i=e&&e.state.doc,r=this.posAtStart;return i?i.slice(r,r+this.length):te.empty}domAtPos(t){return(this.length?0==t:this.side>0)?br.before(this.dom):br.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.widget.coordsAt(this.dom,t,e);if(i)return i;let r=this.dom.getClientRects(),n=null;if(!r.length)return null;let o=this.side?this.side<0:t>0;for(let e=o?r.length-1:0;n=r[e],!(t>0?0==e:e==r.length-1||n.top<n.bottom);e+=o?-1:1);return or(n,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Yr extends yr{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof Yr&&t.side==this.side}split(){return new Yr(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?br.before(this.dom):br.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return te.empty}get isHidden(){return!0}}function jr(t,e){let i=t.dom,{children:r}=t,n=0;for(let t=0;n<r.length;n++){let o=r[n],s=t+o.length;if(!(s==t&&o.getSide()<=0)){if(e>t&&e<s&&o.dom.parentNode==i)return o.domAtPos(e-t);if(e<=t)break;t=s}}for(let t=n;t>0;t--){let e=r[t-1];if(e.dom.parentNode==i)return e.domAtPos(e.length)}for(let t=n;t<r.length;t++){let e=r[t];if(e.dom.parentNode==i)return e.domAtPos(0)}return new br(i,0)}function Dr(t,e,i){let r,{children:n}=t;i>0&&e instanceof zr&&n.length&&(r=n[n.length-1])instanceof zr&&r.mark.eq(e.mark)?Dr(r,e.children[0],i-1):(n.push(e),e.setParent(t)),t.length+=e.length}function Lr(t,e,i){let r=null,n=-1,o=null,s=-1;!function t(e,a){for(let l=0,h=0;l<e.children.length&&h<=a;l++){let c=e.children[l],d=h+c.length;d>=a&&(c.children.length?t(c,a-h):(!o||o.isHidden&&i>0)&&(d>a||h==d&&c.getSide()>0)?(o=c,s=a-h):(h<a||h==d&&c.getSide()<0&&!c.isHidden)&&(r=c,n=a-h)),h=d}}(t,e);let a=(i<0?r:o)||r||o;return a?a.coordsAt(Math.max(0,a==r?n:s),i):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let i=Ji(e);return i[i.length-1]||null}(t)}function Wr(t,e){for(let i in t)"class"==i&&e.class?e.class+=" "+t.class:"style"==i&&e.style?e.style+=";"+t.style:e[i]=t[i];return e}Er.prototype.children=Vr.prototype.children=Yr.prototype.children=vr;const Ur=Object.create(null);function Br(t,e,i){if(t==e)return!0;t||(t=Ur),e||(e=Ur);let r=Object.keys(t),n=Object.keys(e);if(r.length-(i&&r.indexOf(i)>-1?1:0)!=n.length-(i&&n.indexOf(i)>-1?1:0))return!1;for(let o of r)if(o!=i&&(-1==n.indexOf(o)||t[o]!==e[o]))return!1;return!0}function Ir(t,e,i){let r=!1;if(e)for(let n in e)i&&n in i||(r=!0,"style"==n?t.style.cssText="":t.removeAttribute(n));if(i)for(let n in i)e&&e[n]==i[n]||(r=!0,"style"==n?t.style.cssText=i[n]:t.setAttribute(n,i[n]));return r}function Gr(t){let e=Object.create(null);for(let i=0;i<t.attributes.length;i++){let r=t.attributes[i];e[r.name]=r.value}return e}class Nr{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var Hr=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(Hr||(Hr={}));class Fr extends yi{constructor(t,e,i,r){super(),this.startSide=t,this.endSide=e,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(t){return new Kr(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),i=!!t.block;return e+=i&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new tn(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,r=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:n,end:o}=en(t,r);e=(n?r?-3e8:-1:5e8)-1,i=1+(o?r?2e8:1:-6e8)}return new tn(t,e,i,r,t.widget||null,!0)}static line(t){return new Jr(t)}static set(t,e=!1){return Qi.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Fr.none=Qi.empty;class Kr extends Fr{constructor(t){let{start:e,end:i}=en(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,i;return this==t||t instanceof Kr&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(i=t.attrs)||void 0===i?void 0:i.class))&&Br(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Kr.prototype.point=!1;class Jr extends Fr{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Jr&&this.spec.class==t.spec.class&&Br(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Jr.prototype.mapMode=Se.TrackBefore,Jr.prototype.point=!0;class tn extends Fr{constructor(t,e,i,r,n,o){super(e,i,n,t),this.block=r,this.isReplace=o,this.mapMode=r?e<=0?Se.TrackBefore:Se.TrackAfter:Se.TrackDel}get type(){return this.startSide!=this.endSide?Hr.WidgetRange:this.startSide<=0?Hr.WidgetBefore:Hr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof tn&&function(t,e){return t==e||!!(t&&e&&t.compare(e))}(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function en(t,e=!1){let{inclusiveStart:i,inclusiveEnd:r}=t;return null==i&&(i=t.inclusive),null==r&&(r=t.inclusive),{start:null!=i?i:e,end:null!=r?r:e}}function rn(t,e,i,r=0){let n=i.length-1;n>=0&&i[n]+r>=t?i[n]=Math.max(i[n],e):i.push(t,e)}tn.prototype.point=!0;class nn extends yr{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,r,n,o){if(i){if(!(i instanceof nn))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),Qr(this,t,e,i?i.children.slice():[],n,o),!0}split(t){let e=new nn;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i,off:r}=this.childPos(t);r&&(e.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let t=i;t<this.children.length;t++)e.append(this.children[t],0);for(;i>0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){Br(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Dr(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=Wr(e,this.attrs||{})),i&&(this.attrs=Wr({class:i},this.attrs||{}))}domAtPos(t){return jr(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var i;this.dom?4&this.flags&&(pr(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(Ir(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&yr.get(r)instanceof zr;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(i=yr.get(r))||void 0===i?void 0:i.isEditable)||_r.ios&&this.children.some((t=>t instanceof Er))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let i of this.children){if(!(i instanceof Er)||/[^ -~]/.test(i.text))return null;let r=Ji(i.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let i=Lr(this,t,e);if(!this.children.length&&i&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=i.bottom-i.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:i.top+r,bottom:i.bottom-r,left:i.left,right:i.left}}}return i}become(t){return t instanceof nn&&0==this.children.length&&0==t.children.length&&Br(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let i=0,r=0;i<t.children.length;i++){let n=t.children[i],o=r+n.length;if(o>=e){if(n instanceof nn)return n;if(o>e)break}r=o+n.breakAfter}return null}}class on extends yr{constructor(t,e,i){super(),this.widget=t,this.length=e,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,r,n,o){return!(i&&(!(i instanceof on&&this.widget.compare(i.widget))||t>0&&n<=0||e<this.length&&o<=0)||(this.length=t+(i?i.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?br.before(this.dom):br.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let i=new on(this.widget,e,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return vr}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):te.empty}domBoundsAround(){return null}become(t){return t instanceof on&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)||(this.widget instanceof sn?null:or(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:i}=this.deco;return e!=i&&(t<0?e<0:i>0)}}class sn extends Nr{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class an{constructor(t,e,i,r){this.doc=t,this.pos=e,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof on&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new nn),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(ln(new Yr(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof on||this.getLine()}buildText(t,e,i){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(ln(new Er(this.text.slice(this.textOff,this.textOff+r)),e),i),this.atCursorPos=!0,this.textOff+=r,t-=r,i=0}}span(t,e,i,r){this.buildText(e-t,i,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,i,r,n,o){if(this.disallowBlockEffectsFor[o]&&i instanceof tn){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=e-t;if(i instanceof tn)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new on(i.widget||hn.block,s,i));else{let o=Vr.create(i.widget||hn.inline,s,s?0:i.startSide),a=this.atCursorPos&&!o.isEditable&&n<=r.length&&(t<e||i.startSide>0),l=!o.isEditable&&(t<e||n>r.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(h.append(ln(new Yr(1),r),n),n=r.length+Math.max(0,n-r.length)),h.append(ln(o,r),n),this.atCursorPos=l,this.pendingBuffer=l?t<e||n>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=n)}static build(t,e,i,r,n){let o=new an(t,e,i,n);return o.openEnd=Qi.spans(r,e,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function ln(t,e){for(let i of e)t=new zr(i,[t],t.length);return t}class hn extends Nr{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}hn.inline=new hn("span"),hn.block=new hn("div");var cn=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(cn||(cn={}));const dn=cn.LTR,un=cn.RTL;function fn(t){let e=[];for(let i=0;i<t.length;i++)e.push(1<<+t[i]);return e}const pn=fn("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),On=fn("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),gn=Object.create(null),mn=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),i=t.charCodeAt(1);gn[e]=i,gn[i]=-e}function bn(t){return t<=247?pn[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?On[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const vn=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class yn{get dir(){return this.level%2?un:dn}constructor(t,e,i){this.from=t,this.to=e,this.level=i}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,i,r){let n=-1;for(let o=0;o<t.length;o++){let s=t[o];if(s.from<=e&&s.to>=e){if(s.level==i)return o;(n<0||(0!=r?r<0?s.from<e:s.to>e:t[n].level>s.level))&&(n=o)}}if(n<0)throw new RangeError("Index out of range");return n}}function wn(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],n=e[i];if(r.from!=n.from||r.to!=n.to||r.direction!=n.direction||!wn(r.inner,n.inner))return!1}return!0}const Sn=[];function xn(t,e,i,r,n,o,s){let a=r%2?2:1;if(r%2==n%2)for(let l=e,h=0;l<i;){let e=!0,c=!1;if(h==o.length||l<o[h].from){let t=Sn[l];t!=a&&(e=!1,c=16==t)}let d=e||1!=a?null:[],u=e?r:r+1,f=l;t:for(;;)if(h<o.length&&f==o[h].from){if(c)break t;let p=o[h];if(!e)for(let t=p.to,e=h+1;;){if(t==i)break t;if(!(e<o.length&&o[e].from==t)){if(Sn[t]==a)break t;break}t=o[e++].to}h++,d?d.push(p):(p.from>l&&s.push(new yn(l,p.from,u)),Qn(t,p.direction==dn!=!(u%2)?r+1:r,n,p.inner,p.from,p.to,s),l=p.to),f=p.to}else{if(f==i||(e?Sn[f]!=a:Sn[f]==a))break;f++}d?xn(t,l,f,r+1,n,d,s):l<f&&s.push(new yn(l,f,u)),l=f}else for(let l=i,h=o.length;l>e;){let i=!0,c=!1;if(!h||l>o[h-1].to){let t=Sn[l-1];t!=a&&(i=!1,c=16==t)}let d=i||1!=a?null:[],u=i?r:r+1,f=l;t:for(;;)if(h&&f==o[h-1].to){if(c)break t;let p=o[--h];if(!i)for(let t=p.from,i=h;;){if(t==e)break t;if(!i||o[i-1].to!=t){if(Sn[t-1]==a)break t;break}t=o[--i].from}d?d.push(p):(p.to<l&&s.push(new yn(p.to,l,u)),Qn(t,p.direction==dn!=!(u%2)?r+1:r,n,p.inner,p.from,p.to,s),l=p.from),f=p.from}else{if(f==e||(i?Sn[f-1]!=a:Sn[f-1]==a))break;f--}d?xn(t,f,l,r+1,n,d,s):f<l&&s.push(new yn(f,l,u)),l=f}}function Qn(t,e,i,r,n,o,s){let a=e%2?2:1;!function(t,e,i,r,n){for(let o=0;o<=r.length;o++){let s=o?r[o-1].to:e,a=o<r.length?r[o].from:i,l=o?256:n;for(let e=s,i=l,r=l;e<a;e++){let n=bn(t.charCodeAt(e));512==n?n=i:8==n&&4==r&&(n=16),Sn[e]=4==n?2:n,7&n&&(r=n),i=n}for(let t=s,e=l,r=l;t<a;t++){let n=Sn[t];if(128==n)t<a-1&&e==Sn[t+1]&&24&e?n=Sn[t]=e:Sn[t]=256;else if(64==n){let n=t+1;for(;n<a&&64==Sn[n];)n++;let o=t&&8==e||n<i&&8==Sn[n]?1==r?1:8:256;for(let e=t;e<n;e++)Sn[e]=o;t=n-1}else 8==n&&1==r&&(Sn[t]=1);e=n,7&n&&(r=n)}}}(t,n,o,r,a),function(t,e,i,r,n){let o=1==n?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let h=s?r[s-1].to:e,c=s<r.length?r[s].from:i;for(let e,i,r,s=h;s<c;s++)if(i=gn[e=t.charCodeAt(s)])if(i<0){for(let t=a-3;t>=0;t-=3)if(mn[t+1]==-i){let e=mn[t+2],i=2&e?n:4&e?1&e?o:n:0;i&&(Sn[s]=Sn[mn[t]]=i),a=t;break}}else{if(189==mn.length)break;mn[a++]=s,mn[a++]=e,mn[a++]=l}else if(2==(r=Sn[s])||1==r){let t=r==n;l=t?0:1;for(let e=a-3;e>=0;e-=3){let i=mn[e+2];if(2&i)break;if(t)mn[e+2]|=2;else{if(4&i)break;mn[e+2]|=4}}}}}(t,n,o,r,a),function(t,e,i,r){for(let n=0,o=r;n<=i.length;n++){let s=n?i[n-1].to:t,a=n<i.length?i[n].from:e;for(let l=s;l<a;){let s=Sn[l];if(256==s){let s=l+1;for(;;)if(s==a){if(n==i.length)break;s=i[n++].to,a=n<i.length?i[n].from:e}else{if(256!=Sn[s])break;s++}let h=1==o,c=h==(1==(s<e?Sn[s]:r))?h?1:2:r;for(let e=s,r=n,o=r?i[r-1].to:t;e>l;)e==o&&(e=i[--r].from,o=r?i[r-1].to:t),Sn[--e]=c;l=s}else o=s,l++}}}(n,o,r,a),xn(t,n,o,e,i,r,s)}function kn(t){return[new yn(0,t,0)]}let $n="";function Pn(t,e,i,r,n){var o;let s=r.head-t.from,a=yn.find(e,s,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc),l=e[a],h=l.side(n,i);if(s==h){let t=a+=n?1:-1;if(t<0||t>=e.length)return null;l=e[a=t],s=l.side(!n,i),h=l.side(n,i)}let c=fe(t.text,s,l.forward(n,i));(c<l.from||c>l.to)&&(c=h),$n=t.text.slice(Math.min(s,c),Math.max(s,c));let d=a==(n?e.length-1:0)?null:e[a+(n?1:-1)];return d&&c==h&&d.level+(n?0:1)<l.level?Re.cursor(d.side(!n,i)+t.from,d.forward(n,i)?1:-1,d.level):Re.cursor(c+t.from,l.forward(n,i)?-1:1,l.level)}function Zn(t,e,i){for(let r=e;r<i;r++){let e=bn(t.charCodeAt(r));if(1==e)return dn;if(2==e||4==e)return un}return dn}const Tn=Xe.define(),Cn=Xe.define(),An=Xe.define(),Rn=Xe.define(),Mn=Xe.define(),qn=Xe.define(),Xn=Xe.define(),_n=Xe.define(),En=Xe.define(),zn=Xe.define({combine:t=>t.some((t=>t))}),Vn=Xe.define({combine:t=>t.some((t=>t))}),Yn=Xe.define();class jn{constructor(t,e="nearest",i="nearest",r=5,n=5,o=!1){this.range=t,this.y=e,this.x=i,this.yMargin=r,this.xMargin=n,this.isSnapshot=o}map(t){return t.empty?this:new jn(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new jn(Re.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Dn=ai.define({map:(t,e)=>t.map(e)}),Ln=ai.define();function Wn(t,e,i){let r=t.facet(Rn);r.length?r[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const Un=Xe.define({combine:t=>!t.length||t[0]});let Bn=0;const In=Xe.define();class Gn{constructor(t,e,i,r,n){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=r,this.extension=n(this)}static define(t,e){const{eventHandlers:i,eventObservers:r,provide:n,decorations:o}=e||{};return new Gn(Bn++,t,i,r,(t=>{let e=[In.of(t)];return o&&e.push(Kn.of((e=>{let i=e.plugin(t);return i?o(i):Fr.none}))),n&&e.push(n(t)),e}))}static fromClass(t,e){return Gn.define((e=>new t(e)),e)}}class Nn{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(Wn(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){Wn(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){Wn(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const Hn=Xe.define(),Fn=Xe.define(),Kn=Xe.define(),Jn=Xe.define(),to=Xe.define(),eo=Xe.define();function io(t,e){let i=t.state.facet(eo);if(!i.length)return i;let r=i.map((e=>e instanceof Function?e(t):e)),n=[];return Qi.spans(r,e.from,e.to,{point(){},span(t,i,r,o){let s=t-e.from,a=i-e.from,l=n;for(let t=r.length-1;t>=0;t--,o--){let i,n=r[t].spec.bidiIsolate;if(null==n&&(n=Zn(e.text,s,a)),o>0&&l.length&&(i=l[l.length-1]).to==s&&i.direction==n)i.to=a,l=i.inner;else{let t={from:s,to:a,direction:n,inner:[]};l.push(t),l=t.inner}}}}),n}const ro=Xe.define();function no(t){let e=0,i=0,r=0,n=0;for(let o of t.state.facet(ro)){let s=o(t);s&&(null!=s.left&&(e=Math.max(e,s.left)),null!=s.right&&(i=Math.max(i,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(n=Math.max(n,s.bottom)))}return{left:e,right:i,top:r,bottom:n}}const oo=Xe.define();class so{constructor(t,e,i,r){this.fromA=t,this.toA=e,this.fromB=i,this.toB=r}join(t){return new so(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),t.splice(e-1,1)}}return t.splice(e,0,i),t}static extendWithRanges(t,e){if(0==e.length)return t;let i=[];for(let r=0,n=0,o=0,s=0;;r++){let a=r==t.length?null:t[r],l=o-s,h=a?a.fromB:1e9;for(;n<e.length&&e[n]<h;){let t=e[n],r=e[n+1],o=Math.max(s,t),a=Math.min(h,r);if(o<=a&&new so(o+l,a+l,o,a).addToSet(i),r>h)break;n+=2}if(!a)return i;new so(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,s=a.toB}}}class ao{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=Qe.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let r=[];this.changes.iterChangedRanges(((t,e,i,n)=>r.push(new so(t,e,i,n)))),this.changedRanges=r}static create(t,e,i){return new ao(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class lo extends yr{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=Fr.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new nn],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new so(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?r=this.domChanged.newSel.head:function(t,e){let i=!1;return e&&t.iterChangedRanges(((t,r)=>{t<e.to&&r>e.from&&(i=!0)})),i}(t.changes,this.hasComposition)||t.selectionSet||(r=t.state.selection.main.head));let n=r>-1?function(t,e,i){let r=ho(t,i);if(!r)return null;let{node:n,from:o,to:s}=r,a=n.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,h=new so(l.mapPos(o),l.mapPos(s),o,s),c=[];for(let e=n.parentNode;;e=e.parentNode){let i=yr.get(e);if(i instanceof zr)c.push({node:e,deco:i.mark});else{if(i instanceof nn||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:h,text:n,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new Kr({inclusive:!0,attributes:Gr(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;i=new so(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(i.slice())}this.hasComposition=n?{from:n.range.fromB,to:n.range.toB}:null,(_r.ie||_r.chrome)&&!n&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let o=function(t,e,i){let r=new co;return Qi.compare(t,e,i,r),r.changes}(this.decorations,this.updateDeco(),t.changes);return i=so.extendWithRanges(i,o),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,t.startState.doc.length,n),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=_r.chrome||_r.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let n=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof on&&t.widget instanceof sn&&n.push(t.dom);r.updateGaps(n)}updateChildren(t,e,i){let r=i?i.range.addToSet(t.slice()):t,n=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let o,s,a,l,{fromA:h,toA:c,fromB:d,toB:u}=e;if(i&&i.range.fromB<u&&i.range.toB>d){let t=an.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),e=an.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);s=t.breakAtStart,a=t.openStart,l=e.openEnd;let r=this.compositionView(i);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),o=t.content.concat(r).concat(e.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=an.build(this.view.state.doc,d,u,this.decorations,this.dynamicDecorationMap));let{i:f,off:p}=n.findPos(c,1),{i:O,off:g}=n.findPos(h,-1);xr(this,O,g,f,p,o,s,a,l)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(Ln)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new Er(t.text.nodeValue);e.flags|=8;for(let{deco:i}of t.marks)e=new zr(i,[e],e.length);let i=new nn;return i.append(e,0),i}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let i=yr.get(t);i&&i!=e&&(i.dom=null),e.setDOM(t)},i=this.childPos(t.range.fromB,1),r=this.children[i.i];e(t.line,r);for(let n=t.marks.length-1;n>=-1;n--)i=r.childPos(i.off,1),r=r.children[i.i],e(n>=0?t.marks[n].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,n=!r&&Ki(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||e||n))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(_r.gecko&&s.empty&&!this.hasComposition&&1==(h=a).node.nodeType&&h.node.firstChild&&(0==h.offset||"false"==h.node.childNodes[h.offset-1].contentEditable)&&(h.offset==h.node.childNodes.length||"false"==h.node.childNodes[h.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore((()=>a.node.insertBefore(t,a.node.childNodes[a.offset]||null))),a=l=new br(t,0),o=!0}var h;let c=this.view.observer.selectionRange;!o&&c.focusNode&&(tr(a.node,a.offset,c.anchorNode,c.anchorOffset)&&tr(l.node,l.offset,c.focusNode,c.focusOffset)||this.suppressWidgetCursorChange(c,s))||(this.view.observer.ignore((()=>{_r.android&&_r.chrome&&this.dom.contains(c.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=Hi(this.view.root);if(t)if(s.empty){if(_r.gecko){let t=(e=a.node,r=a.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?gr:mr)(a.node,a.offset);e&&(a=new br(e.node,e.offset))}}t.collapse(a.node,a.offset),null!=s.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=s.bidiLevel)}else if(t.extend){t.collapse(a.node,a.offset);try{t.extend(l.node,l.offset)}catch(t){}}else{let e=document.createRange();s.anchor>s.head&&([a,l]=[l,a]),e.setEnd(l.node,l.offset),e.setStart(a.node,a.offset),t.removeAllRanges(),t.addRange(e)}var e,r;n&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new br(c.anchorNode,c.anchorOffset),this.impreciseHead=l.precise?null:new br(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&tr(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=Hi(t.root),{anchorNode:r,anchorOffset:n}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let o=nn.find(this,e.head);if(!o)return;let s=o.posAtStart;if(e.head==s||e.head==s+o.length)return;let a=this.coordsAt(e.head,-1),l=this.coordsAt(e.head,1);if(!a||!l||a.bottom>l.top)return;let h=this.domAtPos(e.head+e.assoc);i.collapse(h.node,h.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let c=t.observer.selectionRange;t.docView.posFromDOM(c.anchorNode,c.anchorOffset)!=e.from&&i.collapse(r,n)}moveToLine(t){let e,i=this.dom;if(t.node!=i)return t;for(let r=t.offset;!e&&r<i.childNodes.length;r++){let t=yr.get(i.childNodes[r]);t instanceof nn&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=yr.get(i.childNodes[r]);t instanceof nn&&(e=t.domAtPos(t.length))}return e?new br(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=yr.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(i<t.length||t instanceof nn)break;e++,i=0}return this.children[e].domAtPos(i)}coordsAt(t,e){let i=null,r=0;for(let n=this.length,o=this.children.length-1;o>=0;o--){let s=this.children[o],a=n-s.breakAfter,l=a-s.length;if(a<t)break;if(l<=t&&(l<t||s.covers(-1))&&(a>t||s.covers(1))&&(!i||s instanceof nn&&!(i instanceof nn&&e>=0)))i=s,r=l;else if(i&&l==t&&a==t&&s instanceof on&&Math.abs(e)<2){if(s.deco.startSide<0)break;o&&(i=null)}n=l}return i?i.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:i}=this.childPos(t,1),r=this.children[e];if(!(r instanceof nn))return null;for(;r.children.length;){let{i:t,off:e}=r.childPos(i,1);for(;;t++){if(t==r.children.length)return null;if((r=r.children[t]).length)break}i=e}if(!(r instanceof Er))return null;let n=fe(r.text,i);if(n==i)return null;let o=ur(r.dom,i,n).getClientRects();for(let t=0;t<o.length;t++){let e=o[t];if(t==o.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:i,to:r}=t,n=this.view.contentDOM.clientWidth,o=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==cn.LTR;for(let t=0,l=0;l<this.children.length;l++){let h=this.children[l],c=t+h.length;if(c>r)break;if(t>=i){let i=h.dom.getBoundingClientRect();if(e.push(i.height),o){let e=h.dom.lastChild,r=e?Ji(e):[];if(r.length){let e=r[r.length-1],o=a?e.right-i.left:i.right-e.left;o>s&&(s=o,this.minWidth=n,this.minWidthFrom=t,this.minWidthTo=c)}}}t=c+h.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?cn.RTL:cn.LTR}measureTextSize(){for(let t of this.children)if(t instanceof nn){let e=t.measureTextSize();if(e)return e}let t,e,i,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let n=Ji(r.firstChild)[0];t=r.getBoundingClientRect().height,e=n?n.width/27:7,i=n?n.height:t,r.remove()})),{lineHeight:t,charWidth:e,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new Sr(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,r=0;;r++){let n=r==e.viewports.length?null:e.viewports[r],o=n?n.from-1:this.length;if(o>i){let r=(e.lineBlockAt(o).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(Fr.replace({widget:new sn(r),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!n)break;i=n.to+1}return Fr.set(t)}updateDeco(){let t=1,e=this.view.state.facet(Kn).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),i=!1,r=this.view.state.facet(Jn).map(((t,e)=>{let r="function"==typeof t;return r&&(i=!0),r?t(this.view):t}));for(r.length&&(this.dynamicDecorationMap[t++]=i,e.push(Qi.join(r))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(Yn))try{if(e(this.view,t.range,t))return!0}catch(t){Wn(this.view.state,t,"scroll handler")}let e,{range:i}=t,r=this.coordsAt(i.head,i.empty?i.assoc:i.head>i.anchor?-1:1);if(!r)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let n=no(this.view),o={left:r.left-n.left,top:r.top-n.top,right:r.right+n.right,bottom:r.bottom+n.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(t,e,i,r,n,o,s,a){let l=t.ownerDocument,h=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(1==c.nodeType){let t,u=c==l.body,f=1,p=1;if(u)t=sr(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:f,scaleY:p}=ar(c,e)),t={left:e.left,right:e.left+c.clientWidth*f,top:e.top,bottom:e.top+c.clientHeight*p}}let O=0,g=0;if("nearest"==n)e.top<t.top?(g=-(t.top-e.top+s),i>0&&e.bottom>t.bottom+g&&(g=e.bottom-t.bottom+g+s)):e.bottom>t.bottom&&(g=e.bottom-t.bottom+s,i<0&&e.top-g<t.top&&(g=-(t.top+g-e.top+s)));else{let r=e.bottom-e.top,o=t.bottom-t.top;g=("center"==n&&r<=o?e.top+r/2-o/2:"start"==n||"center"==n&&i<0?e.top-s:e.bottom-o+s)-t.top}if("nearest"==r?e.left<t.left?(O=-(t.left-e.left+o),i>0&&e.right>t.right+O&&(O=e.right-t.right+O+o)):e.right>t.right&&(O=e.right-t.right+o,i<0&&e.left<t.left+O&&(O=-(t.left+O-e.left+o))):O=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==a?e.left-o:e.right-(t.right-t.left)+o)-t.left,O||g)if(u)h.scrollBy(O,g);else{let t=0,i=0;if(g){let t=c.scrollTop;c.scrollTop+=g/p,i=(c.scrollTop-t)*p}if(O){let e=c.scrollLeft;c.scrollLeft+=O/f,t=(c.scrollLeft-e)*f}e={left:e.left-t,top:e.top-i,right:e.right-t,bottom:e.bottom-i},t&&Math.abs(t-O)<1&&(r="nearest"),i&&Math.abs(i-g)<1&&(n="nearest")}if(u)break;c=c.assignedSlot||c.parentNode}else{if(11!=c.nodeType)break;c=c.host}}(this.view.scrollDOM,o,i.head<i.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,s),-s),Math.max(Math.min(t.yMargin,a),-a),this.view.textDirection==cn.LTR)}}function ho(t,e){let i=t.observer.selectionRange;if(!i.focusNode)return null;let r=gr(i.focusNode,i.focusOffset),n=mr(i.focusNode,i.focusOffset),o=r||n;if(n&&r&&n.node!=r.node){let e=yr.get(n.node);if(!e||e instanceof Er&&e.text!=n.node.nodeValue)o=n;else if(t.docView.lastCompositionAfterCursor){let t=yr.get(r.node);!t||t instanceof Er&&t.text!=r.node.nodeValue||(o=n)}}if(t.docView.lastCompositionAfterCursor=o!=r,!o)return null;let s=e-o.offset;return{from:s,to:s+o.node.nodeValue.length,node:o.node}}let co=class{constructor(){this.changes=[]}compareRange(t,e){rn(t,e,this.changes)}comparePoint(t,e){rn(t,e,this.changes)}};function uo(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function fo(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function po(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Oo(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function go(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function mo(t,e,i){let r,n,o,s,a,l,h,c,d=!1;for(let u=t.firstChild;u;u=u.nextSibling){let t=Ji(u);for(let f=0;f<t.length;f++){let p=t[f];n&&po(n,p)&&(p=Oo(go(p,n.bottom),n.top));let O=uo(e,p),g=fo(i,p);if(0==O&&0==g)return 3==u.nodeType?bo(u,e,i):mo(u,e,i);if(!r||s>g||s==g&&o>O){r=u,n=p,o=O,s=g;let a=g?i<p.top?-1:1:O?e<p.left?-1:1:0;d=!a||(a>0?f<t.length-1:f>0)}0==O?i>p.bottom&&(!h||h.bottom<p.bottom)?(a=u,h=p):i<p.top&&(!c||c.top>p.top)&&(l=u,c=p):h&&po(h,p)?h=go(h,p.bottom):c&&po(c,p)&&(c=Oo(c,p.top))}}if(h&&h.bottom>=i?(r=a,n=h):c&&c.top<=i&&(r=l,n=c),!r)return{node:t,offset:0};let u=Math.max(n.left,Math.min(n.right,e));return 3==r.nodeType?bo(r,u,i):d&&"false"!=r.contentEditable?mo(r,u,i):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(n.left+n.right)/2?1:0)}}function bo(t,e,i){let r=t.nodeValue.length,n=-1,o=1e9,s=0;for(let a=0;a<r;a++){let r=ur(t,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let h=r[l];if(h.top==h.bottom)continue;s||(s=e-h.left);let c=(h.top>i?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c<o){let i=e>=(h.left+h.right)/2,r=i;if((_r.chrome||_r.gecko)&&ur(t,a).getBoundingClientRect().left==h.right&&(r=!i),c<=0)return{node:t,offset:a+(r?1:0)};n=a+(r?1:0),o=c}}}return{node:t,offset:n>-1?n:s>0?t.nodeValue.length:0}}function vo(t,e,i,r=-1){var n,o;let s,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:h}=t.viewState,{x:c,y:d}=e,u=d-l;if(u<0)return 0;if(u>h)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,n=!1;s=t.elementAtHeight(u),s.type!=Hr.Text;)for(;u=r>0?s.bottom+e:s.top-e,!(u>=0&&u<=h);){if(n)return i?null:0;n=!0,r=-r}d=l+u;let f=s.from;if(f<t.viewport.from)return 0==t.viewport.from?0:i?null:yo(t,a,s,c,d);if(f>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:i?null:yo(t,a,s,c,d);let p=t.dom.ownerDocument,O=t.root.elementFromPoint?t.root:p,g=O.elementFromPoint(c,d);g&&!t.contentDOM.contains(g)&&(g=null),g||(c=Math.max(a.left+1,Math.min(a.right-1,c)),g=O.elementFromPoint(c,d),g&&!t.contentDOM.contains(g)&&(g=null));let m,b=-1;if(g&&0!=(null===(n=t.docView.nearest(g))||void 0===n?void 0:n.isEditable)){if(p.caretPositionFromPoint){let t=p.caretPositionFromPoint(c,d);t&&({offsetNode:m,offset:b}=t)}else if(p.caretRangeFromPoint){let e=p.caretRangeFromPoint(c,d);e&&(({startContainer:m,startOffset:b}=e),(!t.contentDOM.contains(m)||_r.safari&&function(t,e,i){let r;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return ur(t,r-1,r).getBoundingClientRect().left>i}(m,b,c)||_r.chrome&&function(t,e,i){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return i-(1==t.nodeType?t.getBoundingClientRect():ur(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(m,b,c))&&(m=void 0))}m&&(b=Math.min(nr(m),b))}if(!m||!t.docView.dom.contains(m)){let e=nn.find(t.docView,f);if(!e)return u>s.top+s.height/2?s.to:s.from;({node:m,offset:b}=mo(e.dom,c,d))}let v=t.docView.nearest(m);if(!v)return null;if(v.isWidget&&1==(null===(o=v.dom)||void 0===o?void 0:o.nodeType)){let t=v.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?v.posAtStart:v.posAtEnd}return v.localPosFromDOM(m,b)+v.posAtStart}function yo(t,e,i,r,n){let o=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;o+=Math.floor((n-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let s=t.state.sliceDoc(i.from,i.to);return i.from+Ei(s,o,t.state.tabSize)}function wo(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==Hr.Text))return t;return i}function So(t,e,i,r){let n=t.state.doc.lineAt(e.head),o=t.bidiSpans(n),s=t.textDirectionAt(n.from);for(let a=e,l=null;;){let e=Pn(n,o,s,a,i),h=$n;if(!e){if(n.number==(i?t.state.doc.lines:1))return a;h="\n",n=t.state.doc.line(n.number+(i?1:-1)),o=t.bidiSpans(n),e=t.visualLineSide(n,!i)}if(l){if(!l(h))return a}else{if(!r)return e;l=r(h)}a=e}}function xo(t,e,i){for(;;){let r=0;for(let n of t)n.between(e-1,e+1,((t,n,o)=>{if(e>t&&e<n){let o=r||i||(e-t<n-e?-1:1);e=o<0?t:n,r=o}}));if(!r)return e}}function Qo(t,e,i){let r=xo(t.state.facet(to).map((e=>e(t))),i.from,e.head>i.from?-1:1);return r==i.from?i:Re.cursor(r,r<i.from?1:-1)}const ko="";class $o{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(bi.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=ko}readRange(t,e){if(!t)return this;let i=t.parentNode;for(let r=t;;){this.findPointBefore(i,r);let t=this.text.length;this.readNode(r);let n=r.nextSibling;if(n==e)break;let o=yr.get(r),s=yr.get(n);(o&&s?o.breakAfter:(o?o.breakAfter:ir(r))||ir(n)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&this.lineBreak(),r=n}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let n,o=-1,s=1;if(this.lineSeparator?(o=e.indexOf(this.lineSeparator,i),s=this.lineSeparator.length):(n=r.exec(e))&&(o=n.index,s=n[0].length),this.append(e.slice(i,o<0?e.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=s-1);i=o+s}}readNode(t){if(t.cmIgnore)return;let e=yr.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(Po(t,i.node,i.offset)?e:0))}}function Po(t,e,i){for(;;){if(!e||i<nr(e))return!1;if(e==t)return!0;i=er(e)+1,e=e.parentNode}}class Zo{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class To{constructor(t,e,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:n,impreciseAnchor:o}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=n||o?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:r,focusNode:n,focusOffset:o}=t.observer.selectionRange;return i&&(e.push(new Zo(i,r)),n==i&&o==r||e.push(new Zo(n,o))),e}(t),i=new $o(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,r=2==t.length?t[1].pos:i;return i>-1&&r>-1?Re.single(i+e,r+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=n&&n.node==e.focusNode&&n.offset==e.focusOffset||!Fi(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),r=o&&o.node==e.anchorNode&&o.offset==e.anchorOffset||!Fi(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),s=t.viewport;if((_r.ios||_r.chrome)&&t.state.selection.main.empty&&i!=r&&(s.from>0||s.to<t.state.doc.length)){let e=Math.min(i,r),n=Math.max(i,r),o=s.from-e,a=s.to-n;0!=o&&1!=o&&0!=e||0!=a&&-1!=a&&n!=t.state.doc.length||(i=0,r=t.state.doc.length)}this.newSel=Re.single(r,i)}}}function Co(t,e){let i,{newSel:r}=e,n=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:r,to:s}=e.bounds,a=n.from,l=null;(8===o||_r.android&&e.text.length<s-r)&&(a=n.to,l="end");let h=function(t,e,i,r){let n=Math.min(t.length,e.length),o=0;for(;o<n&&t.charCodeAt(o)==e.charCodeAt(o);)o++;if(o==n&&t.length==e.length)return null;let s=t.length,a=e.length;for(;s>0&&a>0&&t.charCodeAt(s-1)==e.charCodeAt(a-1);)s--,a--;return"end"==r&&(i-=s+Math.max(0,o-Math.min(s,a))-o),s<o&&t.length<e.length?(o-=i<=o&&i>=s?o-i:0,a=o+(a-s),s=o):a<o&&(o-=i<=o&&i>=a?o-i:0,s=o+(s-a),a=o),{from:o,toA:s,toB:a}}(t.state.doc.sliceString(r,s,ko),e.text,a-r,l);h&&(_r.chrome&&13==o&&h.toB==h.from+2&&e.text.slice(h.from,h.toB)==ko+ko&&h.toB--,i={from:r+h.from,to:r+h.toA,insert:te.of(e.text.slice(h.from,h.toB).split(ko))})}else r&&(!t.hasFocus&&t.state.facet(Un)||r.main.eq(n))&&(r=null);if(!i&&!r)return!1;if(!i&&e.typeOver&&!n.empty&&r&&r.main.empty?i={from:n.from,to:n.to,insert:t.state.doc.slice(n.from,n.to)}:i&&i.from>=n.from&&i.to<=n.to&&(i.from!=n.from||i.to!=n.to)&&n.to-n.from-(i.to-i.from)<=4?i={from:n.from,to:n.to,insert:t.state.doc.slice(n.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,n.to))}:(_r.mac||_r.android)&&i&&i.from==i.to&&i.from==n.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(r&&2==i.insert.length&&(r=Re.single(r.main.anchor-1,r.main.head-1)),i={from:n.from,to:n.to,insert:te.of([" "])}):_r.chrome&&i&&i.from==i.to&&i.from==n.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(r&&(r=Re.single(r.main.anchor-1,r.main.head-1)),i={from:n.from,to:n.to,insert:te.of([" "])}),i)return Ao(t,i,r,o);if(r&&!r.main.eq(n)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:e,userEvent:i}),!0}return!1}function Ao(t,e,i,r=-1){if(_r.ios&&t.inputState.flushIOSKey(e))return!0;let n=t.state.selection.main;if(_r.android&&(e.to==n.to&&(e.from==n.from||e.from==n.from-1&&" "==t.state.sliceDoc(e.from,n.from))&&1==e.insert.length&&2==e.insert.lines&&fr(t.contentDOM,"Enter",13)||(e.from==n.from-1&&e.to==n.to&&0==e.insert.length||8==r&&e.insert.length<e.to-e.from&&e.to>n.head)&&fr(t.contentDOM,"Backspace",8)||e.from==n.from&&e.to==n.to+1&&0==e.insert.length&&fr(t.contentDOM,"Delete",46)))return!0;let o,s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>o||(o=function(t,e,i){let r,n=t.state,o=n.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=o.from<e.from?n.sliceDoc(o.from,e.from):"",s=o.to>e.to?n.sliceDoc(e.to,o.to):"";r=n.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+s))}else{let s=n.changes(e),a=i&&i.main.to<=s.newLength?i.main:void 0;if(n.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let l,h=t.state.sliceDoc(e.from,e.to),c=i&&ho(t,i.main.head);if(c){let t=e.insert.length-(e.to-e.from);l={from:c.from,to:c.to-t}}else l=t.state.doc.lineAt(o.head);let d=o.to-e.to,u=o.to-o.from;r=n.changeByRange((i=>{if(i.from==o.from&&i.to==o.to)return{changes:s,range:a||i.map(s)};let r=i.to-d,c=r-h.length;if(i.to-i.from!=u||t.state.sliceDoc(c,r)!=h||i.to>=l.from&&i.from<=l.to)return{range:i};let f=n.changes({from:c,to:r,insert:e.insert}),p=i.to-o.to;return{changes:f,range:a?Re.range(Math.max(0,a.anchor+p),Math.max(0,a.head+p)):i.map(f)}}))}else r={changes:s,selection:a&&n.selection.replaceRange(a)}}let s="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,s+=".compose",t.inputState.compositionFirstChange&&(s+=".start",t.inputState.compositionFirstChange=!1)),n.update(r,{userEvent:s,scrollIntoView:!0})}(t,e,i));return t.state.facet(qn).some((i=>i(t,e.from,e.to,s,a)))||t.dispatch(a()),!0}class Ro{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,_r.safari&&t.contentDOM.addEventListener("input",(()=>null)),_r.gecko&&function(t){os.has(t)||(os.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(i=yr.get(r))&&i.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=qo(t),i=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let n=!e[t].handlers.length,o=i[t];o&&n!=!o.handlers.length&&(r.removeEventListener(t,this.handleEvent),o=null),o||r.addEventListener(t,this.handleEvent,{passive:n})}for(let t in i)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&Eo.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),_r.android&&_r.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!_r.ios||t.synthetic||t.altKey||t.metaKey||!((e=Xo.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||_o.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,fr(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(_r.safari&&!_r.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Mo(t,e){return(i,r)=>{try{return e.call(t,r,i)}catch(t){Wn(i.state,t)}}}function qo(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let r in t.domEventHandlers){let n=t.domEventHandlers[r];n&&i(r).handlers.push(Mo(e.value,n))}if(t&&t.domEventObservers)for(let r in t.domEventObservers){let n=t.domEventObservers[r];n&&i(r).observers.push(Mo(e.value,n))}}for(let t in Yo)i(t).handlers.push(Yo[t]);for(let t in jo)i(t).observers.push(jo[t]);return e}const Xo=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],_o="dthko",Eo=[16,17,18,20,91,92,224,225];function zo(t){return.7*Math.max(0,t)+8}class Vo{constructor(t,e,i,r){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,i,r=t.ownerDocument;for(let n=t.parentNode;n&&!(n==r.body||e&&i);)if(1==n.nodeType)!i&&n.scrollHeight>n.clientHeight&&(i=n),!e&&n.scrollWidth>n.clientWidth&&(e=n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}return{x:e,y:i}}(t.contentDOM),this.atoms=t.state.facet(to).map((e=>e(t)));let n=t.contentDOM.ownerDocument;n.addEventListener("mousemove",this.move=this.move.bind(this)),n.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(bi.allowMultipleSelections)&&function(t,e){let i=t.state.facet(Tn);return i.length?i[0](e):_r.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let r=Hi(t.root);if(!r||0==r.rangeCount)return!0;let n=r.getRangeAt(0).getClientRects();for(let t=0;t<n.length;t++){let i=n[t];if(i.left<=e.clientX&&i.right>=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=Jo(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&function(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}(this.startEvent,t)<10)return;this.select(this.lastEvent=t);let e=0,i=0,r=0,n=0,o=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:n,bottom:s}=this.scrollParents.y.getBoundingClientRect());let a=no(this.view);t.clientX-a.left<=r+6?e=-zo(r-t.clientX):t.clientX+a.right>=o-6&&(e=zo(t.clientX-o)),t.clientY-a.top<=n+6?i=-zo(n-t.clientY):t.clientY+a.bottom>=s-6&&(i=zo(t.clientY-s)),this.setScrollSpeed(e,i)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let i=0;i<t.ranges.length;i++){let r=t.ranges[i],n=null;if(r.empty){let t=xo(this.atoms,r.from,0);t!=r.from&&(n=Re.cursor(t,-1))}else{let t=xo(this.atoms,r.from,-1),e=xo(this.atoms,r.to,1);t==r.from&&e==r.to||(n=Re.range(r.from==r.anchor?t:e,r.from==r.head?t:e))}n&&(e||(e=t.ranges.slice()),e[i]=n)}return e?Re.create(e,t.mainIndex):t}select(t){let{view:e}=this,i=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&i.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some((t=>t.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const Yo=Object.create(null),jo=Object.create(null),Do=_r.ie&&_r.ie_version<15||_r.ios&&_r.webkit_version<604;function Lo(t,e,i){for(let r of t.facet(e))i=r(i,t);return i}function Wo(t,e){e=Lo(t.state,_n,e);let i,{state:r}=t,n=1,o=r.toText(e),s=o.lines==r.selection.ranges.length;if(null!=es&&r.selection.ranges.every((t=>t.empty))&&es==o.toString()){let t=-1;i=r.changeByRange((i=>{let a=r.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let l=r.toText((s?o.line(n++).text:e)+r.lineBreak);return{changes:{from:a.from,insert:l},range:Re.cursor(i.from+l.length)}}))}else i=s?r.changeByRange((t=>{let e=o.line(n++);return{changes:{from:t.from,to:t.to,insert:e.text},range:Re.cursor(t.from+e.length)}})):r.replaceSelection(o);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function Uo(t,e,i,r){if(1==r)return Re.cursor(e,i);if(2==r)return function(t,e,i=1){let r=t.charCategorizer(e),n=t.doc.lineAt(e),o=e-n.from;if(0==n.length)return Re.cursor(e);0==o?i=1:o==n.length&&(i=-1);let s=o,a=o;i<0?s=fe(n.text,o,!1):a=fe(n.text,o);let l=r(n.text.slice(s,a));for(;s>0;){let t=fe(n.text,s,!1);if(r(n.text.slice(t,s))!=l)break;s=t}for(;a<n.length;){let t=fe(n.text,a);if(r(n.text.slice(a,t))!=l)break;a=t}return Re.range(s+n.from,a+n.from)}(t.state,e,i);{let i=nn.find(t.docView,e),r=t.state.doc.lineAt(i?i.posAtEnd:e),n=i?i.posAtStart:r.from,o=i?i.posAtEnd:r.to;return o<t.state.doc.length&&o==r.to&&o++,Re.range(n,o)}}jo.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Yo.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),jo.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},jo.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Yo.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let r of t.state.facet(An))if(i=r(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=Go(t,e),r=Jo(e),n=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),n=n.map(t.changes))},get(e,o,s){let a,l=Go(t,e),h=Uo(t,l.pos,l.bias,r);if(i.pos!=l.pos&&!o){let e=Uo(t,i.pos,i.bias,r),n=Math.min(e.from,h.from),o=Math.max(e.to,h.to);h=n<h.from?Re.range(n,o):Re.range(o,n)}return o?n.replaceRange(n.main.extend(h.from,h.to)):s&&1==r&&n.ranges.length>1&&(a=function(t,e){for(let i=0;i<t.ranges.length;i++){let{from:r,to:n}=t.ranges[i];if(r<=e&&n>=e)return Re.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(n,l.pos))?a:s?n.addRange(h):Re.create([h])}}}(t,e)),i){let r=!t.hasFocus;t.inputState.startMouseSelection(new Vo(t,e,i,r)),r&&t.observer.ignore((()=>{dr(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let n=t.inputState.mouseSelection;if(n)return n.start(e),!1===n.dragging}return!1};let Bo=(t,e,i)=>e>=i.top&&e<=i.bottom&&t>=i.left&&t<=i.right;function Io(t,e,i,r){let n=nn.find(t.docView,e);if(!n)return 1;let o=e-n.posAtStart;if(0==o)return 1;if(o==n.length)return-1;let s=n.coordsAt(o,-1);if(s&&Bo(i,r,s))return-1;let a=n.coordsAt(o,1);return a&&Bo(i,r,a)?1:s&&s.bottom>=r?-1:1}function Go(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:Io(t,i,e.clientX,e.clientY)}}const No=_r.ie&&_r.ie_version<=11;let Ho=null,Fo=0,Ko=0;function Jo(t){if(!No)return t.detail;let e=Ho,i=Ko;return Ho=t,Ko=Date.now(),Fo=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Fo+1)%3:1}function ts(t,e,i,r){if(!(i=Lo(t.state,_n,i)))return;let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,s=r&&o&&function(t,e){let i=t.state.facet(Cn);return i.length?i[0](e):_r.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:o.from,to:o.to}:null,a={from:n,insert:i},l=t.state.changes(s?[s,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(n,-1),head:l.mapPos(n,1)},userEvent:s?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Yo.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let t=r.posAtStart,e=t+r.length;(t>=i.to||e<=i.from)&&(i=Re.range(t,e))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",Lo(t.state,En,t.state.sliceDoc(i.from,i.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Yo.dragend=t=>(t.inputState.draggedContent=null,!1),Yo.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let r=Array(i.length),n=0,o=()=>{++n==i.length&&ts(t,e,r.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t<i.length;t++){let e=new FileReader;e.onerror=o,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),o()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return ts(t,e,i,!0),!0}return!1},Yo.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=Do?null:e.clipboardData;return i?(Wo(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),Wo(t,i.value)}),50)}(t),!1)};let es=null;Yo.copy=Yo.cut=(t,e)=>{let{text:i,ranges:r,linewise:n}=function(t){let e=[],i=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),i.push(r));if(!e.length){let n=-1;for(let{from:r}of t.selection.ranges){let o=t.doc.lineAt(r);o.number>n&&(e.push(o.text),i.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),n=o.number}r=!0}return{text:Lo(t,En,e.join(t.lineBreak)),ranges:i,linewise:r}}(t.state);if(!i&&!n)return!1;es=n?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=Do?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let r=i.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((()=>{r.remove(),t.focus()}),50)}(t,i),!1)};const is=ni.define();function rs(t,e){let i=[];for(let r of t.facet(Xn)){let n=r(t,e);n&&i.push(n)}return i?t.update({effects:i,annotations:is.of(!0)}):null}function ns(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=rs(t.state,e);i?t.dispatch(i):t.update([])}}),10)}jo.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),ns(t)},jo.blur=t=>{t.observer.clearSelectionRange(),ns(t)},jo.compositionstart=jo.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},jo.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,_r.chrome&&_r.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},jo.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Yo.beforeinput=(t,e)=>{var i,r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let r=null===(i=e.dataTransfer)||void 0===i?void 0:i.getData("text/plain"),n=e.getTargetRanges();if(r&&n.length){let e=n[0],i=t.posAtDOM(e.startContainer,e.startOffset),o=t.posAtDOM(e.endContainer,e.endOffset);return Ao(t,{from:i,to:o,insert:t.state.toText(r)},null),!0}}let n;if(_r.chrome&&_r.android&&(n=Xo.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(n.key,n.keyCode),"Backspace"==n.key||"Delete"==n.key)){let e=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return _r.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),_r.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>jo.compositionend(t,e)),20),!1};const os=new Set,ss=["pre-wrap","normal","pre-line","break-spaces"];let as=!1;function ls(){as=!1}class hs{constructor(t){this.lineWrapping=t,this.doc=te.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return ss.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i<t.length;i++){let r=t[i];r<0?i++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,i,r,n,o){let s=ss.indexOf(t)>-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=e,this.charWidth=i,this.textHeight=r,this.lineLength=n,a){this.heightSamples={};for(let t=0;t<o.length;t++){let e=o[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return a}}class cs{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class ds{constructor(t,e,i,r,n){this.from=t,this.length=e,this.top=i,this.height=r,this._content=n}get type(){return"number"==typeof this._content?Hr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof tn?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new ds(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var us=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(us||(us={}));const fs=.001;class ps{constructor(t,e,i=2){this.length=t,this.height=e,this.flags=i}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>fs&&(as=!0),this.height=t)}replace(t,e,i){return ps.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,r){let n=this,o=i.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:h,toB:c}=r[s],d=n.lineAt(a,us.ByPosNoHeight,i.setDoc(e),0,0),u=d.to>=l?d:n.lineAt(l,us.ByPosNoHeight,i,0,0);for(c+=u.to-l,l=u.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,h=r[s-1].fromB,s--,a<d.from&&(d=n.lineAt(a,us.ByPosNoHeight,i,0,0));h+=d.from-a,a=d.from;let f=ws.build(i.setDoc(o),t,h,c);n=Os(n,n.replace(a,l,f))}return n.updateHeight(i,0)}static empty(){return new ms(0,0)}static of(t){if(1==t.length)return t[0];let e=0,i=t.length,r=0,n=0;for(;;)if(e==i)if(r>2*n){let n=t[e-1];n.break?t.splice(--e,1,n.left,null,n.right):t.splice(--e,1,n.left,n.right),i+=1+n.break,r-=n.size}else{if(!(n>2*r))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,n-=e.size}}else if(r<n){let i=t[e++];i&&(r+=i.size)}else{let e=t[--i];e&&(n+=e.size)}let o=0;return null==t[e-1]?(o=1,e--):null==t[e]&&(o=1,i++),new vs(ps.of(t.slice(0,e)),o,ps.of(t.slice(i)))}}function Os(t,e){return t==e?t:(t.constructor!=e.constructor&&(as=!0),e)}ps.prototype.size=1;class gs extends ps{constructor(t,e,i){super(t,e),this.deco=i}blockAt(t,e,i,r){return new ds(r,this.length,i,this.height,this.deco||0)}lineAt(t,e,i,r,n){return this.blockAt(0,i,r,n)}forEachLine(t,e,i,r,n,o){t<=n+this.length&&e>=n&&o(this.blockAt(0,i,r,n))}updateHeight(t,e=0,i=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class ms extends gs{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,i,r){return new ds(r,this.length,i,this.height,this.breaks)}replace(t,e,i){let r=i[0];return 1==i.length&&(r instanceof ms||r instanceof bs&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof bs?r=new ms(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ps.of(i)}updateHeight(t,e=0,i=!1,r){return r&&r.from<=e&&r.more?this.setHeight(r.heights[r.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class bs extends ps{constructor(t){super(t,0)}heightMetrics(t,e){let i,r=t.doc.lineAt(e).number,n=t.doc.lineAt(e+this.length).number,o=n-r+1,s=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*o);i=e/o,this.length>o+1&&(s=(this.height-e)/(this.length-o-1))}else i=this.height/o;return{firstLine:r,lastLine:n,perLine:i,perChar:s}}blockAt(t,e,i,r){let{firstLine:n,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(e,r);if(e.lineWrapping){let n=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-i)/this.height))*this.length)),o=e.doc.lineAt(n),l=s+o.length*a,h=Math.max(i,t-l/2);return new ds(o.from,o.length,h,l,0)}{let r=Math.max(0,Math.min(o-n,Math.floor((t-i)/s))),{from:a,length:l}=e.doc.line(n+r);return new ds(a,l,i+s*r,s,0)}}lineAt(t,e,i,r,n){if(e==us.ByHeight)return this.blockAt(t,i,r,n);if(e==us.ByPosNoHeight){let{from:e,to:r}=i.doc.lineAt(t);return new ds(e,r-e,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(i,n),l=i.doc.lineAt(t),h=s+l.length*a,c=l.number-o,d=r+s*c+a*(l.from-n-c);return new ds(l.from,l.length,Math.max(r,Math.min(d,r+this.height-h)),h,0)}forEachLine(t,e,i,r,n,o){t=Math.max(t,n),e=Math.min(e,n+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(i,n);for(let h=t,c=r;h<=e;){let e=i.doc.lineAt(h);if(h==t){let i=e.number-s;c+=a*i+l*(t-n-i)}let r=a+l*e.length;o(new ds(e.from,e.length,c,r,0)),c+=r,h=e.to+1}}replace(t,e,i){let r=this.length-e;if(r>0){let t=i[i.length-1];t instanceof bs?i[i.length-1]=new bs(t.length+r):i.push(null,new bs(r-1))}if(t>0){let e=i[0];e instanceof bs?i[0]=new bs(t+e.length):i.unshift(new bs(t-1),null)}return ps.of(i)}decomposeLeft(t,e){e.push(new bs(t-1),null)}decomposeRight(t,e){e.push(null,new bs(this.length-t-1))}updateHeight(t,e=0,i=!1,r){let n=e+this.length;if(r&&r.from<=e+this.length&&r.more){let i=[],o=Math.max(e,r.from),s=-1;for(r.from>e&&i.push(new bs(r.from-e-1).updateHeight(t,e));o<=n&&r.more;){let e=t.doc.lineAt(o).length;i.length&&i.push(null);let n=r.heights[r.index++];-1==s?s=n:Math.abs(n-s)>=fs&&(s=-2);let a=new ms(e,n);a.outdated=!1,i.push(a),o+=e+1}o<=n&&i.push(null,new bs(n-o).updateHeight(t,o));let a=ps.of(i);return(s<0||Math.abs(a.height-this.height)>=fs||Math.abs(s-this.heightMetrics(t,e).perLine)>=fs)&&(as=!0),Os(this,a)}return(i||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class vs extends ps{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,r){let n=i+this.left.height;return t<n?this.left.blockAt(t,e,i,r):this.right.blockAt(t,e,n,r+this.left.length+this.break)}lineAt(t,e,i,r,n){let o=r+this.left.height,s=n+this.left.length+this.break,a=e==us.ByHeight?t<o:t<s,l=a?this.left.lineAt(t,e,i,r,n):this.right.lineAt(t,e,i,o,s);if(this.break||(a?l.to<s:l.from>s))return l;let h=e==us.ByPosNoHeight?us.ByPosNoHeight:us.ByPos;return a?l.join(this.right.lineAt(s,h,i,o,s)):this.left.lineAt(s,h,i,r,n).join(l)}forEachLine(t,e,i,r,n,o){let s=r+this.left.height,a=n+this.left.length+this.break;if(this.break)t<a&&this.left.forEachLine(t,e,i,r,n,o),e>=a&&this.right.forEachLine(t,e,i,s,a,o);else{let l=this.lineAt(a,us.ByPos,i,r,n);t<l.from&&this.left.forEachLine(t,l.from-1,i,r,n,o),l.to>=t&&l.from<=e&&o(l),e>l.to&&this.right.forEachLine(l.to+1,e,i,s,a,o)}}replace(t,e,i){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,i),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,i));let n=[];t>0&&this.decomposeLeft(t,n);let o=n.length;for(let t of i)n.push(t);if(t>0&&ys(n,o-1),e<this.length){let t=n.length;this.decomposeRight(e,n),ys(n,t)}return ps.of(n)}decomposeLeft(t,e){let i=this.left.length;if(t<=i)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(i++,t>=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,r=i+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<i&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?ps.of(this.break?[t,null,e]:[t,e]):(this.left=Os(this.left,t),this.right=Os(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,r){let{left:n,right:o}=this,s=e+n.length+this.break,a=null;return r&&r.from<=e+n.length&&r.more?a=n=n.updateHeight(t,e,i,r):n.updateHeight(t,e,i),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(t,s,i,r):o.updateHeight(t,s,i),a?this.balanced(n,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function ys(t,e){let i,r;null==t[e]&&(i=t[e-1])instanceof bs&&(r=t[e+1])instanceof bs&&t.splice(e-1,3,new bs(i.length+1+r.length))}class ws{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof ms?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new ms(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t<e||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,n=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=e-t;i.block?this.addBlock(new gs(o,r,i)):(o||n||r>=5)&&this.addLineDeco(r,n,o)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new ms(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new bs(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof ms)return t;let e=new ms(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof ms||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new ms(0,-1));let i=t;for(let t of this.nodes)t instanceof ms&&t.updateHeight(this.oracle,i),i+=t?t.length:1;return this.nodes}static build(t,e,i,r){let n=new ws(i,t);return Qi.spans(e,i,r,n,0),n.finish(i)}}class Ss{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,i,r){(t<e||i&&i.heightRelevant||r&&r.heightRelevant)&&rn(t,e,this.changes,5)}}function xs(t,e){let i=t.getBoundingClientRect(),r=t.ownerDocument,n=r.defaultView||window,o=Math.max(0,i.left),s=Math.min(n.innerWidth,i.right),a=Math.max(0,i.top),l=Math.min(n.innerHeight,i.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let i=e,r=window.getComputedStyle(i);if((i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=r.overflow){let r=i.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=Math.min(e==t.parentNode?n.innerHeight:l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?i.offsetParent:i.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:o-i.left,right:Math.max(o,s)-i.left,top:a-(i.top+e),bottom:Math.max(a,l)-(i.top+e)}}function Qs(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class ks{constructor(t,e,i,r){this.from=t,this.to=e,this.size=i,this.displaySize=r}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++){let r=t[i],n=e[i];if(r.from!=n.from||r.to!=n.to||r.size!=n.size)return!1}return!0}draw(t,e){return Fr.replace({widget:new $s(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class $s extends Nr{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class Ps{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=As,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=cn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(Fn).some((t=>"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new hs(e),this.stateDeco=t.facet(Kn).filter((t=>"function"!=typeof t)),this.heightMap=ps.empty().applyChanges(this.stateDeco,te.empty,this.heightOracle.setDoc(t.doc),[new so(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Fr.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let r=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>r>=t&&r<=e))){let{from:e,to:i}=this.lineBlockAt(r);t.push(new Zs(e,i))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?As:new Rs(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(Ms(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Kn).filter((t=>"function"!=typeof t));let r=t.changedRanges,n=so.extendWithRanges(r,function(t,e,i){let r=new Ss;return Qi.compare(t,e,i,r,0),r.changes}(i,this.stateDeco,t?t.changes:Qe.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);ls(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),n),(this.heightMap.height!=o||as)&&(t.flags|=2),s?(this.scrollAnchorPos=t.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=n.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<a.from||e.range.head>a.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let l=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,t.flags|=this.updateForViewport(),(l||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Vn)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),r=this.heightOracle,n=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?cn.RTL:cn.LTR;let o=this.heightOracle.mustRefreshForWrapping(n),s=e.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,h=0;if(s.width&&s.height){let{scaleX:t,scaleY:i}=ar(e,s);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,l|=8,o=a=!0)}let c=(parseInt(i.paddingTop)||0)*this.scaleY,d=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==c&&this.paddingBottom==d||(this.paddingTop=c,this.paddingBottom=d,l|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,l|=8);let u=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=u&&(this.scrollAnchorHeight=-1,this.scrollTop=u),this.scrolledToBottom=Or(t.scrollDOM);let f=(this.printing?Qs:xs)(e,this.paddingTop),p=f.top-this.pixelViewport.top,O=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let m=s.width;if(this.contentDOMWidth==m&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=t.scrollDOM.clientHeight,l|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(e)&&(o=!0),o||r.lineWrapping&&Math.abs(m-this.contentDOMWidth)>r.charWidth){let{lineHeight:i,charWidth:s,textHeight:a}=t.docView.measureTextSize();o=i>0&&r.refresh(n,i,s,a,m/s,e),o&&(t.docView.minWidth=0,l|=8)}p>0&&O>0?h=Math.max(p,O):p<0&&O<0&&(h=Math.min(p,O)),ls();for(let i of this.viewports){let n=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(o?ps.empty().applyChanges(this.stateDeco,te.empty,this.heightOracle,[new so(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new cs(i.from,n))}as&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return b&&(2&l&&(l|=this.updateScaler()),this.viewport=this.getViewport(h,this.scrollTarget),l|=this.updateForViewport()),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,t)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,n=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new Zs(r.lineAt(o-1e3*i,us.ByHeight,n,0,0).from,r.lineAt(s+1e3*(1-i),us.ByHeight,n,0,0).to);if(e){let{head:t}=e.range;if(t<a.from||t>a.to){let i,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(t,us.ByPos,n,0,0);i="center"==e.y?(s.top+s.bottom)/2-o/2:"start"==e.y||"nearest"==e.y&&t<a.from?s.top:s.bottom-o,a=new Zs(r.lineAt(i-500,us.ByHeight,n,0,0).from,r.lineAt(i+o+500,us.ByHeight,n,0,0).to)}}return a}mapViewport(t,e){let i=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new Zs(this.heightMap.lineAt(i,us.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,us.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,us.ByPos,this.heightOracle,0,0),{bottom:n}=this.heightMap.lineAt(e,us.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:s}=this;return(0==t||r<=o-Math.max(10,Math.min(-i,250)))&&(e==this.state.doc.length||n>=s+Math.max(10,Math.min(i,250)))&&r>o-2e3&&n<s+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let i=[];for(let r of t)e.touchesRange(r.from,r.to)||i.push(new ks(e.mapPos(r.from),e.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(t,e){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,n=r>>1,o=r<<1;if(this.defaultTextDirection!=cn.LTR&&!i)return[];let s=[],a=(r,o,l,h)=>{if(o-r<n)return;let c=this.state.selection.main,d=[c.from];c.empty||d.push(c.to);for(let t of d)if(t>r&&t<o)return a(r,t-10,l,h),void a(t+10,o,l,h);let u=function(t,e){for(let i of t)if(e(i))return i}(t,(t=>t.from>=l.from&&t.to<=l.to&&Math.abs(t.from-r)<n&&Math.abs(t.to-o)<n&&!d.some((e=>t.from<e&&t.to>e))));if(!u){if(o<l.to&&e&&i&&e.visibleRanges.some((t=>t.from<=o&&t.to>=o))){let t=e.moveToLineBoundary(Re.cursor(o),!1,!0).head;t>r&&(o=t)}let t=this.gapSize(l,r,o,h);u=new ks(r,o,t,i||t<2e6?t:2e6)}s.push(u)},l=e=>{if(e.length<o||e.type!=Hr.Text)return;let n=function(t,e,i){let r=[],n=t,o=0;return Qi.spans(i,t,e,{span(){},point(t,e){t>n&&(r.push({from:n,to:t}),o+=t-n),n=e}},20),n<e&&(r.push({from:n,to:e}),o+=e-n),{total:o,ranges:r}}(e.from,e.to,this.stateDeco);if(n.total<o)return;let s,l,h=this.scrollTarget?this.scrollTarget.range.head:null;if(i){let t,i,o=r/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=h){let r=Cs(n,h),s=((this.visibleBottom-this.visibleTop)/2+o)/e.height;t=r-s,i=r+s}else t=(this.visibleTop-e.top-o)/e.height,i=(this.visibleBottom-e.top+o)/e.height;s=Ts(n,t),l=Ts(n,i)}else{let i=n.total*this.heightOracle.charWidth,o=r*this.heightOracle.charWidth,a=0;if(i>2e6)for(let i of t)i.from>=e.from&&i.from<e.to&&i.size!=i.displaySize&&i.from*this.heightOracle.charWidth+a<this.pixelViewport.left&&(a=i.size-i.displaySize);let c,d,u=this.pixelViewport.left+a,f=this.pixelViewport.right+a;if(null!=h){let t=Cs(n,h),e=((f-u)/2+o)/i;c=t-e,d=t+e}else c=(u-o)/i,d=(f+o)/i;s=Ts(n,c),l=Ts(n,d)}s>e.from&&a(e.from,s,e,n),l<e.to&&a(l,e.to,e,n)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(l):l(t);return s}gapSize(t,e,i,r){let n=Cs(r,i)-Cs(r,e);return this.heightOracle.lineWrapping?t.height*n:r.total*this.heightOracle.charWidth*n}updateLineGaps(t){ks.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=Fr.set(t.map((t=>t.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];Qi.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||Ms(this.heightMap.lineAt(t,us.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||Ms(this.heightMap.lineAt(this.scaler.fromDOM(t),us.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return Ms(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Zs{constructor(t,e){this.from=t,this.to=e}}function Ts({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let r=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:n}=e[t],o=n-i;if(r<=o)return i+r;r-=o}}function Cs(t,e){let i=0;for(let{from:r,to:n}of t.ranges){if(e<=n){i+=e-r;break}i+=n-r}return i/t.total}const As={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class Rs{constructor(t,e,i){let r=0,n=0,o=0;this.viewports=i.map((({from:i,to:n})=>{let o=e.lineAt(i,us.ByPos,t,0,0).top,s=e.lineAt(n,us.ByPos,t,0,0).bottom;return r+=s-o,{from:i,to:n,top:o,bottom:s,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=o+(t.top-n)*this.scale,o=t.domBottom=t.domTop+(t.bottom-t.top),n=t.bottom}toDOM(t){for(let e=0,i=0,r=0;;e++){let n=e<this.viewports.length?this.viewports[e]:null;if(!n||t<n.top)return r+(t-i)*this.scale;if(t<=n.bottom)return n.domTop+(t-n.top);i=n.bottom,r=n.domBottom}}fromDOM(t){for(let e=0,i=0,r=0;;e++){let n=e<this.viewports.length?this.viewports[e]:null;if(!n||t<n.domTop)return i+(t-r)/this.scale;if(t<=n.domBottom)return n.top+(t-n.domTop);i=n.bottom,r=n.domBottom}}eq(t){return t instanceof Rs&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every(((e,i)=>e.from==t.viewports[i].from&&e.to==t.viewports[i].to))}}function Ms(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),r=e.toDOM(t.bottom);return new ds(t.from,t.length,i,r-i,Array.isArray(t._content)?t._content.map((t=>Ms(t,e))):t._content)}const qs=Xe.define({combine:t=>t.join(" ")}),Xs=Xe.define({combine:t=>t.indexOf(!0)>-1}),_s=ji.newName(),Es=ji.newName(),zs=ji.newName(),Vs={"&light":"."+Es,"&dark":"."+zs};function Ys(t,e,i){return new ji(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const js=Ys("."+_s,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Vs),Ds={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Ls=_r.ie&&_r.ie_version<=11;class Ws{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new lr,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(_r.ie&&_r.ie_version<=11||_r.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||_r.chrome&&_r.chrome_version<126||(this.editContext=new Is(t),t.state.facet(Un)&&(t.contentDOM.editContext=this.editContext.editContext)),Ls&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Un)?i.root.activeElement!=this.dom:!Ki(this.dom,r))return;let n=r.anchorNode&&i.docView.nearest(r.anchorNode);n&&n.ignoreEvent(t)?e||(this.selectionChanged=!1):(_r.ie&&_r.ie_version<=11||_r.android&&_r.chrome)&&!i.state.selection.main.empty&&r.focusNode&&tr(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=Hi(t.root);if(!e)return!1;let i=_r.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Bs(t,i)}let i=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),i?Bs(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let r=Ki(this.dom,i);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let i=e.focusNode,r=e.focusOffset;if(!i||e.anchorNode!=i||e.anchorOffset!=r)return!1;for(r=Math.min(r,nr(i));;)if(r){if(1!=i.nodeType)return!1;let t=i.childNodes[r-1];"false"==t.contentEditable?r--:(i=t,r=nr(i))}else{if(i==t)return!0;r=er(i),i=i.parentNode}}(this.dom,i)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;)if(1==i.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==i?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Ds),Ls&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Ls&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var i;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&fr(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(i=this.delayedAndroidKey)||void 0===i?void 0:i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,r=!1;for(let n of t){let t=this.readMutation(n);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:r}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),r=this.selectionChanged&&Ki(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let n=new To(this.view,t,e,i);return this.view.docView.domChanged={newSel:n.newSel?n.newSel.main:null},n}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,r=Co(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let i=Us(e,t.previousSibling||t.target.previousSibling,-1),r=Us(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(Un)!=t.state.facet(Un)&&(t.view.contentDOM.editContext=t.state.facet(Un)?this.editContext.editContext:null))}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Us(t,e,i){for(;e;){let r=yr.get(e);if(r&&r.parent==t)return r;let n=e.parentNode;e=n!=t.dom?n:i>0?e.nextSibling:e.previousSibling}return null}function Bs(t,e){let i=e.startContainer,r=e.startOffset,n=e.endContainer,o=e.endOffset,s=t.docView.domAtPos(t.state.selection.main.anchor);return tr(s.node,s.offset,n,o)&&([i,r,n,o]=[n,o,i,r]),{anchorNode:i,anchorOffset:r,focusNode:n,focusOffset:o}}class Is{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let{anchor:i}=t.state.selection.main,r={from:this.toEditorPos(e.updateRangeStart),to:this.toEditorPos(e.updateRangeEnd),insert:te.of(e.text.split("\n"))};r.from==this.from&&i<this.from?r.from=i:r.to==this.to&&i>this.to&&(r.to=i),(r.from!=r.to||r.insert.length)&&(this.pendingContextChange=r,t.state.readOnly||Ao(t,r,Re.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd))),this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)))},this.handlers.characterboundsupdate=i=>{let r=[],n=null;for(let e=this.toEditorPos(i.rangeStart),o=this.toEditorPos(i.rangeEnd);e<o;e++){let i=t.coordsForChar(e);n=i&&new DOMRect(i.left,i.top,i.right-i.left,i.bottom-i.top)||n||new DOMRect,r.push(n)}e.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=e=>{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,r=t.underlineThickness;if("None"!=e&&"None"!=r){let n=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==r?1:2}px`;i.push(Fr.mark({attributes:{style:n}}).range(this.toEditorPos(t.rangeStart),this.toEditorPos(t.rangeEnd)))}}t.dispatch({effects:Ln.of(Fr.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{t.inputState.composing=-1,t.inputState.compositionFirstChange=null};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=Hi(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,r=this.pendingContextChange;return t.changes.iterChanges(((n,o,s,a,l)=>{if(i)return;let h=l.length-(o-n);if(r&&o>=r.to){if(r.from==n&&r.to==o&&r.insert.eq(l))return r=this.pendingContextChange=null,e+=h,void(this.to+=h);r=null,this.revertPending(t.state)}if(n+=e,(o+=e)<=this.from)this.from+=h,this.to+=h;else if(n<this.to){if(n<this.from||o>this.to||this.to-this.from+l.length>3e4)return void(i=!0);this.editContext.updateText(this.toContextPos(n),this.toContextPos(o),l.toString()),this.to+=h}e+=h})),r&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange;this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.resetRange(t.state),this.editContext.updateText(0,this.editContext.text.length,t.state.doc.sliceString(this.from,this.to)),this.setSelection(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),r=this.toContextPos(e.head);this.editContext.selectionStart==i&&this.editContext.selectionEnd==r||this.editContext.updateSelection(i,r)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t){return t+this.from}toContextPos(t){return t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class Gs{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(t=>t.forEach((t=>i(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Ps(t.state||bi.create(t)),t.scrollTo&&t.scrollTo.is(Dn)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(In).map((t=>new Nn(t)));for(let t of this.plugins)t.update(this);this.observer=new Ws(this),this.inputState=new Ro(this),this.inputState.ensureHandlers(this.plugins),this.docView=new lo(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof li?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,r=!1,n=this.state;for(let e of t){if(e.startState!=n)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");n=e.state}if(this.destroyed)return void(this.viewState.state=n);let o=this.hasFocus,s=0,a=null;t.some((t=>t.annotation(is)))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=rs(n,o),a||(s=1));let l=this.observer.delayedAndroidKey,h=null;if(l?(this.observer.clearDelayedAndroidKey(),h=this.observer.readChange(),(h&&!this.state.doc.eq(n.doc)||!this.state.selection.eq(n.selection))&&(h=null)):this.observer.clear(),n.facet(bi.phrases)!=this.state.facet(bi.phrases))return this.setState(n);e=ao.create(this,n,t),e.flags|=s;let c=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(c&&(c=c.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;c=new jn(t.empty?t:Re.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Dn)&&(c=t.value.clip(this.state))}this.viewState.update(e,c),this.bidiCache=Fs.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(oo)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(qs)!=e.state.facet(qs)&&(this.viewState.mustMeasureContent=!0),(i||r||c||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(Mn))try{t(e)}catch(t){Wn(this.state,t,"update listener")}(a||h)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),h&&!Co(this,h)&&l.force&&fr(this.contentDOM,l.key,l.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Ps(t),this.plugins=t.facet(In).map((t=>new Nn(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new lo(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(In),i=t.state.facet(In);if(e!=i){let r=[];for(let n of i){let i=e.indexOf(n);if(i<0)r.push(new Nn(n));else{let e=this.plugins[i];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){Wn(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:n,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(o<0)if(Or(i))n=-1,o=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);n=t.from,o=t.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((t=>{try{return t.read(this)}catch(t){return Wn(this.state,t),Hs}})),h=ao.create(this,this.state,[]),c=!1;h.flags|=s,e?e.flags|=s:e=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),c=this.docView.update(h),c&&this.docViewUpdate());for(let t=0;t<a.length;t++)if(l[t]!=Hs)try{let e=a[t];e.write&&e.write(l[t],this)}catch(t){Wn(this.state,t)}if(c&&this.docView.updateSelection(!0),!h.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}{let t=(n<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(n).top)-o;if(t>1||t<-1){r+=t,i.scrollTop=r/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(Mn))t(e)}get themeClasses(){return _s+" "+(this.state.facet(Xs)?zs:Es)+" "+this.state.facet(qs)}updateAttrs(){let t=Ks(this,Hn,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Un)?"true":"false",class:"cm-content",style:`${_r.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),Ks(this,Fn,e);let i=this.observer.ignore((()=>{let i=Ir(this.contentDOM,this.contentAttrs,e),r=Ir(this.dom,this.editorAttrs,t);return i||r}));return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)t.is(Gs.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(oo);let t=this.state.facet(Gs.cspNonce);ji.mount(this.root,this.styleModules.concat(js).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.spec!=t)&&this.pluginMap.set(t,e=this.plugins.find((e=>e.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return Qo(this,t,So(this,t,e,i))}moveByGroup(t,e){return Qo(this,t,So(this,t,e,(e=>function(t,e,i){let r=t.state.charCategorizer(e),n=r(i);return t=>{let e=r(t);return n==Oi.Space&&(n=e),n==e}}(this,t.head,e))))}visualLineSide(t,e){let i=this.bidiSpans(t),r=this.textDirectionAt(t.from),n=i[e?i.length-1:0];return Re.cursor(n.side(e,r)+t.from,n.forward(!e,r)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,r){let n=wo(t,e.head),o=r&&n.type==Hr.Text&&(t.lineWrapping||n.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>n.from?e.head-1:e.head):null;if(o){let e=t.dom.getBoundingClientRect(),r=t.textDirectionAt(n.from),s=t.posAtCoords({x:i==(r==cn.LTR)?e.right-1:e.left+1,y:(o.top+o.bottom)/2});if(null!=s)return Re.cursor(s,i?-1:1)}return Re.cursor(i?n.to:n.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return Qo(this,t,function(t,e,i,r){let n=e.head,o=i?1:-1;if(n==(i?t.state.doc.length:0))return Re.cursor(n,e.assoc);let s,a=e.goalColumn,l=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(n,e.assoc||-1),c=t.documentTop;if(h)null==a&&(a=h.left-l.left),s=o<0?h.top:h.bottom;else{let e=t.viewState.lineBlockAt(n);null==a&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(n-e.from))),s=(o<0?e.top:e.bottom)+c}let d=l.left+a,u=null!=r?r:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let i=s+(u+e)*o,r=vo(t,{x:d,y:i},!1,o);if(i<l.top||i>l.bottom||(o<0?r<n:r>n)){let e=t.docView.coordsForChar(r),n=!e||i<e.top?-1:1;return Re.cursor(r,n,void 0,a)}}}(this,t,e,i))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),vo(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(t),n=this.bidiSpans(r);return or(i,n[yn.find(n,t-r.from,-1,e)].dir==cn.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(zn)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Ns)return kn(t.length);let e,i=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==i&&(r.fresh||wn(r.isolates,e=io(this,t))))return r.order;e||(e=io(this,t));let r=function(t,e,i){if(!t)return[new yn(0,0,e==un?1:0)];if(e==dn&&!i.length&&!vn.test(t))return kn(t.length);if(i.length)for(;t.length>Sn.length;)Sn[Sn.length]=256;let r=[],n=e==dn?0:1;return Qn(t,n,n,i,0,t.length,r),r}(t.text,i,e);return this.bidiCache.push(new Fs(t.from,t.to,i,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||_r.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{dr(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Dn.of(new jn("number"==typeof t?Re.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return Dn.of(new jn(Re.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return Gn.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return Gn.define((()=>({})),{eventObservers:t})}static theme(t,e){let i=ji.newName(),r=[qs.of(i),oo.of(Ys(`.${i}`,t))];return e&&e.dark&&r.push(Xs.of(!0)),r}static baseTheme(t){return We.lowest(oo.of(Ys("."+_s,t,Vs)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),r=i&&yr.get(i)||yr.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}Gs.styleModule=oo,Gs.inputHandler=qn,Gs.clipboardInputFilter=_n,Gs.clipboardOutputFilter=En,Gs.scrollHandler=Yn,Gs.focusChangeEffect=Xn,Gs.perLineTextDirection=zn,Gs.exceptionSink=Rn,Gs.updateListener=Mn,Gs.editable=Un,Gs.mouseSelectionStyle=An,Gs.dragMovesSelection=Cn,Gs.clickAddsSelectionRange=Tn,Gs.decorations=Kn,Gs.outerDecorations=Jn,Gs.atomicRanges=to,Gs.bidiIsolatedRanges=eo,Gs.scrollMargins=ro,Gs.darkTheme=Xs,Gs.cspNonce=Xe.define({combine:t=>t.length?t[0]:""}),Gs.contentAttributes=Fn,Gs.editorAttributes=Hn,Gs.lineWrapping=Gs.contentAttributes.of({class:"cm-lineWrapping"}),Gs.announce=ai.define();const Ns=4096,Hs={};class Fs{constructor(t,e,i,r,n,o){this.from=t,this.to=e,this.dir=i,this.isolates=r,this.fresh=n,this.order=o}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let i=[],r=t.length?t[t.length-1].dir:cn.LTR;for(let n=Math.max(0,t.length-10);n<t.length;n++){let o=t[n];o.dir!=r||e.touchesRange(o.from,o.to)||i.push(new Fs(e.mapPos(o.from,1),e.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return i}}function Ks(t,e,i){for(let r=t.state.facet(e),n=r.length-1;n>=0;n--){let e=r[n],o="function"==typeof e?e(t):e;o&&Wr(o,i)}return i}const Js=_r.mac?"mac":_r.windows?"win":_r.linux?"linux":"key";function ta(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const ea=We.default(Gs.domEventHandlers({keydown:(t,e)=>la(na(e.state),t,e,"editor")})),ia=Xe.define({enables:ea}),ra=new WeakMap;function na(t){let e=t.facet(ia),i=ra.get(e);return i||ra.set(e,i=function(t,e=Js){let i=Object.create(null),r=Object.create(null),n=(t,e)=>{let i=r[t];if(null==i)r[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},o=(t,r,o,s,a)=>{var l,h;let c=i[t]||(i[t]=Object.create(null)),d=r.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let r,n,o,s,a=i[i.length-1];"Space"==a&&(a=" ");for(let t=0;t<i.length-1;++t){const a=i[t];if(/^(cmd|meta|m)$/i.test(a))s=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))n=!0;else if(/^s(hift)?$/i.test(a))o=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==e?s=!0:n=!0}}return r&&(a="Alt-"+a),n&&(a="Ctrl-"+a),s&&(a="Meta-"+a),o&&(a="Shift-"+a),a}(t,e)));for(let e=1;e<d.length;e++){let i=d.slice(0,e).join(" ");n(i,!0),c[i]||(c[i]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=oa={view:e,prefix:i,scope:t};return setTimeout((()=>{oa==r&&(oa=null)}),sa),!0}]})}let u=d.join(" ");n(u,!1);let f=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(l=c._any)||void 0===l?void 0:l.run)||void 0===h?void 0:h.slice())||[]});o&&f.run.push(o),s&&(f.preventDefault=!0),a&&(f.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:n}=r;for(let e in t)t[e].run.push((t=>n(t,aa)))}let n=r[e]||r.key;if(n)for(let e of t)o(e,n,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(e,"Shift-"+n,r.shift,r.preventDefault,r.stopPropagation)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}let oa=null;const sa=4e3;let aa=null;function la(t,e,i,r){aa=e;let n=function(t){var e=!(Bi&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||Ii&&t.shiftKey&&t.key&&1==t.key.length||"Unidentified"==t.key)&&t.key||(t.shiftKey?Ui:Wi)[t.keyCode]||t.key||"Unidentified";return"Esc"==e&&(e="Escape"),"Del"==e&&(e="Delete"),"Left"==e&&(e="ArrowLeft"),"Up"==e&&(e="ArrowUp"),"Right"==e&&(e="ArrowRight"),"Down"==e&&(e="ArrowDown"),e}(e),o=ye(be(n,0))==n.length&&" "!=n,s="",a=!1,l=!1,h=!1;oa&&oa.view==i&&oa.scope==r&&(s=oa.prefix+" ",Eo.indexOf(e.keyCode)<0&&(l=!0,oa=null));let c,d,u=new Set,f=t=>{if(t){for(let e of t.run)if(!u.has(e)&&(u.add(e),e(i)))return t.stopPropagation&&(h=!0),!0;t.preventDefault&&(t.stopPropagation&&(h=!0),l=!0)}return!1},p=t[r];return p&&(f(p[s+ta(n,e,!o)])?a=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(_r.windows&&e.ctrlKey&&e.altKey)&&(c=Wi[e.keyCode])&&c!=n?(f(p[s+ta(c,e,!0)])||e.shiftKey&&(d=Ui[e.keyCode])!=n&&d!=c&&f(p[s+ta(d,e,!1)]))&&(a=!0):o&&e.shiftKey&&f(p[s+ta(n,e,!0)])&&(a=!0),!a&&f(p._any)&&(a=!0)),l&&(a=!0),a&&h&&e.stopPropagation(),aa=null,a}class ha{constructor(t,e,i,r,n){this.className=t,this.left=e,this.top=i,this.width=r,this.height=n}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let r=t.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let n=ca(t);return[new ha(e,r.left-n.left,r.top-n.top,null,r.bottom-r.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let r=Math.max(i.from,t.viewport.from),n=Math.min(i.to,t.viewport.to),o=t.textDirection==cn.LTR,s=t.contentDOM,a=s.getBoundingClientRect(),l=ca(t),h=s.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),d=a.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=a.right-(c?parseInt(c.paddingRight):0),f=wo(t,r),p=wo(t,n),O=f.type==Hr.Text?f:null,g=p.type==Hr.Text?p:null;if(O&&(t.lineWrapping||f.widgetLineBreaks)&&(O=da(t,r,1,O)),g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=da(t,n,-1,g)),O&&g&&O.from==g.from&&O.to==g.to)return b(v(i.from,i.to,O));{let e=O?v(i.from,null,O):y(f,!1),r=g?v(null,i.to,g):y(p,!0),n=[];return(O||f).to<(g||p).from-(O&&g?1:0)||f.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?n.push(m(d,e.bottom,u,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==Hr.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),b(e).concat(n).concat(b(r))}function m(t,i,r,n){return new ha(e,t-l.left,i-l.top-.01,r-t,n-i+.01)}function b({top:t,bottom:e,horizontal:i}){let r=[];for(let n=0;n<i.length;n+=2)r.push(m(i[n],t,i[n+1],e));return r}function v(e,i,r){let n=1e9,s=-1e9,a=[];function l(e,i,l,h,c){let f=t.coordsAtPos(e,e==r.to?-2:2),p=t.coordsAtPos(l,l==r.from?2:-2);f&&p&&(n=Math.min(f.top,p.top,n),s=Math.max(f.bottom,p.bottom,s),c==cn.LTR?a.push(o&&i?d:f.left,o&&h?u:p.right):a.push(!o&&h?d:p.left,!o&&i?u:f.right))}let h=null!=e?e:r.from,c=null!=i?i:r.to;for(let r of t.visibleRanges)if(r.to>h&&r.from<c)for(let n=Math.max(r.from,h),o=Math.min(r.to,c);;){let r=t.state.doc.lineAt(n);for(let s of t.bidiSpans(r)){let t=s.from+r.from,a=s.to+r.from;if(t>=o)break;a>n&&l(Math.max(t,n),null==e&&t<=h,Math.min(a,o),null==i&&a>=c,s.dir)}if(n=r.to+1,n>=o)break}return 0==a.length&&l(h,null==e,c,null==i,t.textDirection),{top:n,bottom:s,horizontal:a}}function y(t,e){let i=a.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function ca(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==cn.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function da(t,e,i,r){let n=t.coordsAtPos(e,2*i);if(!n)return r;let o=t.dom.getBoundingClientRect(),s=(n.top+n.bottom)/2,a=t.posAtCoords({x:o.left+1,y:s}),l=t.posAtCoords({x:o.right-1,y:s});return null==a||null==l?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}class ua{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(fa)!=t.state.facet(fa)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(fa);for(;e<i.length&&i[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>!function(t,e){return t.constructor==e.constructor&&t.eq(e)}(t,this.drawn[e])))){let e=this.dom.firstChild,i=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[i].constructor&&r.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const fa=Xe.define();function pa(t){return[Gn.define((e=>new ua(e,t))),fa.of(t)]}const Oa=!_r.ios,ga=Xe.define({combine:t=>vi(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function ma(t={}){return[ga.of(t),va,wa,xa,Vn.of(!0)]}function ba(t){return t.startState.facet(ga)!=t.state.facet(ga)}const va=pa({above:!0,markers(t){let{state:e}=t,i=e.facet(ga),r=[];for(let n of e.selection.ranges){let o=n==e.selection.main;if(n.empty?!o||Oa:i.drawRangeCursor){let e=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=n.empty?n:Re.cursor(n.head,n.head>n.anchor?-1:1);for(let n of ha.forRange(t,e,i))r.push(n)}}return r},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=ba(t);return i&&ya(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){ya(e.state,t)},class:"cm-cursorLayer"});function ya(t,e){e.style.animationDuration=t.facet(ga).cursorBlinkRate+"ms"}const wa=pa({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:ha.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||ba(t),class:"cm-selectionLayer"}),Sa={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Oa&&(Sa[".cm-line"].caretColor=Sa[".cm-content"].caretColor="transparent !important");const xa=We.highest(Gs.theme(Sa)),Qa=ai.define({map:(t,e)=>null==t?null:e.mapPos(t)}),ka=De.define({create:()=>null,update:(t,e)=>(null!=t&&(t=e.changes.mapPos(t)),e.effects.reduce(((t,e)=>e.is(Qa)?e.value:t),t))}),$a=Gn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(ka);null==i?null!=this.cursor&&(null===(e=this.cursor)||void 0===e||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(ka)!=i||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(ka),i=null!=e&&t.coordsAtPos(e);if(!i)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:i.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:i.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:i.bottom-i.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:i}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/i+"px",this.cursor.style.height=t.height/i+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(ka)!=t&&this.view.dispatch({effects:Qa.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){t.target!=this.view.contentDOM&&this.view.contentDOM.contains(t.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function Pa(t,e,i,r,n){e.lastIndex=0;for(let o,s=t.iterRange(i,r),a=i;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=e.exec(s.value);)n(a+o.index,o)}class Za{constructor(t){const{regexp:e,decoration:i,decorate:r,boundary:n,maxLength:o=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=e,r)this.addMatch=(t,e,i,n)=>r(n,i,i+t[0].length,t,e);else if("function"==typeof i)this.addMatch=(t,e,r,n)=>{let o=i(t,e,r);o&&n(r,r+t[0].length,o)};else{if(!i)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(t,e,r,n)=>n(r,r+t[0].length,i)}this.boundary=n,this.maxLength=o}createDeco(t){let e=new ki,i=e.add.bind(e);for(let{from:e,to:r}of function(t,e){let i=t.visibleRanges;if(1==i.length&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let r=[];for(let{from:n,to:o}of i)n=Math.max(t.state.doc.lineAt(n).from,n-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=n?r[r.length-1].to=o:r.push({from:n,to:o});return r}(t,this.maxLength))Pa(t.state.doc,this.regexp,e,r,((e,r)=>this.addMatch(r,t,e,i)));return e.finish()}updateDeco(t,e){let i=1e9,r=-1;return t.docChanged&&t.changes.iterChanges(((e,n,o,s)=>{s>t.view.viewport.from&&o<t.view.viewport.to&&(i=Math.min(o,i),r=Math.max(s,r))})),t.viewportChanged||r-i>1e3?this.createDeco(t.view):r>-1?this.updateRange(t.view,e.map(t.changes),i,r):e}updateRange(t,e,i,r){for(let n of t.visibleRanges){let o=Math.max(n.from,i),s=Math.min(n.to,r);if(s>o){let i=t.state.doc.lineAt(o),r=i.to<s?t.state.doc.lineAt(s):i,a=Math.max(n.from,i.from),l=Math.min(n.to,r.to);if(this.boundary){for(;o>i.from;o--)if(this.boundary.test(i.text[o-1-i.from])){a=o;break}for(;s<r.to;s++)if(this.boundary.test(r.text[s-r.from])){l=s;break}}let h,c=[],d=(t,e,i)=>c.push(i.range(t,e));if(i==r)for(this.regexp.lastIndex=a-i.from;(h=this.regexp.exec(i.text))&&h.index<l-i.from;)this.addMatch(h,t,h.index+i.from,d);else Pa(t.state.doc,this.regexp,a,l,((e,i)=>this.addMatch(i,t,e,d)));e=e.update({filterFrom:a,filterTo:l,filter:(t,e)=>t<a||e>l,add:c})}}return e}}const Ta=null!=/x/.unicode?"gu":"g",Ca=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",Ta),Aa={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Ra=null;const Ma=Xe.define({combine(t){let e=vi(t,{render:null,specialChars:Ca,addSpecialChars:null});return(e.replaceTabs=!function(){var t;if(null==Ra&&"undefined"!=typeof document&&document.body){let e=document.body.style;Ra=null!=(null!==(t=e.tabSize)&&void 0!==t?t:e.MozTabSize)}return Ra||!1}())&&(e.specialChars=new RegExp("\t|"+e.specialChars.source,Ta)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,Ta)),e}});function qa(t={}){return[Ma.of(t),Xa||(Xa=Gn.fromClass(class{constructor(t){this.view=t,this.decorations=Fr.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(Ma)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new Za({regexp:t.specialChars,decoration:(e,i,r)=>{let{doc:n}=i.state,o=be(e[0],0);if(9==o){let t=n.lineAt(r),e=i.state.tabSize,o=_i(t.text,e,r-t.from);return Fr.replace({widget:new Ea((e-o%e)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=Fr.replace({widget:new _a(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(Ma);t.startState.facet(Ma)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))]}let Xa=null;class _a extends Nr{constructor(t,e){super(),this.options=t,this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=function(t){return t>=32?"•":10==t?"":String.fromCharCode(9216+t)}(this.code),i=t.state.phrase("Control character")+" "+(Aa[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,e);if(r)return r;let n=document.createElement("span");return n.textContent=e,n.title=i,n.setAttribute("aria-label",i),n.className="cm-specialChar",n}ignoreEvent(){return!1}}class Ea extends Nr{constructor(t){super(),this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");return t.textContent="\t",t.className="cm-tab",t.style.width=this.width+"px",t}ignoreEvent(){return!1}}const za=Fr.line({class:"cm-activeLine"}),Va=Gn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let r of t.state.selection.ranges){let n=t.lineBlockAt(r.head);n.from>e&&(i.push(za.range(n.from)),e=n.from)}return Fr.set(i)}},{decorations:t=>t.decorations}),Ya=2e3;function ja(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(i),n=i-r.from,o=n>Ya?-1:n==r.length?function(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}(t,e.clientX):_i(r.text,t.state.tabSize,i-r.from);return{line:r.number,col:o,off:n}}function Da(t){let e=(null==t?void 0:t.eventFilter)||(t=>t.altKey&&0==t.button);return Gs.mouseSelectionStyle.of(((t,i)=>e(i)?function(t,e){let i=ja(t,e),r=t.state.selection;return i?{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from),n=t.state.doc.lineAt(e);i={line:n.number,col:i.col,off:Math.min(i.off,n.length)},r=r.map(t.changes)}},get(e,n,o){let s=ja(t,e);if(!s)return r;let a=function(t,e,i){let r=Math.min(e.line,i.line),n=Math.max(e.line,i.line),o=[];if(e.off>Ya||i.off>Ya||e.col<0||i.col<0){let s=Math.min(e.off,i.off),a=Math.max(e.off,i.off);for(let e=r;e<=n;e++){let i=t.doc.line(e);i.length<=a&&o.push(Re.range(i.from+s,i.to+a))}}else{let s=Math.min(e.col,i.col),a=Math.max(e.col,i.col);for(let e=r;e<=n;e++){let i=t.doc.line(e),r=Ei(i.text,s,t.tabSize,!0);if(r<0)o.push(Re.cursor(i.to));else{let e=Ei(i.text,a,t.tabSize);o.push(Re.range(i.from+r,i.from+e))}}}return o}(t.state,i,s);return a.length?o?Re.create(a.concat(r.ranges)):Re.create(a):r}}:null}(t,i):null))}const La={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},Wa={style:"cursor: crosshair"};function Ua(t={}){let[e,i]=La[t.key||"Alt"],r=Gn.fromClass(class{constructor(t){this.view=t,this.isDown=!1}set(t){this.isDown!=t&&(this.isDown=t,this.view.update([]))}},{eventObservers:{keydown(t){this.set(t.keyCode==e||i(t))},keyup(t){t.keyCode!=e&&i(t)||this.set(!1)},mousemove(t){this.set(i(t))}}});return[r,Gs.contentAttributes.of((t=>{var e;return(null===(e=t.plugin(r))||void 0===e?void 0:e.isDown)?Wa:null}))]}const Ba="-10000px";class Ia{constructor(t,e,i,r){this.facet=e,this.createTooltipView=i,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let n=null;this.tooltipViews=this.tooltips.map((t=>n=i(t,n)))}update(t,e){var i;let r=t.state.facet(this.facet),n=r.filter((t=>t));if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let o=[],s=e?[]:null;for(let i=0;i<n.length;i++){let r=n[i],a=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(a=t)}if(a<0)o[i]=this.createTooltipView(r,i?o[i-1]:null),s&&(s[i]=!!r.above);else{let r=o[i]=this.tooltipViews[a];s&&(s[i]=e[a]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)o.indexOf(t)<0&&(this.removeTooltipView(t),null===(i=t.destroy)||void 0===i||i.call(t));return e&&(s.forEach(((t,i)=>e[i]=t)),e.length=s.length),this.input=r,this.tooltips=n,this.tooltipViews=o,!0}}function Ga(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Na=Xe.define({combine:t=>{var e,i,r;return{position:_r.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(r=t.find((t=>t.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||Ga}}}),Ha=new WeakMap,Fa=Gn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Na);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Ia(t,tl,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,r=t.state.facet(Na);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),r=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=Ba,i.dom.style.left="0px",this.container.insertBefore(i.dom,r),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,i=1,r=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(_r.gecko)r=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==Ba&&"0px"==t.style.left){let e=t.getBoundingClientRect();r=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(r||"absolute"==this.position)if(this.parent){let t=this.parent.getBoundingClientRect();t.width&&t.height&&(e=t.width/this.parent.offsetWidth,i=t.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:i}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(Na).tooltipSpace(this.view),scaleX:e,scaleY:i,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{editor:i,space:r,scaleX:n,scaleY:o}=t,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],h=this.manager.tooltipViews[a],{dom:c}=h,d=t.pos[a],u=t.size[a];if(!d||d.bottom<=Math.max(i.top,r.top)||d.top>=Math.min(i.bottom,r.bottom)||d.right<Math.max(i.left,r.left)-.1||d.left>Math.min(i.right,r.right)+.1){c.style.top=Ba;continue}let f=l.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=f?7:0,O=u.right-u.left,g=null!==(e=Ha.get(h))&&void 0!==e?e:u.bottom-u.top,m=h.offset||Ja,b=this.view.textDirection==cn.LTR,v=u.width>r.right-r.left?b?r.left:r.right-u.width:b?Math.max(r.left,Math.min(d.left-(f?14:0)+m.x,r.right-O)):Math.min(Math.max(r.left,d.left-O+(f?14:0)-m.x),r.right-O),y=this.above[a];!l.strictSide&&(y?d.top-(u.bottom-u.top)-m.y<r.top:d.bottom+(u.bottom-u.top)+m.y>r.bottom)&&y==r.bottom-d.bottom>d.top-r.top&&(y=this.above[a]=!y);let w=(y?d.top-r.top:r.bottom-d.bottom)-p;if(w<g&&!1!==h.resize){if(w<this.view.defaultLineHeight){c.style.top=Ba;continue}Ha.set(h,g),c.style.height=(g=w)/o+"px"}else c.style.height&&(c.style.height="");let S=y?d.top-g-p-m.y:d.bottom+p+m.y,x=v+O;if(!0!==h.overlap)for(let t of s)t.left<x&&t.right>v&&t.top<S+g&&t.bottom>S&&(S=y?t.top-g-2-p:t.bottom+p+2);if("absolute"==this.position?(c.style.top=(S-t.parent.top)/o+"px",c.style.left=(v-t.parent.left)/n+"px"):(c.style.top=S/o+"px",c.style.left=v/n+"px"),f){let t=d.left+(b?m.x:-m.x)-(v+14-7);f.style.left=t/n+"px"}!0!==h.overlap&&s.push({left:v,top:S,right:x,bottom:S+g}),c.classList.toggle("cm-tooltip-above",y),c.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Ba}},{eventObservers:{scroll(){this.maybeMeasure()}}}),Ka=Gs.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Ja={x:0,y:0},tl=Xe.define({enables:[Fa,Ka]}),el=Xe.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class il{static create(t){return new il(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Ia(t,el,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let r=i[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const rl=tl.compute([el],(t=>{let e=t.facet(el);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:il.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class nl{constructor(t,e,i,r,n){this.view=t,this.source=e,this.field=i,this.setHover=r,this.hoverTime=n,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,i=t.docView.nearest(e.target);if(!i)return;let r,n=1;if(i instanceof Vr)r=i.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let i=t.coordsAtPos(r);if(!i||e.y<i.top||e.y>i.bottom||e.x<i.left-t.defaultCharacterWidth||e.x>i.right+t.defaultCharacterWidth)return;let o=t.bidiSpans(t.state.doc.lineAt(r)).find((t=>t.from<=r&&t.to>=r)),s=o&&o.dir==cn.RTL?-1:1;n=e.x<i.left?-s:s}let o=this.source(t,r,n);if(null==o?void 0:o.then){let e=this.pending={pos:r};o.then((i=>{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))}),(e=>Wn(t.state,e,"hover tooltip")))}else!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let t=this.view.plugin(Fa),e=t?t.manager.tooltips.findIndex((t=>t.create==il.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:n}=this;if(r.length&&n&&!function(t,e){let i,{left:r,right:n,top:o,bottom:s}=t.getBoundingClientRect();if(i=t.querySelector(".cm-tooltip-arrow")){let t=i.getBoundingClientRect();o=Math.min(t.top,o),s=Math.max(t.bottom,s)}return e.clientX>=r-ol&&e.clientX<=n+ol&&e.clientY>=o-ol&&e.clientY<=s+ol}(n.dom,t)||this.pending){let{pos:n}=r[0]||this.pending,o=null!==(i=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==i?i:n;(n==o?this.view.posAtCoords(this.lastMove)==n:function(t,e,i,r,n){let o=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>r||o.right<r||o.top>n||Math.min(o.bottom,s)<n)return!1;let a=t.posAtCoords({x:r,y:n},!1);return a>=e&&a<=i}(this.view,n,o,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const ol=4;function sl(t,e={}){let i=ai.define(),r=De.define({create:()=>[],update(t,r){if(t.length&&(e.hideOnChange&&(r.docChanged||r.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(r,t)))),r.docChanged)){let e=[];for(let i of t){let t=r.changes.mapPos(i.pos,-1,Se.TrackDel);if(null!=t){let n=Object.assign(Object.create(null),i);n.pos=t,null!=n.end&&(n.end=r.changes.mapPos(n.end)),e.push(n)}}t=e}for(let e of r.effects)e.is(i)&&(t=e.value),e.is(ll)&&(t=[]);return t},provide:t=>el.from(t)});return{active:r,extension:[r,Gn.define((n=>new nl(n,t,r,i,e.hoverTime||300))),rl]}}function al(t,e){let i=t.plugin(Fa);if(!i)return null;let r=i.manager.tooltips.indexOf(e);return r<0?null:i.manager.tooltipViews[r]}const ll=ai.define(),hl=Xe.define({combine(t){let e,i;for(let r of t)e=e||r.topContainer,i=i||r.bottomContainer;return{topContainer:e,bottomContainer:i}}});function cl(t,e){let i=t.plugin(dl),r=i?i.specs.indexOf(e):-1;return r>-1?i.panels[r]:null}const dl=Gn.fromClass(class{constructor(t){this.input=t.state.facet(pl),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(hl);this.top=new ul(t,!0,e.topContainer),this.bottom=new ul(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(hl);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ul(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ul(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(pl);if(i!=this.input){let e=i.filter((t=>t)),r=[],n=[],o=[],s=[];for(let i of e){let e,a=this.specs.indexOf(i);a<0?(e=i(t.view),s.push(e)):(e=this.panels[a],e.update&&e.update(t)),r.push(e),(e.top?n:o).push(e)}this.specs=e,this.panels=r,this.top.sync(n),this.bottom.sync(o);for(let t of s)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Gs.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class ul{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=fl(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=fl(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function fl(t){let e=t.nextSibling;return t.remove(),e}const pl=Xe.define({enables:dl});class Ol extends yi{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}Ol.prototype.elementClass="",Ol.prototype.toDOM=void 0,Ol.prototype.mapMode=Se.TrackBefore,Ol.prototype.startSide=Ol.prototype.endSide=-1,Ol.prototype.point=!0;const gl=Xe.define(),ml=Xe.define(),bl={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Qi.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},vl=Xe.define();function yl(t){return[Sl(),vl.of(Object.assign(Object.assign({},bl),t))]}const wl=Xe.define({combine:t=>t.some((t=>t))});function Sl(t){let e=[xl];return t&&!1===t.fixed&&e.push(wl.of(!0)),e}const xl=Gn.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(vl).map((e=>new Pl(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(wl),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,r=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(r<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(wl)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=Qi.iter(this.view.state.facet(gl),this.view.viewport.from),r=[],n=this.gutters.map((t=>new $l(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(t.type)){let e=!0;for(let o of t.type)if(o.type==Hr.Text&&e){kl(i,r,o.from);for(let t of n)t.line(this.view,o,r);e=!1}else if(o.widget)for(let t of n)t.widget(this.view,o)}else if(t.type==Hr.Text){kl(i,r,t.from);for(let e of n)e.line(this.view,t,r)}else if(t.widget)for(let e of n)e.widget(this.view,t);for(let t of n)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(vl),i=t.state.facet(vl),r=t.docChanged||t.heightChanged||t.viewportChanged||!Qi.eq(t.startState.facet(gl),t.state.facet(gl),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(r=!0);else{r=!0;let n=[];for(let r of i){let i=e.indexOf(r);i<0?n.push(new Pl(this.view,r)):(this.gutters[i].update(t),n.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),n.indexOf(t)<0&&t.destroy();for(let t of n)this.dom.appendChild(t.dom);this.gutters=n}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Gs.scrollMargins.of((e=>{let i=e.plugin(t);return i&&0!=i.gutters.length&&i.fixed?e.textDirection==cn.LTR?{left:i.dom.offsetWidth*e.scaleX}:{right:i.dom.offsetWidth*e.scaleX}:null}))});function Ql(t){return Array.isArray(t)?t:[t]}function kl(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class $l{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=Qi.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:r}=this,n=(e.top-this.height)/t.scaleY,o=e.height/t.scaleY;if(this.i==r.elements.length){let e=new Zl(t,o,n,i);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,o,n,i);this.height=e.bottom,this.i++}line(t,e,i){let r=[];kl(this.cursor,r,e.from),i.length&&(r=r.concat(i));let n=this.gutter.config.lineMarker(t,e,r);n&&r.unshift(n);let o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e),r=i?[i]:null;for(let i of t.state.facet(ml)){let n=i(t,e.widget,e);n&&(r||(r=[])).push(n)}r&&this.addElement(t,e,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class Pl{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(r=>{let n,o=r.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let t=o.getBoundingClientRect();n=(t.top+t.bottom)/2}else n=r.clientY;let s=t.lineBlockAtHeight(n-t.documentTop);e.domEventHandlers[i](t,s,r)&&r.preventDefault()}));this.markers=Ql(e.markers(t)),e.initialSpacer&&(this.spacer=new Zl(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=Ql(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!Qi.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class Zl{constructor(t,e,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,r)}update(t,e,i,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!t[i].compare(e[i]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let i="cm-gutterElement",r=this.dom.firstChild;for(let n=0,o=0;;){let s=o,a=n<e.length?e[n++]:null,l=!1;if(a){let t=a.elementClass;t&&(i+=" "+t);for(let t=o;t<this.markers.length;t++)if(this.markers[t].compare(a)){s=t,l=!0;break}}else s=this.markers.length;for(;o<s;){let t=this.markers[o++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(t),r)),l&&o++}this.dom.className=i,this.markers=e}destroy(){this.setMarkers(null,[])}}const Tl=Xe.define(),Cl=Xe.define(),Al=Xe.define({combine:t=>vi(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let r=i[t],n=e[t];i[t]=r?(t,e,i)=>r(t,e,i)||n(t,e,i):n}return i}})});class Rl extends Ol{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Ml(t,e){return t.state.facet(Al).formatNumber(e,t.state)}const ql=vl.compute([Al],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Tl),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new Rl(Ml(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,i)=>{for(let r of t.state.facet(Cl)){let n=r(t,e,i);if(n)return n}return null},lineMarkerChange:t=>t.startState.facet(Al)!=t.state.facet(Al),initialSpacer:t=>new Rl(Ml(t,_l(t.state.doc.lines))),updateSpacer(t,e){let i=Ml(e.view,_l(e.view.state.doc.lines));return i==t.number?t:new Rl(i)},domEventHandlers:t.facet(Al).domEventHandlers})));function Xl(t={}){return[Al.of(t),Sl(),ql]}function _l(t){let e=9;for(;e<t;)e=10*e+9;return e}const El=new class extends Ol{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},zl=gl.compute(["selection"],(t=>{let e=[],i=-1;for(let r of t.selection.ranges){let n=t.doc.lineAt(r.head).from;n>i&&(i=n,e.push(El.range(n)))}return Qi.of(e)})),Vl=1024;let Yl=0;class jl{constructor(t,e){this.from=t,this.to=e}}class Dl{constructor(t={}){this.id=Yl++,this.perNode=!!t.perNode,this.deserialize=t.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(t){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof t&&(t=Ul.match(t)),e=>{let i=t(e);return void 0===i?null:[this,i]}}}Dl.closedBy=new Dl({deserialize:t=>t.split(" ")}),Dl.openedBy=new Dl({deserialize:t=>t.split(" ")}),Dl.group=new Dl({deserialize:t=>t.split(" ")}),Dl.isolate=new Dl({deserialize:t=>{if(t&&"rtl"!=t&&"ltr"!=t&&"auto"!=t)throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}}),Dl.contextHash=new Dl({perNode:!0}),Dl.lookAhead=new Dl({perNode:!0}),Dl.mounted=new Dl({perNode:!0});class Ll{constructor(t,e,i){this.tree=t,this.overlay=e,this.parser=i}static get(t){return t&&t.props&&t.props[Dl.mounted.id]}}const Wl=Object.create(null);class Ul{constructor(t,e,i,r=0){this.name=t,this.props=e,this.id=i,this.flags=r}static define(t){let e=t.props&&t.props.length?Object.create(null):Wl,i=(t.top?1:0)|(t.skipped?2:0)|(t.error?4:0)|(null==t.name?8:0),r=new Ul(t.name||"",e,t.id,i);if(t.props)for(let i of t.props)if(Array.isArray(i)||(i=i(r)),i){if(i[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");e[i[0].id]=i[1]}return r}prop(t){return this.props[t.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(t){if("string"==typeof t){if(this.name==t)return!0;let e=this.prop(Dl.group);return!!e&&e.indexOf(t)>-1}return this.id==t}static match(t){let e=Object.create(null);for(let i in t)for(let r of i.split(" "))e[r]=t[i];return t=>{for(let i=t.prop(Dl.group),r=-1;r<(i?i.length:0);r++){let n=e[r<0?t.name:i[r]];if(n)return n}}}}Ul.none=new Ul("",Object.create(null),0,8);class Bl{constructor(t){this.types=t;for(let e=0;e<t.length;e++)if(t[e].id!=e)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...t){let e=[];for(let i of this.types){let r=null;for(let e of t){let t=e(i);t&&(r||(r=Object.assign({},i.props)),r[t[0].id]=t[1])}e.push(r?new Ul(i.name,r,i.id,i.flags):i)}return new Bl(e)}}const Il=new WeakMap,Gl=new WeakMap;var Nl;!function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"}(Nl||(Nl={}));class Hl{constructor(t,e,i,r,n){if(this.type=t,this.children=e,this.positions=i,this.length=r,this.props=null,n&&n.length){this.props=Object.create(null);for(let[t,e]of n)this.props["number"==typeof t?t:t.id]=e}}toString(){let t=Ll.get(this);if(t&&!t.overlay)return t.tree.toString();let e="";for(let t of this.children){let i=t.toString();i&&(e&&(e+=","),e+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(e.length?"("+e+")":""):e}cursor(t=0){return new hh(this.topNode,t)}cursorAt(t,e=0,i=0){let r=Il.get(this)||this.topNode,n=new hh(r);return n.moveTo(t,e),Il.set(this,n._tree),n}get topNode(){return new ih(this,0,0,null)}resolve(t,e=0){let i=th(Il.get(this)||this.topNode,t,e,!1);return Il.set(this,i),i}resolveInner(t,e=0){let i=th(Gl.get(this)||this.topNode,t,e,!0);return Gl.set(this,i),i}resolveStack(t,e=0){return function(t,e,i){let r=t.resolveInner(e,i),n=null;for(let t=r instanceof ih?r:r.context.parent;t;t=t.parent)if(t.index<0){let o=t.parent;(n||(n=[r])).push(o.resolve(e,i)),t=o}else{let o=Ll.get(t.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let s=new ih(o.tree,o.overlay[0].from+t.from,-1,t);(n||(n=[r])).push(th(s,e,i,!1))}}return n?ah(n):r}(this,t,e)}iterate(t){let{enter:e,leave:i,from:r=0,to:n=this.length}=t,o=t.mode||0,s=(o&Nl.IncludeAnonymous)>0;for(let t=this.cursor(o|Nl.IncludeAnonymous);;){let o=!1;if(t.from<=n&&t.to>=r&&(!s&&t.type.isAnonymous||!1!==e(t))){if(t.firstChild())continue;o=!0}for(;o&&i&&(s||!t.type.isAnonymous)&&i(t),!t.nextSibling();){if(!t.parent())return;o=!0}}}prop(t){return t.perNode?this.props?this.props[t.id]:void 0:this.type.prop(t)}get propValues(){let t=[];if(this.props)for(let e in this.props)t.push([+e,this.props[e]]);return t}balance(t={}){return this.children.length<=8?this:fh(Ul.none,this.children,this.positions,0,this.children.length,0,this.length,((t,e,i)=>new Hl(this.type,t,e,i,this.propValues)),t.makeTree||((t,e,i)=>new Hl(Ul.none,t,e,i)))}static build(t){return function(t){var e;let{buffer:i,nodeSet:r,maxBufferLength:n=Vl,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(i)?new Fl(i,i.length):i,l=r.types,h=0,c=0;function d(t,e,i,g,m,b){let{id:v,start:y,end:w,size:S}=a,x=c,Q=h;for(;S<0;){if(a.next(),-1==S){let e=o[v];return i.push(e),void g.push(y-t)}if(-3==S)return void(h=v);if(-4==S)return void(c=v);throw new RangeError(`Unrecognized record size: ${S}`)}let k,$,P=l[v],Z=y-t;if(w-y<=n&&($=function(t,e){let i=a.fork(),r=0,o=0,l=0,h=i.end-n,c={size:0,start:0,skip:0};t:for(let n=i.pos-t;i.pos>n;){let t=i.size;if(i.id==e&&t>=0){c.size=r,c.start=o,c.skip=l,l+=4,r+=4,i.next();continue}let a=i.pos-t;if(t<0||a<n||i.start<h)break;let d=i.id>=s?4:0,u=i.start;for(i.next();i.pos>a;){if(i.size<0){if(-3!=i.size)break t;d+=4}else i.id>=s&&(d+=4);i.next()}o=u,r+=t,l+=d}return(e<0||r==t)&&(c.size=r,c.start=o,c.skip=l),c.size>4?c:void 0}(a.pos-e,m))){let e=new Uint16Array($.size-$.skip),i=a.pos-$.size,n=e.length;for(;a.pos>i;)n=O($.start,e,n);k=new Kl(e,w-$.start,r),Z=$.start-t}else{let t=a.pos-S;a.next();let e=[],i=[],r=v>=s?v:-1,o=0,l=w;for(;a.pos>t;)r>=0&&a.id==r&&a.size>=0?(a.end<=l-n&&(f(e,i,y,o,a.end,l,r,x,Q),o=e.length,l=a.end),a.next()):b>2500?u(y,t,e,i):d(y,t,e,i,r,b+1);if(r>=0&&o>0&&o<e.length&&f(e,i,y,o,y,l,r,x,Q),e.reverse(),i.reverse(),r>-1&&o>0){let t=function(t,e){return(i,r,n)=>{let o,s,a=0,l=i.length-1;if(l>=0&&(o=i[l])instanceof Hl){if(!l&&o.type==t&&o.length==n)return o;(s=o.prop(Dl.lookAhead))&&(a=r[l]+o.length+s)}return p(t,i,r,n,a,e)}}(P,Q);k=fh(P,e,i,0,e.length,0,w-y,t,t)}else k=p(P,e,i,w-y,x-w,Q)}i.push(k),g.push(Z)}function u(t,e,i,o){let s=[],l=0,h=-1;for(;a.pos>e;){let{id:t,start:e,end:i,size:r}=a;if(r>4)a.next();else{if(h>-1&&e<h)break;h<0&&(h=i-n),s.push(t,e,i),l++,a.next()}}if(l){let e=new Uint16Array(4*l),n=s[s.length-2];for(let t=s.length-3,i=0;t>=0;t-=3)e[i++]=s[t],e[i++]=s[t+1]-n,e[i++]=s[t+2]-n,e[i++]=i;i.push(new Kl(e,s[2]-n,r)),o.push(n-t)}}function f(t,e,i,n,o,s,a,l,h){let c=[],d=[];for(;t.length>n;)c.push(t.pop()),d.push(e.pop()+i-o);t.push(p(r.types[a],c,d,s-o,l-s,h)),e.push(o-i)}function p(t,e,i,r,n,o,s){if(o){let t=[Dl.contextHash,o];s=s?[t].concat(s):[t]}if(n>25){let t=[Dl.lookAhead,n];s=s?[t].concat(s):[t]}return new Hl(t,e,i,r,s)}function O(t,e,i){let{id:r,start:n,end:o,size:l}=a;if(a.next(),l>=0&&r<s){let s=i;if(l>4){let r=a.pos-(l-4);for(;a.pos>r;)i=O(t,e,i)}e[--i]=s,e[--i]=o-t,e[--i]=n-t,e[--i]=r}else-3==l?h=r:-4==l&&(c=r);return i}let g=[],m=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,g,m,-1,0);let b=null!==(e=t.length)&&void 0!==e?e:g.length?m[0]+g[0].length:0;return new Hl(l[t.topID],g.reverse(),m.reverse(),b)}(t)}}Hl.empty=new Hl(Ul.none,[],[],0);class Fl{constructor(t,e){this.buffer=t,this.index=e}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new Fl(this.buffer,this.index)}}class Kl{constructor(t,e,i){this.buffer=t,this.length=e,this.set=i}get type(){return Ul.none}toString(){let t=[];for(let e=0;e<this.buffer.length;)t.push(this.childString(e)),e=this.buffer[e+3];return t.join(",")}childString(t){let e=this.buffer[t],i=this.buffer[t+3],r=this.set.types[e],n=r.name;if(/\W/.test(n)&&!r.isError&&(n=JSON.stringify(n)),i==(t+=4))return n;let o=[];for(;t<i;)o.push(this.childString(t)),t=this.buffer[t+3];return n+"("+o.join(",")+")"}findChild(t,e,i,r,n){let{buffer:o}=this,s=-1;for(let a=t;a!=e&&!(Jl(n,r,o[a+1],o[a+2])&&(s=a,i>0));a=o[a+3]);return s}slice(t,e,i){let r=this.buffer,n=new Uint16Array(e-t),o=0;for(let s=t,a=0;s<e;){n[a++]=r[s++],n[a++]=r[s++]-i;let e=n[a++]=r[s++]-i;n[a++]=r[s++]-t,o=Math.max(o,e)}return new Kl(n,o,this.set)}}function Jl(t,e,i,r){switch(t){case-2:return i<e;case-1:return r>=e&&i<e;case 0:return i<e&&r>e;case 1:return i<=e&&r>e;case 2:return r>e;case 4:return!0}}function th(t,e,i,r){for(var n;t.from==t.to||(i<1?t.from>=e:t.from>e)||(i>-1?t.to<=e:t.to<e);){let e=!r&&t instanceof ih&&t.index<0?null:t.parent;if(!e)return t;t=e}let o=r?0:Nl.IgnoreOverlays;if(r)for(let r=t,s=r.parent;s;r=s,s=r.parent)r instanceof ih&&r.index<0&&(null===(n=s.enter(e,i,o))||void 0===n?void 0:n.from)!=r.from&&(t=s);for(;;){let r=t.enter(e,i,o);if(!r)return t;t=r}}class eh{cursor(t=0){return new hh(this,t)}getChild(t,e=null,i=null){let r=rh(this,t,e,i);return r.length?r[0]:null}getChildren(t,e=null,i=null){return rh(this,t,e,i)}resolve(t,e=0){return th(this,t,e,!1)}resolveInner(t,e=0){return th(this,t,e,!0)}matchContext(t){return nh(this.parent,t)}enterUnfinishedNodesBefore(t){let e=this.childBefore(t),i=this;for(;e;){let t=e.lastChild;if(!t||t.to!=e.to)break;t.type.isError&&t.from==t.to?(i=e,e=t.prevSibling):e=t}return i}get node(){return this}get next(){return this.parent}}class ih extends eh{constructor(t,e,i,r){super(),this._tree=t,this.from=e,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(t,e,i,r,n=0){for(let o=this;;){for(let{children:s,positions:a}=o._tree,l=e>0?s.length:-1;t!=l;t+=e){let l=s[t],h=a[t]+o.from;if(Jl(r,i,h,h+l.length))if(l instanceof Kl){if(n&Nl.ExcludeBuffers)continue;let s=l.findChild(0,l.buffer.length,e,i-h,r);if(s>-1)return new sh(new oh(o,l,t,h),null,s)}else if(n&Nl.IncludeAnonymous||!l.type.isAnonymous||ch(l)){let s;if(!(n&Nl.IgnoreMounts)&&(s=Ll.get(l))&&!s.overlay)return new ih(s.tree,h,t,o);let a=new ih(l,h,t,o);return n&Nl.IncludeAnonymous||!a.type.isAnonymous?a:a.nextChild(e<0?l.children.length-1:0,e,i,r)}}if(n&Nl.IncludeAnonymous||!o.type.isAnonymous)return null;if(t=o.index>=0?o.index+e:e<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(t){return this.nextChild(0,1,t,2)}childBefore(t){return this.nextChild(this._tree.children.length-1,-1,t,-2)}enter(t,e,i=0){let r;if(!(i&Nl.IgnoreOverlays)&&(r=Ll.get(this._tree))&&r.overlay){let i=t-this.from;for(let{from:t,to:n}of r.overlay)if((e>0?t<=i:t<i)&&(e<0?n>=i:n>i))return new ih(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,t,e,i)}nextSignificantParent(){let t=this;for(;t.type.isAnonymous&&t._parent;)t=t._parent;return t}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function rh(t,e,i,r){let n=t.cursor(),o=[];if(!n.firstChild())return o;if(null!=i)for(let t=!1;!t;)if(t=n.type.is(i),!n.nextSibling())return o;for(;;){if(null!=r&&n.type.is(r))return o;if(n.type.is(e)&&o.push(n.node),!n.nextSibling())return null==r?o:[]}}function nh(t,e,i=e.length-1){for(let r=t;i>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[i]&&e[i]!=r.name)return!1;i--}}return!0}class oh{constructor(t,e,i,r){this.parent=t,this.buffer=e,this.index=i,this.start=r}}class sh extends eh{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(t,e,i){super(),this.context=t,this._parent=e,this.index=i,this.type=t.buffer.set.types[t.buffer.buffer[i]]}child(t,e,i){let{buffer:r}=this.context,n=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.context.start,i);return n<0?null:new sh(this.context,this,n)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(t){return this.child(1,t,2)}childBefore(t){return this.child(-1,t,-2)}enter(t,e,i=0){if(i&Nl.ExcludeBuffers)return null;let{buffer:r}=this.context,n=r.findChild(this.index+4,r.buffer[this.index+3],e>0?1:-1,t-this.context.start,e);return n<0?null:new sh(this.context,this,n)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(t){return this._parent?null:this.context.parent.nextChild(this.context.index+t,t,0,4)}get nextSibling(){let{buffer:t}=this.context,e=t.buffer[this.index+3];return e<(this._parent?t.buffer[this._parent.index+3]:t.buffer.length)?new sh(this.context,this._parent,e):this.externalSibling(1)}get prevSibling(){let{buffer:t}=this.context,e=this._parent?this._parent.index+4:0;return this.index==e?this.externalSibling(-1):new sh(this.context,this._parent,t.findChild(e,this.index,-1,0,4))}get tree(){return null}toTree(){let t=[],e=[],{buffer:i}=this.context,r=this.index+4,n=i.buffer[this.index+3];if(n>r){let o=i.buffer[this.index+1];t.push(i.slice(r,n,o)),e.push(0)}return new Hl(this.type,t,e,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function ah(t){if(!t.length)return null;let e=0,i=t[0];for(let r=1;r<t.length;r++){let n=t[r];(n.from>i.from||n.to<i.to)&&(i=n,e=r)}let r=i instanceof ih&&i.index<0?null:i.parent,n=t.slice();return r?n[e]=r:n.splice(e,1),new lh(n,i)}class lh{constructor(t,e){this.heads=t,this.node=e}get next(){return ah(this.heads)}}class hh{get name(){return this.type.name}constructor(t,e=0){if(this.mode=e,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,t instanceof ih)this.yieldNode(t);else{this._tree=t.context.parent,this.buffer=t.context;for(let e=t._parent;e;e=e._parent)this.stack.unshift(e.index);this.bufferNode=t,this.yieldBuf(t.index)}}yieldNode(t){return!!t&&(this._tree=t,this.type=t.type,this.from=t.from,this.to=t.to,!0)}yieldBuf(t,e){this.index=t;let{start:i,buffer:r}=this.buffer;return this.type=e||r.set.types[r.buffer[t]],this.from=i+r.buffer[t+1],this.to=i+r.buffer[t+2],!0}yield(t){return!!t&&(t instanceof ih?(this.buffer=null,this.yieldNode(t)):(this.buffer=t.context,this.yieldBuf(t.index,t.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(t,e,i){if(!this.buffer)return this.yield(this._tree.nextChild(t<0?this._tree._tree.children.length-1:0,t,e,i,this.mode));let{buffer:r}=this.buffer,n=r.findChild(this.index+4,r.buffer[this.index+3],t,e-this.buffer.start,i);return!(n<0)&&(this.stack.push(this.index),this.yieldBuf(n))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(t){return this.enterChild(1,t,2)}childBefore(t){return this.enterChild(-1,t,-2)}enter(t,e,i=this.mode){return this.buffer?!(i&Nl.ExcludeBuffers)&&this.enterChild(1,t,e):this.yield(this._tree.enter(t,e,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Nl.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let t=this.mode&Nl.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(t)}sibling(t){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+t,t,0,4,this.mode));let{buffer:e}=this.buffer,i=this.stack.length-1;if(t<0){let t=i<0?0:this.stack[i]+4;if(this.index!=t)return this.yieldBuf(e.findChild(t,this.index,-1,0,4))}else{let t=e.buffer[this.index+3];if(t<(i<0?e.buffer.length:e.buffer[this.stack[i]+3]))return this.yieldBuf(t)}return i<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+t,t,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(t){let e,i,{buffer:r}=this;if(r){if(t>0){if(this.index<r.buffer.buffer.length)return!1}else for(let t=0;t<this.index;t++)if(r.buffer.buffer[t+3]<this.index)return!1;({index:e,parent:i}=r)}else({index:e,_parent:i}=this._tree);for(;i;({index:e,_parent:i}=i))if(e>-1)for(let r=e+t,n=t<0?-1:i._tree.children.length;r!=n;r+=t){let t=i._tree.children[r];if(this.mode&Nl.IncludeAnonymous||t instanceof Kl||!t.type.isAnonymous||ch(t))return!1}return!0}move(t,e){if(e&&this.enterChild(t,0,4))return!0;for(;;){if(this.sibling(t))return!0;if(this.atLastNode(t)||!this.parent())return!1}}next(t=!0){return this.move(1,t)}prev(t=!0){return this.move(-1,t)}moveTo(t,e=0){for(;(this.from==this.to||(e<1?this.from>=t:this.from>t)||(e>-1?this.to<=t:this.to<t))&&this.parent(););for(;this.enterChild(1,t,e););return this}get node(){if(!this.buffer)return this._tree;let t=this.bufferNode,e=null,i=0;if(t&&t.context==this.buffer)t:for(let r=this.index,n=this.stack.length;n>=0;){for(let o=t;o;o=o._parent)if(o.index==r){if(r==this.index)return o;e=o,i=n+1;break t}r=this.stack[--n]}for(let t=i;t<this.stack.length;t++)e=new sh(this.buffer,e,this.stack[t]);return this.bufferNode=new sh(this.buffer,e,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(t,e){for(let i=0;;){let r=!1;if(this.type.isAnonymous||!1!==t(this)){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;r&&e&&e(this),r=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,r=!0}}}matchContext(t){if(!this.buffer)return nh(this.node.parent,t);let{buffer:e}=this.buffer,{types:i}=e.set;for(let r=t.length-1,n=this.stack.length-1;r>=0;n--){if(n<0)return nh(this._tree,t,r);let o=i[e.buffer[this.stack[n]]];if(!o.isAnonymous){if(t[r]&&t[r]!=o.name)return!1;r--}}return!0}}function ch(t){return t.children.some((t=>t instanceof Kl||!t.type.isAnonymous||ch(t)))}const dh=new WeakMap;function uh(t,e){if(!t.isAnonymous||e instanceof Kl||e.type!=t)return 1;let i=dh.get(e);if(null==i){i=1;for(let r of e.children){if(r.type!=t||!(r instanceof Hl)){i=1;break}i+=uh(t,r)}dh.set(e,i)}return i}function fh(t,e,i,r,n,o,s,a,l){let h=0;for(let i=r;i<n;i++)h+=uh(t,e[i]);let c=Math.ceil(1.5*h/8),d=[],u=[];return function e(i,r,n,s,a){for(let h=n;h<s;){let n=h,f=r[h],p=uh(t,i[h]);for(h++;h<s;h++){let e=uh(t,i[h]);if(p+e>=c)break;p+=e}if(h==n+1){if(p>c){let t=i[n];e(t.children,t.positions,0,t.children.length,r[n]+a);continue}d.push(i[n])}else{let e=r[h-1]+i[h-1].length-f;d.push(fh(t,i,r,n,h,f,e,null,l))}u.push(f+a-o)}}(e,i,r,n,0),(a||l)(d,u,s)}class ph{constructor(){this.map=new WeakMap}setBuffer(t,e,i){let r=this.map.get(t);r||this.map.set(t,r=new Map),r.set(e,i)}getBuffer(t,e){let i=this.map.get(t);return i&&i.get(e)}set(t,e){t instanceof sh?this.setBuffer(t.context.buffer,t.index,e):t instanceof ih&&this.map.set(t.tree,e)}get(t){return t instanceof sh?this.getBuffer(t.context.buffer,t.index):t instanceof ih?this.map.get(t.tree):void 0}cursorSet(t,e){t.buffer?this.setBuffer(t.buffer.buffer,t.index,e):this.map.set(t.tree,e)}cursorGet(t){return t.buffer?this.getBuffer(t.buffer.buffer,t.index):this.map.get(t.tree)}}class Oh{constructor(t,e,i,r,n=!1,o=!1){this.from=t,this.to=e,this.tree=i,this.offset=r,this.open=(n?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(t,e=[],i=!1){let r=[new Oh(0,t.length,t,0,!1,i)];for(let i of e)i.to>t.length&&r.push(i);return r}static applyChanges(t,e,i=128){if(!e.length)return t;let r=[],n=1,o=t.length?t[0]:null;for(let s=0,a=0,l=0;;s++){let h=s<e.length?e[s]:null,c=h?h.fromA:1e9;if(c-a>=i)for(;o&&o.from<c;){let e=o;if(a>=e.from||c<=e.to||l){let t=Math.max(e.from,a)-l,i=Math.min(e.to,c)-l;e=t>=i?null:new Oh(t,i,e.tree,e.offset+l,s>0,!!h)}if(e&&r.push(e),o.to>c)break;o=n<t.length?t[n++]:null}if(!h)break;a=h.toA,l=h.toA-h.toB}return r}}class gh{startParse(t,e,i){return"string"==typeof t&&(t=new mh(t)),i=i?i.length?i.map((t=>new jl(t.from,t.to))):[new jl(0,0)]:[new jl(0,t.length)],this.createParse(t,e||[],i)}parse(t,e,i){let r=this.startParse(t,e,i);for(;;){let t=r.advance();if(t)return t}}}class mh{constructor(t){this.string=t}get length(){return this.string.length}chunk(t){return this.string.slice(t)}get lineChunks(){return!1}read(t,e){return this.string.slice(t,e)}}class bh{constructor(t,e,i,r,n){this.parser=t,this.parse=e,this.overlay=i,this.target=r,this.from=n}}function vh(t){if(!t.length||t.some((t=>t.from>=t.to)))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class yh{constructor(t,e,i,r,n,o,s){this.parser=t,this.predicate=e,this.mounts=i,this.index=r,this.start=n,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const wh=new Dl({perNode:!0});class Sh{constructor(t,e,i,r,n){this.nest=e,this.input=i,this.fragments=r,this.ranges=n,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=t}advance(){if(this.baseParse){let t=this.baseParse.advance();if(!t)return null;if(this.baseParse=null,this.baseTree=t,this.startInner(),null!=this.stoppedAt)for(let t of this.inner)t.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let t=this.baseTree;return null!=this.stoppedAt&&(t=new Hl(t.type,t.children,t.positions,t.length,t.propValues.concat([[wh,this.stoppedAt]]))),t}let t=this.inner[this.innerDone],e=t.parse.advance();if(e){this.innerDone++;let i=Object.assign(Object.create(null),t.target.props);i[Dl.mounted.id]=new Ll(e,t.overlay,t.parser),t.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let t=this.input.length;for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].from<t&&(t=Math.min(t,this.inner[e].parse.parsedPos));return t}stopAt(t){if(this.stoppedAt=t,this.baseParse)this.baseParse.stopAt(t);else for(let e=this.innerDone;e<this.inner.length;e++)this.inner[e].parse.stopAt(t)}startInner(){let t=new Ph(this.fragments),e=null,i=null,r=new hh(new ih(this.baseTree,this.ranges[0].from,0,null),Nl.IncludeAnonymous|Nl.IgnoreMounts);t:for(let n,o;;){let s,a=!0;if(null!=this.stoppedAt&&r.from>=this.stoppedAt)a=!1;else if(t.hasNode(r)){if(e){let t=e.mounts.find((t=>t.frag.from<=r.from&&t.frag.to>=r.to&&t.mount.overlay));if(t)for(let i of t.mount.overlay){let n=i.from+t.pos,o=i.to+t.pos;n>=r.from&&o<=r.to&&!e.ranges.some((t=>t.from<o&&t.to>n))&&e.ranges.push({from:n,to:o})}}a=!1}else if(i&&(o=xh(i.ranges,r.from,r.to)))a=2!=o;else if(!r.type.isAnonymous&&(n=this.nest(r,this.input))&&(r.from<r.to||!n.overlay)){r.tree||kh(r);let o=t.findMounts(r.from,n.parser);if("function"==typeof n.overlay)e=new yh(n.parser,n.overlay,o,this.inner.length,r.from,r.tree,e);else{let t=Zh(this.ranges,n.overlay||(r.from<r.to?[new jl(r.from,r.to)]:[]));t.length&&vh(t),!t.length&&n.overlay||this.inner.push(new bh(n.parser,t.length?n.parser.startParse(this.input,Ch(o,t),t):n.parser.startParse(""),n.overlay?n.overlay.map((t=>new jl(t.from-r.from,t.to-r.from))):null,r.tree,t.length?t[0].from:r.from)),n.overlay?t.length&&(i={ranges:t,depth:0,prev:i}):a=!1}}else if(e&&(s=e.predicate(r))&&(!0===s&&(s=new jl(r.from,r.to)),s.from<s.to)){let t=e.ranges.length-1;t>=0&&e.ranges[t].to==s.from?e.ranges[t]={from:e.ranges[t].from,to:s.to}:e.ranges.push(s)}if(a&&r.firstChild())e&&e.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break t;if(e&&! --e.depth){let t=Zh(this.ranges,e.ranges);t.length&&(vh(t),this.inner.splice(e.index,0,new bh(e.parser,e.parser.startParse(this.input,Ch(e.mounts,t),t),e.ranges.map((t=>new jl(t.from-e.start,t.to-e.start))),e.target,t[0].from))),e=e.prev}i&&! --i.depth&&(i=i.prev)}}}}function xh(t,e,i){for(let r of t){if(r.from>=i)break;if(r.to>e)return r.from<=e&&r.to>=i?2:1}return 0}function Qh(t,e,i,r,n,o){if(e<i){let s=t.buffer[e+1];r.push(t.slice(e,i,s)),n.push(s-o)}}function kh(t){let{node:e}=t,i=[],r=e.context.buffer;do{i.push(t.index),t.parent()}while(!t.tree);let n=t.tree,o=n.children.indexOf(r),s=n.children[o],a=s.buffer,l=[o];n.children[o]=function t(r,n,o,h,c,d){let u=i[d],f=[],p=[];Qh(s,r,u,f,p,h);let O=a[u+1],g=a[u+2];l.push(f.length);let m=d?t(u+4,a[u+3],s.set.types[a[u]],O,g-O,d-1):e.toTree();return f.push(m),p.push(O-h),Qh(s,a[u+3],n,f,p,h),new Hl(o,f,p,c)}(0,a.length,Ul.none,0,s.length,i.length-1);for(let e of l){let i=t.tree.children[e],r=t.tree.positions[e];t.yield(new ih(i,r+t.from,e,t._tree))}}class $h{constructor(t,e){this.offset=e,this.done=!1,this.cursor=t.cursor(Nl.IncludeAnonymous|Nl.IgnoreMounts)}moveTo(t){let{cursor:e}=this,i=t-this.offset;for(;!this.done&&e.from<i;)e.to>=t&&e.enter(i,1,Nl.IgnoreOverlays|Nl.ExcludeBuffers)||e.next(!1)||(this.done=!0)}hasNode(t){if(this.moveTo(t.from),!this.done&&this.cursor.from+this.offset==t.from&&this.cursor.tree)for(let e=this.cursor.tree;;){if(e==t.tree)return!0;if(!(e.children.length&&0==e.positions[0]&&e.children[0]instanceof Hl))break;e=e.children[0]}return!1}}class Ph{constructor(t){var e;if(this.fragments=t,this.curTo=0,this.fragI=0,t.length){let i=this.curFrag=t[0];this.curTo=null!==(e=i.tree.prop(wh))&&void 0!==e?e:i.to,this.inner=new $h(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(t){for(;this.curFrag&&t.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=t.from&&this.curTo>=t.to&&this.inner.hasNode(t)}nextFrag(){var t;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let e=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(t=e.tree.prop(wh))&&void 0!==t?t:e.to,this.inner=new $h(e.tree,-e.offset)}}findMounts(t,e){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(t,1);for(let t=this.inner.cursor.node;t;t=t.parent){let n=null===(i=t.tree)||void 0===i?void 0:i.prop(Dl.mounted);if(n&&n.parser==e)for(let e=this.fragI;e<this.fragments.length;e++){let i=this.fragments[e];if(i.from>=t.to)break;i.tree==this.curFrag.tree&&r.push({frag:i,pos:t.from-i.offset,mount:n})}}}return r}}function Zh(t,e){let i=null,r=e;for(let n=1,o=0;n<t.length;n++){let s=t[n-1].to,a=t[n].from;for(;o<r.length;o++){let t=r[o];if(t.from>=a)break;t.to<=s||(i||(r=i=e.slice()),t.from<s?(i[o]=new jl(t.from,s),t.to>a&&i.splice(o+1,0,new jl(a,t.to))):t.to>a?i[o--]=new jl(a,t.to):i.splice(o--,1))}}return r}function Th(t,e,i,r){let n=0,o=0,s=!1,a=!1,l=-1e9,h=[];for(;;){let c=n==t.length?1e9:s?t[n].to:t[n].from,d=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let t=Math.max(l,i),e=Math.min(c,d,r);t<e&&h.push(new jl(t,e))}if(l=Math.min(c,d),1e9==l)break;c==l&&(s?(s=!1,n++):s=!0),d==l&&(a?(a=!1,o++):a=!0)}return h}function Ch(t,e){let i=[];for(let{pos:r,mount:n,frag:o}of t){let t=r+(n.overlay?n.overlay[0].from:0),s=t+n.tree.length,a=Math.max(o.from,t),l=Math.min(o.to,s);if(n.overlay){let s=Th(e,n.overlay.map((t=>new jl(t.from+r,t.to+r))),a,l);for(let e=0,r=a;;e++){let a=e==s.length,h=a?l:s[e].from;if(h>r&&i.push(new Oh(r,h,n.tree,-t,o.from>=r||o.openStart,o.to<=h||o.openEnd)),a)break;r=s[e].to}}else i.push(new Oh(a,l,n.tree,-t,o.from>=t||o.openStart,o.to<=s||o.openEnd))}return i}let Ah=0;class Rh{constructor(t,e,i,r){this.name=t,this.set=e,this.base=i,this.modified=r,this.id=Ah++}toString(){let{name:t}=this;for(let e of this.modified)e.name&&(t=`${e.name}(${t})`);return t}static define(t,e){let i="string"==typeof t?t:"?";if(t instanceof Rh&&(e=t),null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let r=new Rh(i,[],null,[]);if(r.set.push(r),e)for(let t of e.set)r.set.push(t);return r}static defineModifier(t){let e=new qh(t);return t=>t.modified.indexOf(e)>-1?t:qh.get(t.base||t,t.modified.concat(e).sort(((t,e)=>t.id-e.id)))}}let Mh=0;class qh{constructor(t){this.name=t,this.instances=[],this.id=Mh++}static get(t,e){if(!e.length)return t;let i=e[0].instances.find((i=>i.base==t&&function(t,e){return t.length==e.length&&t.every(((t,i)=>t==e[i]))}(e,i.modified)));if(i)return i;let r=[],n=new Rh(t.name,r,t,e);for(let t of e)t.instances.push(n);let o=function(t){let e=[[]];for(let i=0;i<t.length;i++)for(let r=0,n=e.length;r<n;r++)e.push(e[r].concat(t[i]));return e.sort(((t,e)=>e.length-t.length))}(e);for(let e of t.set)if(!e.modified.length)for(let t of o)r.push(qh.get(e,t));return n}}function Xh(t){let e=Object.create(null);for(let i in t){let r=t[i];Array.isArray(r)||(r=[r]);for(let t of i.split(" "))if(t){let i=[],n=2,o=t;for(let e=0;;){if("..."==o&&e>0&&e+3==t.length){n=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw new RangeError("Invalid path: "+t);if(i.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),e+=r[0].length,e==t.length)break;let s=t[e++];if(e==t.length&&"!"==s){n=0;break}if("/"!=s)throw new RangeError("Invalid path: "+t);o=t.slice(e)}let s=i.length-1,a=i[s];if(!a)throw new RangeError("Invalid path: "+t);let l=new Eh(r,n,s>0?i.slice(0,s):null);e[a]=l.sort(e[a])}}return _h.add(e)}const _h=new Dl;class Eh{constructor(t,e,i,r){this.tags=t,this.mode=e,this.context=i,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(t){return!t||t.depth<this.depth?(this.next=t,this):(t.next=this.sort(t.next),t)}get depth(){return this.context?this.context.length:0}}function zh(t,e){let i=Object.create(null);for(let e of t)if(Array.isArray(e.tag))for(let t of e.tag)i[t.id]=e.class;else i[e.tag.id]=e.class;let{scope:r,all:n=null}=e||{};return{style:t=>{let e=n;for(let r of t)for(let t of r.set){let r=i[t.id];if(r){e=e?e+" "+r:r;break}}return e},scope:r}}function Vh(t,e,i,r=0,n=t.length){let o=new Yh(r,Array.isArray(e)?e:[e],i);o.highlightRange(t.cursor(),r,n,"",o.highlighters),o.flush(n)}Eh.empty=new Eh([],2,null);class Yh{constructor(t,e,i){this.at=t,this.highlighters=e,this.span=i,this.class=""}startSpan(t,e){e!=this.class&&(this.flush(t),t>this.at&&(this.at=t),this.class=e)}flush(t){t>this.at&&this.class&&this.span(this.at,t,this.class)}highlightRange(t,e,i,r,n){let{type:o,from:s,to:a}=t;if(s>=i||a<=e)return;o.isTop&&(n=this.highlighters.filter((t=>!t.scope||t.scope(o))));let l=r,h=function(t){let e=t.type.prop(_h);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}(t)||Eh.empty,c=function(t,e){let i=null;for(let r of t){let t=r.style(e);t&&(i=i?i+" "+t:t)}return i}(n,h.tags);if(c&&(l&&(l+=" "),l+=c,1==h.mode&&(r+=(r?" ":"")+c)),this.startSpan(Math.max(e,s),l),h.opaque)return;let d=t.tree&&t.tree.prop(Dl.mounted);if(d&&d.overlay){let o=t.node.enter(d.overlay[0].from+s,1),h=this.highlighters.filter((t=>!t.scope||t.scope(d.tree.type))),c=t.firstChild();for(let u=0,f=s;;u++){let p=u<d.overlay.length?d.overlay[u]:null,O=p?p.from+s:a,g=Math.max(e,f),m=Math.min(i,O);if(g<m&&c)for(;t.from<m&&(this.highlightRange(t,g,m,r,n),this.startSpan(Math.min(m,t.to),l),!(t.to>=O)&&t.nextSibling()););if(!p||O>i)break;f=p.to+s,f>e&&(this.highlightRange(o.cursor(),Math.max(e,p.from+s),Math.min(i,f),"",h),this.startSpan(Math.min(i,f),l))}c&&t.parent()}else if(t.firstChild()){d&&(r="");do{if(!(t.to<=e)){if(t.from>=i)break;this.highlightRange(t,e,i,r,n),this.startSpan(Math.min(i,t.to),l)}}while(t.nextSibling());t.parent()}}}const jh=Rh.define,Dh=jh(),Lh=jh(),Wh=jh(Lh),Uh=jh(Lh),Bh=jh(),Ih=jh(Bh),Gh=jh(Bh),Nh=jh(),Hh=jh(Nh),Fh=jh(),Kh=jh(),Jh=jh(),tc=jh(Jh),ec=jh(),ic={comment:Dh,lineComment:jh(Dh),blockComment:jh(Dh),docComment:jh(Dh),name:Lh,variableName:jh(Lh),typeName:Wh,tagName:jh(Wh),propertyName:Uh,attributeName:jh(Uh),className:jh(Lh),labelName:jh(Lh),namespace:jh(Lh),macroName:jh(Lh),literal:Bh,string:Ih,docString:jh(Ih),character:jh(Ih),attributeValue:jh(Ih),number:Gh,integer:jh(Gh),float:jh(Gh),bool:jh(Bh),regexp:jh(Bh),escape:jh(Bh),color:jh(Bh),url:jh(Bh),keyword:Fh,self:jh(Fh),null:jh(Fh),atom:jh(Fh),unit:jh(Fh),modifier:jh(Fh),operatorKeyword:jh(Fh),controlKeyword:jh(Fh),definitionKeyword:jh(Fh),moduleKeyword:jh(Fh),operator:Kh,derefOperator:jh(Kh),arithmeticOperator:jh(Kh),logicOperator:jh(Kh),bitwiseOperator:jh(Kh),compareOperator:jh(Kh),updateOperator:jh(Kh),definitionOperator:jh(Kh),typeOperator:jh(Kh),controlOperator:jh(Kh),punctuation:Jh,separator:jh(Jh),bracket:tc,angleBracket:jh(tc),squareBracket:jh(tc),paren:jh(tc),brace:jh(tc),content:Nh,heading:Hh,heading1:jh(Hh),heading2:jh(Hh),heading3:jh(Hh),heading4:jh(Hh),heading5:jh(Hh),heading6:jh(Hh),contentSeparator:jh(Nh),list:jh(Nh),quote:jh(Nh),emphasis:jh(Nh),strong:jh(Nh),link:jh(Nh),monospace:jh(Nh),strikethrough:jh(Nh),inserted:jh(),deleted:jh(),changed:jh(),invalid:jh(),meta:ec,documentMeta:jh(ec),annotation:jh(ec),processingInstruction:jh(ec),definition:Rh.defineModifier("definition"),constant:Rh.defineModifier("constant"),function:Rh.defineModifier("function"),standard:Rh.defineModifier("standard"),local:Rh.defineModifier("local"),special:Rh.defineModifier("special")};for(let t in ic){let e=ic[t];e instanceof Rh&&(e.name=t)}var rc;zh([{tag:ic.link,class:"tok-link"},{tag:ic.heading,class:"tok-heading"},{tag:ic.emphasis,class:"tok-emphasis"},{tag:ic.strong,class:"tok-strong"},{tag:ic.keyword,class:"tok-keyword"},{tag:ic.atom,class:"tok-atom"},{tag:ic.bool,class:"tok-bool"},{tag:ic.url,class:"tok-url"},{tag:ic.labelName,class:"tok-labelName"},{tag:ic.inserted,class:"tok-inserted"},{tag:ic.deleted,class:"tok-deleted"},{tag:ic.literal,class:"tok-literal"},{tag:ic.string,class:"tok-string"},{tag:ic.number,class:"tok-number"},{tag:[ic.regexp,ic.escape,ic.special(ic.string)],class:"tok-string2"},{tag:ic.variableName,class:"tok-variableName"},{tag:ic.local(ic.variableName),class:"tok-variableName tok-local"},{tag:ic.definition(ic.variableName),class:"tok-variableName tok-definition"},{tag:ic.special(ic.variableName),class:"tok-variableName2"},{tag:ic.definition(ic.propertyName),class:"tok-propertyName tok-definition"},{tag:ic.typeName,class:"tok-typeName"},{tag:ic.namespace,class:"tok-namespace"},{tag:ic.className,class:"tok-className"},{tag:ic.macroName,class:"tok-macroName"},{tag:ic.propertyName,class:"tok-propertyName"},{tag:ic.operator,class:"tok-operator"},{tag:ic.comment,class:"tok-comment"},{tag:ic.meta,class:"tok-meta"},{tag:ic.invalid,class:"tok-invalid"},{tag:ic.punctuation,class:"tok-punctuation"}]);const nc=new Dl;function oc(t){return Xe.define({combine:t?e=>e.concat(t):void 0})}const sc=new Dl;class ac{constructor(t,e,i=[],r=""){this.data=t,this.name=r,bi.prototype.hasOwnProperty("tree")||Object.defineProperty(bi.prototype,"tree",{get(){return cc(this)}}),this.parser=e,this.extension=[vc.of(this),bi.languageData.of(((t,e,i)=>{let r=lc(t,e,i),n=r.type.prop(nc);if(!n)return[];let o=t.facet(n),s=r.type.prop(sc);if(s){let n=r.resolve(e-r.from,i);for(let e of s)if(e.test(n,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(o)}}return o}))].concat(i)}isActiveAt(t,e,i=-1){return lc(t,e,i).type.prop(nc)==this.data}findRegions(t){let e=t.facet(vc);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],r=(t,e)=>{if(t.prop(nc)==this.data)return void i.push({from:e,to:e+t.length});let n=t.prop(Dl.mounted);if(n){if(n.tree.prop(nc)==this.data){if(n.overlay)for(let t of n.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(n.overlay){let t=i.length;if(r(n.tree,n.overlay[0].from+e),i.length>t)return}}for(let i=0;i<t.children.length;i++){let n=t.children[i];n instanceof Hl&&r(n,t.positions[i]+e)}};return r(cc(t),0),i}get allowsNesting(){return!0}}function lc(t,e,i){let r=t.facet(vc),n=cc(t).topNode;if(!r||r.allowsNesting)for(let t=n;t;t=t.enter(e,i,Nl.ExcludeBuffers))t.type.isTop&&(n=t);return n}ac.setState=ai.define();class hc extends ac{constructor(t,e,i){super(t,e,[],i),this.parser=e}static define(t){let e=oc(t.languageData);return new hc(e,t.parser.configure({props:[nc.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new hc(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function cc(t){let e=t.field(ac.state,!1);return e?e.tree:Hl.empty}class dc{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t<i||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let uc=null;class fc{constructor(t,e,i=[],r,n,o,s,a){this.parser=t,this.state=e,this.fragments=i,this.tree=r,this.treeLen=n,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new fc(t,e,[],Hl.empty,0,i,[],null)}startParse(){return this.parser.startParse(new dc(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=Hl.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(Oh.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(i=this.parse.stoppedAt)&&void 0!==i?i:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(Oh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=uc;uc=this;try{return t()}finally{uc=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=pc(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:r,treeLen:n,viewport:o,skipped:s}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,r,n)=>e.push({fromA:t,toA:i,fromB:r,toB:n}))),i=Oh.applyChanges(i,e),r=Hl.empty,n=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){s=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);i<r&&s.push({from:i,to:r})}}}return new fc(this.parser,e,i,r,n,o,s,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:i,to:r}=this.skipped[e];i<t.to&&r>t.from&&(this.fragments=pc(this.fragments,i,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends gh{createParse(e,i,r){let n=r[0].from,o=r[r.length-1].to;return{parsedPos:n,advance(){let e=uc;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new Hl(Ul.none,[],[],o-n)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return uc}}function pc(t,e,i){return Oh.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class Oc{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new Oc(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=fc.create(t.facet(vc).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new Oc(i)}}ac.state=De.define({create:Oc.init,update(t,e){for(let t of e.effects)if(t.is(ac.setState))return t.value;return e.startState.facet(vc)!=e.state.facet(vc)?Oc.init(e.state):t.apply(e)}});let gc=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(gc=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const mc="undefined"!=typeof navigator&&(null===(rc=navigator.scheduling)||void 0===rc?void 0:rc.isInputPending)?()=>navigator.scheduling.isInputPending():null,bc=Gn.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(ac.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(ac.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=gc(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,n=i.field(ac.state);if(n.tree==n.context.tree&&n.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,t&&!mc?Math.max(25,t.timeRemaining()-5):1e9),s=n.context.treeLen<r&&i.doc.length>r+1e3,a=n.context.work((()=>mc&&mc()||Date.now()>o),r+(s?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(n.context.takeTree(),this.view.dispatch({effects:ac.setState.of(new Oc(n.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(n.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>Wn(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),vc=Xe.define({combine:t=>t.length?t[0]:null,enables:t=>[ac.state,bc,Gs.contentAttributes.compute([t],(e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}}))]});class yc{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const wc=Xe.define(),Sc=Xe.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function xc(t){let e=t.facet(Sc);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function Qc(t,e){let i="",r=t.tabSize,n=t.facet(Sc)[0];if("\t"==n){for(;e>=r;)i+="\t",e-=r;n=" "}for(let t=0;t<e;t++)i+=n;return i}function kc(t,e){t instanceof bi&&(t=new $c(t));for(let i of t.state.facet(wc)){let r=i(t,e);if(void 0!==r)return r}let i=cc(t.state);return i.length>=e?function(t,e,i){let r=e.resolveStack(i),n=r.node.enterUnfinishedNodesBefore(i);if(n!=r.node){let t=[];for(let e=n;e!=r.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return Zc(r,t,i)}(t,i,e):null}class $c{constructor(t,e={}){this.state=t,this.options=e,this.unit=xc(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:n}=this.options;return null!=r&&r>=i.from&&r<=i.to?n&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(t,e);return i.slice(t-r,Math.min(i.length,t+100-r))}column(t,e=1){let{text:i,from:r}=this.lineAt(t,e),n=this.countColumn(i,t-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(n+=o-this.countColumn(i,i.search(/\S|$/))),n}countColumn(t,e=t.length){return _i(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:r}=this.lineAt(t,e),n=this.options.overrideIndentation;if(n){let t=n(r);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Pc=new Dl;function Zc(t,e,i){for(let r=t;r;r=r.next){let t=Tc(r.node);if(t)return t(Ac.create(e,i,r))}return 0}function Tc(t){let e=t.type.prop(Pc);if(e)return e;let i,r=t.firstChild;if(r&&(i=r.type.prop(Dl.closedBy))){let e=t.lastChild,r=e&&i.indexOf(e.name)>-1;return t=>qc(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?Cc:null}function Cc(){return 0}class Ac extends $c{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new Ac(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Rc(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return Zc(this.context.next,this.base,this.pos)}}function Rc(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function Mc({closing:t,align:e=!0,units:i=1}){return r=>qc(r,e,i,t)}function qc(t,e,i,r,n){let o=t.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||n==t.pos+s,l=e?function(t){let e=t.node,i=e.childAfter(e.from),r=e.lastChild;if(!i)return null;let n=t.options.simulateBreak,o=t.state.doc.lineAt(i.from),s=null==n||n<=o.from?o.to:Math.min(o.to,n);for(let t=i.to;;){let n=e.childAfter(t);if(!n||n==r)return null;if(!n.type.isSkipped){if(n.from>=s)return null;let t=/^ */.exec(o.text.slice(i.to-o.from))[0].length;return{from:i.from,to:i.to+t}}t=n.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*i)}function Xc({except:t,units:e=1}={}){return i=>{let r=t&&t.test(i.textAfter);return i.baseIndent+(r?0:e*i.unit)}}const _c=Xe.define(),Ec=new Dl;function zc(t){let e=t.firstChild,i=t.lastChild;return e&&e.to<i.from?{from:e.to,to:i.type.isError?t.to:i.from}:null}function Vc(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Yc(t,e,i){for(let r of t.facet(_c)){let n=r(t,e,i);if(n)return n}return function(t,e,i){let r=cc(t);if(r.length<i)return null;let n=null;for(let o=r.resolveStack(i,1);o;o=o.next){let s=o.node;if(s.to<=i||s.from>i)continue;if(n&&s.from<e)break;let a=s.type.prop(Ec);if(a&&(s.to<r.length-50||r.length==t.doc.length||!Vc(s))){let r=a(s,t);r&&r.from<=i&&r.from>=e&&r.to>i&&(n=r)}}return n}(t,e,i)}function jc(t,e){let i=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return i>=r?void 0:{from:i,to:r}}const Dc=ai.define({map:jc}),Lc=ai.define({map:jc});function Wc(t){let e=[];for(let{head:i}of t.state.selection.ranges)e.some((t=>t.from<=i&&t.to>=i))||e.push(t.lineBlockAt(i));return e}const Uc=De.define({create:()=>Fr.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)if(i.is(Dc)&&!Ic(t,i.value.from,i.value.to)){let{preparePlaceholder:r}=e.state.facet(Kc),n=r?Fr.replace({widget:new id(r(e.state,i.value))}):ed;t=t.update({add:[n.range(i.value.from,i.value.to)]})}else i.is(Lc)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:r}=e.selection.main;t.between(r,r,((t,e)=>{t<r&&e>r&&(i=!0)})),i&&(t=t.update({filterFrom:r,filterTo:r,filter:(t,e)=>e<=r||t>=r}))}return t},provide:t=>Gs.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,((t,e)=>{i.push(t,e)})),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i<t.length;){let r=t[i++],n=t[i++];if("number"!=typeof r||"number"!=typeof n)throw new RangeError("Invalid JSON for fold state");e.push(ed.range(r,n))}return Fr.set(e,!0)}});function Bc(t,e,i){var r;let n=null;return null===(r=t.field(Uc,!1))||void 0===r||r.between(e,i,((t,e)=>{(!n||n.from>t)&&(n={from:t,to:e})})),n}function Ic(t,e,i){let r=!1;return t.between(e,e,((t,n)=>{t==e&&n==i&&(r=!0)})),r}function Gc(t,e){return t.field(Uc,!1)?e:e.concat(ai.appendConfig.of(Jc()))}function Nc(t,e,i=!0){let r=t.state.doc.lineAt(e.from).number,n=t.state.doc.lineAt(e.to).number;return Gs.announce.of(`${t.state.phrase(i?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${n}.`)}const Hc=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of Wc(t)){let i=Yc(t.state,e.from,e.to);if(i)return t.dispatch({effects:Gc(t.state,[Dc.of(i),Nc(t,i)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(Uc,!1))return!1;let e=[];for(let i of Wc(t)){let r=Bc(t.state,i.from,i.to);r&&e.push(Lc.of(r),Nc(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,i=[];for(let r=0;r<e.doc.length;){let n=t.lineBlockAt(r),o=Yc(e,n.from,n.to);o&&i.push(Dc.of(o)),r=(o?t.lineBlockAt(o.to):n).to+1}return i.length&&t.dispatch({effects:Gc(t.state,i)}),!!i.length}},{key:"Ctrl-Alt-]",run:t=>{let e=t.state.field(Uc,!1);if(!e||!e.size)return!1;let i=[];return e.between(0,t.state.doc.length,((t,e)=>{i.push(Lc.of({from:t,to:e}))})),t.dispatch({effects:i}),!0}}],Fc={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},Kc=Xe.define({combine:t=>vi(t,Fc)});function Jc(t){let e=[Uc,sd];return t&&e.push(Kc.of(t)),e}function td(t,e){let{state:i}=t,r=i.facet(Kc),n=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),r=Bc(t.state,i.from,i.to);r&&t.dispatch({effects:Lc.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,n,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",i.phrase("folded code")),o.title=i.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=n,o}const ed=Fr.replace({widget:new class extends Nr{toDOM(t){return td(t,null)}}});class id extends Nr{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return td(t,this.value)}}const rd={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class nd extends Ol{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function od(t={}){let e=Object.assign(Object.assign({},rd),t),i=new nd(e,!0),r=new nd(e,!1),n=Gn.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(vc)!=t.state.facet(vc)||t.startState.field(Uc,!1)!=t.state.field(Uc,!1)||cc(t.startState)!=cc(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new ki;for(let n of t.viewportLineBlocks){let o=Bc(t.state,n.from,n.to)?r:Yc(t.state,n.from,n.to)?i:null;o&&e.add(n.from,n.from,o)}return e.finish()}}),{domEventHandlers:o}=e;return[n,yl({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(n))||void 0===e?void 0:e.markers)||Qi.empty},initialSpacer:()=>new nd(e,!1),domEventHandlers:Object.assign(Object.assign({},o),{click:(t,e,i)=>{if(o.click&&o.click(t,e,i))return!0;let r=Bc(t.state,e.from,e.to);if(r)return t.dispatch({effects:Lc.of(r)}),!0;let n=Yc(t.state,e.from,e.to);return!!n&&(t.dispatch({effects:Dc.of(n)}),!0)}})}),Jc()]}const sd=Gs.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ad{constructor(t,e){let i;function r(t){let e=ji.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const n="string"==typeof e.all?e.all:e.all?r(e.all):void 0,o=e.scope;this.scope=o instanceof ac?t=>t.prop(nc)==o.data:o?t=>t==o:void 0,this.style=zh(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:n}).style,this.module=i?new ji(i):null,this.themeType=e.themeType}static define(t,e){return new ad(t,e||{})}}const ld=Xe.define(),hd=Xe.define({combine:t=>t.length?[t[0]]:null});function cd(t){let e=t.facet(ld);return e.length?e:t.facet(hd)}function dd(t,e){let i,r=[fd];return t instanceof ad&&(t.module&&r.push(Gs.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?r.push(hd.of(t)):i?r.push(ld.computeN([Gs.darkTheme],(e=>e.facet(Gs.darkTheme)==("dark"==i)?[t]:[]))):r.push(ld.of(t)),r}class ud{constructor(t){this.markCache=Object.create(null),this.tree=cc(t.state),this.decorations=this.buildDeco(t,cd(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=cc(t.state),i=cd(t.state),r=i!=cd(t.startState),{viewport:n}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length<n.to&&!r&&e.type==this.tree.type&&o>=n.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=n.to)}buildDeco(t,e){if(!e||!this.tree.length)return Fr.none;let i=new ki;for(let{from:r,to:n}of t.visibleRanges)Vh(this.tree,e,((t,e,r)=>{i.add(t,e,this.markCache[r]||(this.markCache[r]=Fr.mark({class:r})))}),r,n);return i.finish()}}const fd=We.high(Gn.fromClass(ud,{decorations:t=>t.decorations})),pd=ad.define([{tag:ic.meta,color:"#404740"},{tag:ic.link,textDecoration:"underline"},{tag:ic.heading,textDecoration:"underline",fontWeight:"bold"},{tag:ic.emphasis,fontStyle:"italic"},{tag:ic.strong,fontWeight:"bold"},{tag:ic.strikethrough,textDecoration:"line-through"},{tag:ic.keyword,color:"#708"},{tag:[ic.atom,ic.bool,ic.url,ic.contentSeparator,ic.labelName],color:"#219"},{tag:[ic.literal,ic.inserted],color:"#164"},{tag:[ic.string,ic.deleted],color:"#a11"},{tag:[ic.regexp,ic.escape,ic.special(ic.string)],color:"#e40"},{tag:ic.definition(ic.variableName),color:"#00f"},{tag:ic.local(ic.variableName),color:"#30a"},{tag:[ic.typeName,ic.namespace],color:"#085"},{tag:ic.className,color:"#167"},{tag:[ic.special(ic.variableName),ic.macroName],color:"#256"},{tag:ic.definition(ic.propertyName),color:"#00c"},{tag:ic.comment,color:"#940"},{tag:ic.invalid,color:"#f00"}]),Od=Gs.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),gd="()[]{}",md=Xe.define({combine:t=>vi(t,{afterCursor:!0,brackets:gd,maxScanDistance:1e4,renderMatch:yd})}),bd=Fr.mark({class:"cm-matchingBracket"}),vd=Fr.mark({class:"cm-nonmatchingBracket"});function yd(t){let e=[],i=t.matched?bd:vd;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const wd=De.define({create:()=>Fr.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],r=e.state.facet(md);for(let t of e.state.selection.ranges){if(!t.empty)continue;let n=Pd(e.state,t.head,-1,r)||t.head>0&&Pd(e.state,t.head-1,1,r)||r.afterCursor&&(Pd(e.state,t.head,1,r)||t.head<e.state.doc.length&&Pd(e.state,t.head+1,-1,r));n&&(i=i.concat(r.renderMatch(n,e.state)))}return Fr.set(i,!0)},provide:t=>Gs.decorations.from(t)}),Sd=[wd,Od];function xd(t={}){return[md.of(t),Sd]}const Qd=new Dl;function kd(t,e,i){let r=t.prop(e<0?Dl.openedBy:Dl.closedBy);if(r)return r;if(1==t.name.length){let r=i.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[i[r+e]]}return null}function $d(t){let e=t.type.prop(Qd);return e?e(t.node):t}function Pd(t,e,i,r={}){let n=r.maxScanDistance||1e4,o=r.brackets||gd,s=cc(t),a=s.resolveInner(e,i);for(let t=a;t;t=t.parent){let r=kd(t.type,i,o);if(r&&t.from<t.to){let n=$d(t);if(n&&(i>0?e>=n.from&&e<n.to:e>n.from&&e<=n.to))return Zd(0,0,i,t,n,r,o)}}return function(t,e,i,r,n,o,s){let a=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=s.indexOf(a);if(l<0||l%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),d=0;for(let t=0;!c.next().done&&t<=o;){let o=c.value;i<0&&(t+=o.length);let a=e+t*i;for(let t=i>0?0:o.length-1,e=i>0?o.length:-1;t!=e;t+=i){let e=s.indexOf(o[t]);if(!(e<0||r.resolveInner(a+t,1).type!=n))if(e%2==0==i>0)d++;else{if(1==d)return{start:h,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};d--}}i>0&&(t+=o.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,s,a.type,n,o)}function Zd(t,e,i,r,n,o,s){let a=r.parent,l={from:n.from,to:n.to},h=0,c=null==a?void 0:a.cursor();if(c&&(i<0?c.childBefore(r.from):c.childAfter(r.to)))do{if(i<0?c.to<=r.from:c.from>=r.to){if(0==h&&o.indexOf(c.type.name)>-1&&c.from<c.to){let t=$d(c);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(kd(c.type,i,s))h++;else if(kd(c.type,-i,s)){if(0==h){let t=$d(c);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}h--}}}while(i<0?c.prevSibling():c.nextSibling());return{start:l,matched:!1}}const Td=Object.create(null),Cd=[Ul.none],Ad=[],Rd=Object.create(null),Md=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])Md[t]=Xd(Td,e);function qd(t,e){Ad.indexOf(t)>-1||(Ad.push(t),console.warn(e))}function Xd(t,e){let i=[];for(let r of e.split(" ")){let e=[];for(let i of r.split(".")){let r=t[i]||ic[i];r?"function"==typeof r?e.length?e=e.map(r):qd(i,`Modifier ${i} used at start of tag`):e.length?qd(i,`Tag ${i} used as modifier`):e=Array.isArray(r)?r:[r]:qd(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let r=e.replace(/ /g,"_"),n=r+" "+i.map((t=>t.id)),o=Rd[n];if(o)return o.id;let s=Rd[n]=Ul.define({id:Cd.length,name:r,props:[Xh({[r]:i})]});return Cd.push(s),s.id}function _d(t,e){return({state:i,dispatch:r})=>{if(i.readOnly)return!1;let n=t(e,i);return!!n&&(r(i.update(n)),!0)}}cn.RTL,cn.LTR;const Ed=_d(Ld,0),zd=_d(Dd,0),Vd=_d(((t,e)=>Dd(t,e,function(t){let e=[];for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),n=i.to<=r.to?r:t.doc.lineAt(i.to),o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=n.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:n.to})}return e}(e))),0);function Yd(t,e){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}const jd=50;function Dd(t,e,i=e.selection.ranges){let r=i.map((t=>Yd(e,t.from).block));if(!r.every((t=>t)))return null;let n=i.map(((t,i)=>function(t,{open:e,close:i},r,n){let o,s,a=t.sliceDoc(r-jd,r),l=t.sliceDoc(n,n+jd),h=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(l)[0].length,d=a.length-h;if(a.slice(d-e.length,d)==e&&l.slice(c,c+i.length)==i)return{open:{pos:r-h,margin:h&&1},close:{pos:n+c,margin:c&&1}};n-r<=2*jd?o=s=t.sliceDoc(r,n):(o=t.sliceDoc(r,r+jd),s=t.sliceDoc(n-jd,n));let u=/^\s*/.exec(o)[0].length,f=/\s*$/.exec(s)[0].length,p=s.length-f-i.length;return o.slice(u,u+e.length)==e&&s.slice(p,p+i.length)==i?{open:{pos:r+u+e.length,margin:/\s/.test(o.charAt(u+e.length))?1:0},close:{pos:n-f-i.length,margin:/\s/.test(s.charAt(p-1))?1:0}}:null}(e,r[i],t.from,t.to)));if(2!=t&&!n.every((t=>t)))return{changes:e.changes(i.map(((t,e)=>n[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}])))};if(1!=t&&n.some((t=>t))){let t=[];for(let e,i=0;i<n.length;i++)if(e=n[i]){let n=r[i],{open:o,close:s}=e;t.push({from:o.pos-n.open.length,to:o.pos+o.margin},{from:s.pos-s.margin,to:s.pos+n.close.length})}return{changes:t}}return null}function Ld(t,e,i=e.selection.ranges){let r=[],n=-1;for(let{from:t,to:o}of i){let i=r.length,s=1e9,a=Yd(e,t).line;if(a){for(let i=t;i<=o;){let l=e.doc.lineAt(i);if(l.from>n&&(t==o||o>l.from)){n=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,i=l.text.slice(t,t+a.length)==a?t:-1;t<l.text.length&&t<s&&(s=t),r.push({line:l,comment:i,token:a,indent:t,empty:e,single:!1})}i=l.to+1}if(s<1e9)for(let t=i;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=s);r.length==i+1&&(r[i].single=!0)}}if(2!=t&&r.some((t=>t.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:i,indent:n,empty:o,single:s}of r)!s&&o||t.push({from:e.from+n,insert:i+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&r.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:n}of r)if(i>=0){let r=e.from+i,o=r+n.length;" "==e.text[o-e.from]&&o++,t.push({from:r,to:o})}return{changes:t}}return null}const Wd=ni.define(),Ud=ni.define(),Bd=Xe.define(),Id=Xe.define({combine:t=>vi(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,r)=>t(i,r)||e(i,r)})}),Gd=De.define({create:()=>du.empty,update(t,e){let i=e.state.facet(Id),r=e.annotation(Wd);if(r){let n=eu.fromTransaction(e,r.selection),o=r.side,s=0==o?t.undone:t.done;return s=n?iu(s,s.length,i.minDepth,n):su(s,e.startState.selection),new du(0==o?r.rest:s,0==o?s:r.rest)}let n=e.annotation(Ud);if("full"!=n&&"before"!=n||(t=t.isolate()),!1===e.annotation(li.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let o=eu.fromTransaction(e),s=e.annotation(li.time),a=e.annotation(li.userEvent);return o?t=t.addChanges(o,s,a,i,e):e.selection&&(t=t.addSelection(e.startState.selection,s,a,i.newGroupDelay)),"full"!=n&&"after"!=n||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new du(t.done.map(eu.fromJSON),t.undone.map(eu.fromJSON))});function Nd(t={}){return[Gd,Id.of(t),Gs.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?Fd:"historyRedo"==t.inputType?Kd:null;return!!i&&(t.preventDefault(),i(e))}})]}function Hd(t,e){return function({state:i,dispatch:r}){if(!e&&i.readOnly)return!1;let n=i.field(Gd,!1);if(!n)return!1;let o=n.pop(t,i,e);return!!o&&(r(o),!0)}}const Fd=Hd(0,!1),Kd=Hd(1,!1),Jd=Hd(0,!0),tu=Hd(1,!0);class eu{constructor(t,e,i,r,n){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=r,this.selectionsAfter=n}setSelAfter(t){return new eu(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new eu(t.changes&&Qe.fromJSON(t.changes),[],t.mapped&&xe.fromJSON(t.mapped),t.startSelection&&Re.fromJSON(t.startSelection),t.selectionsAfter.map(Re.fromJSON))}static fromTransaction(t,e){let i=nu;for(let e of t.startState.facet(Bd)){let r=e(t);r.length&&(i=i.concat(r))}return!i.length&&t.changes.empty?null:new eu(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,nu)}static selection(t){return new eu(void 0,nu,void 0,void 0,t)}}function iu(t,e,i,r){let n=e+1>i+20?e-i-1:0,o=t.slice(n,e);return o.push(r),o}function ru(t,e){return t.length?e.length?t.concat(e):t:e}const nu=[],ou=200;function su(t,e){if(t.length){let i=t[t.length-1],r=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-ou));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),iu(t,t.length-1,1e9,i.setSelAfter(r)))}return[eu.selection([e])]}function au(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function lu(t,e){if(!t.length)return t;let i=t.length,r=nu;for(;i;){let n=hu(t[i-1],e,r);if(n.changes&&!n.changes.empty||n.effects.length){let e=t.slice(0,i);return e[i-1]=n,e}e=n.mapped,i--,r=n.selectionsAfter}return r.length?[eu.selection(r)]:nu}function hu(t,e,i){let r=ru(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):nu,i);if(!t.changes)return eu.selection(r);let n=t.changes.map(e),o=e.mapDesc(t.changes,!0),s=t.mapped?t.mapped.composeDesc(o):o;return new eu(n,ai.mapEffects(t.effects,e),s,t.startSelection.map(o),r)}const cu=/^(input\.type|delete)($|\.)/;class du{constructor(t,e,i=0,r=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new du(this.done,this.undone):this}addChanges(t,e,i,r,n){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!i||cu.test(i))&&(!s.selectionsAfter.length&&e-this.prevTime<r.newGroupDelay&&r.joinToEvent(n,function(t,e){let i=[],r=!1;return t.iterChangedRanges(((t,e)=>i.push(t,e))),e.iterChangedRanges(((t,e,n,o)=>{for(let t=0;t<i.length;){let e=i[t++],s=i[t++];o>=e&&n<=s&&(r=!0)}})),r}(s.changes,t.changes))||"input.type.compose"==i)?iu(o,o.length-1,r.minDepth,new eu(t.changes.compose(s.changes),ru(ai.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,nu)):iu(o,o.length,r.minDepth,t),new du(o,nu,e,i)}addSelection(t,e,i,r){let n=this.done.length?this.done[this.done.length-1].selectionsAfter:nu;return n.length>0&&e-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&function(t,e){return t.ranges.length==e.ranges.length&&0===t.ranges.filter(((t,i)=>t.empty!=e.ranges[i].empty)).length}(n[n.length-1],t)?this:new du(su(this.done,t),this.undone,e,i)}addMapping(t){return new du(lu(this.done,t),lu(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let r=0==t?this.done:this.undone;if(0==r.length)return null;let n=r[r.length-1],o=n.selectionsAfter[0]||e.selection;if(i&&n.selectionsAfter.length)return e.update({selection:n.selectionsAfter[n.selectionsAfter.length-1],annotations:Wd.of({side:t,rest:au(r),selection:o}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(n.changes){let i=1==r.length?nu:r.slice(0,r.length-1);return n.mapped&&(i=lu(i,n.mapped)),e.update({changes:n.changes,selection:n.startSelection,effects:n.effects,annotations:Wd.of({side:t,rest:i,selection:o}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}du.empty=new du(nu,nu);const uu=[{key:"Mod-z",run:Fd,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Kd,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Kd,preventDefault:!0},{key:"Mod-u",run:Jd,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:tu,preventDefault:!0}];function fu(t,e){return Re.create(t.ranges.map(e),t.mainIndex)}function pu(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ou({state:t,dispatch:e},i){let r=fu(t.selection,i);return!r.eq(t.selection,!0)&&(e(pu(t,r)),!0)}function gu(t,e){return Re.cursor(e?t.to:t.from)}function mu(t,e){return Ou(t,(i=>i.empty?t.moveByChar(i,e):gu(i,e)))}function bu(t){return t.textDirectionAt(t.state.selection.main.head)==cn.LTR}const vu=t=>mu(t,!bu(t)),yu=t=>mu(t,bu(t));function wu(t,e){return Ou(t,(i=>i.empty?t.moveByGroup(i,e):gu(i,e)))}function Su(t,e,i){if(e.type.prop(i))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function xu(t,e,i){let r,n,o=cc(t).resolveInner(e.head),s=i?Dl.closedBy:Dl.openedBy;for(let r=e.head;;){let e=i?o.childAfter(r):o.childBefore(r);if(!e)break;Su(t,e,s)?o=e:r=i?e.to:e.from}return n=o.type.prop(s)&&(r=i?Pd(t,o.from,1):Pd(t,o.to,-1))&&r.matched?i?r.end.to:r.end.from:i?o.to:o.from,Re.cursor(n,i?-1:1)}function Qu(t,e){return Ou(t,(i=>{if(!i.empty)return gu(i,e);let r=t.moveVertically(i,e);return r.head!=i.head?r:t.moveToLineBoundary(i,e)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const ku=t=>Qu(t,!1),$u=t=>Qu(t,!0);function Pu(t){let e,i=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,n=0;if(i){for(let e of t.state.facet(Gs.scrollMargins)){let i=e(t);(null==i?void 0:i.top)&&(r=Math.max(null==i?void 0:i.top,r)),(null==i?void 0:i.bottom)&&(n=Math.max(null==i?void 0:i.bottom,n))}e=t.scrollDOM.clientHeight-r-n}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:n,selfScroll:i,height:Math.max(t.defaultLineHeight,e-5)}}function Zu(t,e){let i,r=Pu(t),{state:n}=t,o=fu(n.selection,(i=>i.empty?t.moveVertically(i,e,r.height):gu(i,e)));if(o.eq(n.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(n.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;e&&e.top>a&&e.bottom<l&&(i=Gs.scrollIntoView(o.main.head,{y:"start",yMargin:e.top-a}))}return t.dispatch(pu(n,o),{effects:i}),!0}const Tu=t=>Zu(t,!1),Cu=t=>Zu(t,!0);function Au(t,e,i){let r=t.lineBlockAt(e.head),n=t.moveToLineBoundary(e,i);if(n.head==e.head&&n.head!=(i?r.to:r.from)&&(n=t.moveToLineBoundary(e,i,!1)),!i&&n.head==r.from&&r.length){let i=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;i&&e.head!=r.from+i&&(n=Re.cursor(r.from+i))}return n}function Ru(t,e){let i=fu(t.state.selection,(t=>{let i=e(t);return Re.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(t.state.selection)&&(t.dispatch(pu(t.state,i)),!0)}function Mu(t,e){return Ru(t,(i=>t.moveByChar(i,e)))}const qu=t=>Mu(t,!bu(t)),Xu=t=>Mu(t,bu(t));function _u(t,e){return Ru(t,(i=>t.moveByGroup(i,e)))}function Eu(t,e){return Ru(t,(i=>t.moveVertically(i,e)))}const zu=t=>Eu(t,!1),Vu=t=>Eu(t,!0);function Yu(t,e){return Ru(t,(i=>t.moveVertically(i,e,Pu(t).height)))}const ju=t=>Yu(t,!1),Du=t=>Yu(t,!0),Lu=({state:t,dispatch:e})=>(e(pu(t,{anchor:0})),!0),Wu=({state:t,dispatch:e})=>(e(pu(t,{anchor:t.doc.length})),!0),Uu=({state:t,dispatch:e})=>(e(pu(t,{anchor:t.selection.main.anchor,head:0})),!0),Bu=({state:t,dispatch:e})=>(e(pu(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function Iu(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:r}=t,n=r.changeByRange((r=>{let{from:n,to:o}=r;if(n==o){let s=e(r);s<n?(i="delete.backward",s=Gu(t,s,!1)):s>n&&(i="delete.forward",s=Gu(t,s,!0)),n=Math.min(n,s),o=Math.max(o,s)}else n=Gu(t,n,!1),o=Gu(t,o,!0);return n==o?{range:r}:{changes:{from:n,to:o},range:Re.cursor(n,n<r.head?-1:1)}}));return!n.changes.empty&&(t.dispatch(r.update(n,{scrollIntoView:!0,userEvent:i,effects:"delete.selection"==i?Gs.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function Gu(t,e,i){if(t instanceof Gs)for(let r of t.state.facet(Gs.atomicRanges).map((e=>e(t))))r.between(e,e,((t,r)=>{t<e&&r>e&&(e=i?r:t)}));return e}const Nu=(t,e,i)=>Iu(t,(r=>{let n,o,s=r.from,{state:a}=t,l=a.doc.lineAt(s);if(i&&!e&&s>l.from&&s<l.from+200&&!/[^ \t]/.test(n=l.text.slice(0,s-l.from))){if("\t"==n[n.length-1])return s-1;let t=_i(n,a.tabSize)%xc(a)||xc(a);for(let e=0;e<t&&" "==n[n.length-1-e];e++)s--;o=s}else o=fe(l.text,s-l.from,e,e)+l.from,o==s&&l.number!=(e?a.doc.lines:1)?o+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(l.text.slice(o-l.from,s-l.from))&&(o=fe(l.text,o-l.from,!1,!1)+l.from);return o})),Hu=t=>Nu(t,!1,!0),Fu=t=>Nu(t,!0,!1),Ku=(t,e)=>Iu(t,(i=>{let r=i.head,{state:n}=t,o=n.doc.lineAt(r),s=n.charCategorizer(r);for(let t=null;;){if(r==(e?o.to:o.from)){r==i.head&&o.number!=(e?n.doc.lines:1)&&(r+=e?1:-1);break}let a=fe(o.text,r-o.from,e)+o.from,l=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),h=s(l);if(null!=t&&h!=t)break;" "==l&&r==i.head||(t=h),r=a}return r})),Ju=t=>Ku(t,!1);function tf(t){let e=[],i=-1;for(let r of t.selection.ranges){let n=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(r.empty||r.to!=o.from||(o=t.doc.lineAt(r.to-1)),i>=n.number){let t=e[e.length-1];t.to=o.to,t.ranges.push(r)}else e.push({from:n.from,to:o.to,ranges:[r]});i=o.number+1}return e}function ef(t,e,i){if(t.readOnly)return!1;let r=[],n=[];for(let e of tf(t)){if(i?e.to==t.doc.length:0==e.from)continue;let o=t.doc.lineAt(i?e.to+1:e.from-1),s=o.length+1;if(i){r.push({from:e.to,to:o.to},{from:e.from,insert:o.text+t.lineBreak});for(let i of e.ranges)n.push(Re.range(Math.min(t.doc.length,i.anchor+s),Math.min(t.doc.length,i.head+s)))}else{r.push({from:o.from,to:e.from},{from:e.to,insert:t.lineBreak+o.text});for(let t of e.ranges)n.push(Re.range(t.anchor-s,t.head-s))}}return!!r.length&&(e(t.update({changes:r,scrollIntoView:!0,selection:Re.create(n,t.selection.mainIndex),userEvent:"move.line"})),!0)}function rf(t,e,i){if(t.readOnly)return!1;let r=[];for(let e of tf(t))i?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const nf=sf(!1),of=sf(!0);function sf(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let r=e.changeByRange((i=>{let{from:r,to:n}=i,o=e.doc.lineAt(r),s=!t&&r==n&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,r=cc(t).resolveInner(e),n=r.childBefore(e),o=r.childAfter(e);return n&&o&&n.to<=e&&o.from>=e&&(i=n.type.prop(Dl.closedBy))&&i.indexOf(o.name)>-1&&t.doc.lineAt(n.to).from==t.doc.lineAt(o.from).from&&!/\S/.test(t.sliceDoc(n.to,o.from))?{from:n.to,to:o.from}:null}(e,r);t&&(r=n=(n<=o.to?o:e.doc.lineAt(n)).to);let a=new $c(e,{simulateBreak:r,simulateDoubleBreak:!!s}),l=kc(a,r);for(null==l&&(l=_i(/^\s*/.exec(e.doc.lineAt(r).text)[0],e.tabSize));n<o.to&&/\s/.test(o.text[n-o.from]);)n++;s?({from:r,to:n}=s):r>o.from&&r<o.from+100&&!/\S/.test(o.text.slice(0,r))&&(r=o.from);let h=["",Qc(e,l)];return s&&h.push(Qc(e,a.lineIndent(o.from,-1))),{changes:{from:r,to:n,insert:te.of(h)},range:Re.cursor(r+1+h[1].length)}}));return i(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function af(t,e){let i=-1;return t.changeByRange((r=>{let n=[];for(let o=r.from;o<=r.to;){let s=t.doc.lineAt(o);s.number>i&&(r.empty||r.to>s.from)&&(e(s,n,r),i=s.number),o=s.to+1}let o=t.changes(n);return{changes:n,range:Re.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}}))}const lf=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(af(t,((e,i)=>{i.push({from:e.from,insert:t.facet(Sc)})})),{userEvent:"input.indent"})),!0),hf=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(af(t,((e,i)=>{let r=/^\s*/.exec(e.text)[0];if(!r)return;let n=_i(r,t.tabSize),o=0,s=Qc(t,Math.max(0,n-xc(t)));for(;o<r.length&&o<s.length&&r.charCodeAt(o)==s.charCodeAt(o);)o++;i.push({from:e.from+o,to:e.from+r.length,insert:s.slice(o)})})),{userEvent:"delete.dedent"})),!0),cf=[{key:"ArrowLeft",run:vu,shift:qu,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>wu(t,!bu(t)),shift:t=>_u(t,!bu(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>Ou(t,(e=>Au(t,e,!bu(t)))),shift:t=>Ru(t,(e=>Au(t,e,!bu(t)))),preventDefault:!0},{key:"ArrowRight",run:yu,shift:Xu,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>wu(t,bu(t)),shift:t=>_u(t,bu(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>Ou(t,(e=>Au(t,e,bu(t)))),shift:t=>Ru(t,(e=>Au(t,e,bu(t)))),preventDefault:!0},{key:"ArrowUp",run:ku,shift:zu,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Lu,shift:Uu},{mac:"Ctrl-ArrowUp",run:Tu,shift:ju},{key:"ArrowDown",run:$u,shift:Vu,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Wu,shift:Bu},{mac:"Ctrl-ArrowDown",run:Cu,shift:Du},{key:"PageUp",run:Tu,shift:ju},{key:"PageDown",run:Cu,shift:Du},{key:"Home",run:t=>Ou(t,(e=>Au(t,e,!1))),shift:t=>Ru(t,(e=>Au(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:Lu,shift:Uu},{key:"End",run:t=>Ou(t,(e=>Au(t,e,!0))),shift:t=>Ru(t,(e=>Au(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:Wu,shift:Bu},{key:"Enter",run:nf,shift:nf},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:Hu,shift:Hu},{key:"Delete",run:Fu},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ju},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>Ku(t,!0)},{mac:"Mod-Backspace",run:t=>Iu(t,(e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>Iu(t,(e=>{let i=t.moveToLineBoundary(e,!0).head;return e.head<i?i:Math.min(t.state.doc.length,e.head+1)}))}].concat([{key:"Ctrl-b",run:vu,shift:qu,preventDefault:!0},{key:"Ctrl-f",run:yu,shift:Xu},{key:"Ctrl-p",run:ku,shift:zu},{key:"Ctrl-n",run:$u,shift:Vu},{key:"Ctrl-a",run:t=>Ou(t,(e=>Re.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>Ru(t,(e=>Re.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>Ou(t,(e=>Re.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>Ru(t,(e=>Re.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:Fu},{key:"Ctrl-h",run:Hu},{key:"Ctrl-k",run:t=>Iu(t,(e=>{let i=t.lineBlockAt(e.head).to;return e.head<i?i:Math.min(t.state.doc.length,e.head+1)}))},{key:"Ctrl-Alt-h",run:Ju},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:te.of(["",""])},range:Re.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,r=t.doc.lineAt(i),n=i==r.from?i-1:fe(r.text,i-r.from,!1)+r.from,o=i==r.to?i+1:fe(r.text,i-r.from,!0)+r.from;return{changes:{from:n,to:o,insert:t.doc.slice(i,o).append(t.doc.slice(n,i))},range:Re.cursor(o)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:Cu}].map((t=>({mac:t.key,run:t.run,shift:t.shift})))),df=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>Ou(t,(e=>xu(t.state,e,!bu(t)))),shift:t=>Ru(t,(e=>xu(t.state,e,!bu(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>Ou(t,(e=>xu(t.state,e,bu(t)))),shift:t=>Ru(t,(e=>xu(t.state,e,bu(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>ef(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>rf(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>ef(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>rf(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,r=null;return i.ranges.length>1?r=Re.create([i.main]):i.main.empty||(r=Re.create([Re.cursor(i.main.head)])),!!r&&(e(pu(t,r)),!0)}},{key:"Mod-Enter",run:of},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=tf(t).map((({from:e,to:i})=>Re.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:Re.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=fu(t.selection,(e=>{let i=cc(t),r=i.resolveStack(e.from,1);if(e.empty){let t=i.resolveStack(e.from,-1);t.node.from>=r.node.from&&t.node.to<=r.node.to&&(r=t)}for(let t=r;t;t=t.next){let{node:i}=t;if((i.from<e.from&&i.to>=e.to||i.to>e.to&&i.from<=e.from)&&t.next)return Re.range(i.to,i.from)}return e}));return!i.eq(t.selection)&&(e(pu(t,i)),!0)},preventDefault:!0},{key:"Mod-[",run:hf},{key:"Mod-]",run:lf},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),r=new $c(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),n=af(t,((e,n,o)=>{let s=kc(r,e.from);if(null==s)return;/\S/.test(e.text)||(s=0);let a=/^\s*/.exec(e.text)[0],l=Qc(t,s);(a!=l||o.from<e.from+a.length)&&(i[e.from]=s,n.push({from:e.from,to:e.from+a.length,insert:l}))}));return n.changes.empty||e(t.update(n,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(tf(e).map((({from:t,to:i})=>(t>0?t--:i<e.doc.length&&i++,{from:t,to:i})))),r=fu(e.selection,(e=>{let i;if(t.lineWrapping){let r=t.lineBlockAt(e.head),n=t.coordsAtPos(e.head,e.assoc||1);n&&(i=r.bottom+t.documentTop-n.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)})).map(i);return t.dispatch({changes:i,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,i){let r=!1,n=fu(t.selection,(e=>{let n=Pd(t,e.head,-1)||Pd(t,e.head,1)||e.head>0&&Pd(t,e.head-1,1)||e.head<t.doc.length&&Pd(t,e.head+1,-1);if(!n||!n.end)return e;r=!0;let o=n.start.from==e.head?n.end.to:n.end.from;return i?Re.range(e.anchor,o):Re.cursor(o)}));return!!r&&(e(pu(t,n)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),r=Yd(t.state,i.from);return r.line?Ed(t):!!r.block&&Vd(t)}},{key:"Alt-A",run:zd},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat(cf),uf={key:"Tab",run:lf,shift:hf};class ff{constructor(t,e,i,r,n,o,s,a,l,h=0,c){this.p=t,this.stack=e,this.state=i,this.reducePos=r,this.pos=n,this.score=o,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=h,this.parent=c}toString(){return`[${this.stack.filter(((t,e)=>e%3==0)).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(t,e,i=0){let r=t.parser.context;return new ff(t,[],e,i,i,0,[],0,r?new pf(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(t,e){this.stack.push(this.state,e,this.bufferBase+this.buffer.length),this.state=t}reduce(t){var e;let i=t>>19,r=65535&t,{parser:n}=this.p,o=this.reducePos<this.pos-25;o&&this.setLookAhead(this.pos);let s=n.dynamicPrecedence(r);if(s&&(this.score+=s),0==i)return this.pushState(n.getGoto(this.state,r,!0),this.reducePos),r<n.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),void this.reduceContext(r,this.reducePos);let a=this.stack.length-3*(i-1)-(262144&t?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from,h=this.reducePos-l;h>=2e3&&!(null===(e=this.p.parser.nodeSet.types[r])||void 0===e?void 0:e.isAnonymous)&&(l==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=h):this.p.lastBigReductionSize<h&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=h));let c=a?this.stack[a-1]:0,d=this.bufferBase+this.buffer.length-c;if(r<n.minRepeatTerm||131072&t){let t=n.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,t,d+4,!0)}if(262144&t)this.state=this.stack[a];else{let t=this.stack[a-3];this.state=n.getGoto(t,r,!0)}for(;this.stack.length>a;)this.stack.pop();this.reduceContext(r,l)}storeNode(t,e,i,r=4,n=!1){if(0==t&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let t=this,r=this.buffer.length;if(0==r&&t.parent&&(r=t.bufferBase-t.parent.bufferBase,t=t.parent),r>0&&0==t.buffer[r-4]&&t.buffer[r-1]>-1){if(e==i)return;if(t.buffer[r-2]>=e)return void(t.buffer[r-2]=i)}}if(n&&this.pos!=i){let n=this.buffer.length;if(n>0&&0!=this.buffer[n-4]){let t=!1;for(let e=n;e>0&&this.buffer[e-2]>i;e-=4)if(this.buffer[e-1]>=0){t=!0;break}if(t)for(;n>0&&this.buffer[n-2]>i;)this.buffer[n]=this.buffer[n-4],this.buffer[n+1]=this.buffer[n-3],this.buffer[n+2]=this.buffer[n-2],this.buffer[n+3]=this.buffer[n-1],n-=4,r>4&&(r-=4)}this.buffer[n]=t,this.buffer[n+1]=e,this.buffer[n+2]=i,this.buffer[n+3]=r}else this.buffer.push(t,e,i,r)}shift(t,e,i,r){if(131072&t)this.pushState(65535&t,this.pos);else if(262144&t)this.pos=r,this.shiftContext(e,i),e<=this.p.parser.maxNode&&this.buffer.push(e,i,r,4);else{let n=t,{parser:o}=this.p;(r>this.pos||e<=o.maxNode)&&(this.pos=r,o.stateFlag(n,1)||(this.reducePos=r)),this.pushState(n,i),this.shiftContext(e,i),e<=o.maxNode&&this.buffer.push(e,i,r,4)}}apply(t,e,i,r){65536&t?this.reduce(t):this.shift(t,e,i,r)}useNode(t,e){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=t)&&(this.p.reused.push(t),i++);let r=this.pos;this.reducePos=this.pos=r+t.length,this.pushState(e,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,t,this,this.p.stream.reset(this.pos-t.length)))}split(){let t=this,e=t.buffer.length;for(;e>0&&t.buffer[e-2]>t.reducePos;)e-=4;let i=t.buffer.slice(e),r=t.bufferBase+e;for(;t&&r==t.bufferBase;)t=t.parent;return new ff(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,t)}recoverByDelete(t,e){let i=t<=this.p.parser.maxNode;i&&this.storeNode(t,this.pos,e,4),this.storeNode(0,this.pos,e,i?8:4),this.pos=this.reducePos=e,this.score-=190}canShift(t){for(let e=new Of(this);;){let i=this.p.parser.stateSlot(e.state,4)||this.p.parser.hasAction(e.state,t);if(0==i)return!1;if(!(65536&i))return!0;e.reduce(i)}}recoverByInsert(t){if(this.stack.length>=300)return[];let e=this.p.parser.nextStates(this.state);if(e.length>8||this.stack.length>=120){let i=[];for(let r,n=0;n<e.length;n+=2)(r=e[n+1])!=this.state&&this.p.parser.hasAction(r,t)&&i.push(e[n],r);if(this.stack.length<120)for(let t=0;i.length<8&&t<e.length;t+=2){let r=e[t+1];i.some(((t,e)=>1&e&&t==r))||i.push(e[t],r)}e=i}let i=[];for(let t=0;t<e.length&&i.length<4;t+=2){let r=e[t+1];if(r==this.state)continue;let n=this.split();n.pushState(r,this.pos),n.storeNode(0,n.pos,n.pos,4,!0),n.shiftContext(e[t],this.pos),n.reducePos=this.pos,n.score-=200,i.push(n)}return i}forceReduce(){let{parser:t}=this.p,e=t.stateSlot(this.state,5);if(!(65536&e))return!1;if(!t.validAction(this.state,e)){let i=e>>19,r=65535&e,n=this.stack.length-3*i;if(n<0||t.getGoto(this.stack[n],r,!1)<0){let t=this.findForcedReduction();if(null==t)return!1;e=t}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}findForcedReduction(){let{parser:t}=this.p,e=[],i=(r,n)=>{if(!e.includes(r))return e.push(r),t.allActions(r,(e=>{if(393216&e);else if(65536&e){let i=(e>>19)-n;if(i>1){let r=65535&e,n=this.stack.length-3*i;if(n>=0&&t.getGoto(this.stack[n],r,!1)>=0)return i<<19|65536|r}}else{let t=i(e,n+1);if(null!=t)return t}}))};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:t}=this.p;return 65535==t.data[t.stateSlot(this.state,1)]&&!t.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(t){if(this.state!=t.state||this.stack.length!=t.stack.length)return!1;for(let e=0;e<this.stack.length;e+=3)if(this.stack[e]!=t.stack[e])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(t){return this.p.parser.dialect.flags[t]}shiftContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,t,this,this.p.stream.reset(e)))}reduceContext(t,e){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,t,this,this.p.stream.reset(e)))}emitContext(){let t=this.buffer.length-1;(t<0||-3!=this.buffer[t])&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let t=this.buffer.length-1;(t<0||-4!=this.buffer[t])&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(t){if(t!=this.curContext.context){let e=new pf(this.curContext.tracker,t);e.hash!=this.curContext.hash&&this.emitContext(),this.curContext=e}}setLookAhead(t){t>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=t)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class pf{constructor(t,e){this.tracker=t,this.context=e,this.hash=t.strict?t.hash(e):0}}class Of{constructor(t){this.start=t,this.state=t.state,this.stack=t.stack,this.base=this.stack.length}reduce(t){let e=65535&t,i=t>>19;0==i?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(i-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],e,!0);this.state=r}}class gf{constructor(t,e,i){this.stack=t,this.pos=e,this.index=i,this.buffer=t.buffer,0==this.index&&this.maybeNext()}static create(t,e=t.bufferBase+t.buffer.length){return new gf(t,e,e-t.bufferBase)}maybeNext(){let t=this.stack.parent;null!=t&&(this.index=this.stack.bufferBase-t.bufferBase,this.stack=t,this.buffer=t.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new gf(this.stack,this.pos,this.index)}}function mf(t,e=Uint16Array){if("string"!=typeof t)return t;let i=null;for(let r=0,n=0;r<t.length;){let o=0;for(;;){let e=t.charCodeAt(r++),i=!1;if(126==e){o=65535;break}e>=92&&e--,e>=34&&e--;let n=e-32;if(n>=46&&(n-=46,i=!0),o+=n,i)break;o*=46}i?i[n++]=o:i=new e(o)}return i}class bf{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const vf=new bf;class yf{constructor(t,e){this.input=t,this.ranges=e,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=vf,this.rangeIndex=0,this.pos=this.chunkPos=e[0].from,this.range=e[0],this.end=e[e.length-1].to,this.readNext()}resolveOffset(t,e){let i=this.range,r=this.rangeIndex,n=this.pos+t;for(;n<i.from;){if(!r)return null;let t=this.ranges[--r];n-=i.from-t.to,i=t}for(;e<0?n>i.to:n>=i.to;){if(r==this.ranges.length-1)return null;let t=this.ranges[++r];n+=t.from-i.to,i=t}return n}clipPos(t){if(t>=this.range.from&&t<this.range.to)return t;for(let e of this.ranges)if(e.to>t)return Math.max(t,e.from);return this.end}peek(t){let e,i,r=this.chunkOff+t;if(r>=0&&r<this.chunk.length)e=this.pos+t,i=this.chunk.charCodeAt(r);else{let r=this.resolveOffset(t,1);if(null==r)return-1;if(e=r,e>=this.chunk2Pos&&e<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(e-this.chunk2Pos);else{let t=this.rangeIndex,r=this.range;for(;r.to<=e;)r=this.ranges[++t];this.chunk2=this.input.chunk(this.chunk2Pos=e),e+this.chunk2.length>r.to&&(this.chunk2=this.chunk2.slice(0,r.to-e)),i=this.chunk2.charCodeAt(0)}}return e>=this.token.lookAhead&&(this.token.lookAhead=e+1),i}acceptToken(t,e=0){let i=e?this.resolveOffset(e,-1):this.pos;if(null==i||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=t,this.token.end=i}acceptTokenTo(t,e){this.token.value=t,this.token.end=e}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:t,chunkPos:e}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=t,this.chunk2Pos=e,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let t=this.input.chunk(this.pos),e=this.pos+t.length;this.chunk=e>this.range.to?t.slice(0,this.range.to-this.pos):t,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(t=1){for(this.chunkOff+=t;this.pos+t>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();t-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=t,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(t,e){if(e?(this.token=e,e.start=t,e.lookAhead=t+1,e.value=e.extended=-1):this.token=vf,this.pos!=t){if(this.pos=t,t==this.end)return this.setDone(),this;for(;t<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;t>=this.range.to;)this.range=this.ranges[++this.rangeIndex];t>=this.chunkPos&&t<this.chunkPos+this.chunk.length?this.chunkOff=t-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(t,e){if(t>=this.chunkPos&&e<=this.chunkPos+this.chunk.length)return this.chunk.slice(t-this.chunkPos,e-this.chunkPos);if(t>=this.chunk2Pos&&e<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(t-this.chunk2Pos,e-this.chunk2Pos);if(t>=this.range.from&&e<=this.range.to)return this.input.read(t,e);let i="";for(let r of this.ranges){if(r.from>=e)break;r.to>t&&(i+=this.input.read(Math.max(r.from,t),Math.min(r.to,e)))}return i}}class wf{constructor(t,e){this.data=t,this.id=e}token(t,e){let{parser:i}=e.p;Qf(this.data,t,e,this.id,i.data,i.tokenPrecTable)}}wf.prototype.contextual=wf.prototype.fallback=wf.prototype.extend=!1;class Sf{constructor(t,e,i){this.precTable=e,this.elseToken=i,this.data="string"==typeof t?mf(t):t}token(t,e){let i=t.pos,r=0;for(;;){let i=t.next<0,n=t.resolveOffset(1,1);if(Qf(this.data,t,e,0,this.data,this.precTable),t.token.value>-1)break;if(null==this.elseToken)return;if(i||r++,null==n)break;t.reset(n,t.token)}r&&(t.reset(i,t.token),t.acceptToken(this.elseToken,r))}}Sf.prototype.contextual=wf.prototype.fallback=wf.prototype.extend=!1;class xf{constructor(t,e={}){this.token=t,this.contextual=!!e.contextual,this.fallback=!!e.fallback,this.extend=!!e.extend}}function Qf(t,e,i,r,n,o){let s=0,a=1<<r,{dialect:l}=i.p.parser;t:for(;a&t[s];){let i=t[s+1];for(let r=s+3;r<i;r+=2)if((t[r+1]&a)>0){let i=t[r];if(l.allows(i)&&(-1==e.token.value||e.token.value==i||$f(i,e.token.value,n,o))){e.acceptToken(i);break}}let r=e.next,h=0,c=t[s+2];if(!(e.next<0&&c>h&&65535==t[i+3*c-3])){for(;h<c;){let n=h+c>>1,o=i+n+(n<<1),a=t[o],l=t[o+1]||65536;if(r<a)c=n;else{if(!(r>=l)){s=t[o+2],e.advance();continue t}h=n+1}}break}s=t[i+3*c-1]}}function kf(t,e,i){for(let r,n=e;65535!=(r=t[n]);n++)if(r==i)return n-e;return-1}function $f(t,e,i,r){let n=kf(i,r,e);return n<0||kf(i,r,t)<n}const Pf="undefined"!=typeof process&&process.env&&/\bparse\b/.test(process.env.LOG);let Zf=null;function Tf(t,e,i){let r=t.cursor(Nl.IncludeAnonymous);for(r.moveTo(e);;)if(!(i<0?r.childBefore(e):r.childAfter(e)))for(;;){if((i<0?r.to<e:r.from>e)&&!r.type.isError)return i<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(i<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return i<0?0:t.length}}class Cf{constructor(t,e){this.fragments=t,this.nodeSet=e,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let t=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(t){for(this.safeFrom=t.openStart?Tf(t.tree,t.from+t.offset,1)-t.offset:t.from,this.safeTo=t.openEnd?Tf(t.tree,t.to+t.offset,-1)-t.offset:t.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(t.tree),this.start.push(-t.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(t){if(t<this.nextStart)return null;for(;this.fragment&&this.safeTo<=t;)this.nextFragment();if(!this.fragment)return null;for(;;){let e=this.trees.length-1;if(e<0)return this.nextFragment(),null;let i=this.trees[e],r=this.index[e];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let n=i.children[r],o=this.start[e]+i.positions[r];if(o>t)return this.nextStart=o,null;if(n instanceof Hl){if(o==t){if(o<this.safeFrom)return null;let t=o+n.length;if(t<=this.safeTo){let e=n.prop(Dl.lookAhead);if(!e||t+e<this.fragment.to)return n}}this.index[e]++,o+n.length>=Math.max(this.safeFrom,t)&&(this.trees.push(n),this.start.push(o),this.index.push(0))}else this.index[e]++,this.nextStart=o+n.length}}}class Af{constructor(t,e){this.stream=e,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=t.tokenizers.map((t=>new bf))}getActions(t){let e=0,i=null,{parser:r}=t.p,{tokenizers:n}=r,o=r.stateSlot(t.state,3),s=t.curContext?t.curContext.hash:0,a=0;for(let r=0;r<n.length;r++){if(!(1<<r&o))continue;let l=n[r],h=this.tokens[r];if((!i||l.fallback)&&((l.contextual||h.start!=t.pos||h.mask!=o||h.context!=s)&&(this.updateCachedToken(h,l,t),h.mask=o,h.context=s),h.lookAhead>h.end+25&&(a=Math.max(h.lookAhead,a)),0!=h.value)){let r=e;if(h.extended>-1&&(e=this.addActions(t,h.extended,h.end,e)),e=this.addActions(t,h.value,h.end,e),!l.extend&&(i=h,e>r))break}}for(;this.actions.length>e;)this.actions.pop();return a&&t.setLookAhead(a),i||t.pos!=this.stream.end||(i=new bf,i.value=t.p.parser.eofTerm,i.start=i.end=t.pos,e=this.addActions(t,i.value,i.end,e)),this.mainToken=i,this.actions}getMainToken(t){if(this.mainToken)return this.mainToken;let e=new bf,{pos:i,p:r}=t;return e.start=i,e.end=Math.min(i+1,r.stream.end),e.value=i==r.stream.end?r.parser.eofTerm:0,e}updateCachedToken(t,e,i){let r=this.stream.clipPos(i.pos);if(e.token(this.stream.reset(r,t),i),t.value>-1){let{parser:e}=i.p;for(let r=0;r<e.specialized.length;r++)if(e.specialized[r]==t.value){let n=e.specializers[r](this.stream.read(t.start,t.end),i);if(n>=0&&i.p.parser.dialect.allows(n>>1)){1&n?t.extended=n>>1:t.value=n>>1;break}}}else t.value=0,t.end=this.stream.clipPos(r+1)}putAction(t,e,i,r){for(let e=0;e<r;e+=3)if(this.actions[e]==t)return r;return this.actions[r++]=t,this.actions[r++]=e,this.actions[r++]=i,r}addActions(t,e,i,r){let{state:n}=t,{parser:o}=t.p,{data:s}=o;for(let t=0;t<2;t++)for(let a=o.stateSlot(n,t?2:1);;a+=3){if(65535==s[a]){if(1!=s[a+1]){0==r&&2==s[a+1]&&(r=this.putAction(zf(s,a+2),e,i,r));break}a=zf(s,a+2)}s[a]==e&&(r=this.putAction(zf(s,a+1),e,i,r))}return r}}class Rf{constructor(t,e,i,r){this.parser=t,this.input=e,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new yf(e,r),this.tokens=new Af(t,this.stream),this.topTerm=t.top[1];let{from:n}=r[0];this.stacks=[ff.start(this,t.top[0],n)],this.fragments=i.length&&this.stream.end-n>4*t.bufferLength?new Cf(i,t.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let t,e,i=this.stacks,r=this.minStackPos,n=this.stacks=[];if(this.bigReductionCount>300&&1==i.length){let[t]=i;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<i.length;o++){let s=i[o];for(;;){if(this.tokens.mainToken=null,s.pos>r)n.push(s);else{if(this.advanceStack(s,n,i))continue;{t||(t=[],e=[]),t.push(s);let i=this.tokens.getMainToken(s);e.push(i.value,i.end)}}break}}if(!n.length){let e=t&&function(t){let e=null;for(let i of t){let t=i.p.stoppedAt;(i.pos==i.p.stream.end||null!=t&&i.pos>t)&&i.p.parser.stateFlag(i.state,2)&&(!e||e.score<i.score)&&(e=i)}return e}(t);if(e)return Pf&&console.log("Finish with "+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw Pf&&t&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+r);this.recovering||(this.recovering=5)}if(this.recovering&&t){let i=null!=this.stoppedAt&&t[0].pos>this.stoppedAt?t[0]:this.runRecovery(t,e,n);if(i)return Pf&&console.log("Force-finish "+this.stackID(i)),this.stackToTree(i.forceAll())}if(this.recovering){let t=1==this.recovering?1:3*this.recovering;if(n.length>t)for(n.sort(((t,e)=>e.score-t.score));n.length>t;)n.pop();n.some((t=>t.reducePos>r))&&this.recovering--}else if(n.length>1){t:for(let t=0;t<n.length-1;t++){let e=n[t];for(let i=t+1;i<n.length;i++){let r=n[i];if(e.sameState(r)||e.buffer.length>500&&r.buffer.length>500){if(!((e.score-r.score||e.buffer.length-r.buffer.length)>0)){n.splice(t--,1);continue t}n.splice(i--,1)}}}n.length>12&&n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let t=1;t<n.length;t++)n[t].pos<this.minStackPos&&(this.minStackPos=n[t].pos);return null}stopAt(t){if(null!=this.stoppedAt&&this.stoppedAt<t)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=t}advanceStack(t,e,i){let r=t.pos,{parser:n}=this,o=Pf?this.stackID(t)+" -> ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return t.forceReduce()?t:null;if(this.fragments){let e=t.curContext&&t.curContext.tracker.strict,i=e?t.curContext.hash:0;for(let s=this.fragments.nodeAt(r);s;){let r=this.parser.nodeSet.types[s.type.id]==s.type?n.getGoto(t.state,s.type.id):-1;if(r>-1&&s.length&&(!e||(s.prop(Dl.contextHash)||0)==i))return t.useNode(s,r),Pf&&console.log(o+this.stackID(t)+` (via reuse of ${n.getName(s.type.id)})`),!0;if(!(s instanceof Hl)||0==s.children.length||s.positions[0]>0)break;let a=s.children[0];if(!(a instanceof Hl&&0==s.positions[0]))break;s=a}}let s=n.stateSlot(t.state,4);if(s>0)return t.reduce(s),Pf&&console.log(o+this.stackID(t)+` (via always-reduce ${n.getName(65535&s)})`),!0;if(t.stack.length>=8400)for(;t.stack.length>6e3&&t.forceReduce(););let a=this.tokens.getActions(t);for(let s=0;s<a.length;){let l=a[s++],h=a[s++],c=a[s++],d=s==a.length||!i,u=d?t:t.split(),f=this.tokens.mainToken;if(u.apply(l,h,f?f.start:u.pos,c),Pf&&console.log(o+this.stackID(u)+` (via ${65536&l?`reduce of ${n.getName(65535&l)}`:"shift"} for ${n.getName(h)} @ ${r}${u==t?"":", split"})`),d)return!0;u.pos>r?e.push(u):i.push(u)}return!1}advanceFully(t,e){let i=t.pos;for(;;){if(!this.advanceStack(t,null,null))return!1;if(t.pos>i)return Mf(t,e),!0}}runRecovery(t,e,i){let r=null,n=!1;for(let o=0;o<t.length;o++){let s=t[o],a=e[o<<1],l=e[1+(o<<1)],h=Pf?this.stackID(s)+" -> ":"";if(s.deadEnd){if(n)continue;if(n=!0,s.restart(),Pf&&console.log(h+this.stackID(s)+" (restarted)"),this.advanceFully(s,i))continue}let c=s.split(),d=h;for(let t=0;c.forceReduce()&&t<10&&(Pf&&console.log(d+this.stackID(c)+" (via force-reduce)"),!this.advanceFully(c,i));t++)Pf&&(d=this.stackID(c)+" -> ");for(let t of s.recoverByInsert(a))Pf&&console.log(h+this.stackID(t)+" (via recover-insert)"),this.advanceFully(t,i);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),Pf&&console.log(h+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),Mf(s,i)):(!r||r.score<s.score)&&(r=s)}return r}stackToTree(t){return t.close(),Hl.build({buffer:gf.create(t),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:t.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(t){let e=(Zf||(Zf=new WeakMap)).get(t);return e||Zf.set(t,e=String.fromCodePoint(this.nextStackID++)),e+t}}function Mf(t,e){for(let i=0;i<e.length;i++){let r=e[i];if(r.pos==t.pos&&r.sameState(t))return void(e[i].score<t.score&&(e[i]=t))}e.push(t)}class qf{constructor(t,e,i){this.source=t,this.flags=e,this.disabled=i}allows(t){return!this.disabled||0==this.disabled[t]}}const Xf=t=>t;class _f{constructor(t){this.start=t.start,this.shift=t.shift||Xf,this.reduce=t.reduce||Xf,this.reuse=t.reuse||Xf,this.hash=t.hash||(()=>0),this.strict=!1!==t.strict}}class Ef extends gh{constructor(t){if(super(),this.wrappers=[],14!=t.version)throw new RangeError(`Parser version (${t.version}) doesn't match runtime version (14)`);let e=t.nodeNames.split(" ");this.minRepeatTerm=e.length;for(let i=0;i<t.repeatNodeCount;i++)e.push("");let i=Object.keys(t.topRules).map((e=>t.topRules[e][1])),r=[];for(let t=0;t<e.length;t++)r.push([]);function n(t,e,i){r[t].push([e,e.deserialize(String(i))])}if(t.nodeProps)for(let e of t.nodeProps){let t=e[0];"string"==typeof t&&(t=Dl[t]);for(let i=1;i<e.length;){let r=e[i++];if(r>=0)n(r,t,e[i++]);else{let o=e[i+-r];for(let s=-r;s>0;s--)n(e[i++],t,o);i++}}}this.nodeSet=new Bl(e.map(((e,n)=>Ul.define({name:n>=this.minRepeatTerm?void 0:e,id:n,props:r[n],top:i.indexOf(n)>-1,error:0==n,skipped:t.skippedNodes&&t.skippedNodes.indexOf(n)>-1})))),t.propSources&&(this.nodeSet=this.nodeSet.extend(...t.propSources)),this.strict=!1,this.bufferLength=Vl;let o=mf(t.tokenData);this.context=t.context,this.specializerSpecs=t.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let t=0;t<this.specializerSpecs.length;t++)this.specialized[t]=this.specializerSpecs[t].term;this.specializers=this.specializerSpecs.map(Vf),this.states=mf(t.states,Uint32Array),this.data=mf(t.stateData),this.goto=mf(t.goto),this.maxTerm=t.maxTerm,this.tokenizers=t.tokenizers.map((t=>"number"==typeof t?new wf(o,t):t)),this.topRules=t.topRules,this.dialects=t.dialects||{},this.dynamicPrecedences=t.dynamicPrecedences||null,this.tokenPrecTable=t.tokenPrec,this.termNames=t.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(t,e,i){let r=new Rf(this,t,e,i);for(let n of this.wrappers)r=n(r,t,e,i);return r}getGoto(t,e,i=!1){let r=this.goto;if(e>=r[0])return-1;for(let n=r[e+1];;){let e=r[n++],o=1&e,s=r[n++];if(o&&i)return s;for(let i=n+(e>>1);n<i;n++)if(r[n]==t)return s;if(o)return-1}}hasAction(t,e){let i=this.data;for(let r=0;r<2;r++)for(let n,o=this.stateSlot(t,r?2:1);;o+=3){if(65535==(n=i[o])){if(1!=i[o+1]){if(2==i[o+1])return zf(i,o+2);break}n=i[o=zf(i,o+2)]}if(n==e||0==n)return zf(i,o+1)}return 0}stateSlot(t,e){return this.states[6*t+e]}stateFlag(t,e){return(this.stateSlot(t,0)&e)>0}validAction(t,e){return!!this.allActions(t,(t=>t==e||null))}allActions(t,e){let i=this.stateSlot(t,4),r=i?e(i):void 0;for(let i=this.stateSlot(t,1);null==r;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=zf(this.data,i+2)}r=e(zf(this.data,i+1))}return r}nextStates(t){let e=[];for(let i=this.stateSlot(t,1);;i+=3){if(65535==this.data[i]){if(1!=this.data[i+1])break;i=zf(this.data,i+2)}if(!(1&this.data[i+2])){let t=this.data[i+1];e.some(((e,i)=>1&i&&e==t))||e.push(this.data[i],t)}}return e}configure(t){let e=Object.assign(Object.create(Ef.prototype),this);if(t.props&&(e.nodeSet=this.nodeSet.extend(...t.props)),t.top){let i=this.topRules[t.top];if(!i)throw new RangeError(`Invalid top rule name ${t.top}`);e.top=i}return t.tokenizers&&(e.tokenizers=this.tokenizers.map((e=>{let i=t.tokenizers.find((t=>t.from==e));return i?i.to:e}))),t.specializers&&(e.specializers=this.specializers.slice(),e.specializerSpecs=this.specializerSpecs.map(((i,r)=>{let n=t.specializers.find((t=>t.from==i.external));if(!n)return i;let o=Object.assign(Object.assign({},i),{external:n.to});return e.specializers[r]=Vf(o),o}))),t.contextTracker&&(e.context=t.contextTracker),t.dialect&&(e.dialect=this.parseDialect(t.dialect)),null!=t.strict&&(e.strict=t.strict),t.wrap&&(e.wrappers=e.wrappers.concat(t.wrap)),null!=t.bufferLength&&(e.bufferLength=t.bufferLength),e}hasWrappers(){return this.wrappers.length>0}getName(t){return this.termNames?this.termNames[t]:String(t<=this.maxNode&&this.nodeSet.types[t].name||t)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(t){let e=this.dynamicPrecedences;return null==e?0:e[t]||0}parseDialect(t){let e=Object.keys(this.dialects),i=e.map((()=>!1));if(t)for(let r of t.split(" ")){let t=e.indexOf(r);t>=0&&(i[t]=!0)}let r=null;for(let t=0;t<e.length;t++)if(!i[t])for(let i,n=this.dialects[e[t]];65535!=(i=this.data[n++]);)(r||(r=new Uint8Array(this.maxTerm+1)))[i]=1;return new qf(t,i,r)}static deserialize(t){return new Ef(t)}}function zf(t,e){return t[e]|t[e+1]<<16}function Vf(t){if(t.external){let e=t.extend?1:0;return(i,r)=>t.external(i,r)<<1|e}return t.get}const Yf={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},jf={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},Df={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function Lf(t){return 9==t||10==t||13==t||32==t}let Wf=null,Uf=null,Bf=0;function If(t,e){let i=t.pos+e;if(Bf==i&&Uf==t)return Wf;let r=t.peek(e);for(;Lf(r);)r=t.peek(++e);let n="";for(;45==(o=r)||46==o||58==o||o>=65&&o<=90||95==o||o>=97&&o<=122||o>=161;)n+=String.fromCharCode(r),r=t.peek(++e);var o;return Uf=t,Bf=i,Wf=n?n.toLowerCase():r==Gf||r==Nf?void 0:null}const Gf=63,Nf=33;function Hf(t,e){this.name=t,this.parent=e}const Ff=[6,10,7,8,9],Kf=new _f({start:null,shift:(t,e,i,r)=>Ff.indexOf(e)>-1?new Hf(If(r,1)||"",t):t,reduce:(t,e)=>20==e&&t?t.parent:t,reuse(t,e,i,r){let n=e.type.id;return 6==n||36==n?new Hf(If(r,1)||"",t):t},strict:!1}),Jf=new xf(((t,e)=>{if(60!=t.next)return void(t.next<0&&e.context&&t.acceptToken(57));t.advance();let i=47==t.next;i&&t.advance();let r=If(t,0);if(void 0===r)return;if(!r)return t.acceptToken(i?14:6);let n=e.context?e.context.name:null;if(i){if(r==n)return t.acceptToken(11);if(n&&jf[n])return t.acceptToken(57,-2);if(e.dialectEnabled(0))return t.acceptToken(12);for(let t=e.context;t;t=t.parent)if(t.name==r)return;t.acceptToken(13)}else{if("script"==r)return t.acceptToken(7);if("style"==r)return t.acceptToken(8);if("textarea"==r)return t.acceptToken(9);if(Yf.hasOwnProperty(r))return t.acceptToken(10);n&&Df[n]&&Df[n][r]?t.acceptToken(57,-1):t.acceptToken(6)}}),{contextual:!0}),tp=new xf((t=>{for(let e=0,i=0;;i++){if(t.next<0){i&&t.acceptToken(58);break}if(45==t.next)e++;else{if(62==t.next&&e>=2){i>=3&&t.acceptToken(58,-2);break}e=0}t.advance()}})),ep=new xf(((t,e)=>{if(47==t.next&&62==t.peek(1)){let i=e.dialectEnabled(1)||function(t){for(;t;t=t.parent)if("svg"==t.name||"math"==t.name)return!0;return!1}(e.context);t.acceptToken(i?5:4,2)}else 62==t.next&&t.acceptToken(4,1)}));function ip(t,e,i){let r=2+t.length;return new xf((n=>{for(let o=0,s=0,a=0;;a++){if(n.next<0){a&&n.acceptToken(e);break}if(0==o&&60==n.next||1==o&&47==n.next||o>=2&&o<r&&n.next==t.charCodeAt(o-2))o++,s++;else if(2!=o&&o!=r||!Lf(n.next)){if(o==r&&62==n.next){a>s?n.acceptToken(e,-s):n.acceptToken(i,-(s-2));break}if((10==n.next||13==n.next)&&a){n.acceptToken(e,1);break}o=s=0}else s++;n.advance()}}))}const rp=ip("script",54,1),np=ip("style",55,2),op=ip("textarea",56,3),sp=Xh({"Text RawText":ic.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":ic.angleBracket,TagName:ic.tagName,"MismatchedCloseTag/TagName":[ic.tagName,ic.invalid],AttributeName:ic.attributeName,"AttributeValue UnquotedAttributeValue":ic.attributeValue,Is:ic.definitionOperator,"EntityReference CharacterReference":ic.character,Comment:ic.blockComment,ProcessingInst:ic.processingInstru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ndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:Kf,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"],["isolate",-11,21,29,30,32,33,35,36,37,38,41,42,"ltr",-3,26,27,39,""]],propSources:[sp],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'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#e!4Q#e;'S*V;'S;=`*s<%lO*V!R!4XX!a`!cpOr*Vrs(Vsv*Vwx)ex#X*V#X#Y!+q#Y;'S*V;'S;=`*s<%lO*V!R!4{Y!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!cpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOxPP!7TP;=`<%l!6Vq!7]V!cpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!a`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!a`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!a`!cpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[rp,np,op,ep,Jf,tp,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:509},tokenPrec:511});function lp(t,e){let i=Object.create(null);for(let r of t.getChildren(23)){let t=r.getChild(24),n=r.getChild(26)||r.getChild(27);t&&(i[e.read(t.from,t.to)]=n?26==n.type.id?e.read(n.from+1,n.to-1):e.read(n.from,n.to):"")}return i}function hp(t,e){let i=t.getChild(22);return i?e.read(i.from,i.to):" "}function cp(t,e,i){let r;for(let n of i)if(!n.attrs||n.attrs(r||(r=lp(t.node.parent.firstChild,e))))return{parser:n.parser};return null}function dp(t=[],e=[]){let i=[],r=[],n=[],o=[];for(let e of t)("script"==e.tag?i:"style"==e.tag?r:"textarea"==e.tag?n:o).push(e);let s=e.length?Object.create(null):null;for(let t of e)(s[t.name]||(s[t.name]=[])).push(t);return a=(t,e)=>{let a=t.type.id;if(28==a)return cp(t,e,i);if(31==a)return cp(t,e,r);if(34==a)return cp(t,e,n);if(20==a&&o.length){let i,r=t.node,n=r.firstChild,s=n&&hp(n,e);if(s)for(let t of o)if(t.tag==s&&(!t.attrs||t.attrs(i||(i=lp(n,e))))){let e=r.lastChild,i=37==e.type.id?e.from:r.to;if(i>n.to)return{parser:t.parser,overlay:[{from:n.to,to:i}]}}}if(s&&23==a){let i,r=t.node;if(i=r.firstChild){let t=s[e.read(i.from,i.to)];if(t)for(let i of t){if(i.tagName&&i.tagName!=hp(r.parent,e))continue;let t=r.lastChild;if(26==t.type.id){let e=t.from+1,r=t.lastChild,n=t.to-(r&&r.isError?0:1);if(n>e)return{parser:i.parser,overlay:[{from:e,to:n}]}}else if(27==t.type.id)return{parser:i.parser,overlay:[{from:t.from,to:t.to}]}}}}return null},(t,e,i,r)=>new Sh(t,a,e,i,r);var a}const up=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function fp(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function pp(t){return t>=48&&t<=57}const Op=new xf(((t,e)=>{for(let i=!1,r=0,n=0;;n++){let{next:o}=t;if(fp(o)||45==o||95==o||i&&pp(o))!i&&(45!=o||n>0)&&(i=!0),r===n&&45==o&&r++,t.advance();else{if(92!=o||10==t.peek(1)){i&&t.acceptToken(40==o?100:2==r&&e.canShift(2)?2:101);break}t.advance(),t.next>-1&&t.advance(),i=!0}}})),gp=new xf((t=>{if(up.includes(t.peek(-1))){let{next:e}=t;(fp(e)||95==e||35==e||46==e||91==e||58==e&&fp(t.peek(1))||45==e||38==e)&&t.acceptToken(99)}})),mp=new xf((t=>{if(!up.includes(t.peek(-1))){let{next:e}=t;if(37==e&&(t.advance(),t.acceptToken(1)),fp(e)){do{t.advance()}while(fp(t.next)||pp(t.next));t.acceptToken(1)}}})),bp=Xh({"AtKeyword import charset namespace keyframes media supports":ic.definitionKeyword,"from to selector":ic.keyword,NamespaceName:ic.namespace,KeyframeName:ic.labelName,KeyframeRangeName:ic.operatorKeyword,TagName:ic.tagName,ClassName:ic.className,PseudoClassName:ic.constant(ic.className),IdName:ic.labelName,"FeatureName PropertyName":ic.propertyName,AttributeName:ic.attributeName,NumberLiteral:ic.number,KeywordQuery:ic.keyword,UnaryQueryOp:ic.operatorKeyword,"CallTag ValueName":ic.atom,VariableName:ic.variableName,Callee:ic.operatorKeyword,Unit:ic.unit,"UniversalSelector NestingSelector":ic.definitionOperator,MatchOp:ic.compareOperator,"ChildOp SiblingOp, LogicOp":ic.logicOperator,BinOp:ic.arithmeticOperator,Important:ic.modifier,Comment:ic.blockComment,ColorLiteral:ic.color,"ParenthesizedContent StringLiteral":ic.string,":":ic.punctuation,"PseudoOp #":ic.derefOperator,"; ,":ic.separator,"( )":ic.paren,"[ ]":ic.squareBracket,"{ }":ic.brace}),vp={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:138},yp={__proto__:null,"@import":118,"@media":142,"@charset":146,"@namespace":150,"@keyframes":156,"@supports":168},wp={__proto__:null,not:132,only:132},Sp=Ef.deserialize({version:14,states:":jQYQ[OOO#_Q[OOP#fOWOOOOQP'#Cd'#CdOOQP'#Cc'#CcO#kQ[O'#CfO$_QXO'#CaO$fQ[O'#ChO$qQ[O'#DTO$vQ[O'#DWOOQP'#Em'#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#{$Q$[$k$l$s$x%UU$f#m$h${R$z$eq!XZ]!T!m#S#U#X#q#{$Q$[$k$l$s$x%Up![Z]!T!m#S#U#X#q#{$Q$[$k$l$s$x%UQ!f^R#l!gT#^!Z#_Q|VR!yqQ!x|R#y!yQ!PWR!{rQ!RXR!|sQxUQ!wpQ#i!cQ#o!jQ#p!kQ$}$gR%Z$|SgPwQ!phQ#s!nR$n#tZfPhw!n#ta!b[`a!V!^!`#d#eR#b!^R!g^R!i_R#n!iS$g#m$hR%X${V$e#m$h${Q!rjR#w!rQdOShPwU!ldh#tR#t!nQ$Q#SU$r$Q$x%UQ$x$[R%U$sQ#_!ZR$Y#_Q$t$QR%V$tQpUS!vp$pR$p#}Q$l#qR%R$lQ!ogS#u!o#vR#v!pQ#f!_R$`#fQ$h#mR%O$hQ$|$gR%Y$|_cOPdhw!n#t^UOPdhw!n#tQ!uoQ!}tQ#OuQ#PvQ#}#RR$a#hR$R#SQ!VZQ!d]Q#V!TQ#q!m[$P#S$Q$[$s$x%UQ$S#UQ$U#XS$j#q$lQ$o#{R%Q$kR$O#RQiPR#QwQ!c[Q!kaR#Y!VU!_[a!VQ!j`Q#c!^Q#g!`Q$^#dR$_#e",nodeNames:"⚠ Unit VariableName Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee CallLiteral CallTag ParenthesizedContent ] [ LineNames LineName , PseudoClassName ArgList IdSelector # IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp } { Block Declaration PropertyName Important ; ImportStatement AtKeyword import KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList Keyfram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^;'S;=`%o<%lO%^bBbU]QOy%^z![%^![!]Bt!];'S%^;'S;=`%o<%lO%^bB{S^Qo`Oy%^z;'S%^;'S;=`%o<%lO%^nC^S!Y^Oy%^z;'S%^;'S;=`%o<%lO%^dCoS|SOy%^z;'S%^;'S;=`%o<%lO%^bDQU!OQOy%^z!`%^!`!aDd!a;'S%^;'S;=`%o<%lO%^bDkS!OQo`Oy%^z;'S%^;'S;=`%o<%lO%^bDzWOy%^z!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^bEk[![Qo`Oy%^z}%^}!OEd!O!Q%^!Q![Ed![!c%^!c!}Ed!}#T%^#T#oEd#o;'S%^;'S;=`%o<%lO%^nFfSq^Oy%^z;'S%^;'S;=`%o<%lO%^nFwSp^Oy%^z;'S%^;'S;=`%o<%lO%^bGWUOy%^z#b%^#b#cGj#c;'S%^;'S;=`%o<%lO%^bGoUo`Oy%^z#W%^#W#XHR#X;'S%^;'S;=`%o<%lO%^bHYS!bQo`Oy%^z;'S%^;'S;=`%o<%lO%^bHiUOy%^z#f%^#f#gHR#g;'S%^;'S;=`%o<%lO%^fIQS!TUOy%^z;'S%^;'S;=`%o<%lO%^nIcS!S^Oy%^z;'S%^;'S;=`%o<%lO%^fItU!RQOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^`JZP;=`<%l$}",tokenizers:[gp,mp,Op,1,2,3,4,new Sf("m~RRYZ[z{a~~g~aO#^~~dP!P!Qg~lO#_~~",28,105)],topRules:{StyleSheet:[0,4],Styles:[1,86]},specialized:[{term:100,get:t=>vp[t]||-1},{term:58,get:t=>yp[t]||-1},{term:101,get:t=>wp[t]||-1}],tokenPrec:1219});let xp=null;function Qp(){if(!xp&&"object"==typeof document&&document.body){let{style:t}=document.body,e=[],i=new Set;for(let r in t)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof t[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))),i.has(r)||(e.push(r),i.add(r)));xp=e.sort().map((t=>({type:"property",label:t})))}return xp||[]}const kp=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((t=>({type:"class",label:t}))),$p=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((t=>({type:"keyword",label:t}))).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((t=>({type:"constant",label:t})))),Pp=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((t=>({type:"type",label:t}))),Zp=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((t=>({type:"keyword",label:t}))),Tp=/^(\w[\w-]*|-\w[\w-]*|)$/,Cp=/^-(-[\w-]*)?$/,Ap=new ph,Rp=["Declaration"];function Mp(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function qp(t,e,i){if(e.to-e.from>4096){let r=Ap.get(e);if(r)return r;let n=[],o=new Set,s=e.cursor(Nl.IncludeAnonymous);if(s.firstChild())do{for(let e of qp(t,s.node,i))o.has(e.label)||(o.add(e.label),n.push(e))}while(s.nextSibling());return Ap.set(e,n),n}{let r=[],n=new Set;return e.cursor().iterate((e=>{var o;if(i(e)&&e.matchContext(Rp)&&":"==(null===(o=e.node.nextSibling)||void 0===o?void 0:o.name)){let i=t.sliceString(e.from,e.to);n.has(i)||(n.add(i),r.push({label:i,type:"variable"}))}})),r}}const Xp=t=>e=>{let{state:i,pos:r}=e,n=cc(i).resolveInner(r,-1),o=n.type.isError&&n.from==n.to-1&&"-"==i.doc.sliceString(n.from,n.to);if("PropertyName"==n.name||(o||"TagName"==n.name)&&/^(Block|Styles)$/.test(n.resolve(n.to).name))return{from:n.from,options:Qp(),validFor:Tp};if("ValueName"==n.name)return{from:n.from,options:$p,validFor:Tp};if("PseudoClassName"==n.name)return{from:n.from,options:kp,validFor:Tp};if(t(n)||(e.explicit||o)&&function(t,e){var i;if(("("==t.name||t.type.isError)&&(t=t.parent||t),"ArgList"!=t.name)return!1;let r=null===(i=t.parent)||void 0===i?void 0:i.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==e.sliceString(r.from,r.to)}(n,i.doc))return{from:t(n)||o?n.from:r,options:qp(i.doc,Mp(n),t),validFor:Cp};if("TagName"==n.name){for(let{parent:t}=n;t;t=t.parent)if("Block"==t.name)return{from:n.from,options:Qp(),validFor:Tp};return{from:n.from,options:Pp,validFor:Tp}}if("AtKeyword"==n.name)return{from:n.from,options:Zp,validFor:Tp};if(!e.explicit)return null;let s=n.resolve(r),a=s.childBefore(r);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:r,options:kp,validFor:Tp}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:r,options:$p,validFor:Tp}:"Block"==s.name||"Styles"==s.name?{from:r,options:Qp(),validFor:Tp}:null},_p=Xp((t=>"VariableName"==t.name)),Ep=hc.define({name:"css",parser:Sp.configure({props:[Pc.add({Declaration:Xc()}),Ec.add({"Block KeyframeList":zc})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function zp(){return new yc(Ep,Ep.data.of({autocomplete:_p}))}const Vp=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Yp=new _f({start:!1,shift:(t,e)=>5==e||6==e||316==e?t:317==e,strict:!1}),jp=new xf(((t,e)=>{let{next:i}=t;(125==i||-1==i||e.context)&&t.acceptToken(314)}),{contextual:!0,fallback:!0}),Dp=new xf(((t,e)=>{let i,{next:r}=t;Vp.indexOf(r)>-1||(47!=r||47!=(i=t.peek(1))&&42!=i)&&(125==r||59==r||-1==r||e.context||t.acceptToken(312))}),{contextual:!0}),Lp=new xf(((t,e)=>{91!=t.next||e.context||t.acceptToken(313)}),{contextual:!0}),Wp=new xf(((t,e)=>{let{next:i}=t;if(43==i||45==i){if(t.advance(),i==t.next){t.advance();let i=!e.context&&e.canShift(1);t.acceptToken(i?1:2)}}else 63==i&&46==t.peek(1)&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(3))}),{contextual:!0});function Up(t,e){return t>=65&&t<=90||t>=97&&t<=122||95==t||t>=192||!e&&t>=48&&t<=57}const Bp=new xf(((t,e)=>{if(60!=t.next||!e.dialectEnabled(0))return;if(t.advance(),47==t.next)return;let i=0;for(;Vp.indexOf(t.next)>-1;)t.advance(),i++;if(Up(t.next,!0)){for(t.advance(),i++;Up(t.next,!1);)t.advance(),i++;for(;Vp.indexOf(t.next)>-1;)t.advance(),i++;if(44==t.next)return;for(let e=0;;e++){if(7==e){if(!Up(t.next,!0))return;break}if(t.next!="extends".charCodeAt(e))break;t.advance(),i++}}t.acceptToken(4,-i)})),Ip=Xh({"get set async static":ic.modifier,"for while do if else switch try catch finally return throw break continue default case":ic.controlKeyword,"in of await yield void typeof delete instanceof":ic.operatorKeyword,"let var const using function class extends":ic.definitionKeyword,"import export from":ic.moduleKeyword,"with debugger as new":ic.keyword,TemplateString:ic.special(ic.string),super:ic.atom,BooleanLiteral:ic.bool,this:ic.self,null:ic.null,Star:ic.modifier,VariableName:ic.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":ic.function(ic.variableName),VariableDefinition:ic.definition(ic.variableName),Label:ic.labelName,PropertyName:ic.propertyName,PrivatePropertyName:ic.special(ic.propertyName),"CallExpression/MemberExpression/PropertyName":ic.function(ic.propertyName),"FunctionDeclaration/VariableDefinition":ic.function(ic.definition(ic.variableName)),"ClassDeclaration/VariableDefinition":ic.definition(ic.className),PropertyDefinition:ic.definition(ic.propertyName),PrivatePropertyDefinition:ic.definition(ic.special(ic.propertyName)),UpdateOp:ic.updateOperator,"LineComment Hashbang":ic.lineComment,BlockComment:ic.blockComment,Number:ic.number,String:ic.string,Escape:ic.escape,ArithOp:ic.arithmeticOperator,LogicOp:ic.logicOperator,BitOp:ic.bitwiseOperator,CompareOp:ic.compareOperator,RegExp:ic.regexp,Equals:ic.definitionOperator,Arrow:ic.function(ic.punctuation),": Spread":ic.punctuation,"( )":ic.paren,"[ ]":ic.squareBracket,"{ }":ic.brace,"InterpolationStart InterpolationEnd":ic.special(ic.brace),".":ic.derefOperator,", ;":ic.separator,"@":ic.meta,TypeName:ic.typeName,TypeDefinition:ic.definition(ic.typeName),"type enum interface implements namespace module declare":ic.definitionKeyword,"abstract global Privacy readonly override":ic.modifier,"is keyof unique infer":ic.operatorKeyword,JSXAttributeValue:ic.attributeValue,JSXText:ic.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":ic.angleBracket,"JSXIdentifier JSXNameSpacedName":ic.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":ic.attributeName,"JSXBuiltin/JSXIdentifier":ic.standard(ic.tagName)}),Gp={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Np={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Hp={__proto__:null,"<":187},Fp=Ef.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO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Q;S:qR;V:ynqOXst!Z#d%k&o&q&r&t,l,q1}2QQ&i!VR,a&ftmOXst!U!V!Z#d%k&f&o&q&r&t,l,q1}2QR,h&lT%jm,hR1^,QR,`&dQ&S|R+x&TR+n%}T&m!W&pT&n!W&pT2P,q2Q",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:Yp,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[Ip],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P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#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Dp,Lp,Wp,Bp,2,3,4,5,6,7,8,9,10,11,12,13,14,jp,new Sf("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new Sf("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:t=>Gp[t]||-1},{term:339,get:t=>Np[t]||-1},{term:92,get:t=>Hp[t]||-1}],tokenPrec:15004});class Kp{constructor(t,e,i,r){this.state=t,this.pos=e,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=cc(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),r=e.text.slice(i-e.from,this.pos-e.from),n=r.search(rO(t,!1));return n<0?null:{from:i+n,to:this.pos,text:r.slice(n)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,i){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function Jp(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function tO(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,r]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)i[r[t]]=!0}let r=Jp(e)+Jp(i)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let n=t.matchBefore(r);return n||t.explicit?{from:n?n.from:t.pos,options:e,validFor:i}:null}}class eO{constructor(t,e,i,r){this.completion=t,this.source=e,this.match=i,this.score=r}}function iO(t){return t.selection.main.from}function rO(t,e){var i;let{source:r}=t,n=e&&"^"!=r[0],o="$"!=r[r.length-1];return n||o?new RegExp(`${n?"^":""}(?:${r})${o?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const nO=ni.define(),oO=new WeakMap;function sO(t){if(!Array.isArray(t))return t;let e=oO.get(t);return e||oO.set(t,e=tO(t)),e}const aO=ai.define(),lO=ai.define();class hO{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let i=be(t,e),r=ye(i);this.chars.push(i);let n=t.slice(e,e+r),o=n.toUpperCase();this.folded.push(be(o==n?n.toLowerCase():o,0)),e+=r}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:i,any:r,precise:n,byWord:o}=this;if(1==e.length){let r=be(t,0),n=ye(r),o=n==t.length?0:-100;if(r==e[0]);else{if(r!=i[0])return null;o+=-200}return this.ret(o,[0,n])}let s=t.indexOf(this.pattern);if(0==s)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=e.length,l=0;if(s<0){for(let n=0,o=Math.min(t.length,200);n<o&&l<a;){let o=be(t,n);o!=e[l]&&o!=i[l]||(r[l++]=n),n+=ye(o)}if(l<a)return null}let h=0,c=0,d=!1,u=0,f=-1,p=-1,O=/[a-z]/.test(t),g=!0;for(let r=0,l=Math.min(t.length,200),m=0;r<l&&c<a;){let l=be(t,r);s<0&&(h<a&&l==e[h]&&(n[h++]=r),u<a&&(l==e[u]||l==i[u]?(0==u&&(f=r),p=r+1,u++):u=0));let b,v=l<255?l>=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(b=ve(l))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!r||1==v&&O||0==m&&0!=v)&&(e[c]==l||i[c]==l&&(d=!0)?o[c++]=r:o.length&&(g=!1)),m=v,r+=ye(l)}return c==a&&0==o[0]&&g?this.result((d?-200:0)-100,o,t):u==a&&0==f?this.ret(-200-t.length+(p==t.length?0:-100),[0,p]):s>-1?this.ret(-700-t.length,[s,s+this.pattern.length]):u==a?this.ret(-900-t.length,[f,p]):c==a?this.result((d?-200:0)-100-700+(g?0:-1100),o,t):2==e.length?null:this.result((r[0]?-700:0)-200-1100,r,t)}result(t,e,i){let r=[],n=0;for(let t of e){let e=t+(this.astral?ye(be(i,t)):1);n&&r[n-1]==t?r[n-1]=e:(r[n++]=t,r[n++]=e)}return this.ret(t-i.length,r)}}class cO{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),i=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==i?null:(this.matched=[0,e.length],this.score=i+(t.length==this.pattern.length?0:-100),this)}}const dO=Xe.define({combine:t=>vi(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fO,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>uO(t(i),e(i)),optionClass:(t,e)=>i=>uO(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function uO(t,e){return t?e?t+" "+e:t:e}function fO(t,e,i,r,n,o){let s,a,l=t.textDirection==cn.RTL,h=l,c=!1,d="top",u=e.left-n.left,f=n.right-e.right,p=r.right-r.left,O=r.bottom-r.top;if(h&&u<Math.min(p,f)?h=!1:!h&&f<Math.min(p,u)&&(h=!0),p<=(h?u:f))s=Math.max(n.top,Math.min(i.top,n.bottom-O))-e.top,a=Math.min(400,h?u:f);else{c=!0,a=Math.min(400,(l?e.right:n.right-e.left)-30);let t=n.bottom-e.bottom;t>=O||t>e.top?s=i.bottom-e.top:(d="bottom",s=e.bottom-i.top)}return{style:`${d}: ${s/((e.bottom-e.top)/o.offsetHeight)}px; max-width: ${a/((e.right-e.left)/o.offsetWidth)}px`,class:"cm-completionInfo-"+(c?l?"left-narrow":"right-narrow":h?"left":"right")}}function pO(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let r=Math.floor((t-e)/i);return{from:t-(r+1)*i,to:t-r*i}}class OO{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:n,selected:o}=r.open,s=t.state.facet(dO);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,r){let n=document.createElement("span");n.className="cm-completionLabel";let o=t.displayLabel||t.label,s=0;for(let t=0;t<r.length;){let e=r[t++],i=r[t++];e>s&&n.appendChild(document.createTextNode(o.slice(s,e)));let a=n.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(o.slice(e,i))),a.className="cm-completionMatchedText",s=i}return s<o.length&&n.appendChild(document.createTextNode(o.slice(s))),n},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort(((t,e)=>t.position-e.position)).map((t=>t.render))}(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=pO(n.length,o,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(i=>{let{options:r}=t.state.field(e).open;for(let e,n=i.target;n&&n!=this.dom;n=n.parentNode)if("LI"==n.nodeName&&(e=/-(\d+)$/.exec(n.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void i.preventDefault()})),this.dom.addEventListener("focusout",(e=>{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(dO).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:lO.of(null)})})),this.showOptions(n,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let i=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=r){let{options:n,selected:o,disabled:s}=i.open;r.open&&r.open.options==n||(this.range=pO(n.length,o,t.state.facet(dO).maxRenderedOptions),this.showOptions(n,i.id)),this.updateSel(),s!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=pO(e.options.length,e.selected,this.view.state.facet(dO).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:i}=e.options[e.selected],{info:r}=i;if(!r)return;let n="string"==typeof r?document.createTextNode(r):r(i);if(!n)return;"then"in n?n.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,i)})).catch((t=>Wn(this.view.state,t,"completion info"))):this.addInfoPane(n,i)}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;i.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)"LI"==i.nodeName&&i.id?r==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):r--;return e&&function(t,e){let i=t.getBoundingClientRect(),r=e.getBoundingClientRect(),n=i.height/t.offsetHeight;r.top<i.top?t.scrollTop-=(i.top-r.top)/n:r.bottom>i.bottom&&(t.scrollTop+=(r.bottom-i.bottom)/n)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),n=this.space;if(!n){let t=this.dom.ownerDocument.defaultView||window;n={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return r.top>Math.min(n.bottom,e.bottom)-10||r.bottom<Math.max(n.top,e.top)+10?null:this.view.state.facet(dO).positionInfo(this.view,e,r,i,n,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,i){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));let n=null;for(let o=i.from;o<i.to;o++){let{completion:s,match:a}=t[o],{section:l}=s;if(l){let t="string"==typeof l?l:l.name;t!=n&&(o>i.from||0==i.from)&&(n=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const h=r.appendChild(document.createElement("li"));h.id=e+"-"+o,h.setAttribute("role","option");let c=this.optionClass(s);c&&(h.className=c);for(let t of this.optionContent){let e=t(s,this.view.state,this.view,a);e&&h.appendChild(e)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function gO(t,e){return i=>new OO(i,t,e)}function mO(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class bO{constructor(t,e,i,r,n,o){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=r,this.selected=n,this.disabled=o}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new bO(this.options,SO(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,r,n){let o=function(t,e){let i=[],r=null,n=t=>{i.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some((e=>e.name==t))||r.push("string"==typeof e?{name:t}:e)}},o=e.facet(dO);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)n(new eO(e,r.source,t?t(e):[],1e9-i.length));else{let i,s=e.sliceDoc(r.from,r.to),a=o.filterStrict?new cO(s):new hO(s);for(let e of r.result.options)if(i=a.match(e.label)){let o=e.displayLabel?t?t(e,i.matched):[]:i.matched;n(new eO(e,r.source,o,i.score+(e.boost||0)))}}}if(r){let t=Object.create(null),e=0,n=(t,e)=>{var i,r;return(null!==(i=t.rank)&&void 0!==i?i:1e9)-(null!==(r=e.rank)&&void 0!==r?r:1e9)||(t.name<e.name?-1:1)};for(let i of r.sort(n))e-=1e5,t[i.name]=e;for(let e of i){let{section:i}=e.completion;i&&(e.score+=t["string"==typeof i?i:i.name])}}let s=[],a=null,l=o.compareCompletions;for(let t of i.sort(((t,e)=>e.score-t.score||l(t.completion,e.completion)))){let e=t.completion;!a||a.label!=e.label||a.detail!=e.detail||null!=a.type&&null!=e.type&&a.type!=e.type||a.apply!=e.apply||a.boost!=e.boost?s.push(t):mO(t.completion)>mO(a)&&(s[s.length-1]=t),a=t.completion}return s}(t,e);if(!o.length)return r&&t.some((t=>1==t.state))?new bO(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=e.facet(dO).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<o.length;e++)if(o[e].completion==t){s=e;break}}return new bO(o,SO(i,s),{pos:t.reduce(((t,e)=>e.hasResult()?Math.min(t,e.from):t),1e8),create:AO,above:n.aboveCursor},r?r.timestamp:Date.now(),s,!1)}map(t){return new bO(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class vO{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new vO(xO,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(dO),r=(i.override||e.languageDataAt("autocomplete",iO(e)).map(sO)).map((e=>{let r=this.active.find((t=>t.source==e))||new kO(e,this.active.some((t=>0!=t.state))?1:0);return r.update(t,i)}));r.length==this.active.length&&r.every(((t,e)=>t==this.active[e]))&&(r=this.active);let n=this.open;n&&t.docChanged&&(n=n.map(t.changes)),t.selection||r.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,r=0;;){for(;i<t.length&&!t[i].hasResult;)i++;for(;r<e.length&&!e[r].hasResult;)r++;let n=i==t.length,o=r==e.length;if(n||o)return n==o;if(t[i++].result!=e[r++].result)return!1}}(r,this.active)?n=bO.build(r,e,this.id,n,i):n&&n.disabled&&!r.some((t=>1==t.state))&&(n=null),!n&&r.every((t=>1!=t.state))&&r.some((t=>t.hasResult()))&&(r=r.map((t=>t.hasResult()?new kO(t.source,0):t)));for(let e of t.effects)e.is(ZO)&&(n=n&&n.setSelected(e.value,this.id));return r==this.active&&n==this.open?this:new vO(r,this.id,n)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?yO:wO}}const yO={"aria-autocomplete":"list"},wO={};function SO(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const xO=[];function QO(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(nO);if(i&&e.activateOnCompletion(i))return 12}let i=t.isUserEvent("input.type");return i&&e.activateOnTyping?5:i?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class kO{constructor(t,e,i=-1){this.source=t,this.state=e,this.explicitPos=i}hasResult(){return!1}update(t,e){let i=QO(t,e),r=this;(8&i||16&i&&this.touches(t))&&(r=new kO(r.source,0)),4&i&&0==r.state&&(r=new kO(this.source,1)),r=r.updateFor(t,i);for(let e of t.effects)if(e.is(aO))r=new kO(r.source,1,e.value?iO(t.state):-1);else if(e.is(lO))r=new kO(r.source,0);else if(e.is(PO))for(let t of e.value)t.source==r.source&&(r=t);return r}updateFor(t,e){return this.map(t.changes)}map(t){return t.empty||this.explicitPos<0?this:new kO(this.source,this.state,t.mapPos(this.explicitPos))}touches(t){return t.changes.touchesRange(iO(t.state))}}class $O extends kO{constructor(t,e,i,r,n){super(t,2,e),this.result=i,this.from=r,this.to=n}hasResult(){return!0}updateFor(t,e){var i;if(!(3&e))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let n=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),s=iO(t.state);if((this.explicitPos<0?s<=n:s<this.from)||s>o||!r||2&e&&iO(t.startState)==this.from)return new kO(this.source,4&e?1:0);let a=this.explicitPos<0?-1:t.changes.mapPos(this.explicitPos);return function(t,e,i,r){if(!t)return!1;let n=e.sliceDoc(i,r);return"function"==typeof t?t(n,i,r,e):rO(t,!0).test(n)}(r.validFor,t.state,n,o)?new $O(this.source,a,r,n,o):r.update&&(r=r.update(r,n,o,new Kp(t.state,s,a>=0)))?new $O(this.source,a,r,r.from,null!==(i=r.to)&&void 0!==i?i:iO(t.state)):new kO(this.source,1,a)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new $O(this.source,this.explicitPos<0?-1:t.mapPos(this.explicitPos),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new kO(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const PO=ai.define({map:(t,e)=>t.map((t=>t.map(e)))}),ZO=ai.define(),TO=De.define({create:()=>vO.start(),update:(t,e)=>t.update(e),provide:t=>[tl.from(t,(t=>t.tooltip)),Gs.contentAttributes.from(t,(t=>t.attrs))]});function CO(t,e){const i=e.completion.apply||e.completion.label;let r=t.state.field(TO).active.find((t=>t.source==e.source));return r instanceof $O&&("string"==typeof i?t.dispatch(Object.assign(Object.assign({},function(t,e,i,r){let{main:n}=t.selection,o=i-n.from,s=r-n.from;return Object.assign(Object.assign({},t.changeByRange((a=>{if(a!=n&&i!=r&&t.sliceDoc(a.from+o,a.from+s)!=t.sliceDoc(i,r))return{range:a};let l=t.toText(e);return{changes:{from:a.from+o,to:r==n.from?a.to:a.from+s,insert:l},range:Re.cursor(a.from+o+l.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,i,r.from,r.to)),{annotations:nO.of(e.completion)})):i(t,e.completion,r.from,r.to),!0)}const AO=gO(TO,CO);function RO(t,e="option"){return i=>{let r=i.state.field(TO,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<i.state.facet(dO).interactionDelay)return!1;let n,o=1;"page"==e&&(n=al(i,r.open.tooltip))&&(o=Math.max(2,Math.floor(n.dom.offsetHeight/n.dom.querySelector("li").offsetHeight)-1));let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+o*(t?1:-1):t?0:s-1;return a<0?a="page"==e?0:s-1:a>=s&&(a="page"==e?s-1:0),i.dispatch({effects:ZO.of(a)}),!0}}const MO=t=>!!t.state.field(TO,!1)&&(t.dispatch({effects:aO.of(!0)}),!0);class qO{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const XO=Gn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(TO).active)1==e.state&&this.startQuery(e)}update(t){let e=t.state.field(TO),i=t.state.facet(dO);if(!t.selectionSet&&!t.docChanged&&t.startState.field(TO)==e)return;let r=t.transactions.some((t=>{let e=QO(t,i);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let e=0;e<this.running.length;e++){let i=this.running[e];if(r||i.context.abortOnDocChange&&t.docChanged||i.updates.length+t.transactions.length>50&&Date.now()-i.time>1e3){for(let t of i.context.abortListeners)try{t()}catch(t){Wn(this.view.state,t)}i.context.abortListeners=null,this.running.splice(e--,1)}else i.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(aO)))))&&(this.pendingStart=!0);let n=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>1==t.state&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),n):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(TO);for(let t of e.active)1!=t.state||this.running.some((e=>e.active.source==t.source))||this.startQuery(t)}startQuery(t){let{state:e}=this.view,i=iO(e),r=new Kp(e,i,t.explicitPos==i,this.view),n=new qO(t,r);this.running.push(n),Promise.resolve(t.source(r)).then((t=>{n.context.aborted||(n.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:lO.of(null)}),Wn(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(dO).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(dO);for(let r=0;r<this.running.length;r++){let n=this.running[r];if(void 0===n.done)continue;if(this.running.splice(r--,1),n.done){let r=new $O(n.active.source,n.active.explicitPos,n.done,n.done.from,null!==(t=n.done.to)&&void 0!==t?t:iO(n.updates.length?n.updates[0].startState:this.view.state));for(let t of n.updates)r=r.update(t,i);if(r.hasResult()){e.push(r);continue}}let o=this.view.state.field(TO).active.find((t=>t.source==n.active.source));if(o&&1==o.state)if(null==n.done){let t=new kO(n.active.source,0);for(let e of n.updates)t=t.update(e,i);1!=t.state&&e.push(t)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:PO.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(TO,!1);if(e&&e.tooltip&&this.view.state.facet(dO).closeOnBlur){let i=e.open&&al(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:lO.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:aO.of(!1)})),20),this.composing=0}}}),_O="object"==typeof navigator&&/Win/.test(navigator.platform),EO=We.highest(Gs.domEventHandlers({keydown(t,e){let i=e.state.field(TO,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!_O||!t.altKey)||t.metaKey)return!1;let r=i.open.options[i.open.selected],n=i.active.find((t=>t.source==r.source)),o=r.completion.commitCharacters||n.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&CO(e,r),!1}})),zO=Gs.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class VO{constructor(t,e,i,r){this.field=t,this.line=e,this.from=i,this.to=r}}class YO{constructor(t,e,i){this.field=t,this.from=e,this.to=i}map(t){let e=t.mapPos(this.from,-1,Se.TrackDel),i=t.mapPos(this.to,1,Se.TrackDel);return null==e||null==i?null:new YO(this.field,e,i)}}class jO{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let i=[],r=[e],n=t.doc.lineAt(e),o=/^\s*/.exec(n.text)[0];for(let n of this.lines){if(i.length){let i=o,s=/^\t*/.exec(n)[0].length;for(let e=0;e<s;e++)i+=t.facet(Sc);r.push(e+i.length-s),n=i+n.slice(s)}i.push(n),e+=n.length+1}let s=this.fieldPositions.map((t=>new YO(t.field,r[t.line]+t.from,r[t.line]+t.to)));return{text:i,ranges:s}}static parse(t){let e,i=[],r=[],n=[];for(let o of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(o);){let t=e[1]?+e[1]:null,s=e[2]||e[3]||"",a=-1,l=s.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e<i.length;e++)(null!=t?i[e].seq==t:l&&i[e].name==l)&&(a=e);if(a<0){let e=0;for(;e<i.length&&(null==t||null!=i[e].seq&&i[e].seq<t);)e++;i.splice(e,0,{seq:t,name:l}),a=e;for(let t of n)t.field>=a&&t.field++}n.push(new VO(a,r.length,e.index,e.index+l.length)),o=o.slice(0,e.index)+s+o.slice(e.index+e[0].length)}o=o.replace(/\\([{}])/g,((t,e,i)=>{for(let t of n)t.line==r.length&&t.from>i&&(t.from--,t.to--);return e})),r.push(o)}return new jO(r,n)}}let DO=Fr.widget({widget:new class extends Nr{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),LO=Fr.mark({class:"cm-snippetField"});class WO{constructor(t,e){this.ranges=t,this.active=e,this.deco=Fr.set(t.map((t=>(t.from==t.to?DO:LO).range(t.from,t.to))))}map(t){let e=[];for(let i of this.ranges){let r=i.map(t);if(!r)return null;e.push(r)}return new WO(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const UO=ai.define({map:(t,e)=>t&&t.map(e)}),BO=ai.define(),IO=De.define({create:()=>null,update(t,e){for(let i of e.effects){if(i.is(UO))return i.value;if(i.is(BO)&&t)return new WO(t.ranges,i.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Gs.decorations.from(t,(t=>t?t.deco:Fr.none))});function GO(t,e){return Re.create(t.filter((t=>t.field==e)).map((t=>Re.range(t.from,t.to))))}function NO(t){let e=jO.parse(t);return(t,i,r,n)=>{let{text:o,ranges:s}=e.instantiate(t.state,r),a={changes:{from:r,to:n,insert:te.of(o)},scrollIntoView:!0,annotations:i?[nO.of(i),li.userEvent.of("input.complete")]:void 0};if(s.length&&(a.selection=GO(s,0)),s.some((t=>t.field>0))){let e=new WO(s,0),i=a.effects=[UO.of(e)];void 0===t.state.field(IO,!1)&&i.push(ai.appendConfig.of([IO,JO,eg,zO]))}t.dispatch(t.state.update(a))}}function HO(t){return({state:e,dispatch:i})=>{let r=e.field(IO,!1);if(!r||t<0&&0==r.active)return!1;let n=r.active+t,o=t>0&&!r.ranges.some((e=>e.field==n+t));return i(e.update({selection:GO(r.ranges,n),effects:UO.of(o?null:new WO(r.ranges,n)),scrollIntoView:!0})),!0}}const FO=[{key:"Tab",run:HO(1),shift:HO(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(IO,!1)&&(e(t.update({effects:UO.of(null)})),!0)}],KO=Xe.define({combine:t=>t.length?t[0]:FO}),JO=We.highest(ia.compute([KO],(t=>t.facet(KO))));function tg(t,e){return Object.assign(Object.assign({},e),{apply:NO(t)})}const eg=Gs.domEventHandlers({mousedown(t,e){let i,r=e.state.field(IO,!1);if(!r||null==(i=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let n=r.ranges.find((t=>t.from<=i&&t.to>=i));return!(!n||n.field==r.active||(e.dispatch({selection:GO(r.ranges,n.field),effects:UO.of(r.ranges.some((t=>t.field>n.field))?new WO(r.ranges,n.field):null),scrollIntoView:!0}),0))}}),ig={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},rg=ai.define({map(t,e){let i=e.mapPos(t,-1,Se.TrackAfter);return null==i?void 0:i}}),ng=new class extends yi{};ng.startSide=1,ng.endSide=-1;const og=De.define({create:()=>Qi.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(rg)&&(t=t.update({add:[ng.range(i.value,i.value+1)]}));return t}}),sg="()[]{}<>";function ag(t){for(let e=0;e<8;e+=2)if(sg.charCodeAt(e)==t)return sg.charAt(e+1);return ve(t<128?t:t+1)}function lg(t,e){return t.languageDataAt("closeBrackets",e)[0]||ig}const hg="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),cg=Gs.inputHandler.of(((t,e,i,r)=>{if((hg?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let n=t.state.selection.main;if(r.length>2||2==r.length&&1==ye(be(r,0))||e!=n.from||i!=n.to)return!1;let o=function(t,e){let i=lg(t,t.selection.main.head),r=i.brackets||ig.brackets;for(let n of r){let o=ag(be(n,0));if(e==n)return o==n?gg(t,n,r.indexOf(n+n+n)>-1,i):pg(t,n,o,i.before||ig.before);if(e==o&&ug(t,t.selection.main.from))return Og(t,0,o)}return null}(t.state,r);return!!o&&(t.dispatch(o),!0)})),dg=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=lg(t,t.selection.main.head).brackets||ig.brackets,r=null,n=t.changeByRange((e=>{if(e.empty){let r=function(t,e){let i=t.sliceString(e-2,e);return ye(be(i,0))==i.length?i:i.slice(1)}(t.doc,e.head);for(let n of i)if(n==r&&fg(t.doc,e.head)==ag(be(n,0)))return{changes:{from:e.head-n.length,to:e.head+n.length},range:Re.cursor(e.head-n.length)}}return{range:r=e}}));return r||e(t.update(n,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function ug(t,e){let i=!1;return t.field(og).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function fg(t,e){let i=t.sliceString(e,e+2);return i.slice(0,ye(be(i,0)))}function pg(t,e,i,r){let n=null,o=t.changeByRange((o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:i,from:o.to}],effects:rg.of(o.to+e.length),range:Re.range(o.anchor+e.length,o.head+e.length)};let s=fg(t.doc,o.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+i,from:o.head},effects:rg.of(o.head+e.length),range:Re.cursor(o.head+e.length)}:{range:n=o}}));return n?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Og(t,e,i){let r=null,n=t.changeByRange((e=>e.empty&&fg(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:Re.cursor(e.head+i.length)}:r={range:e}));return r?null:t.update(n,{scrollIntoView:!0,userEvent:"input.type"})}function gg(t,e,i,r){let n=r.stringPrefixes||ig.stringPrefixes,o=null,s=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:e,from:r.to}],effects:rg.of(r.to+e.length),range:Re.range(r.anchor+e.length,r.head+e.length)};let s,a=r.head,l=fg(t.doc,a);if(l==e){if(mg(t,a))return{changes:{insert:e+e,from:a},effects:rg.of(a+e.length),range:Re.cursor(a+e.length)};if(ug(t,a)){let r=i&&t.sliceDoc(a,a+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:a,to:a+r.length,insert:r},range:Re.cursor(a+r.length)}}}else{if(i&&t.sliceDoc(a-2*e.length,a)==e+e&&(s=bg(t,a-2*e.length,n))>-1&&mg(t,s))return{changes:{insert:e+e+e+e,from:a},effects:rg.of(a+e.length),range:Re.cursor(a+e.length)};if(t.charCategorizer(a)(l)!=Oi.Word&&bg(t,a,n)>-1&&!function(t,e,i,r){let n=cc(t).resolveInner(e,-1),o=r.reduce(((t,e)=>Math.max(t,e.length)),0);for(let s=0;s<5;s++){let s=t.sliceDoc(n.from,Math.min(n.to,n.from+i.length+o)),a=s.indexOf(i);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let e=n.firstChild;for(;e&&e.from==n.from&&e.to-e.from>i.length+a;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let l=n.to==e&&n.parent;if(!l)break;n=l}return!1}(t,a,e,n))return{changes:{insert:e+e,from:a},effects:rg.of(a+e.length),range:Re.cursor(a+e.length)}}return{range:o=r}}));return o?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function mg(t,e){let i=cc(t).resolveInner(e+1);return i.parent&&i.from==e}function bg(t,e,i){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Oi.Word)return e;for(let n of i){let i=e-n.length;if(t.sliceDoc(i,e)==n&&r(t.sliceDoc(i-1,i))!=Oi.Word)return i}return-1}function vg(t={}){return[EO,TO,dO.of(t),XO,wg,zO]}const yg=[{key:"Ctrl-Space",run:MO},{mac:"Alt-`",run:MO},{key:"Escape",run:t=>{let e=t.state.field(TO,!1);return!(!e||!e.active.some((t=>0!=t.state))||(t.dispatch({effects:lO.of(null)}),0))}},{key:"ArrowDown",run:RO(!0)},{key:"ArrowUp",run:RO(!1)},{key:"PageDown",run:RO(!0,"page")},{key:"PageUp",run:RO(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(TO,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(dO).interactionDelay)&&CO(t,e.open.options[e.open.selected])}}],wg=We.highest(ia.computeN([dO],(t=>t.facet(dO).defaultKeymap?[yg]:[]))),Sg=[tg("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),tg("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),tg("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),tg("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),tg("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),tg("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),tg("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),tg("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),tg("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),tg('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),tg('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],xg=Sg.concat([tg("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),tg("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),tg("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Qg=new ph,kg=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function $g(t){return(e,i)=>{let r=e.node.getChild("VariableDefinition");return r&&i(r,t),!0}}const Pg=["FunctionDeclaration"],Zg={FunctionDeclaration:$g("function"),ClassDeclaration:$g("class"),ClassExpression:()=>!0,EnumDeclaration:$g("constant"),TypeAliasDeclaration:$g("type"),NamespaceDeclaration:$g("namespace"),VariableDefinition(t,e){t.matchContext(Pg)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function Tg(t,e){let i=Qg.get(e);if(i)return i;let r=[],n=!0;function o(e,i){let n=t.sliceString(e.from,e.to);r.push({label:n,type:i})}return e.cursor(Nl.IncludeAnonymous).iterate((e=>{if(n)n=!1;else if(e.name){let t=Zg[e.name];if(t&&t(e,o)||kg.has(e.name))return!1}else if(e.to-e.from>8192){for(let i of Tg(t,e.node))r.push(i);return!1}})),Qg.set(e,r),r}const Cg=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Ag=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Rg(t){let e=cc(t.state).resolveInner(t.pos,-1);if(Ag.indexOf(e.name)>-1)return null;let i="VariableName"==e.name||e.to-e.from<20&&Cg.test(t.state.sliceDoc(e.from,e.to));if(!i&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)kg.has(i.name)&&(r=r.concat(Tg(t.state.doc,i)));return{options:r,from:i?e.from:t.pos,validFor:Cg}}const Mg=hc.define({name:"javascript",parser:Fp.configure({props:[Pc.add({IfStatement:Xc({except:/^\s*({|else\b)/}),TryStatement:Xc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:t=>t.baseIndent,SwitchBody:t=>{let e=t.textAfter,i=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(i?0:r?1:2)*t.unit},Block:Mc({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Xc({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),Ec.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":zc,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),qg={test:t=>/^JSX/.test(t.name),facet:oc({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Xg=Mg.configure({dialect:"ts"},"typescript"),_g=Mg.configure({dialect:"jsx",props:[sc.add((t=>t.isTop?[qg]:void 0))]}),Eg=Mg.configure({dialect:"jsx ts",props:[sc.add((t=>t.isTop?[qg]:void 0))]},"typescript");let zg=t=>({label:t,type:"keyword"});const Vg="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(zg),Yg=Vg.concat(["declare","implements","private","protected","public"].map(zg));function jg(t={}){let e=t.jsx?t.typescript?Eg:_g:t.typescript?Xg:Mg,i=t.typescript?xg.concat(Yg):Sg.concat(Vg);return new yc(e,[Mg.data.of({autocomplete:(r=Ag,n=tO(i),t=>{for(let e=cc(t.state).resolveInner(t.pos,-1);e;e=e.parent){if(r.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return n(t)})}),Mg.data.of({autocomplete:Rg}),t.jsx?Wg:[]]);var r,n}function Dg(t,e,i=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,i));return""}const Lg="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),Wg=Gs.inputHandler.of(((t,e,i,r,n)=>{if((Lg?t.composing:t.compositionStarted)||t.state.readOnly||e!=i||">"!=r&&"/"!=r||!Mg.isActiveAt(t.state,e,-1))return!1;let o=n(),{state:s}=o,a=s.changeByRange((t=>{var e;let i,{head:n}=t,o=cc(s).resolveInner(n-1,-1);if("JSXStartTag"==o.name&&(o=o.parent),s.doc.sliceString(n-1,n)!=r||"JSXAttributeValue"==o.name&&o.to>n);else{if(">"==r&&"JSXFragmentTag"==o.name)return{range:t,changes:{from:n,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==o.name){let t=o.parent,r=t.parent;if(r&&t.from==n-2&&((i=Dg(s.doc,r.firstChild,n))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${i}>`;return{range:Re.cursor(n+t.length,-1),changes:{from:n,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(o);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(s.doc.sliceString(n,n+2))&&(i=Dg(s.doc,e,n)))return{range:t,changes:{from:n,insert:`</${i}>`}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)})),Ug=["_blank","_self","_top","_parent"],Bg=["ascii","utf-8","utf-16","latin1","latin1"],Ig=["get","post","put","delete"],Gg=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Ng=["true","false"],Hg={},Fg={a:{attrs:{href:null,ping:null,type:null,media:null,target:Ug,hreflang:null}},abbr:Hg,address:Hg,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Hg,aside:Hg,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Hg,base:{attrs:{href:null,target:Ug}},bdi:Hg,bdo:Hg,blockquote:{attrs:{cite:null}},body:Hg,br:Hg,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:Gg,formmethod:Ig,formnovalidate:["novalidate"],formtarget:Ug,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Hg,center:Hg,cite:Hg,code:Hg,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Hg,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Hg,div:Hg,dl:Hg,dt:Hg,em:Hg,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Hg,figure:Hg,footer:Hg,form:{attrs:{action:null,name:null,"accept-charset":Bg,autocomplete:["on","off"],enctype:Gg,method:Ig,novalidate:["novalidate"],target:Ug}},h1:Hg,h2:Hg,h3:Hg,h4:Hg,h5:Hg,h6:Hg,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Hg,hgroup:Hg,hr:Hg,html:{attrs:{manifest:null}},i:Hg,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:Gg,formmethod:Ig,formnovalidate:["novalidate"],formtarget:Ug,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Hg,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Hg,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Hg,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:Bg,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Hg,noscript:Hg,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Hg,param:{attrs:{name:null,value:null}},pre:Hg,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Hg,rt:Hg,ruby:Hg,samp:Hg,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:Bg}},section:Hg,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Hg,source:{attrs:{src:null,type:null,media:null}},span:Hg,strong:Hg,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Hg,summary:Hg,sup:Hg,table:Hg,tbody:Hg,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Hg,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Hg,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Hg,time:{attrs:{datetime:null}},title:Hg,tr:Hg,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Hg,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Hg},Kg={accesskey:null,class:null,contenteditable:Ng,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Ng,autocorrect:Ng,autocapitalize:Ng,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Ng,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Ng,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Ng,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Ng,"aria-hidden":Ng,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Ng,"aria-multiselectable":Ng,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Ng,"aria-relevant":null,"aria-required":Ng,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Jg="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((t=>"on"+t));for(let t of Jg)Kg[t]=null;class tm{constructor(t,e){this.tags=Object.assign(Object.assign({},Fg),t),this.globalAttrs=Object.assign(Object.assign({},Kg),e),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function em(t,e,i=t.length){if(!e)return"";let r=e.firstChild,n=r&&r.getChild("TagName");return n?t.sliceString(n.from,Math.min(n.to,i)):""}function im(t,e=!1){for(;t;t=t.parent)if("Element"==t.name){if(!e)return t;e=!1}return null}function rm(t,e,i){let r=i.tags[em(t,im(e))];return(null==r?void 0:r.children)||i.allTags}function nm(t,e){let i=[];for(let r=im(e);r&&!r.type.isTop;r=im(r.parent)){let n=em(t,r);if(n&&"CloseTag"==r.lastChild.name)break;n&&i.indexOf(n)<0&&("EndTag"==e.name||e.from>=r.firstChild.to)&&i.push(n)}return i}tm.default=new tm;const om=/^[:\-\.\w\u00b7-\uffff]*$/;function sm(t,e,i,r,n){let o=/\s*>/.test(t.sliceDoc(n,n+5))?"":">",s=im(i,!0);return{from:r,to:n,options:rm(t.doc,s,e).map((t=>({label:t,type:"type"}))).concat(nm(t.doc,i).map(((t,e)=>({label:"/"+t,apply:"/"+t+o,type:"type",boost:99-e})))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function am(t,e,i,r){let n=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:i,to:r,options:nm(t.doc,e).map(((t,e)=>({label:t,apply:t+n,type:"type",boost:99-e}))),validFor:om}}function lm(t){let{extraTags:e,extraGlobalAttributes:i}=t,r=i||e?new tm(e,i):tm.default;return t=>function(t,e){let{state:i,pos:r}=e,n=cc(i).resolveInner(r,-1),o=n.resolve(r);for(let t,e=r;o==n&&(t=n.childBefore(e));){let i=t.lastChild;if(!i||!i.type.isError||i.from<i.to)break;o=n=t,e=i.from}return"TagName"==n.name?n.parent&&/CloseTag$/.test(n.parent.name)?am(i,n,n.from,r):sm(i,t,n,n.from,r):"StartTag"==n.name?sm(i,t,n,r,r):"StartCloseTag"==n.name||"IncompleteCloseTag"==n.name?am(i,n,r,r):"OpenTag"==n.name||"SelfClosingTag"==n.name||"AttributeName"==n.name?function(t,e,i,r,n){let o=im(i),s=o?e.tags[em(t.doc,o)]:null,a=s&&s.attrs?Object.keys(s.attrs):[];return{from:r,to:n,options:(s&&!1===s.globalAttrs?a:a.length?a.concat(e.globalAttrNames):e.globalAttrNames).map((t=>({label:t,type:"property"}))),validFor:om}}(i,t,n,"AttributeName"==n.name?n.from:r,r):"Is"==n.name||"AttributeValue"==n.name||"UnquotedAttributeValue"==n.name?function(t,e,i,r,n){var o;let s,a=null===(o=i.parent)||void 0===o?void 0:o.getChild("AttributeName"),l=[];if(a){let o=t.sliceDoc(a.from,a.to),h=e.globalAttrs[o];if(!h){let r=im(i),n=r?e.tags[em(t.doc,r)]:null;h=(null==n?void 0:n.attrs)&&n.attrs[o]}if(h){let e=t.sliceDoc(r,n).toLowerCase(),i='"',o='"';/^['"]/.test(e)?(s='"'==e[0]?/^[^"]*$/:/^[^']*$/,i="",o=t.sliceDoc(n,n+1)==e[0]?"":e[0],e=e.slice(1),r++):s=/^[^\s<>='"]*$/;for(let t of h)l.push({label:t,apply:i+t+o,type:"constant"})}}return{from:r,to:n,options:l,validFor:s}}(i,t,n,"Is"==n.name?r:n.from,r):!e.explicit||"Element"!=o.name&&"Text"!=o.name&&"Document"!=o.name?null:function(t,e,i,r){let n=[],o=0;for(let r of rm(t.doc,i,e))n.push({label:"<"+r,type:"type"});for(let e of nm(t.doc,i))n.push({label:"</"+e+">",type:"type",boost:99-o++});return{from:r,to:r,options:n,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(i,t,n,r)}(r,t)}const hm=Mg.parser.configure({top:"SingleExpression"}),cm=[{tag:"script",attrs:t=>"text/typescript"==t.type||"ts"==t.lang,parser:Xg.parser},{tag:"script",attrs:t=>"text/babel"==t.type||"text/jsx"==t.type,parser:_g.parser},{tag:"script",attrs:t=>"text/typescript-jsx"==t.type,parser:Eg.parser},{tag:"script",attrs:t=>/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type),parser:hm},{tag:"script",attrs:t=>!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type),parser:Mg.parser},{tag:"style",attrs:t=>(!t.lang||"css"==t.lang)&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type)),parser:Ep.parser}],dm=[{name:"style",parser:Ep.parser.configure({top:"Styles"})}].concat(Jg.map((t=>({name:t,parser:Mg.parser})))),um=hc.define({name:"html",parser:ap.configure({props:[Pc.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag":t=>t.column(t.node.from)+t.unit,Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e,i=null;for(let e=t.node;;){let t=e.lastChild;if(!t||"Element"!=t.name||t.to!=e.to)break;i=e=t}return i&&(!(e=i.lastChild)||"CloseTag"!=e.name&&"SelfClosingTag"!=e.name)?t.lineIndent(i.from)+t.unit:null}}),Ec.add({Element(t){let e=t.firstChild,i=t.lastChild;return e&&"OpenTag"==e.name?{from:e.to,to:"CloseTag"==i.name?i.from:t.to}:null}}),Qd.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),fm=um.configure({wrap:dp(cm,dm)});function pm(t={}){let e,i="";!1===t.matchClosingTags&&(i="noMatch"),!0===t.selfClosingTags&&(i=(i?i+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(e=dp((t.nestedLanguages||[]).concat(cm),(t.nestedAttributes||[]).concat(dm)));let r=e?um.configure({wrap:e,dialect:i}):i?fm.configure({dialect:i}):fm;return new yc(r,[fm.data.of({autocomplete:lm(t)}),!1!==t.autoCloseTags?gm:[],jg().support,zp().support])}const Om=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),gm=Gs.inputHandler.of(((t,e,i,r,n)=>{if(t.composing||t.state.readOnly||e!=i||">"!=r&&"/"!=r||!fm.isActiveAt(t.state,e,-1))return!1;let o=n(),{state:s}=o,a=s.changeByRange((t=>{var e,i,n;let o,a=s.doc.sliceString(t.from-1,t.to)==r,{head:l}=t,h=cc(s).resolveInner(l,-1);if(a&&">"==r&&"EndTag"==h.name){let r=h.parent;if("CloseTag"!=(null===(i=null===(e=r.parent)||void 0===e?void 0:e.lastChild)||void 0===i?void 0:i.name)&&(o=em(s.doc,r.parent,l))&&!Om.has(o))return{range:t,changes:{from:l,to:l+(">"===s.doc.sliceString(l,l+1)?1:0),insert:`</${o}>`}}}else if(a&&"/"==r&&"IncompleteCloseTag"==h.name){let t=h.parent;if(h.from==l-2&&"CloseTag"!=(null===(n=t.lastChild)||void 0===n?void 0:n.name)&&(o=em(s.doc,t,l))&&!Om.has(o)){let t=l+(">"===s.doc.sliceString(l,l+1)?1:0),e=`${o}>`;return{range:Re.cursor(l+e.length,-1),changes:{from:l,to:t,insert:e}}}}return{range:t}}));return!a.changes.empty&&(t.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}));function mm(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,i=arguments[1];if(i&&"object"==typeof i&&null==i.nodeType&&!Array.isArray(i)){for(var r in i)if(Object.prototype.hasOwnProperty.call(i,r)){var n=i[r];"string"==typeof n?t.setAttribute(r,n):null!=n&&(t[r]=n)}e++}for(;e<arguments.length;e++)bm(t,arguments[e]);return t}function bm(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var i=0;i<e.length;i++)bm(t,e[i])}}const vm="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class ym{constructor(t,e,i=0,r=t.length,n,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,r),this.bufferStart=i,this.normalize=n?t=>n(vm(t)):vm,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return be(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=ve(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=ye(t);let r=this.normalize(e);for(let t=0,n=i;;t++){let o=r.charCodeAt(t),s=this.match(o,n,this.bufferPos+this.bufferStart);if(t==r.length-1){if(s)return this.value=s,this;break}n==i&&t<e.length&&e.charCodeAt(t)==o&&n++}}}match(t,e,i){let r=null;for(let e=0;e<this.matches.length;e+=2){let n=this.matches[e],o=!1;this.query.charCodeAt(n)==t&&(n==this.query.length-1?r={from:this.matches[e+1],to:i}:(this.matches[e]++,o=!0)),o||(this.matches.splice(e,2),e-=2)}return this.query.charCodeAt(0)==t&&(1==this.query.length?r={from:e,to:i}:this.matches.push(1,e)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}"undefined"!=typeof Symbol&&(ym.prototype[Symbol.iterator]=function(){return this});const wm={from:-1,to:-1,match:/.*/.exec("")},Sm="gm"+(null==/x/.unicode?"":"u");class xm{constructor(t,e,i,r=0,n=t.length){if(this.text=t,this.to=n,this.curLine="",this.done=!1,this.value=wm,/\\[sWDnr]|\n|\r|\[\^/.test(e))return new $m(t,e,i,r,n);this.re=new RegExp(e,Sm+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.iter=t.iter();let o=t.lineAt(r);this.curLineStart=o.from,this.matchPos=Pm(t,r),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,r=i+e[0].length;if(this.matchPos=Pm(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,e)))return this.value={from:i,to:r,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length<this.to))return this.done=!0,this;this.nextLine(),t=0}}}}const Qm=new WeakMap;class km{constructor(t,e){this.from=t,this.text=e}get to(){return this.from+this.text.length}static get(t,e,i){let r=Qm.get(t);if(!r||r.from>=i||r.to<=e){let r=new km(e,t.sliceString(e,i));return Qm.set(t,r),r}if(r.from==e&&r.to==i)return r;let{text:n,from:o}=r;return o>e&&(n=t.sliceString(e,o)+n,o=e),r.to<i&&(n+=t.sliceString(r.to,i)),Qm.set(t,new km(o,n)),new km(e,n.slice(e-o,i-o))}}class $m{constructor(t,e,i,r,n){this.text=t,this.to=n,this.done=!1,this.value=wm,this.matchPos=Pm(t,r),this.re=new RegExp(e,Sm+((null==i?void 0:i.ignoreCase)?"i":"")),this.test=null==i?void 0:i.test,this.flat=km.get(t,r,this.chunkEnd(r+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=Pm(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=km.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function Pm(t,e){if(e>=t.length)return e;let i,r=t.lineAt(e);for(;e<r.to&&(i=r.text.charCodeAt(e-r.from))>=56320&&i<57344;)e++;return e}function Zm(t){let e=mm("input",{class:"cm-textfield",name:"line",value:String(t.state.doc.lineAt(t.state.selection.main.head).number)});function i(){let i=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!i)return;let{state:r}=t,n=r.doc.lineAt(r.selection.main.head),[,o,s,a,l]=i,h=a?+a.slice(1):0,c=s?+s:n.number;if(s&&l){let t=c/100;o&&(t=t*("-"==o?-1:1)+n.number/r.doc.lines),c=Math.round(r.doc.lines*t)}else s&&o&&(c=c*("-"==o?-1:1)+n.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,c))),u=Re.cursor(d.from+Math.max(0,Math.min(h,d.length)));t.dispatch({effects:[Tm.of(!1),Gs.scrollIntoView(u.from,{y:"center"})],selection:u}),t.focus()}return{dom:mm("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:Tm.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),i())},onsubmit:t=>{t.preventDefault(),i()}},mm("label",t.state.phrase("Go to line"),": ",e)," ",mm("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(xm.prototype[Symbol.iterator]=$m.prototype[Symbol.iterator]=function(){return this});const Tm=ai.define(),Cm=De.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(Tm)&&(t=i.value);return t},provide:t=>pl.from(t,(t=>t?Zm:null))}),Am=Gs.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),Rm={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Mm=Xe.define({combine:t=>vi(t,Rm,{highlightWordAroundCursor:(t,e)=>t||e,minSelectionLength:Math.min,maxMatches:Math.min})});function qm(t){let e=[Vm,zm];return t&&e.push(Mm.of(t)),e}const Xm=Fr.mark({class:"cm-selectionMatch"}),_m=Fr.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Em(t,e,i,r){return!(0!=i&&t(e.sliceDoc(i-1,i))==Oi.Word||r!=e.doc.length&&t(e.sliceDoc(r,r+1))==Oi.Word)}const zm=Gn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Mm),{state:i}=t,r=i.selection;if(r.ranges.length>1)return Fr.none;let n,o=r.main,s=null;if(o.empty){if(!e.highlightWordAroundCursor)return Fr.none;let t=i.wordAt(o.head);if(!t)return Fr.none;s=i.charCategorizer(o.head),n=i.sliceDoc(t.from,t.to)}else{let t=o.to-o.from;if(t<e.minSelectionLength||t>200)return Fr.none;if(e.wholeWords){if(n=i.sliceDoc(o.from,o.to),s=i.charCategorizer(o.head),!Em(s,i,o.from,o.to)||!function(t,e,i,r){return t(e.sliceDoc(i,i+1))==Oi.Word&&t(e.sliceDoc(r-1,r))==Oi.Word}(s,i,o.from,o.to))return Fr.none}else if(n=i.sliceDoc(o.from,o.to),!n)return Fr.none}let a=[];for(let r of t.visibleRanges){let t=new ym(i.doc,n,r.from,r.to);for(;!t.next().done;){let{from:r,to:n}=t.value;if((!s||Em(s,i,r,n))&&(o.empty&&r<=o.from&&n>=o.to?a.push(_m.range(r,n)):(r>=o.to||n<=o.from)&&a.push(Xm.range(r,n)),a.length>e.maxMatches))return Fr.none}}return Fr.set(a)}},{decorations:t=>t.decorations}),Vm=Gs.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),Ym=Xe.define({combine:t=>vi(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new Ob(t),scrollToMatch:t=>Gs.scrollIntoView(t)})});class jm{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,Sm),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new Gm(this):new Wm(this)}getCursor(t,e=0,i){let r=t.doc?t:bi.create({doc:t});return null==i&&(i=r.doc.length),this.regexp?Um(this,r,e,i):Lm(this,r,e,i)}}class Dm{constructor(t){this.spec=t}}function Lm(t,e,i,r){return new ym(e.doc,t.unquoted,i,r,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?function(t,e){return(i,r,n,o)=>((o>i||o+n.length<r)&&(o=Math.max(0,i-2),n=t.sliceString(o,Math.min(t.length,r+2))),!(e(Bm(n,i-o))==Oi.Word&&e(Im(n,i-o))==Oi.Word||e(Im(n,r-o))==Oi.Word&&e(Bm(n,r-o))==Oi.Word))}(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}class Wm extends Dm{constructor(t){super(t)}nextMatch(t,e,i){let r=Lm(this.spec,t,i,t.doc.length).nextOverlapping();return r.done&&(r=Lm(this.spec,t,0,e).nextOverlapping()),r.done?null:r.value}prevMatchInRange(t,e,i){for(let r=i;;){let i=Math.max(e,r-1e4-this.spec.unquoted.length),n=Lm(this.spec,t,i,r),o=null;for(;!n.nextOverlapping().done;)o=n.value;if(o)return o;if(i==e)return null;r-=1e4}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,e){let i=Lm(this.spec,t,0,t.doc.length),r=[];for(;!i.next().done;){if(r.length>=e)return null;r.push(i.value)}return r}highlight(t,e,i,r){let n=Lm(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}}function Um(t,e,i,r){return new xm(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(n=e.charCategorizer(e.selection.main.head),(t,e,i)=>!i[0].length||(n(Bm(i.input,i.index))!=Oi.Word||n(Im(i.input,i.index))!=Oi.Word)&&(n(Im(i.input,i.index+i[0].length))!=Oi.Word||n(Bm(i.input,i.index+i[0].length))!=Oi.Word)):void 0},i,r);var n}function Bm(t,e){return t.slice(fe(t,e,!1),e)}function Im(t,e){return t.slice(e,fe(t,e))}class Gm extends Dm{nextMatch(t,e,i){let r=Um(this.spec,t,i,t.doc.length).next();return r.done&&(r=Um(this.spec,t,0,e).next()),r.done?null:r.value}prevMatchInRange(t,e,i){for(let r=1;;r++){let n=Math.max(e,i-1e4*r),o=Um(this.spec,t,n,i),s=null;for(;!o.next().done;)s=o.value;if(s&&(n==e||s.from>n+10))return s;if(n==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i<t.match.length?t.match[i]:e))}matchAll(t,e){let i=Um(this.spec,t,0,t.doc.length),r=[];for(;!i.next().done;){if(r.length>=e)return null;r.push(i.value)}return r}highlight(t,e,i,r){let n=Um(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!n.next().done;)r(n.value.from,n.value.to)}}const Nm=ai.define(),Hm=ai.define(),Fm=De.define({create:t=>new Km(hb(t).create(),null),update(t,e){for(let i of e.effects)i.is(Nm)?t=new Km(i.value.create(),t.panel):i.is(Hm)&&(t=new Km(t.query,i.value?lb:null));return t},provide:t=>pl.from(t,(t=>t.panel))});class Km{constructor(t,e){this.query=t,this.panel=e}}const Jm=Fr.mark({class:"cm-searchMatch"}),tb=Fr.mark({class:"cm-searchMatch cm-searchMatch-selected"}),eb=Gn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Fm))}update(t){let e=t.state.field(Fm);(e!=t.startState.field(Fm)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Fr.none;let{view:i}=this,r=new ki;for(let e=0,n=i.visibleRanges,o=n.length;e<o;e++){let{from:s,to:a}=n[e];for(;e<o-1&&a>n[e+1].from-500;)a=n[++e].to;t.highlight(i.state,s,a,((t,e)=>{let n=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));r.add(t,e,n?tb:Jm)}))}return r.finish()}},{decorations:t=>t.decorations});function ib(t){return e=>{let i=e.state.field(Fm,!1);return i&&i.query.spec.valid?t(e,i):ub(e)}}const rb=ib(((t,{query:e})=>{let{to:i}=t.state.selection.main,r=e.nextMatch(t.state,i,i);if(!r)return!1;let n=Re.single(r.from,r.to),o=t.state.facet(Ym);return t.dispatch({selection:n,effects:[vb(t,r),o.scrollToMatch(n.main,t)],userEvent:"select.search"}),db(t),!0})),nb=ib(((t,{query:e})=>{let{state:i}=t,{from:r}=i.selection.main,n=e.prevMatch(i,r,r);if(!n)return!1;let o=Re.single(n.from,n.to),s=t.state.facet(Ym);return t.dispatch({selection:o,effects:[vb(t,n),s.scrollToMatch(o.main,t)],userEvent:"select.search"}),db(t),!0})),ob=ib(((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length||(t.dispatch({selection:Re.create(i.map((t=>Re.range(t.from,t.to)))),userEvent:"select.search.matches"}),0))})),sb=ib(((t,{query:e})=>{let{state:i}=t,{from:r,to:n}=i.selection.main;if(i.readOnly)return!1;let o=e.nextMatch(i,r,r);if(!o)return!1;let s,a,l=[],h=[];if(o.from==r&&o.to==n&&(a=i.toText(e.getReplacement(o)),l.push({from:o.from,to:o.to,insert:a}),o=e.nextMatch(i,o.from,o.to),h.push(Gs.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(r).number)+"."))),o){let e=0==l.length||l[0].from>=o.to?0:o.to-o.from-a.length;s=Re.single(o.from-e,o.to-e),h.push(vb(t,o)),h.push(i.facet(Ym).scrollToMatch(s.main,t))}return t.dispatch({changes:l,selection:s,effects:h,userEvent:"input.replace"}),!0})),ab=ib(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map((t=>{let{from:i,to:r}=t;return{from:i,to:r,insert:e.getReplacement(t)}}));if(!i.length)return!1;let r=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:Gs.announce.of(r),userEvent:"input.replace.all"}),!0}));function lb(t){return t.state.facet(Ym).createPanel(t)}function hb(t,e){var i,r,n,o,s;let a=t.selection.main,l=a.empty||a.to>a.from+100?"":t.sliceDoc(a.from,a.to);if(e&&!l)return e;let h=t.facet(Ym);return new jm({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==e?void 0:e.caseSensitive)&&void 0!==r?r:h.caseSensitive,literal:null!==(n=null==e?void 0:e.literal)&&void 0!==n?n:h.literal,regexp:null!==(o=null==e?void 0:e.regexp)&&void 0!==o?o:h.regexp,wholeWord:null!==(s=null==e?void 0:e.wholeWord)&&void 0!==s?s:h.wholeWord})}function cb(t){let e=cl(t,lb);return e&&e.dom.querySelector("[main-field]")}function db(t){let e=cb(t);e&&e==t.root.activeElement&&e.select()}const ub=t=>{let e=t.state.field(Fm,!1);if(e&&e.panel){let i=cb(t);if(i&&i!=t.root.activeElement){let r=hb(t.state,e.query.spec);r.valid&&t.dispatch({effects:Nm.of(r)}),i.focus(),i.select()}}else t.dispatch({effects:[Hm.of(!0),e?Nm.of(hb(t.state,e.query.spec)):ai.appendConfig.of(wb)]});return!0},fb=t=>{let e=t.state.field(Fm,!1);if(!e||!e.panel)return!1;let i=cl(t,lb);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:Hm.of(!1)}),!0},pb=[{key:"Mod-f",run:ub,scope:"editor search-panel"},{key:"F3",run:rb,shift:nb,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:rb,shift:nb,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:fb,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:r,to:n}=i.main,o=[],s=0;for(let e=new ym(t.doc,t.sliceDoc(r,n));!e.next().done;){if(o.length>1e3)return!1;e.value.from==r&&(s=o.length),o.push(Re.range(e.value.from,e.value.to))}return e(t.update({selection:Re.create(o,s),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=cl(t,Zm);if(!e){let i=[Tm.of(!0)];null==t.state.field(Cm,!1)&&i.push(ai.appendConfig.of([Cm,Am])),t.dispatch({effects:i}),e=cl(t,Zm)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,r=Re.create(i.ranges.map((e=>t.wordAt(e.head)||Re.cursor(e.head))),i.mainIndex);return!r.eq(i)&&(e(t.update({selection:r})),!0)})({state:t,dispatch:e});let r=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=r)))return!1;let n=function(t,e){let{main:i,ranges:r}=t.selection,n=t.wordAt(i.head),o=n&&n.from==i.from&&n.to==i.to;for(let i=!1,n=new ym(t.doc,e,r[r.length-1].to);;){if(n.next(),!n.done){if(i&&r.some((t=>t.from==n.value.from)))continue;if(o){let e=t.wordAt(n.value.from);if(!e||e.from!=n.value.from||e.to!=n.value.to)continue}return n.value}if(i)return null;n=new ym(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),i=!0}}(t,r);return!!n&&(e(t.update({selection:t.selection.addRange(Re.range(n.from,n.to),!1),effects:Gs.scrollIntoView(n.to)})),!0)},preventDefault:!0}];class Ob{constructor(t){this.view=t;let e=this.query=t.state.field(Fm).query.spec;function i(t,e,i){return mm("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=mm("input",{value:e.search,placeholder:gb(t,"Find"),"aria-label":gb(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=mm("input",{value:e.replace,placeholder:gb(t,"Replace"),"aria-label":gb(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=mm("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=mm("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=mm("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=mm("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>rb(t)),[gb(t,"next")]),i("prev",(()=>nb(t)),[gb(t,"previous")]),i("select",(()=>ob(t)),[gb(t,"all")]),mm("label",null,[this.caseField,gb(t,"match case")]),mm("label",null,[this.reField,gb(t,"regexp")]),mm("label",null,[this.wordField,gb(t,"by word")]),...t.state.readOnly?[]:[mm("br"),this.replaceField,i("replace",(()=>sb(t)),[gb(t,"replace")]),i("replaceAll",(()=>ab(t)),[gb(t,"replace all")])],mm("button",{name:"close",onclick:()=>fb(t),"aria-label":gb(t,"close"),type:"button"},["×"])])}commit(){let t=new jm({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:Nm.of(t)}))}keydown(t){var e,i;i=t,la(na((e=this.view).state),i,e,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?nb:rb)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),sb(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(Nm)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ym).top}}function gb(t,e){return t.state.phrase(e)}const mb=30,bb=/[\s\.,:;?!]/;function vb(t,{from:e,to:i}){let r=t.state.doc.lineAt(e),n=t.state.doc.lineAt(i).to,o=Math.max(r.from,e-mb),s=Math.min(n,i+mb),a=t.state.sliceDoc(o,s);if(o!=r.from)for(let t=0;t<mb;t++)if(!bb.test(a[t+1])&&bb.test(a[t])){a=a.slice(t);break}if(s!=n)for(let t=a.length-1;t>a.length-mb;t--)if(!bb.test(a[t-1])&&bb.test(a[t])){a=a.slice(0,t);break}return Gs.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${r.number}.`)}const yb=Gs.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),wb=[Fm,We.low(eb),yb];class Sb{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class xb{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let r=t,n=i.facet(qb).markerFilter;n&&(r=n(r,i));let o=Fr.set(r.map((t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?Fr.widget({widget:new Eb(t),diagnostic:t}).range(t.from):Fr.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t}).range(t.from,t.to))),!0);return new xb(o,e,Qb(o))}}function Qb(t,e=null,i=0){let r=null;return t.between(i,1e9,((t,i,{spec:n})=>{if(!e||n.diagnostic==e)return r=new Sb(t,i,n.diagnostic),!1})),r}const kb=ai.define(),$b=ai.define(),Pb=ai.define(),Zb=De.define({create:()=>new xb(Fr.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),r=null,n=t.panel;if(t.selected){let n=e.changes.mapPos(t.selected.from,1);r=Qb(i,t.selected.diagnostic,n)||Qb(i,null,n)}!i.size&&n&&e.state.facet(qb).autoPanel&&(n=null),t=new xb(i,n,r)}for(let i of e.effects)if(i.is(kb)){let r=e.state.facet(qb).autoPanel?i.value.length?Vb.open:null:t.panel;t=xb.init(i.value,r,e.state)}else i.is($b)?t=new xb(t.diagnostics,i.value?Vb.open:null,t.selected):i.is(Pb)&&(t=new xb(t.diagnostics,t.panel,i.value));return t},provide:t=>[pl.from(t,(t=>t.panel)),Gs.decorations.from(t,(t=>t.diagnostics))]}),Tb=Fr.mark({class:"cm-lintRange cm-lintRange-active"});function Cb(t,e,i){let{diagnostics:r}=t.state.field(Zb),n=[],o=2e8,s=0;r.between(e-(i<0?1:0),e+(i>0?1:0),((t,r,{spec:a})=>{e>=t&&e<=r&&(t==r||(e>t||i>0)&&(e<r||i<0))&&(n.push(a.diagnostic),o=Math.min(t,o),s=Math.max(r,s))}));let a=t.state.facet(qb).tooltipFilter;return a&&(n=a(n,t.state)),n.length?{pos:o,end:s,above:t.state.doc.lineAt(o).to<s,create:()=>({dom:Ab(t,n)})}:null}function Ab(t,e){return mm("ul",{class:"cm-tooltip-lint"},e.map((e=>_b(t,e,!1))))}const Rb=t=>{let e=t.state.field(Zb,!1);return!(!e||!e.panel||(t.dispatch({effects:$b.of(!1)}),0))},Mb=[{key:"Mod-Shift-m",run:t=>{let e=t.state.field(Zb,!1);var i,r;e&&e.panel||t.dispatch({effects:(i=t.state,r=[$b.of(!0)],i.field(Zb,!1)?r:r.concat(ai.appendConfig.of(Db)))});let n=cl(t,Vb.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:t=>{let e=t.state.field(Zb,!1);if(!e)return!1;let i=t.state.selection.main,r=e.diagnostics.iter(i.to+1);return!(!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==i.from&&r.to==i.to)||(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),0))}}],qb=Xe.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},vi(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e}))});function Xb(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;t<i.length;t++){let r=i[t];if(/[a-zA-Z]/.test(r)&&!e.some((t=>t.toLowerCase()==r.toLowerCase()))){e.push(r);continue t}}e.push("")}return e}function _b(t,e,i){var r;let n=i?Xb(e.actions):[];return mm("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},mm("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map(((i,r)=>{let o=!1,s=r=>{if(r.preventDefault(),o)return;o=!0;let n=Qb(t.state.field(Zb).diagnostics,e);n&&i.apply(t,n.from,n.to)},{name:a}=i,l=n[r]?a.indexOf(n[r]):-1,h=l<0?a:[a.slice(0,l),mm("u",a.slice(l,l+1)),a.slice(l+1)];return mm("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${n[r]})"`}.`},h)})),e.source&&mm("div",{class:"cm-diagnosticSource"},e.source))}class Eb extends Nr{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return mm("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class zb{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=_b(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Vb{constructor(t){this.view=t,this.items=[],this.list=mm("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)Rb(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],r=Xb(i.actions);for(let n=0;n<r.length;n++)if(r[n].toUpperCase().charCodeAt(0)==e.keyCode){let e=Qb(this.view.state.field(Zb).diagnostics,i);e&&i.actions[n].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=mm("div",{class:"cm-panel-lint"},this.list,mm("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Rb(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Zb).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(Zb),i=0,r=!1,n=null;for(t.between(0,this.view.state.doc.length,((t,o,{spec:s})=>{let a,l=-1;for(let t=i;t<this.items.length;t++)if(this.items[t].diagnostic==s.diagnostic){l=t;break}l<0?(a=new zb(this.view,s.diagnostic),this.items.splice(i,0,a),r=!0):(a=this.items[l],l>i&&(this.items.splice(i,l-i),r=!0)),e&&a.diagnostic==e.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),n=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),i++}));i<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new zb(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),n?(this.list.setAttribute("aria-activedescendant",n.id),this.view.requestMeasure({key:this,read:()=>({sel:n.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/i:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=Qb(this.view.state.field(Zb).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:Pb.of(e)})}static open(t){return new Vb(t)}}function Yb(t){return function(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const jb=Gs.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:Yb("#d11")},".cm-lintRange-warning":{backgroundImage:Yb("orange")},".cm-lintRange-info":{backgroundImage:Yb("#999")},".cm-lintRange-hint":{backgroundImage:Yb("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Db=[Zb,Gs.decorations.compute([Zb],(t=>{let{selected:e,panel:i}=t.field(Zb);return e&&i&&e.from!=e.to?Fr.set([Tb.range(e.from,e.to)]):Fr.none})),sl(Cb,{hideOn:function(t,e){let i=e.pos,r=e.end||i,n=t.state.facet(qb).hideOn(t,i,r);if(null!=n)return n;let o=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(kb)))&&!t.changes.touchesRange(o.from,Math.max(o.to,r)))}}),jb],Lb=(()=>[Xl(),zl,qa(),Nd(),od(),ma(),[ka,$a],bi.allowMultipleSelections.of(!0),bi.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:r}=t.newSelection.main,n=i.lineAt(r);if(r>n.from+200)return t;let o=i.sliceString(n.from,r);if(!e.some((t=>t.test(o))))return t;let{state:s}=t,a=-1,l=[];for(let{head:t}of s.selection.ranges){let e=s.doc.lineAt(t);if(e.from==a)continue;a=e.from;let i=kc(s,e.from);if(null==i)continue;let r=/^\s*/.exec(e.text)[0],n=Qc(s,i);r!=n&&l.push({from:e.from,to:e.from+r.length,insert:n})}return l.length?[t,{changes:l,sequential:!0}]:t})),dd(pd,{fallback:!0}),xd(),[cg,og],vg(),Da(),Ua(),Va,qm(),ia.of([...dg,...df,...pb,...uu,...Hc,...yg,...Mb])])(),Wb=h`@charset "UTF-8";/*!
|
|
25
|
+
* Bootstrap v5.3.3 (https://getbootstrap.com/)
|
|
26
|
+
* Copyright 2011-2024 The Bootstrap Authors
|
|
27
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
|
28
|
+
*/:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:rgb(5.2, 44, 101.2);--bs-secondary-text-emphasis:rgb(43.2, 46.8, 50);--bs-success-text-emphasis:rgb(10, 54, 33.6);--bs-info-text-emphasis:rgb(5.2, 80.8, 96);--bs-warning-text-emphasis:rgb(102, 77.2, 2.8);--bs-danger-text-emphasis:rgb(88, 21.2, 27.6);--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:rgb(206.6, 226, 254.6);--bs-secondary-bg-subtle:rgb(225.6, 227.4, 229);--bs-success-bg-subtle:rgb(209, 231, 220.8);--bs-info-bg-subtle:rgb(206.6, 244.4, 252);--bs-warning-bg-subtle:rgb(255, 242.6, 205.4);--bs-danger-bg-subtle:rgb(248, 214.6, 217.8);--bs-light-bg-subtle:rgb(251.5, 252, 252.5);--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:rgb(158.2, 197, 254.2);--bs-secondary-border-subtle:rgb(196.2, 199.8, 203);--bs-success-border-subtle:rgb(163, 207, 186.6);--bs-info-border-subtle:rgb(158.2, 233.8, 249);--bs-warning-border-subtle:rgb(255, 230.2, 155.8);--bs-danger-border-subtle:rgb(241, 174.2, 180.6);--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, 0.75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, 0.5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:rgb(10.4, 88, 202.4);--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:rgb(255, 242.6, 205.4);--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 0.5rem 1rem rgba(0, 0, 0, 0.15);--bs-box-shadow-sm:0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, 0.175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, 0.075);--bs-focus-ring-width:0.25rem;--bs-focus-ring-opacity:0.25;--bs-focus-ring-color:rgba(13, 110, 253, 0.25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:var(--bs-border-width) solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2;color:var(--bs-heading-color)}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;color:var(--bs-highlight-color);background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:rgba(var(--bs-link-color-rgb),var(--bs-link-opacity,1));text-decoration:underline}a:hover{--bs-link-color-rgb:var(--bs-link-hover-color-rgb)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:var(--bs-secondary-color);text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator{display:none!important}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}::-moz-focus-inner{padding:0;border-style:none}textarea{resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{float:left;width:100%;padding:0;margin-bottom:.5rem;font-size:calc(1.275rem + .3vw);line-height:inherit}@media (min-width:1200px){legend{font-size:1.5rem}}legend+*{clear:left}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-text,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit;-webkit-appearance:button}output{display:inline-block}iframe{border:0}summary{display:list-item;cursor:pointer}progress{vertical-align:baseline}[hidden]{display:none!important}.lead{font-size:1.25rem;font-weight:300}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote>:last-child{margin-bottom:0}.figure{display:inline-block}.container{--bs-gutter-x:1.5rem;--bs-gutter-y:0;width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}@media (min-width:1400px){.container{max-width:1320px}}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(-1 * var(--bs-gutter-y));margin-right:calc(-.5 * var(--bs-gutter-x));margin-left:calc(-.5 * var(--bs-gutter-x))}.row>*{flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.offset-1{margin-left:8.33333333%}.table{--bs-table-color-type:initial;--bs-table-bg-type:initial;--bs-table-color-state:initial;--bs-table-bg-state:initial;--bs-table-color:var(--bs-emphasis-color);--bs-table-bg:var(--bs-body-bg);--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-emphasis-color);--bs-table-striped-bg:rgba(var(--bs-emphasis-color-rgb), 0.05);--bs-table-active-color:var(--bs-emphasis-color);--bs-table-active-bg:rgba(var(--bs-emphasis-color-rgb), 0.1);--bs-table-hover-color:var(--bs-emphasis-color);--bs-table-hover-bg:rgba(var(--bs-emphasis-color-rgb), 0.075);width:100%;margin-bottom:1rem;vertical-align:top;border-color:var(--bs-table-border-color)}.table>:not(caption)>*>*{padding:.5rem .5rem;color:var(--bs-table-color-state,var(--bs-table-color-type,var(--bs-table-color)));background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state,var(--bs-table-bg-type,var(--bs-table-accent-bg)))}.table>tbody{vertical-align:inherit}.table>thead{vertical-align:bottom}.form-control,.qbo-code input{display:block;width:100%;padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:var(--bs-body-color);-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-body-bg);background-clip:padding-box;border:var(--bs-border-width) solid var(--bs-border-color);border-radius:var(--bs-border-radius);transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control,.qbo-code input{transition:none}}.form-control[type=file],.qbo-code input[type=file]{overflow:hidden}.form-control[type=file]:not(:disabled):not([readonly]),.qbo-code input[type=file]:not(:disabled):not([readonly]){cursor:pointer}.form-control:focus,.qbo-code input:focus{color:var(--bs-body-color);background-color:var(--bs-body-bg);border-color:rgb(134,182.5,254);outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-control::-webkit-date-and-time-value,.qbo-code input::-webkit-date-and-time-value{min-width:85px;height:1.5em;margin:0}.form-control::-webkit-datetime-edit,.qbo-code input::-webkit-datetime-edit{display:block;padding:0}.form-control::-moz-placeholder,.qbo-code input::-moz-placeholder{color:var(--bs-secondary-color);opacity:1}.form-control::placeholder,.qbo-code input::placeholder{color:var(--bs-secondary-color);opacity:1}.form-control:disabled,.qbo-code input:disabled{background-color:var(--bs-secondary-bg);opacity:1}.form-control::file-selector-button,.qbo-code input::file-selector-button{padding:.375rem .75rem;margin:-.375rem -.75rem;margin-inline-end:.75rem;color:var(--bs-body-color);background-color:var(--bs-tertiary-bg);pointer-events:none;border-color:inherit;border-style:solid;border-width:0;border-inline-end-width:var(--bs-border-width);border-radius:0;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-control::file-selector-button,.qbo-code input::file-selector-button{transition:none}}.form-control:hover:not(:disabled):not([readonly])::file-selector-button,.qbo-code input:hover:not(:disabled):not([readonly])::file-selector-button{background-color:var(--bs-secondary-bg)}textarea.form-control{min-height:calc(1.5em + .75rem + calc(var(--bs-border-width) * 2))}.form-check{display:block;min-height:1.5rem;padding-left:1.5em;margin-bottom:.125rem}.form-check .form-check-input{float:left;margin-left:-1.5em}.form-check-input{--bs-form-check-bg:var(--bs-body-bg);flex-shrink:0;width:1em;height:1em;margin-top:.25em;vertical-align:top;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--bs-form-check-bg);background-image:var(--bs-form-check-bg-image);background-repeat:no-repeat;background-position:center;background-size:contain;border:var(--bs-border-width) solid var(--bs-border-color);-webkit-print-color-adjust:exact;print-color-adjust:exact}.form-check-input[type=checkbox]{border-radius:.25em}.form-check-input[type=radio]{border-radius:50%}.form-check-input:active{filter:brightness(90%)}.form-check-input:focus{border-color:rgb(134,182.5,254);outline:0;box-shadow:0 0 0 .25rem rgba(13,110,253,.25)}.form-check-input:checked{background-color:#0d6efd;border-color:#0d6efd}.form-check-input:checked[type=checkbox]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e")}.form-check-input:checked[type=radio]{--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e")}.form-check-input[type=checkbox]:indeterminate{background-color:#0d6efd;border-color:#0d6efd;--bs-form-check-bg-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e")}.form-check-input:disabled{pointer-events:none;filter:none;opacity:.5}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{cursor:default;opacity:.5}.form-switch{padding-left:2.5em}.form-switch .form-check-input{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");width:2em;margin-left:-2.5em;background-image:var(--bs-form-switch-bg);background-position:left center;border-radius:2em;transition:background-position .15s ease-in-out}@media (prefers-reduced-motion:reduce){.form-switch .form-check-input{transition:none}}.form-switch .form-check-input:focus{--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgb%28134, 182.5, 254%29'/%3e%3c/svg%3e")}.form-switch .form-check-input:checked{background-position:right center;--bs-form-switch-bg:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e")}.btn-check{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.btn-check:disabled+.btn,.btn-check[disabled]+.btn,.qbo-code .btn-check:disabled+button,.qbo-code .btn-check[disabled]+button{pointer-events:none;filter:none;opacity:.65}.form-floating{position:relative}.form-floating>.form-control,.qbo-code .form-floating>input{height:calc(3.5rem + calc(var(--bs-border-width) * 2));min-height:calc(3.5rem + calc(var(--bs-border-width) * 2));line-height:1.25}.form-floating>label{position:absolute;top:0;left:0;z-index:2;height:100%;padding:1rem .75rem;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border:var(--bs-border-width) solid transparent;transform-origin:0 0;transition:opacity .1s ease-in-out,transform .1s ease-in-out}@media (prefers-reduced-motion:reduce){.form-floating>label{transition:none}}.form-floating>.form-control,.qbo-code .form-floating>input{padding:1rem .75rem}.form-floating>.form-control::-moz-placeholder,.qbo-code .form-floating>input::-moz-placeholder{color:transparent}.form-floating>.form-control::placeholder,.qbo-code .form-floating>input::placeholder{color:transparent}.form-floating>.form-control:not(:-moz-placeholder-shown),.qbo-code .form-floating>input:not(:-moz-placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:focus,.form-floating>.form-control:not(:placeholder-shown),.qbo-code .form-floating>input:focus,.qbo-code .form-floating>input:not(:placeholder-shown){padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:-webkit-autofill,.qbo-code .form-floating>input:-webkit-autofill{padding-top:1.625rem;padding-bottom:.625rem}.form-floating>.form-control:not(:-moz-placeholder-shown)~label,.qbo-code .form-floating>input:not(:-moz-placeholder-shown)~label{color:rgba(var(--bs-body-color-rgb),.65);transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:focus~label,.form-floating>.form-control:not(:placeholder-shown)~label,.qbo-code .form-floating>input:focus~label,.qbo-code .form-floating>input:not(:placeholder-shown)~label{color:rgba(var(--bs-body-color-rgb),.65);transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:not(:-moz-placeholder-shown)~label::after,.qbo-code .form-floating>input:not(:-moz-placeholder-shown)~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:"";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>.form-control:focus~label::after,.form-floating>.form-control:not(:placeholder-shown)~label::after,.qbo-code .form-floating>input:focus~label::after,.qbo-code .form-floating>input:not(:placeholder-shown)~label::after{position:absolute;inset:1rem 0.375rem;z-index:-1;height:1.5em;content:"";background-color:var(--bs-body-bg);border-radius:var(--bs-border-radius)}.form-floating>.form-control:-webkit-autofill~label,.qbo-code .form-floating>input:-webkit-autofill~label{color:rgba(var(--bs-body-color-rgb),.65);transform:scale(.85) translateY(-.5rem) translateX(.15rem)}.form-floating>.form-control:disabled~label,.form-floating>:disabled~label{color:#6c757d}.form-floating>.form-control:disabled~label::after,.form-floating>:disabled~label::after{background-color:var(--bs-secondary-bg)}.input-group{position:relative;display:flex;flex-wrap:wrap;align-items:stretch;width:100%}.input-group>.form-control,.input-group>.form-floating,.qbo-code .input-group>input{position:relative;flex:1 1 auto;width:1%;min-width:0}.input-group>.form-control:focus,.input-group>.form-floating:focus-within,.qbo-code .input-group>input:focus{z-index:5}.input-group .btn,.input-group .qbo-code button,.qbo-code .input-group button{position:relative;z-index:2}.input-group .btn:focus,.input-group .qbo-code button:focus,.qbo-code .input-group button:focus{z-index:5}.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3),.input-group:not(.has-validation)>.form-floating:not(:last-child)>.form-control,.input-group:not(.has-validation)>:not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.qbo-code .input-group:not(.has-validation)>.form-floating:not(:last-child)>input{border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.dropdown-toggle:nth-last-child(n+4),.input-group.has-validation>.form-floating:nth-last-child(n+3)>.form-control,.input-group.has-validation>:nth-last-child(n+3):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),.qbo-code .input-group.has-validation>.form-floating:nth-last-child(n+3)>input{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback){margin-left:calc(var(--bs-border-width) * -1);border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.form-floating:not(:first-child)>.form-control,.qbo-code .input-group>.form-floating:not(:first-child)>input{border-top-left-radius:0;border-bottom-left-radius:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-valid-color)}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-success);border-radius:var(--bs-border-radius)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:var(--bs-form-invalid-color)}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;color:#fff;background-color:var(--bs-danger);border-radius:var(--bs-border-radius)}.btn,.qbo-code button{--bs-btn-padding-x:0.75rem;--bs-btn-padding-y:0.375rem;--bs-btn-font-family: ;--bs-btn-font-size:1rem;--bs-btn-font-weight:400;--bs-btn-line-height:1.5;--bs-btn-color:var(--bs-body-color);--bs-btn-bg:transparent;--bs-btn-border-width:var(--bs-border-width);--bs-btn-border-color:transparent;--bs-btn-border-radius:var(--bs-border-radius);--bs-btn-hover-border-color:transparent;--bs-btn-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 1px rgba(0, 0, 0, 0.075);--bs-btn-disabled-opacity:0.65;--bs-btn-focus-box-shadow:0 0 0 0.25rem rgba(var(--bs-btn-focus-shadow-rgb), .5);display:inline-block;padding:var(--bs-btn-padding-y) var(--bs-btn-padding-x);font-family:var(--bs-btn-font-family);font-size:var(--bs-btn-font-size);font-weight:var(--bs-btn-font-weight);line-height:var(--bs-btn-line-height);color:var(--bs-btn-color);text-align:center;text-decoration:none;vertical-align:middle;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;border:var(--bs-btn-border-width) solid var(--bs-btn-border-color);border-radius:var(--bs-btn-border-radius);background-color:var(--bs-btn-bg);transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media (prefers-reduced-motion:reduce){.btn,.qbo-code button{transition:none}}.btn:hover,.qbo-code button:hover{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color)}.btn-check+.btn:hover,.qbo-code .btn-check+button:hover{color:var(--bs-btn-color);background-color:var(--bs-btn-bg);border-color:var(--bs-btn-border-color)}.btn:focus-visible,.qbo-code button:focus-visible{color:var(--bs-btn-hover-color);background-color:var(--bs-btn-hover-bg);border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:focus-visible+.btn,.qbo-code .btn-check:focus-visible+button{border-color:var(--bs-btn-hover-border-color);outline:0;box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked+.btn,.btn.active,.btn.show,.btn:first-child:active,.qbo-code .btn-check:checked+button,.qbo-code :not(.btn-check)+button:active,.qbo-code button.active,.qbo-code button.show,.qbo-code button:first-child:active,:not(.btn-check)+.btn:active{color:var(--bs-btn-active-color);background-color:var(--bs-btn-active-bg);border-color:var(--bs-btn-active-border-color)}.btn-check:checked+.btn:focus-visible,.btn.active:focus-visible,.btn.show:focus-visible,.btn:first-child:active:focus-visible,.qbo-code .btn-check:checked+button:focus-visible,.qbo-code :not(.btn-check)+button:active:focus-visible,.qbo-code button.active:focus-visible,.qbo-code button.show:focus-visible,.qbo-code button:first-child:active:focus-visible,:not(.btn-check)+.btn:active:focus-visible{box-shadow:var(--bs-btn-focus-box-shadow)}.btn-check:checked:focus-visible+.btn,.qbo-code .btn-check:checked:focus-visible+button{box-shadow:var(--bs-btn-focus-box-shadow)}.btn.disabled,.btn:disabled,.qbo-code button.disabled,.qbo-code button:disabled,.qbo-code fieldset:disabled button,fieldset:disabled .btn,fieldset:disabled .qbo-code button{color:var(--bs-btn-disabled-color);pointer-events:none;background-color:var(--bs-btn-disabled-bg);border-color:var(--bs-btn-disabled-border-color);opacity:var(--bs-btn-disabled-opacity)}.qbo-code button[type=submit]{--bs-btn-color:#fff;--bs-btn-bg:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:rgb(11.05, 93.5, 215.05);--bs-btn-hover-border-color:rgb(10.4, 88, 202.4);--bs-btn-focus-shadow-rgb:49,132,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:rgb(10.4, 88, 202.4);--bs-btn-active-border-color:rgb(9.75, 82.5, 189.75);--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#0d6efd;--bs-btn-disabled-border-color:#0d6efd}.btn-secondary{--bs-btn-color:#fff;--bs-btn-bg:#6c757d;--bs-btn-border-color:#6c757d;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:rgb(91.8, 99.45, 106.25);--bs-btn-hover-border-color:rgb(86.4, 93.6, 100);--bs-btn-focus-shadow-rgb:130,138,145;--bs-btn-active-color:#fff;--bs-btn-active-bg:rgb(86.4, 93.6, 100);--bs-btn-active-border-color:rgb(81, 87.75, 93.75);--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#6c757d;--bs-btn-disabled-border-color:#6c757d}.btn-success{--bs-btn-color:#fff;--bs-btn-bg:#198754;--bs-btn-border-color:#198754;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:rgb(21.25, 114.75, 71.4);--bs-btn-hover-border-color:rgb(20, 108, 67.2);--bs-btn-focus-shadow-rgb:60,153,110;--bs-btn-active-color:#fff;--bs-btn-active-bg:rgb(20, 108, 67.2);--bs-btn-active-border-color:rgb(18.75, 101.25, 63);--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#fff;--bs-btn-disabled-bg:#198754;--bs-btn-disabled-border-color:#198754}.qbo-code button[type=reset]{--bs-btn-color:#000;--bs-btn-bg:#f8f9fa;--bs-btn-border-color:#f8f9fa;--bs-btn-hover-color:#000;--bs-btn-hover-bg:rgb(210.8, 211.65, 212.5);--bs-btn-hover-border-color:rgb(198.4, 199.2, 200);--bs-btn-focus-shadow-rgb:211,212,213;--bs-btn-active-color:#000;--bs-btn-active-bg:rgb(198.4, 199.2, 200);--bs-btn-active-border-color:rgb(186, 186.75, 187.5);--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#000;--bs-btn-disabled-bg:#f8f9fa;--bs-btn-disabled-border-color:#f8f9fa}.btn-outline-primary{--bs-btn-color:#0d6efd;--bs-btn-border-color:#0d6efd;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#0d6efd;--bs-btn-hover-border-color:#0d6efd;--bs-btn-focus-shadow-rgb:13,110,253;--bs-btn-active-color:#fff;--bs-btn-active-bg:#0d6efd;--bs-btn-active-border-color:#0d6efd;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#0d6efd;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#0d6efd;--bs-gradient:none}.btn-outline-danger{--bs-btn-color:#dc3545;--bs-btn-border-color:#dc3545;--bs-btn-hover-color:#fff;--bs-btn-hover-bg:#dc3545;--bs-btn-hover-border-color:#dc3545;--bs-btn-focus-shadow-rgb:220,53,69;--bs-btn-active-color:#fff;--bs-btn-active-bg:#dc3545;--bs-btn-active-border-color:#dc3545;--bs-btn-active-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125);--bs-btn-disabled-color:#dc3545;--bs-btn-disabled-bg:transparent;--bs-btn-disabled-border-color:#dc3545;--bs-gradient:none}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{--bs-dropdown-zindex:1000;--bs-dropdown-min-width:10rem;--bs-dropdown-padding-x:0;--bs-dropdown-padding-y:0.5rem;--bs-dropdown-spacer:0.125rem;--bs-dropdown-font-size:1rem;--bs-dropdown-color:var(--bs-body-color);--bs-dropdown-bg:var(--bs-body-bg);--bs-dropdown-border-color:var(--bs-border-color-translucent);--bs-dropdown-border-radius:var(--bs-border-radius);--bs-dropdown-border-width:var(--bs-border-width);--bs-dropdown-inner-border-radius:calc(var(--bs-border-radius) - var(--bs-border-width));--bs-dropdown-divider-bg:var(--bs-border-color-translucent);--bs-dropdown-divider-margin-y:0.5rem;--bs-dropdown-box-shadow:var(--bs-box-shadow);--bs-dropdown-link-color:var(--bs-body-color);--bs-dropdown-link-hover-color:var(--bs-body-color);--bs-dropdown-link-hover-bg:var(--bs-tertiary-bg);--bs-dropdown-link-active-color:#fff;--bs-dropdown-link-active-bg:#0d6efd;--bs-dropdown-link-disabled-color:var(--bs-tertiary-color);--bs-dropdown-item-padding-x:1rem;--bs-dropdown-item-padding-y:0.25rem;--bs-dropdown-header-color:#6c757d;--bs-dropdown-header-padding-x:1rem;--bs-dropdown-header-padding-y:0.5rem;position:absolute;z-index:var(--bs-dropdown-zindex);display:none;min-width:var(--bs-dropdown-min-width);padding:var(--bs-dropdown-padding-y) var(--bs-dropdown-padding-x);margin:0;font-size:var(--bs-dropdown-font-size);color:var(--bs-dropdown-color);text-align:left;list-style:none;background-color:var(--bs-dropdown-bg);background-clip:padding-box;border:var(--bs-dropdown-border-width) solid var(--bs-dropdown-border-color);border-radius:var(--bs-dropdown-border-radius)}.dropdown-menu.show{display:block}.nav{--bs-nav-link-padding-x:1rem;--bs-nav-link-padding-y:0.5rem;--bs-nav-link-font-weight: ;--bs-nav-link-color:var(--bs-link-color);--bs-nav-link-hover-color:var(--bs-link-hover-color);--bs-nav-link-disabled-color:var(--bs-secondary-color);display:flex;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.alert,.error{--bs-alert-bg:transparent;--bs-alert-padding-x:1rem;--bs-alert-padding-y:1rem;--bs-alert-margin-bottom:1rem;--bs-alert-color:inherit;--bs-alert-border-color:transparent;--bs-alert-border:var(--bs-border-width) solid var(--bs-alert-border-color);--bs-alert-border-radius:var(--bs-border-radius);--bs-alert-link-color:inherit;position:relative;padding:var(--bs-alert-padding-y) var(--bs-alert-padding-x);margin-bottom:var(--bs-alert-margin-bottom);color:var(--bs-alert-color);background-color:var(--bs-alert-bg);border:var(--bs-alert-border);border-radius:var(--bs-alert-border-radius)}.working{--bs-alert-color:var(--bs-success-text-emphasis);--bs-alert-bg:var(--bs-success-bg-subtle);--bs-alert-border-color:var(--bs-success-border-subtle);--bs-alert-link-color:var(--bs-success-text-emphasis)}.error{--bs-alert-color:var(--bs-danger-text-emphasis);--bs-alert-bg:var(--bs-danger-bg-subtle);--bs-alert-border-color:var(--bs-danger-border-subtle);--bs-alert-link-color:var(--bs-danger-text-emphasis)}@keyframes progress-bar-stripes{0%{background-position-x:1rem}}.progress{--bs-progress-height:1rem;--bs-progress-font-size:0.75rem;--bs-progress-bg:var(--bs-secondary-bg);--bs-progress-border-radius:var(--bs-border-radius);--bs-progress-box-shadow:var(--bs-box-shadow-inset);--bs-progress-bar-color:#fff;--bs-progress-bar-bg:#0d6efd;--bs-progress-bar-transition:width 0.6s ease;display:flex;height:var(--bs-progress-height);overflow:hidden;font-size:var(--bs-progress-font-size);background-color:var(--bs-progress-bg);border-radius:var(--bs-progress-border-radius)}.modal{--bs-modal-zindex:1055;--bs-modal-width:500px;--bs-modal-padding:1rem;--bs-modal-margin:0.5rem;--bs-modal-color: ;--bs-modal-bg:var(--bs-body-bg);--bs-modal-border-color:var(--bs-border-color-translucent);--bs-modal-border-width:var(--bs-border-width);--bs-modal-border-radius:var(--bs-border-radius-lg);--bs-modal-box-shadow:var(--bs-box-shadow-sm);--bs-modal-inner-border-radius:calc(var(--bs-border-radius-lg) - (var(--bs-border-width)));--bs-modal-header-padding-x:1rem;--bs-modal-header-padding-y:1rem;--bs-modal-header-padding:1rem 1rem;--bs-modal-header-border-color:var(--bs-border-color);--bs-modal-header-border-width:var(--bs-border-width);--bs-modal-title-line-height:1.5;--bs-modal-footer-gap:0.5rem;--bs-modal-footer-bg: ;--bs-modal-footer-border-color:var(--bs-border-color);--bs-modal-footer-border-width:var(--bs-border-width);position:fixed;top:0;left:0;z-index:var(--bs-modal-zindex);display:none;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}.modal-dialog{position:relative;width:auto;margin:var(--bs-modal-margin);pointer-events:none}.modal.show .modal-dialog{transform:none}.modal-dialog-scrollable{height:calc(100% - var(--bs-modal-margin) * 2)}.modal-dialog-scrollable .qbo-code{max-height:100%;overflow:hidden}.modal-dialog-scrollable .qbo-code section,.qbo-code .modal-dialog-scrollable section{overflow-y:auto}.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - var(--bs-modal-margin) * 2)}.qbo-code{position:relative;display:flex;flex-direction:column;width:100%;color:var(--bs-modal-color);pointer-events:auto;background-color:var(--bs-modal-bg);background-clip:padding-box;border:var(--bs-modal-border-width) solid var(--bs-modal-border-color);border-radius:var(--bs-modal-border-radius);outline:0}.qbo-code header{display:flex;flex-shrink:0;align-items:center;padding:var(--bs-modal-header-padding);border-bottom:var(--bs-modal-header-border-width) solid var(--bs-modal-header-border-color);border-top-left-radius:var(--bs-modal-inner-border-radius);border-top-right-radius:var(--bs-modal-inner-border-radius)}.qbo-code section{position:relative;flex:1 1 auto;padding:var(--bs-modal-padding)}.qbo-code footer{display:flex;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;padding:calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);background-color:var(--bs-modal-footer-bg);border-top:var(--bs-modal-footer-border-width) solid var(--bs-modal-footer-border-color);border-bottom-right-radius:var(--bs-modal-inner-border-radius);border-bottom-left-radius:var(--bs-modal-inner-border-radius)}.qbo-code footer>*{margin:calc(var(--bs-modal-footer-gap) * .5)}@media (min-width:576px){.modal{--bs-modal-margin:1.75rem;--bs-modal-box-shadow:var(--bs-box-shadow)}.modal-dialog{max-width:var(--bs-modal-width);margin-right:auto;margin-left:auto}}.tooltip{--bs-tooltip-zindex:1080;--bs-tooltip-max-width:200px;--bs-tooltip-padding-x:0.5rem;--bs-tooltip-padding-y:0.25rem;--bs-tooltip-margin: ;--bs-tooltip-font-size:0.875rem;--bs-tooltip-color:var(--bs-body-bg);--bs-tooltip-bg:var(--bs-emphasis-color);--bs-tooltip-border-radius:var(--bs-border-radius);--bs-tooltip-opacity:0.9;--bs-tooltip-arrow-width:0.8rem;--bs-tooltip-arrow-height:0.4rem;z-index:var(--bs-tooltip-zindex);display:block;margin:var(--bs-tooltip-margin);font-family:var(--bs-font-sans-serif);font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:var(--bs-tooltip-font-size);word-wrap:break-word;opacity:0}.tooltip.show{opacity:var(--bs-tooltip-opacity)}.spinner-border,.spinner-grow{display:inline-block;width:var(--bs-spinner-width);height:var(--bs-spinner-height);vertical-align:var(--bs-spinner-vertical-align);border-radius:50%;animation:var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name)}@keyframes spinner-border{to{transform:rotate(360deg)}}.spinner-border{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-border-width:0.25em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-border;border:var(--bs-spinner-border-width) solid currentcolor;border-right-color:transparent}@keyframes spinner-grow{0%{transform:scale(0)}50%{opacity:1;transform:none}}.spinner-grow{--bs-spinner-width:2rem;--bs-spinner-height:2rem;--bs-spinner-vertical-align:-0.125em;--bs-spinner-animation-speed:0.75s;--bs-spinner-animation-name:spinner-grow;background-color:currentcolor;opacity:0}@media (prefers-reduced-motion:reduce){.spinner-border,.spinner-grow{--bs-spinner-animation-speed:1.5s}}.placeholder{display:inline-block;min-height:1em;vertical-align:middle;cursor:wait;background-color:currentcolor;opacity:.5}.placeholder.btn::before,.qbo-code button.placeholder::before{display:inline-block;content:""}.placeholder-glow .placeholder{animation:placeholder-glow 2s ease-in-out infinite}@keyframes placeholder-glow{50%{opacity:.2}}.placeholder-wave{-webkit-mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);mask-image:linear-gradient(130deg,#000 55%,rgba(0,0,0,0.8) 75%,#000 95%);-webkit-mask-size:200% 100%;mask-size:200% 100%;animation:placeholder-wave 2s linear infinite}@keyframes placeholder-wave{100%{-webkit-mask-position:-200% 0%;mask-position:-200% 0%}}.ratio{position:relative;width:100%}.ratio::before{display:block;padding-top:var(--bs-aspect-ratio);content:""}.ratio>*{position:absolute;top:0;left:0;width:100%;height:100%}.vr{display:inline-block;align-self:stretch;width:var(--bs-border-width);min-height:1em;background-color:currentcolor;opacity:.25}.shadow{box-shadow:var(--bs-box-shadow)!important}.border{border:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-top{border-top:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.border-bottom{border-bottom:var(--bs-border-width) var(--bs-border-style) var(--bs-border-color)!important}.flex-wrap{flex-wrap:wrap!important}.mb-3{margin-bottom:1rem!important}.p-1{padding:.25rem!important}.bg-success{--bs-bg-opacity:1;background-color:rgba(var(--bs-success-rgb),var(--bs-bg-opacity))!important}.visible{visibility:visible!important}.invisible{visibility:hidden!important}.qbo-code{position:fixed;top:100px;left:100px;width:60%;height:50%;background:#fff;box-shadow:0 4px 8px rgba(0,0,0,.1);border:1px solid #ddd;z-index:1000;resize:both;overflow:auto}.qbo-code header{cursor:move}.qbo-code footer{display:flex;gap:.5em}.working{opacity:1;cursor:not-allowed}`;var Ub=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Bb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};const Ib={},Gb=new Map;function Nb(t){return(e,i)=>{const r=e.prefix??e.constructor?.name;if(!r)return console.error("Template prefix and constructor name not defined.",e,i);const n=Gb.get(r)||new Map;n.set(t??i,e[i]),Gb.set(r,n)}}const Hb=t=>{class e extends t{static{this.styles=[Wb,h`
|
|
29
|
+
:host {
|
|
30
|
+
display: block;
|
|
31
|
+
position: relative;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
:host-context(.qbo-design):host(:hover) {
|
|
35
|
+
outline: 1px dashed #0078d4;
|
|
36
|
+
background-color: #f0f8ff;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
}
|
|
39
|
+
input.working {
|
|
40
|
+
background-color: #f3f3f3;
|
|
41
|
+
cursor: wait;
|
|
42
|
+
}
|
|
43
|
+
`]}constructor(...t){super(...t),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.regex=/`(.*?)`/s,this.editorError=null,this.type=null,this.editing=!1,this.defaultTemplate=t=>B`<span>Template matching ${t.type} not defined</span>`,this.templateEndpoint="/configuration/template",this.prefix=null,this.map=void 0,this.editor=null,this.editorType=this.type,this.editorCoding=!1}async connectedCallback(){super.connectedCallback(),this.prefix??=this.constructor.name,Gb.has(this.prefix)||Gb.set(this.prefix,new Map),this.map=Gb.get(this.prefix),void 0===this.map&&console.error(`The prefix ${this.prefix} is not defined in the templates map.`),this.map&&this.type&&!this.map.has(this.type)&&await this.loadScript(this.prefix),this.addEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this))}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}_onMouseDown(t){const e=this.shadowRoot?.querySelector(".qbo-code");if(!e||!t.target.closest(".qbo-code header"))return;const i=window.getComputedStyle(e);e.style.left="auto"===i.left?`${e.getBoundingClientRect().left}px`:i.left,e.style.top="auto"===i.top?`${e.getBoundingClientRect().top}px`:i.top,this.dragging=!0,this.offsetX=t.clientX-parseFloat(i.left||"0"),this.offsetY=t.clientY-parseFloat(i.top||"0")}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code");if(e){const i=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e.style.left=`${i}px`,e.style.top=`${r}px`}}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}flattenObjectKeys(t,e=""){return Object.keys(t).reduce(((i,r)=>{const n=e.length?`${e}.`:"";return"object"==typeof t[r]&&null!==t[r]?i=i.concat(this.flattenObjectKeys(t[r],`${n}${r}`)):i.push(`${n}${r}`),i}),[])}flattenComponentKeys(t){const e=[],i=Object.getPrototypeOf(t);return Object.getOwnPropertyNames(i).forEach((r=>{"constructor"===r||r.startsWith("_")||Reflect.getMetadata("design:type",i,r)&&("object"==typeof t[r]&&null!==t[r]?e.push(...this.flattenObjectKeys(t[r],r)):e.push(r))})),e.map((t=>({label:t,type:"variable"})))}_isSerializable(t){if("function"==typeof t||void 0===t)return!1;try{JSON.stringify(t)}catch(t){return!1}return!0}getComponent(){let t={};return new Set(Object.keys(this)).forEach((e=>{e.startsWith("_")||"constructor"!==e&&"shadowRoot"!==e&&"renderOptions"!==e&&"renderRoot"!==e&&"editor"!==e&&"function"!=typeof this[e]&&(t[e]=this[e])})),t}async loadScript(t){Ib[t]||(Ib[t]=this.fetchScript(t));try{const e=await Ib[t];this.appendScriptToHead(e),console.log(`Template script for ${this.prefix} loaded and executed.`),this.requestUpdate()}catch(t){console.error(`Template script for ${this.prefix} failed to load:`,t)}}async fetchScript(t){const e=await fetch(`${this.templateEndpoint}/search/${t}`);if(!e.ok)throw new Error(`Failed to fetch templates from: ${this.templateEndpoint}/search/${t}`);return e.text()}appendScriptToHead(t){const e=document.createElement("script");e.type="text/javascript",e.text=t,document.head.appendChild(e)}requestEdit(t){t.ctrlKey&&this.closest(".qbo-design")&&this.toggleEdit(!this.editing)}toggleEdit(t){this.editing=t,this.editing||(this.testTemplate=void 0,this.editor?.destroy(),this.editor=null)}setTemplate(t){const e=new Function("component",`return qbo4.configuration.html\`${t}\``);try{e(this),this.editorError=void 0,this.testTemplate=e}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}resetTemplate(t){this.editorType=t.target.value,this.map?.has(t.target.value)&&(this.testTemplate=this.map.get(t.target.value)??this.defaultTemplate);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editor?.dispatch(this.editor.state.update({changes:{from:0,to:this.editor.state.doc.length,insert:e}}))}updated(t){super.update(t);let e="<span>Template not defined</span>";if(void 0!==this.testTemplate){const t=this.testTemplate.toString().match(this.regex);t&&(e=t[1])}this.editing&&(this.editor??=new Gs({doc:e,extensions:[Lb,pm(),ia.of([uf]),Gs.updateListener.of((t=>{this.setTemplate(t.state.doc.toString())}))],parent:this.shadowRoot?.querySelector("div.editor")}))}edit(){this.testTemplate??=this.map?.get(this.type)??this.defaultTemplate;const t=Math.random().toString(36).substring(2,15);return B`
|
|
44
|
+
<dialog class="qbo-code" open>
|
|
45
|
+
<header>
|
|
46
|
+
<h5>Edit Template</h5>
|
|
47
|
+
</header>
|
|
48
|
+
<section class="content">
|
|
49
|
+
<input list="${t}" .value=${this.type} @change=${this.resetTemplate} ?disabled="${this.editorCoding}">
|
|
50
|
+
<datalist id="${t}">
|
|
51
|
+
${Array.from(this.map?.keys()??[]).map((t=>B`<option>${t}</option>`))}
|
|
52
|
+
</datalist>
|
|
53
|
+
<div class="editor"></div>
|
|
54
|
+
${this.editorError?B`<hr/><span class="error">${this.editorError.message}</span>`:B``}
|
|
55
|
+
${this.editorCoding?B`<hr/><span class="info">Generating code, please wait...</span>`:B``}
|
|
56
|
+
</section>
|
|
57
|
+
<footer>
|
|
58
|
+
<input @change=${this.code} ?disabled="${this.editorCoding}" class="${this.editorCoding?"working":""}" placeholder="Ask AI to code..." />
|
|
59
|
+
<button type="submit" @click=${this.save} ?disabled="${this.editorCoding}">Save</button>
|
|
60
|
+
<button type="reset" @click=${this.cancel} ?disabled="${this.editorCoding}">Cancel</button>
|
|
61
|
+
</footer>
|
|
62
|
+
</dialog>`}cancel(){this.toggleEdit(!1)}async save(){try{if(null==this.editor)return;const t=new FormData;t.append("htmlTemplate",this.editor.state.doc.toString());const e=await fetch(`${this.templateEndpoint}/save/${this.prefix}/${this.editorType}`,{method:"POST",body:t});if(e.ok)return this.map?.set(this.editorType,this.testTemplate),this.type=this.editorType,void this.toggleEdit(!1);throw new Error(`Failed to save template: ${e.statusText}`)}catch(t){throw t}}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,i=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({HtmlTemplate:this.editor.state.doc.toString(),Component:this.getComponent(),Prompt:e})});if(this.editorCoding=!1,i.ok){const t=await i.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${i.statusText}`)}catch(t){throw this.editorCoding=!1,t}}render(){let t=this.defaultTemplate;return this.type&&this.prefix&&!this.map?.has(this.type)&&(this.map=Gb.get(this.prefix)),this.type&&this.map?.has(this.type)&&(t=this.map.get(this.type)),this.editing?B`${this.edit()}${this.testTemplate(this)}`:t(this)}}return Ub([Ht({attribute:!1}),Bb("design:type",Object)],e.prototype,"editorError",void 0),Ub([Ht(),Bb("design:type",Object)],e.prototype,"type",void 0),Ub([Ht(),Bb("design:type",Object)],e.prototype,"editing",void 0),Ub([Ht({attribute:!1}),Bb("design:type",Function)],e.prototype,"defaultTemplate",void 0),Ub([Ht({attribute:!1}),Bb("design:type",Object)],e.prototype,"testTemplate",void 0),Ub([Ht(),Bb("design:type",Object)],e.prototype,"templateEndpoint",void 0),Ub([Ht(),Bb("design:type",Object)],e.prototype,"prefix",void 0),Ub([Ht({attribute:!1}),Bb("design:type",Object)],e.prototype,"map",void 0),Ub([Ht({attribute:!1}),Bb("design:type",Boolean)],e.prototype,"editorCoding",void 0),e},Fb=Hb(ht);"undefined"!=typeof window&&(window.qbo4=window.qbo4||{},window.qbo4.configuration=window.qbo4.configuration||{},window.qbo4.configuration.templates=Gb,window.qbo4.configuration.html=B,window.qbo4.configuration.version="1.0.1");var Kb=function(t,e,i,r){var n,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,i,r);else for(var a=t.length-1;a>=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,i,s):n(e,i))||s);return o>3&&s&&Object.defineProperty(e,i,s),s},Jb=function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};let tv=class extends ht{constructor(){super(...arguments),this.dragging=!1,this.resizing=!1,this.offsetX=0,this.offsetY=0,this.startWidth=0,this.startHeight=0,this.editorError=null,this.editing=!1,this.storageKey="qbo-css",this.customcss="",this.editorCoding=!1,this.templateEndpoint="/configuration/css",this.editor=null,this.styleElement=null}static{this.styles=[Wb]}async connectedCallback(){super.connectedCallback(),this.addEventListener("click",this.requestEdit.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.addEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.addEventListener("mousemove",this._onMouseMove.bind(this)),window.addEventListener("mouseup",this._onMouseUp.bind(this)),this.customcss=localStorage.getItem(this.storageKey)??""}async disconnectedCallback(){this.removeEventListener("dblclick",this.requestEdit.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onMouseDown.bind(this)),this.shadowRoot?.removeEventListener("mousedown",this._onResizeMouseDown.bind(this),!0),window.removeEventListener("mousemove",this._onMouseMove.bind(this)),window.removeEventListener("mouseup",this._onMouseUp.bind(this))}_onMouseDown(t){if(!t.target.closest(".qbo-code header"))return;this.dragging=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.offsetX=t.clientX-e.getBoundingClientRect().left,this.offsetY=t.clientY-e.getBoundingClientRect().top)}_onResizeMouseDown(t){if(!t.target.closest(".qbo-code .resize-handle"))return;this.resizing=!0;const e=this.shadowRoot?.querySelector(".qbo-code");e&&(this.startWidth=e.offsetWidth,this.startHeight=e.offsetHeight,this.offsetX=t.clientX,this.offsetY=t.clientY)}_onMouseMove(t){if(this.dragging){const e=this.shadowRoot?.querySelector(".qbo-code"),i=t.clientX-this.offsetX,r=t.clientY-this.offsetY;e&&(e.style.left=`${i}px`,e.style.top=`${r}px`)}else if(this.resizing){const e=this.shadowRoot?.querySelector(".qbo-code");e&&(e.style.width=`${this.startWidth+(t.clientX-this.offsetX)}px`,e.style.height=`${this.startHeight+(t.clientY-this.offsetY)}px`)}}_onMouseUp(){this.dragging=!1,this.resizing=!1}requestEdit(t){t.composedPath().some((t=>t instanceof Element&&t.classList.contains("qbo-code")))||!this.editing&&t.target.closest(".qbo-design")&&this.toggleEdit(!0)}toggleEdit(t){this.editing=t,this.editing||(this.editor?.destroy(),this.editor=null)}cancel(){this.setCss(this.customcss),this.toggleEdit(!1)}firstUpdated(t){super.firstUpdated(t);const e=document.createElement("style");e.type="text/css",e.appendChild(document.createTextNode(localStorage.getItem(this.storageKey)??"")),document.head.appendChild(e),this.styleElement=e}updated(t){super.update(t),this.editing&&(this.editor??=new Gs({doc:this.styleElement?.textContent??"",extensions:[Lb,zp(),ia.of([uf]),Gs.updateListener.of((t=>{this.setCss(t.state.doc.toString())}))],parent:this.shadowRoot?.querySelector("div.editor")}))}async code(t){try{if(null==this.editor)return;this.editorCoding=!0;const e=t.target?.value,i=await fetch(`${this.templateEndpoint}/code`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({CssTemplate:this.editor.state.doc.toString(),Prompt:e})});if(this.editorCoding=!1,i.ok){const t=await i.text();return void this.editor.dispatch({changes:{from:0,to:this.editor.state.doc.length,insert:t}})}throw new Error(`Failed to generate code: ${i.statusText}`)}catch(t){throw this.editorCoding=!1,t}}save(){this.toggleEdit(!1)}setCss(t){if(localStorage.setItem(this.storageKey,t),null!=this.styleElement)try{this.styleElement.textContent=t,this.editorError=void 0}catch(e){this.editorError=e,console.error(`Error rendering ${t}`,e)}}edit(){return B`
|
|
63
|
+
<dialog class="qbo-code" open>
|
|
64
|
+
<header>
|
|
65
|
+
<h5>Edit Css</h5>
|
|
66
|
+
</header>
|
|
67
|
+
<section class="content">
|
|
68
|
+
<div class="editor"></div>
|
|
69
|
+
${this.editorError?B`<hr/><span class="error">${this.editorError.message}<span>`:B``}
|
|
70
|
+
</section>
|
|
71
|
+
<footer>
|
|
72
|
+
<input @change=${this.code} ?disabled="${this.editorCoding}" class="${this.editorCoding?"working":""}" placeholder="Ask AI to code..." />
|
|
73
|
+
<button type="submit" @click=${this.save}>Save</button>
|
|
74
|
+
<button type="reset" @click=${this.cancel}>Cancel</button>
|
|
75
|
+
</footer>
|
|
76
|
+
</dialog>`}render(){return B`${this.editing?this.edit():B``}<slot>css edit</slot>`}};var ev;Kb([Ht({attribute:!1}),Jb("design:type",Object)],tv.prototype,"editorError",void 0),Kb([Ht(),Jb("design:type",Object)],tv.prototype,"editing",void 0),Kb([Ht(),Jb("design:type",String)],tv.prototype,"storageKey",void 0),Kb([Ht(),Jb("design:type",String)],tv.prototype,"customcss",void 0),Kb([Ht({attribute:!1}),Jb("design:type",Boolean)],tv.prototype,"editorCoding",void 0),Kb([Ht(),Jb("design:type",Object)],tv.prototype,"templateEndpoint",void 0),tv=Kb([(ev="qbo-css",(t,e)=>{void 0!==e?e.addInitializer((()=>{customElements.define(ev,t)})):customElements.define(ev,t)})],tv);var iv=r.Vk,rv=r.CA,nv=r.F2,ov=r.KY,sv=r.jm,av=r.uH,lv=r.U7,hv=r.wy,cv=r.lk,dv=r._N,uv=r.xC,fv=r.qy,pv=r.JZ,Ov=r.$p,gv=r.vs,mv=r.kT;export{iv as Configuration,rv as ConfigurationSection,nv as EmptyConfigurationSource,ov as IConfigurationSourceToken,sv as IConfigurationToken,av as JsonConfigurationSource,lv as QboConfigEditor,hv as QboCss,cv as QboTemplate,dv as QboTemplateMixin,uv as Services,fv as html,pv as iterateConfig,Ov as services,gv as template,mv as templates};
|
|
77
77
|
//# sourceMappingURL=qbo4.configuration.min.js.map
|