/*! For license information please see server-web.js.LICENSE.txt */ (()=>{var e={2504:(e,t)=>{"use strict";t.byteLength=function(e){var t=o(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,s=o(e),a=s[0],u=s[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),p=0,m=u>0?a-4:a;for(r=0;r>16&255,l[p++]=t>>8&255,l[p++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[p++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[p++]=t>>8&255,l[p++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],a=16383,o=0,l=n-i;ol?l:o+a));return 1===i?(t=e[n-1],s.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],s.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function o(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,s,a=[],o=t;o>18&63]+r[s>>12&63]+r[s>>6&63]+r[63&s]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},6325:(e,t,r)=>{var n=r(2620),i=r(2510),s=r(1661),a=Function.bind,o=a.bind(a);function u(e,t,r){var n=o(s,null).apply(null,r?[t,r]:[t]);e.api={remove:n},e.remove=n,["before","error","after","wrap"].forEach((function(n){var s=r?[t,n,r]:[t,n];e[n]=e.api[n]=o(i,null).apply(null,s)}))}function l(){var e={registry:{}},t=n.bind(null,e);return u(t,e),t}var p=!1;function m(){return p||(console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'),p=!0),l()}m.Singular=function(){var e={registry:{}},t=n.bind(null,e,"h");return u(t,e,"h"),t}.bind(),m.Collection=l.bind(),e.exports=m,e.exports.Hook=m,e.exports.Singular=m.Singular,e.exports.Collection=m.Collection},2510:e=>{e.exports=function(e,t,r,n){var i=n;e.registry[r]||(e.registry[r]=[]),"before"===t&&(n=function(e,t){return Promise.resolve().then(i.bind(null,t)).then(e.bind(null,t))}),"after"===t&&(n=function(e,t){var r;return Promise.resolve().then(e.bind(null,t)).then((function(e){return i(r=e,t)})).then((function(){return r}))}),"error"===t&&(n=function(e,t){return Promise.resolve().then(e.bind(null,t)).catch((function(e){return i(e,t)}))}),e.registry[r].push({hook:n,orig:i})}},2620:e=>{e.exports=function e(t,r,n,i){if("function"!=typeof n)throw new Error("method for before hook must be a function");return i||(i={}),Array.isArray(r)?r.reverse().reduce((function(r,n){return e.bind(null,t,n,r,i)}),n)():Promise.resolve().then((function(){return t.registry[r]?t.registry[r].reduce((function(e,t){return t.hook.bind(null,e,i)}),n)():n(i)}))}},1661:e=>{e.exports=function(e,t,r){if(e.registry[t]){var n=e.registry[t].map((function(e){return e.orig})).indexOf(r);-1!==n&&e.registry[t].splice(n,1)}}},2313:(e,t,r)=>{"use strict";const n=r(2504),i=r(9029),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=u,t.IS=50;const a=2147483647;function o(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return m(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=o(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Q(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Q(e,ArrayBuffer)||e&&Q(e.buffer,ArrayBuffer))return g(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(Q(e,SharedArrayBuffer)||e&&Q(e.buffer,SharedArrayBuffer)))return g(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|c(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function p(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function m(e){return p(e),o(e<0?0:0|c(e))}function d(e){const t=e.length<0?0:0|c(e.length),r=o(t);for(let n=0;n=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function h(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return j(this,t,r);case"latin1":case"binary":return G(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function _(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function f(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let s,a=1,o=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,u/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(s=r;so&&(r=o-u),s=r;s>=0;s--){let r=!0;for(let n=0;ni&&(n=i):n=i;const s=t.length;let a;for(n>s/2&&(n=s/2),a=0;a>8,i=r%256,s.push(i),s.push(n);return s}(t,e.length-r),e,r,n)}function k(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,o,u;switch(a){case 1:t<128&&(s=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(s=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(s=u));break;case 4:r=e[i+1],n=e[i+2],o=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&o)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&o,u>65535&&u<1114112&&(s=u))}}null===s?(s=65533,a=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|1023&s),n.push(s),i+=a}return function(e){const t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=y,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(Q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const o=Math.min(s,a),l=this.slice(n,i),p=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let s=!1;for(;;)switch(n){case"hex":return q(this,e,t,r);case"utf8":case"utf-8":return R(this,e,t,r);case"ascii":case"latin1":case"binary":return v(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const E=4096;function j(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,r,n,i,s){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i){F(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function z(e,t,r,n,i){F(t,n,i,e,r,7);let s=Number(t&BigInt(4294967295));e[r+7]=s,s>>=8,e[r+6]=s,s>>=8,e[r+5]=s,s>>=8,e[r+4]=s;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function D(e,t,r,n,i,s){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,s){return t=+t,r>>>=0,s||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function x(e,t,r,n,s){return t=+t,r>>>=0,s||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=J((function(e){B(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||O(e,t,this.length);let n=this[e],i=1,s=0;for(;++s=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||O(e,t,this.length);let n=t,i=1,s=this[e+--n];for(;n>0&&(i*=256);)s+=this[e+--n]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*t)),s},u.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=J((function(e){B(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||W(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||O(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,s=0;for(this[t]=255&e;++s>>=0,r>>>=0,n||I(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,s=1;for(this[t+i]=255&e;--i>=0&&(s*=256);)this[t+i]=e/s&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=J((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(e,t=0){return z(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);I(this,e,t,r,n-1,-n)}let i=0,s=1,a=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);I(this,e,t,r,n-1,-n)}let i=r-1,s=1,a=0;for(this[t+i]=255&e;--i>=0&&(s*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/s|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=J((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(e,t=0){return z(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function F(e,t,r,n,i,s){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(s+1)}${n}`:`>= -(2${n} ** ${8*(s+1)-1}${n}) and < 2 ** ${8*(s+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new C.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){B(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||W(t,e.length-(r+1))}(n,i,s)}function B(e,t){if("number"!=typeof e)throw new C.ERR_INVALID_ARG_TYPE(t,"number",e)}function W(e,t,r){if(Math.floor(e)!==e)throw B(e,r),new C.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new C.ERR_BUFFER_OUT_OF_BOUNDS;throw new C.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}N("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),N("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),N("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function $(e,t){let r;t=t||1/0;const n=e.length;let i=null;const s=[];for(let a=0;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}const X=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function J(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},3692:e=>{var t;globalThis,t=()=>(()=>{"use strict";var e={949:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CronParser=void 0;var n=r(515),i=function(){function e(e,t,r){void 0===t&&(t=!0),void 0===r&&(r=!1),this.expression=e,this.dayOfWeekStartIndexZero=t,this.monthStartIndexZero=r}return e.prototype.parse=function(){var e,t;if((null!==(e=this.expression)&&void 0!==e?e:"").startsWith("@")){var r=this.parseSpecial(this.expression);t=this.extractParts(r)}else t=this.extractParts(this.expression);return this.normalize(t),this.validate(t),t},e.prototype.parseSpecial=function(e){var t={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *"}[e];if(!t)throw new Error("Unknown special expression.");return t},e.prototype.extractParts=function(e){if(!this.expression)throw new Error("cron expression is empty");for(var t=e.trim().split(/[ ]+/),r=0;r7)throw new Error("Expression has ".concat(t.length," parts; too many!"));return t},e.prototype.normalize=function(e){var t=this;if(e[3]=e[3].replace("?","*"),e[5]=e[5].replace("?","*"),e[2]=e[2].replace("?","*"),0==e[0].indexOf("0/")&&(e[0]=e[0].replace("0/","*/")),0==e[1].indexOf("0/")&&(e[1]=e[1].replace("0/","*/")),0==e[2].indexOf("0/")&&(e[2]=e[2].replace("0/","*/")),0==e[3].indexOf("1/")&&(e[3]=e[3].replace("1/","*/")),0==e[4].indexOf("1/")&&(e[4]=e[4].replace("1/","*/")),0==e[6].indexOf("1/")&&(e[6]=e[6].replace("1/","*/")),e[5]=e[5].replace(/(^\d)|([^#/\s]\d)/g,(function(e){var r=e.replace(/\D/,""),n=r;return t.dayOfWeekStartIndexZero?"7"==r&&(n="0"):n=(parseInt(r)-1).toString(),e.replace(r,n)})),"L"==e[5]&&(e[5]="6"),"?"==e[3]&&(e[3]="*"),e[3].indexOf("W")>-1&&(e[3].indexOf(",")>-1||e[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var r={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var n in r)e[5]=e[5].replace(new RegExp(n,"gi"),r[n].toString());e[4]=e[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,(function(e){var r=e.replace(/\D/,""),n=r;return t.monthStartIndexZero&&(n=(parseInt(r)+1).toString()),e.replace(r,n)}));var i={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var s in i)e[4]=e[4].replace(new RegExp(s,"gi"),i[s].toString());"0"==e[0]&&(e[0]=""),/\*|\-|\,|\//.test(e[2])||!/\*|\//.test(e[1])&&!/\*|\//.test(e[0])||(e[2]+="-".concat(e[2]));for(var a=0;a-1&&!/^\*|\-|\,/.test(e[a])){var o=null;switch(a){case 4:o="12";break;case 5:o="6";break;case 6:o="9999";break;default:o=null}if(null!==o){var u=e[a].split("/");e[a]="".concat(u[0],"-").concat(o,"/").concat(u[1])}}},e.prototype.validate=function(e){var t="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(e[0],t),this.validateOnlyExpectedCharactersFound(e[1],t),this.validateOnlyExpectedCharactersFound(e[2],t),this.validateOnlyExpectedCharactersFound(e[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(e[4],t),this.validateOnlyExpectedCharactersFound(e[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(e[6],t),this.validateAnyRanges(e)},e.prototype.validateAnyRanges=function(e){n.default.secondRange(e[0]),n.default.minuteRange(e[1]),n.default.hourRange(e[2]),n.default.dayOfMonthRange(e[3]),n.default.monthRange(e[4],this.monthStartIndexZero),n.default.dayOfWeekRange(e[5],this.dayOfWeekStartIndexZero)},e.prototype.validateOnlyExpectedCharactersFound=function(e,t){var r=e.match(new RegExp("[^".concat(t,"]+"),"gi"));if(r&&r.length)throw new Error("Expression contains invalid values: '".concat(r.toString(),"'"))},e}();t.CronParser=i},333:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExpressionDescriptor=void 0;var n=r(823),i=r(949),s=function(){function e(t,r){if(this.expression=t,this.options=r,this.expressionParts=new Array(5),!this.options.locale&&e.defaultLocale&&(this.options.locale=e.defaultLocale),!e.locales[this.options.locale]){var n=Object.keys(e.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(n,"'.")),this.options.locale=n}this.i18n=e.locales[this.options.locale],void 0===r.use24HourTimeFormat&&(r.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return e.toString=function(t,r){var n=void 0===r?{}:r,i=n.throwExceptionOnParseError,s=void 0===i||i,a=n.verbose,o=void 0!==a&&a,u=n.dayOfWeekStartIndexZero,l=void 0===u||u,p=n.monthStartIndexZero,m=void 0!==p&&p,d=n.use24HourTimeFormat,g=n.locale,c=void 0===g?null:g,y=n.tzOffset;return new e(t,{throwExceptionOnParseError:s,verbose:o,dayOfWeekStartIndexZero:l,monthStartIndexZero:m,use24HourTimeFormat:d,locale:c,tzOffset:void 0===y?0:y}).getFullDescription()},e.initialize=function(t,r){void 0===r&&(r="en"),e.specialCharacters=["/","-",",","*"],e.defaultLocale=r,t.load(e.locales)},e.prototype.getFullDescription=function(){var e="";try{var t=new i.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);this.expressionParts=t.parse();var r=this.getTimeOfDayDescription(),n=this.getDayOfMonthDescription(),s=this.getMonthDescription();e+=r+n+this.getDayOfWeekDescription()+s+this.getYearDescription(),e=(e=this.transformVerbosity(e,!!this.options.verbose)).charAt(0).toLocaleUpperCase()+e.substr(1)}catch(t){if(this.options.throwExceptionOnParseError)throw"".concat(t);e=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD()}return e},e.prototype.getTimeOfDayDescription=function(){var t=this.expressionParts[0],r=this.expressionParts[1],i=this.expressionParts[2],s="";if(n.StringUtilities.containsAny(r,e.specialCharacters)||n.StringUtilities.containsAny(i,e.specialCharacters)||n.StringUtilities.containsAny(t,e.specialCharacters))if(t||!(r.indexOf("-")>-1)||r.indexOf(",")>-1||r.indexOf("/")>-1||n.StringUtilities.containsAny(i,e.specialCharacters))if(!t&&i.indexOf(",")>-1&&-1==i.indexOf("-")&&-1==i.indexOf("/")&&!n.StringUtilities.containsAny(r,e.specialCharacters)){var a=i.split(",");s+=this.i18n.at();for(var o=0;o1){var s=i[i.length-1].index;r=r.substring(0,s)+":59"+r.substring(s+3)}}return r},e.prototype.getDayOfWeekDescription=function(){var e=this,t=this.i18n.daysOfTheWeek();return"*"==this.expressionParts[5]?"":this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),(function(r,n){var i=r;r.indexOf("#")>-1?i=r.substring(0,r.indexOf("#")):r.indexOf("L")>-1&&(i=i.replace("L",""));var s=parseInt(i);if(e.options.tzOffset){var a=e.expressionParts[2],o=parseInt(a)+(e.options.tzOffset?e.options.tzOffset:0);o>=24?s++:o<0&&s--,s>6?s=0:s<0&&(s=6)}var u=e.i18n.daysOfTheWeekInCase?e.i18n.daysOfTheWeekInCase(n)[s]:t[s];if(r.indexOf("#")>-1){var l=null,p=r.substring(r.indexOf("#")+1),m=r.substring(0,r.indexOf("#"));switch(p){case"1":l=e.i18n.first(m);break;case"2":l=e.i18n.second(m);break;case"3":l=e.i18n.third(m);break;case"4":l=e.i18n.fourth(m);break;case"5":l=e.i18n.fifth(m)}u=l+" "+u}return u}),(function(t){return 1==parseInt(t)?"":n.StringUtilities.format(e.i18n.commaEveryX0DaysOfTheWeek(t),t)}),(function(t){var r=t.substring(0,t.indexOf("-"));return"*"!=e.expressionParts[3]?e.i18n.commaAndX0ThroughX1(r):e.i18n.commaX0ThroughX1(r)}),(function(t){var r=null;if(t.indexOf("#")>-1){var n=t.substring(t.indexOf("#")+1),i=t.substring(0,t.indexOf("#"));r=e.i18n.commaOnThe(n,i).trim()+e.i18n.spaceX0OfTheMonth()}else r=t.indexOf("L")>-1?e.i18n.commaOnTheLastX0OfTheMonth(t.replace("L","")):"*"!=e.expressionParts[3]?e.i18n.commaAndOnX0():e.i18n.commaOnlyOnX0(t);return r}))},e.prototype.getMonthDescription=function(){var e=this,t=this.i18n.monthsOfTheYear();return this.getSegmentDescription(this.expressionParts[4],"",(function(r,n){return n&&e.i18n.monthsOfTheYearInCase?e.i18n.monthsOfTheYearInCase(n)[parseInt(r)-1]:t[parseInt(r)-1]}),(function(t){return 1==parseInt(t)?"":n.StringUtilities.format(e.i18n.commaEveryX0Months(t),t)}),(function(t){return e.i18n.commaMonthX0ThroughMonthX1()||e.i18n.commaX0ThroughX1()}),(function(t){return e.i18n.commaOnlyInMonthX0?e.i18n.commaOnlyInMonthX0():e.i18n.commaOnlyInX0()}))},e.prototype.getDayOfMonthDescription=function(){var e=this,t=null,r=this.expressionParts[3];switch(r){case"L":t=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":t=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var i=r.match(/(\d{1,2}W)|(W\d{1,2})/);if(i){var s=parseInt(i[0].replace("W","")),a=1==s?this.i18n.firstWeekday():n.StringUtilities.format(this.i18n.weekdayNearestDayX0(),s.toString());t=n.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),a);break}var o=r.match(/L-(\d{1,2})/);if(o){var u=o[1];t=n.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(u),u);break}if("*"==r&&"*"!=this.expressionParts[5])return"";t=this.getSegmentDescription(r,this.i18n.commaEveryDay(),(function(t){return"L"==t?e.i18n.lastDay():e.i18n.dayX0?n.StringUtilities.format(e.i18n.dayX0(),t):t}),(function(t){return"1"==t?e.i18n.commaEveryDay():e.i18n.commaEveryX0Days(t)}),(function(t){return e.i18n.commaBetweenDayX0AndX1OfTheMonth(t)}),(function(t){return e.i18n.commaOnDayX0OfTheMonth(t)}))}return t},e.prototype.getYearDescription=function(){var e=this;return this.getSegmentDescription(this.expressionParts[6],"",(function(e){return/^\d+$/.test(e)?new Date(parseInt(e),1).getFullYear().toString():e}),(function(t){return n.StringUtilities.format(e.i18n.commaEveryX0Years(t),t)}),(function(t){return e.i18n.commaYearX0ThroughYearX1()||e.i18n.commaX0ThroughX1()}),(function(t){return e.i18n.commaOnlyInYearX0?e.i18n.commaOnlyInYearX0():e.i18n.commaOnlyInX0()}))},e.prototype.getSegmentDescription=function(e,t,r,i,s,a){var o=null,u=e.indexOf("/")>-1,l=e.indexOf("-")>-1,p=e.indexOf(",")>-1;if(e)if("*"===e)o=t;else if(u||l||p)if(p){for(var m=e.split(","),d="",g=0;g0&&m.length>2&&(d+=",",g0&&m.length>1&&(g==m.length-1||2==m.length)&&(d+="".concat(this.i18n.spaceAnd()," ")),m[g].indexOf("/")>-1||m[g].indexOf("-")>-1){var c=m[g].indexOf("-")>-1&&-1==m[g].indexOf("/"),y=this.getSegmentDescription(m[g],t,r,i,c?this.i18n.commaX0ThroughX1:s,a);c&&(y=y.replace(", ","")),d+=y}else d+=u?this.getSegmentDescription(m[g],t,r,i,s,a):r(m[g]);o=u?d:n.StringUtilities.format(a(e),d)}else if(u){if(m=e.split("/"),o=n.StringUtilities.format(i(m[1]),m[1]),m[0].indexOf("-")>-1){var h=this.generateRangeSegmentDescription(m[0],s,r);0!=h.indexOf(", ")&&(o+=", "),o+=h}else if(-1==m[0].indexOf("*")){var _=n.StringUtilities.format(a(m[0]),r(m[0]));_=_.replace(", ",""),o+=n.StringUtilities.format(this.i18n.commaStartingX0(),_)}}else l&&(o=this.generateRangeSegmentDescription(e,s,r));else o=n.StringUtilities.format(a(e),r(e));else o="";return o},e.prototype.generateRangeSegmentDescription=function(e,t,r){var i="",s=e.split("-"),a=r(s[0],1),o=r(s[1],2),u=t(e);return i+n.StringUtilities.format(u,a,o)},e.prototype.formatTime=function(e,t,r){var n=0,i=0;this.options.tzOffset&&(n=this.options.tzOffset>0?Math.floor(this.options.tzOffset):Math.ceil(this.options.tzOffset),0!=(i=parseFloat((this.options.tzOffset%1).toFixed(2)))&&(i*=60));var s=parseInt(e)+n,a=parseInt(t)+i;a>=60?(a-=60,s+=1):a<0&&(a+=60,s-=1),s>=24?s-=24:s<0&&(s=24+s);var o="",u=!1;this.options.use24HourTimeFormat||(o=(u=!(!this.i18n.setPeriodBeforeTime||!this.i18n.setPeriodBeforeTime()))?"".concat(this.getPeriod(s)," "):" ".concat(this.getPeriod(s)),s>12&&(s-=12),0===s&&(s=12));var l="";return r&&(l=":".concat(("00"+r).substring(r.length))),"".concat(u?o:"").concat(("00"+s.toString()).substring(s.toString().length),":").concat(("00"+a.toString()).substring(a.toString().length)).concat(l).concat(u?"":o)},e.prototype.transformVerbosity=function(e,t){return t||(e=(e=(e=(e=e.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),"")).replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),"")).replace(new RegExp(this.i18n.commaEveryDay(),"g"),"")).replace(/\, ?$/,"")),e},e.prototype.getPeriod=function(e){return e>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},e.locales={},e}();t.ExpressionDescriptor=s},747:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.enLocaleLoader=void 0;var n=r(486),i=function(){function e(){}return e.prototype.load=function(e){e.en=new n.en},e}();t.enLocaleLoader=i},486:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.en=void 0;var r=function(){function e(){}return e.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},e.prototype.atX0MinutesPastTheHourGt20=function(){return null},e.prototype.commaMonthX0ThroughMonthX1=function(){return null},e.prototype.commaYearX0ThroughYearX1=function(){return null},e.prototype.use24HourTimeFormatByDefault=function(){return!1},e.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occured when generating the expression description. Check the cron expression syntax."},e.prototype.everyMinute=function(){return"every minute"},e.prototype.everyHour=function(){return"every hour"},e.prototype.atSpace=function(){return"At "},e.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},e.prototype.at=function(){return"At"},e.prototype.spaceAnd=function(){return" and"},e.prototype.everySecond=function(){return"every second"},e.prototype.everyX0Seconds=function(){return"every %s seconds"},e.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},e.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},e.prototype.everyX0Minutes=function(){return"every %s minutes"},e.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},e.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},e.prototype.everyX0Hours=function(){return"every %s hours"},e.prototype.betweenX0AndX1=function(){return"between %s and %s"},e.prototype.atX0=function(){return"at %s"},e.prototype.commaEveryDay=function(){return", every day"},e.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},e.prototype.commaX0ThroughX1=function(){return", %s through %s"},e.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},e.prototype.first=function(){return"first"},e.prototype.second=function(){return"second"},e.prototype.third=function(){return"third"},e.prototype.fourth=function(){return"fourth"},e.prototype.fifth=function(){return"fifth"},e.prototype.commaOnThe=function(){return", on the "},e.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},e.prototype.lastDay=function(){return"the last day"},e.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},e.prototype.commaOnlyOnX0=function(){return", only on %s"},e.prototype.commaAndOnX0=function(){return", and on %s"},e.prototype.commaEveryX0Months=function(){return", every %s months"},e.prototype.commaOnlyInX0=function(){return", only in %s"},e.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},e.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},e.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},e.prototype.firstWeekday=function(){return"first weekday"},e.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},e.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},e.prototype.commaEveryX0Days=function(){return", every %s days"},e.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},e.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},e.prototype.commaEveryHour=function(){return", every hour"},e.prototype.commaEveryX0Years=function(){return", every %s years"},e.prototype.commaStartingX0=function(){return", starting %s"},e.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},e.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},e}();t.en=r},515:(e,t)=>{function r(e,t){if(!e)throw new Error(t)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e.secondRange=function(e){for(var t=e.split(","),n=0;n=0&&i<=59,"seconds part must be >= 0 and <= 59")}},e.minuteRange=function(e){for(var t=e.split(","),n=0;n=0&&i<=59,"minutes part must be >= 0 and <= 59")}},e.hourRange=function(e){for(var t=e.split(","),n=0;n=0&&i<=23,"hours part must be >= 0 and <= 23")}},e.dayOfMonthRange=function(e){for(var t=e.split(","),n=0;n=1&&i<=31,"DOM part must be >= 1 and <= 31")}},e.monthRange=function(e,t){for(var n=e.split(","),i=0;i=1&&s<=12,t?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},e.dayOfWeekRange=function(e,t){for(var n=e.split(","),i=0;i=0&&s<=6,t?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},e}();t.default=n},823:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StringUtilities=void 0;var r=function(){function e(){}return e.format=function(e){for(var t=[],r=1;r-1}))},e}();t.StringUtilities=r}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}var n={};return(()=>{var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.toString=void 0;var t=r(333),i=r(747);t.ExpressionDescriptor.initialize(new i.enLocaleLoader),e.default=t.ExpressionDescriptor;var s=t.ExpressionDescriptor.toString;e.toString=s})(),n})(),e.exports=t()},9029:(e,t)=>{t.read=function(e,t,r,n,i){var s,a,o=8*i-n-1,u=(1<>1,p=-7,m=r?i-1:0,d=r?-1:1,g=e[t+m];for(m+=d,s=g&(1<<-p)-1,g>>=-p,p+=o;p>0;s=256*s+e[t+m],m+=d,p-=8);for(a=s&(1<<-p)-1,s>>=-p,p+=n;p>0;a=256*a+e[t+m],m+=d,p-=8);if(0===s)s=1-l;else{if(s===u)return a?NaN:1/0*(g?-1:1);a+=Math.pow(2,n),s-=l}return(g?-1:1)*a*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var a,o,u,l=8*s-i-1,p=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:s-1,c=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=p):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+m>=1?d/u:d*Math.pow(2,1-m))*u>=2&&(a++,u/=2),a+m>=p?(o=0,a=p):a+m>=1?(o=(t*u-1)*Math.pow(2,i),a+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,i),a=0));i>=8;e[r+g]=255&o,g+=c,o/=256,i-=8);for(a=a<0;e[r+g]=255&a,g+=c,a/=256,l-=8);e[r+g-c]|=128*y}},4714:(e,t)=>{"use strict";var r=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r)return r;throw new Error("unable to locate global object")}();e.exports=t=r.fetch,r.fetch&&(t.default=r.fetch.bind(r)),t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response},3073:(e,t,r)=>{var n=r(9557);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function s(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},r=e.name||"Function wrapped with `once`";return t.onceError=r+" shouldn't be called more than once",t.called=!1,t}e.exports=n(i),e.exports.strict=n(s),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return s(this)},configurable:!0})}))},5781:(e,t,r)=>{"use strict";e.exports=r(5929)},5929:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,r(3605).default.install();const s=r(4615);i(r(4615),t);class a extends s.AbstractMessageReader{constructor(e){super(),this._onData=new s.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener("error",(e=>this.fireError(e))),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}}t.BrowserMessageReader=a;class o extends s.AbstractMessageWriter{constructor(e){super(),this.context=e,this.errorCount=0,e.addEventListener("error",(e=>this.fireError(e)))}write(e){try{return this.context.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.BrowserMessageWriter=o,t.createMessageConnection=function(e,t,r,n){return void 0===r&&(r=s.NullLogger),s.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,s.createMessageConnection)(e,t,r,n)}},3605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9504),i=r(2437),s=r(7522),a=r(9014);class o extends a.AbstractMessageBuffer{constructor(e="utf-8"){super(e),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return o.emptyBuffer}fromString(e,t){return(new TextEncoder).encode(e)}toString(e,t){return"ascii"===t?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}}o.emptyBuffer=new Uint8Array(0);class u{constructor(e){this.socket=e,this._onData=new s.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then((e=>{this._onData.fire(new Uint8Array(e))}),(()=>{(0,n.default)().console.error("Converting blob to array buffer failed.")}))},this.socket.addEventListener("message",this._messageListener)}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create((()=>this.socket.removeEventListener("end",e)))}onData(e){return this._onData.event(e)}}class l{constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener("close",e),i.Disposable.create((()=>this.socket.removeEventListener("close",e)))}onError(e){return this.socket.addEventListener("error",e),i.Disposable.create((()=>this.socket.removeEventListener("error",e)))}onEnd(e){return this.socket.addEventListener("end",e),i.Disposable.create((()=>this.socket.removeEventListener("end",e)))}write(e,t){if("string"==typeof e){if(void 0!==t&&"utf-8"!==t)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}}const p=new TextEncoder,m=Object.freeze({messageBuffer:Object.freeze({create:e=>new o(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{if("utf-8"!==t.charset)throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(p.encode(JSON.stringify(e,void 0,0)))}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{if(!(e instanceof Uint8Array))throw new Error("In a Browser environments only Uint8Arrays are supported.");return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))}})}),stream:Object.freeze({asReadableStream:e=>new u(e),asWritableStream:e=>new l(e)}),console,timer:Object.freeze({setTimeout(e,t,...r){const n=setTimeout(e,t,...r);return{dispose:()=>clearTimeout(n)}},setImmediate(e,...t){const r=setTimeout(e,0,...t);return{dispose:()=>clearTimeout(r)}},setInterval(e,t,...r){const n=setInterval(e,t,...r);return{dispose:()=>clearInterval(n)}}})});function d(){return m}!function(e){e.install=function(){n.default.install(m)}}(d||(d={})),t.default=d},4615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFormat=t.TraceValues=t.Trace=t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=void 0;const n=r(2515);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const i=r(7406);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return i.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return i.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return i.Touch}});const s=r(2437);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return s.Disposable}});const a=r(7522);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return a.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return a.Emitter}});const o=r(5280);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return o.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return o.CancellationToken}});const u=r(8983);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return u.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return u.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return u.ReadableStreamMessageReader}});const l=r(6631);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return l.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return l.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return l.WriteableStreamMessageWriter}});const p=r(3247);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}});const m=r(9504);t.RAL=m.default},5280:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=r(9504),i=r(8967),s=r(7522);var a;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:s.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:s.Event.None}),e.is=function(t){const r=t;return r&&(r===e.None||r===e.Cancelled||i.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}}(a=t.CancellationToken||(t.CancellationToken={}));const o=Object.freeze((function(e,t){const r=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}));class u{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new s.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new u),this._token}cancel(){this._token?this._token.cancel():this._token=a.Cancelled}dispose(){this._token?this._token instanceof u&&this._token.dispose():this._token=a.None}}},3247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const n=r(9504),i=r(8967),s=r(2515),a=r(7406),o=r(7522),u=r(5280);var l,p,m,d,g,c,y,h,_,f,b,q,R,v,w;!function(e){e.type=new s.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(p=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new s.NotificationType("$/progress")}(m||(m={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return i.func(e)}}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(g=t.Trace||(t.Trace={})),(w=t.TraceValues||(t.TraceValues={})).Off="off",w.Messages="messages",w.Compact="compact",w.Verbose="verbose",function(e){e.fromString=function(t){if(!i.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(g=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return i.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(c=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new s.NotificationType("$/setTrace")}(y=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new s.NotificationType("$/logTrace")}(h=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(_=t.ConnectionErrors||(t.ConnectionErrors={}));class T extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,T.prototype)}}t.ConnectionError=T,function(e){e.is=function(e){const t=e;return t&&i.func(t.cancelUndispatched)}}(f=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new u.CancellationTokenSource}),e.is=function(e){const t=e;return t&&i.func(t.createCancellationTokenSource)}}(b=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&i.func(t.sendCancellation)&&i.func(t.cleanup)}}(q=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:b.Message,sender:q.Message}),e.is=function(e){const t=e;return t&&b.is(t.receiver)&&q.is(t.sender)}}(R=t.CancellationStrategy||(t.CancellationStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(R.is(t.cancellationStrategy)||f.is(t.connectionStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(v||(v={})),t.createMessageConnection=function(e,r,f,b){const q=void 0!==f?f:t.NullLogger;let w=0,k=0,P=0;const E="2.0";let j;const G=new Map;let A;const S=new Map,O=new Map;let I,M,z=new a.LinkedMap,D=new Map,L=new Set,x=new Map,C=g.Off,N=c.Text,U=v.New;const F=new o.Emitter,B=new o.Emitter,W=new o.Emitter,H=new o.Emitter,$=new o.Emitter,K=b&&b.cancellationStrategy?b.cancellationStrategy:R.Message;function Y(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Q(e){}function V(){return U===v.Listening}function X(){return U===v.Closed}function J(){return U===v.Disposed}function Z(){U!==v.New&&U!==v.Listening||(U=v.Closed,B.fire(void 0))}function ee(){I||0===z.size||(I=(0,n.default)().timer.setImmediate((()=>{I=void 0,function(){if(0===z.size)return;const e=z.shift();try{s.Message.isRequest(e)?function(e){if(J())return;function t(t,n,i){const a={jsonrpc:E,id:e.id};t instanceof s.ResponseError?a.error=t.toJson():a.result=void 0===t?null:t,ne(a,n,i),r.write(a).catch((()=>q.error("Sending response failed.")))}function n(t,n,i){const s={jsonrpc:E,id:e.id,error:t.toJson()};ne(s,n,i),r.write(s).catch((()=>q.error("Sending response failed.")))}!function(e){if(C!==g.Off&&M)if(N===c.Text){let t;C!==g.Verbose&&C!==g.Compact||!e.params||(t=`Params: ${re(e.params)}\n\n`),M.log(`Received request '${e.method} - (${e.id})'.`,t)}else se("receive-request",e)}(e);const a=G.get(e.method);let o,u;a&&(o=a.type,u=a.handler);const l=Date.now();if(u||j){const a=e.id??String(Date.now()),p=K.receiver.createCancellationTokenSource(a);null!==e.id&&L.has(e.id)&&p.cancel(),null!==e.id&&x.set(a,p);try{let m;if(u)if(void 0===e.params){if(void 0!==o&&0!==o.numberOfParams)return void n(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines ${o.numberOfParams} params but received none.`),e.method,l);m=u(p.token)}else if(Array.isArray(e.params)){if(void 0!==o&&o.parameterStructures===s.ParameterStructures.byName)return void n(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);m=u(...e.params,p.token)}else{if(void 0!==o&&o.parameterStructures===s.ParameterStructures.byPosition)return void n(new s.ResponseError(s.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);m=u(e.params,p.token)}else j&&(m=j(e.method,e.params,p.token));const d=m;m?d.then?d.then((r=>{x.delete(a),t(r,e.method,l)}),(t=>{x.delete(a),t instanceof s.ResponseError?n(t,e.method,l):t&&i.string(t.message)?n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)})):(x.delete(a),t(m,e.method,l)):(x.delete(a),function(t,n,i){void 0===t&&(t=null);const s={jsonrpc:E,id:e.id,result:t};ne(s,n,i),r.write(s).catch((()=>q.error("Sending response failed.")))}(m,e.method,l))}catch(r){x.delete(a),r instanceof s.ResponseError?t(r,e.method,l):r&&i.string(r.message)?n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${r.message}`),e.method,l):n(new s.ResponseError(s.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else n(new s.ResponseError(s.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):s.Message.isNotification(e)?function(e){if(J())return;let t,r;if(e.method===l.type.method){const t=e.params.id;return L.delete(t),void ie(e)}{const n=S.get(e.method);n&&(r=n.handler,t=n.type)}if(r||A)try{if(ie(e),r)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==s.ParameterStructures.byName&&q.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),r();else if(Array.isArray(e.params)){const n=e.params;e.method===m.type.method&&2===n.length&&p.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===s.ParameterStructures.byName&&q.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&q.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),r(...n))}else void 0!==t&&t.parameterStructures===s.ParameterStructures.byPosition&&q.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params);else A&&A(e.method,e.params)}catch(t){t.message?q.error(`Notification handler '${e.method}' failed with message: ${t.message}`):q.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):s.Message.isResponse(e)?function(e){if(!J())if(null===e.id)e.error?q.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):q.error("Received response message without id. No further error information provided.");else{const t=e.id,r=D.get(t);if(function(e,t){if(C!==g.Off&&M)if(N===c.Text){let r;if(C!==g.Verbose&&C!==g.Compact||(e.error&&e.error.data?r=`Error data: ${re(e.error.data)}\n\n`:e.result?r=`Result: ${re(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else M.log(`Received response ${e.id} without active response promise.`,r)}else se("receive-response",e)}(e,r),void 0!==r){D.delete(t);try{if(e.error){const t=e.error;r.reject(new s.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?q.error(`Response handler '${r.method}' failed with message: ${e.message}`):q.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void q.error("Received empty message.");q.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(i.string(t.id)||i.number(t.id)){const e=t.id,r=D.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{ee()}}()})))}e.onClose(Z),e.onError((function(e){F.fire([e,void 0,void 0])})),r.onClose(Z),r.onError((function(e){F.fire(e)}));const te=e=>{try{if(s.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,n=Y(t),i=z.get(n);if(s.Message.isRequest(i)){const s=b?.connectionStrategy,a=s&&s.cancelUndispatched?s.cancelUndispatched(i,Q):void 0;if(a&&(void 0!==a.error||void 0!==a.result))return z.delete(n),x.delete(t),a.id=i.id,ne(a,e.method,Date.now()),void r.write(a).catch((()=>q.error("Sending response for canceled message failed.")))}const a=x.get(t);if(void 0!==a)return a.cancel(),void ie(e);L.add(t)}!function(e,t){var r;s.Message.isRequest(t)?e.set(Y(t.id),t):s.Message.isResponse(t)?e.set(null===(r=t.id)?"res-unknown-"+(++P).toString():"res-"+r.toString(),t):e.set("not-"+(++k).toString(),t)}(z,e)}finally{ee()}};function re(e){if(null!=e)switch(C){case g.Verbose:return JSON.stringify(e,null,4);case g.Compact:return JSON.stringify(e);default:return}}function ne(e,t,r){if(C!==g.Off&&M)if(N===c.Text){let n;C!==g.Verbose&&C!==g.Compact||(e.error&&e.error.data?n=`Error data: ${re(e.error.data)}\n\n`:e.result?n=`Result: ${re(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else se("send-response",e)}function ie(e){if(C!==g.Off&&M&&e.method!==h.type.method)if(N===c.Text){let t;C!==g.Verbose&&C!==g.Compact||(t=e.params?`Params: ${re(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Received notification '${e.method}'.`,t)}else se("receive-notification",e)}function se(e,t){if(!M||C===g.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(r)}function ae(){if(X())throw new T(_.Closed,"Connection is closed.");if(J())throw new T(_.Disposed,"Connection is disposed.")}function oe(e){return void 0===e?null:e}function ue(e){return null===e?void 0:e}function le(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function pe(e,t){switch(e){case s.ParameterStructures.auto:return le(t)?ue(t):[oe(t)];case s.ParameterStructures.byName:if(!le(t))throw new Error("Received parameters by name but param is not an object literal.");return ue(t);case s.ParameterStructures.byPosition:return[oe(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function me(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=pe(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e{let n,a;if(ae(),i.string(e)){n=e;const r=t[0];let i=0,o=s.ParameterStructures.auto;s.ParameterStructures.is(r)&&(i=1,o=r);let u=t.length;const l=u-i;switch(l){case 0:a=void 0;break;case 1:a=pe(o,t[i]);break;default:if(o===s.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(i,u).map((e=>oe(e)))}}else{const r=t;n=e.method,a=me(e,r)}const o={jsonrpc:E,method:n,params:a};return function(e){if(C!==g.Off&&M)if(N===c.Text){let t;C!==g.Verbose&&C!==g.Compact||(t=e.params?`Params: ${re(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Sending notification '${e.method}'.`,t)}else se("send-notification",e)}(o),r.write(o).catch((()=>q.error("Sending notification failed.")))},onNotification:(e,t)=>{let r;return ae(),i.func(e)?A=e:t&&(i.string(e)?(r=e,S.set(e,{type:void 0,handler:t})):(r=e.method,S.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==r?S.delete(r):A=void 0}}},onProgress:(e,t,r)=>{if(O.has(t))throw new Error(`Progress handler for token ${t} already registered`);return O.set(t,r),{dispose:()=>{O.delete(t)}}},sendProgress:(e,t,r)=>de.sendNotification(m.type,{token:t,value:r}),onUnhandledProgress:H.event,sendRequest:(e,...t)=>{let n,a,o;if(ae(),function(){if(!V())throw new Error("Call listen() first.")}(),i.string(e)){n=e;const r=t[0],i=t[t.length-1];let l=0,p=s.ParameterStructures.auto;s.ParameterStructures.is(r)&&(l=1,p=r);let m=t.length;u.CancellationToken.is(i)&&(m-=1,o=i);const d=m-l;switch(d){case 0:a=void 0;break;case 1:a=pe(p,t[l]);break;default:if(p===s.ParameterStructures.byName)throw new Error(`Received ${d} parameters for 'by Name' request parameter structure.`);a=t.slice(l,m).map((e=>oe(e)))}}else{const r=t;n=e.method,a=me(e,r);const i=e.numberOfParams;o=u.CancellationToken.is(r[i])?r[i]:void 0}const l=w++;let p;return o&&(p=o.onCancellationRequested((()=>{const e=K.sender.sendCancellation(de,l);return void 0===e?(q.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch((()=>{q.log(`Sending cancellation messages for id ${l} failed`)}))}))),new Promise(((e,t)=>{const i={jsonrpc:E,id:l,method:n,params:a};let o={method:n,timerStart:Date.now(),resolve:t=>{e(t),K.sender.cleanup(l),p?.dispose()},reject:e=>{t(e),K.sender.cleanup(l),p?.dispose()}};!function(e){if(C!==g.Off&&M)if(N===c.Text){let t;C!==g.Verbose&&C!==g.Compact||!e.params||(t=`Params: ${re(e.params)}\n\n`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else se("send-request",e)}(i);try{r.write(i).catch((()=>q.error("Sending request failed.")))}catch(e){o.reject(new s.ResponseError(s.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),o=null}o&&D.set(l,o)}))},onRequest:(e,t)=>{ae();let r=null;return d.is(e)?(r=void 0,j=e):i.string(e)?(r=null,void 0!==t&&(r=e,G.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,G.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==r&&(void 0!==r?G.delete(r):j=void 0)}}},hasPendingResponse:()=>D.size>0,trace:async(e,t,r)=>{let n=!1,s=c.Text;void 0!==r&&(i.boolean(r)?n=r:(n=r.sendNotification||!1,s=r.traceFormat||c.Text)),C=e,N=s,M=C===g.Off?void 0:t,!n||X()||J()||await de.sendNotification(y.type,{value:g.toString(e)})},onError:F.event,onClose:B.event,onUnhandledNotification:W.event,onDispose:$.event,end:()=>{r.end()},dispose:()=>{if(J())return;U=v.Disposed,$.fire(void 0);const t=new s.ResponseError(s.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of D.values())e.reject(t);D=new Map,x=new Map,L=new Set,z=new a.LinkedMap,i.func(r.dispose)&&r.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{ae(),function(){if(V())throw new T(_.AlreadyListening,"Connection is already listening")}(),U=v.Listening,e.listen(te)},inspect:()=>{(0,n.default)().console.log("inspect")}};return de.onNotification(h.type,(e=>{if(C===g.Off||!M)return;const t=C===g.Verbose||C===g.Compact;M.log(e.message,t?e.verbose:void 0)})),de.onNotification(m.type,(e=>{const t=O.get(e.token);t?t(e.value):H.fire(e)})),de}},2437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},7522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=r(9504);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class i{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,i=this._callbacks.length;n{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=s._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=s,s._noop=function(){}},8967:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))}},7406:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n=t.Touch||(t.Touch={}));class i{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,r)=>{e.push([r,t])})),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=i,t.LRUCache=class extends i{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(){if(0===this._chunks.length)return;let e=0,t=0,r=0,n=0;e:for(;tthis._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const i=n.slice(0,e);t.set(i,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const n=r(9504),i=r(8967),s=r(7522);var a;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class o{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter,this.partialMessageEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=o,function(e){e.fromOptions=function(e){let t,r;const i=new Map;let s;const a=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,i.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)i.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(s=e.contentTypeDecoder,a.set(s.name,s)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)a.set(t.name,t)}return void 0===s&&(s=(0,n.default)().applicationJson.decoder,a.set(s.name,s)),{charset:t,contentDecoder:r,contentDecoders:i,contentTypeDecoder:s,contentTypeDecoders:a}}}(a||(a={})),t.ReadableStreamMessageReader=class extends o{constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData((e=>{this.onData(e)}));return this.readable.onError((e=>this.fireError(e))),this.readable.onClose((()=>this.fireClose())),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders();if(!e)return;const t=e.get("Content-Length");if(!t)throw new Error("Header must provide a Content-Length property.");const r=parseInt(t);if(isNaN(r))throw new Error("Content-Length value must be a number.");this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();let t;this.clearPartialMessageTimer(),this.nextMessageLength=-1,t=void 0!==this.options.contentDecoder?this.options.contentDecoder.decode(e):Promise.resolve(e),t.then((e=>{this.options.contentTypeDecoder.decode(e,this.options).then((e=>{this.callback(e)}),(e=>{this.fireError(e)}))}),(e=>{this.fireError(e)}))}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,n.default)().timer.setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},6631:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const n=r(9504),i=r(8967),s=r(7061),a=r(7522);var o;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class u{constructor(){this.errorEmitter=new a.Emitter,this.closeEmitter=new a.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=u,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}}(o||(o={})),t.WriteableStreamMessageWriter=class extends u{constructor(e,t){super(),this.writable=e,this.options=o.fromOptions(t),this.errorCount=0,this.writeSemaphore=new s.Semaphore(1),this.writable.onError((e=>this.fireError(e))),this.writable.onClose((()=>this.fireClose()))}async write(e){return this.writeSemaphore.lock((async()=>this.options.contentTypeEncoder.encode(e,this.options).then((e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e)).then((t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)}),(e=>{throw this.fireError(e),e}))))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},2515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const n=r(8967);var i,s;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(i=t.ErrorCodes||(t.ErrorCodes={}));class a extends Error{constructor(e,t,r){super(t),this.code=n.number(e)?e:i.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,a.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=a;class o{constructor(e){this.kind=e}static is(e){return e===o.auto||e===o.byName||e===o.byPosition}toString(){return this.kind}}t.ParameterStructures=o,o.auto=new o("auto"),o.byPosition=new o("byPosition"),o.byName=new o("byName");class u{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return o.auto}}t.AbstractMessageSignature=u,t.RequestType0=class extends u{constructor(e){super(e,0)}},t.RequestType=class extends u{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends u{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends u{constructor(e){super(e,2)}},t.RequestType3=class extends u{constructor(e){super(e,3)}},t.RequestType4=class extends u{constructor(e){super(e,4)}},t.RequestType5=class extends u{constructor(e){super(e,5)}},t.RequestType6=class extends u{constructor(e){super(e,6)}},t.RequestType7=class extends u{constructor(e){super(e,7)}},t.RequestType8=class extends u{constructor(e){super(e,8)}},t.RequestType9=class extends u{constructor(e){super(e,9)}},t.NotificationType=class extends u{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends u{constructor(e){super(e,0)}},t.NotificationType1=class extends u{constructor(e,t=o.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends u{constructor(e){super(e,2)}},t.NotificationType3=class extends u{constructor(e){super(e,3)}},t.NotificationType4=class extends u{constructor(e){super(e,4)}},t.NotificationType5=class extends u{constructor(e){super(e,5)}},t.NotificationType6=class extends u{constructor(e){super(e,6)}},t.NotificationType7=class extends u{constructor(e){super(e,7)}},t.NotificationType8=class extends u{constructor(e){super(e,8)}},t.NotificationType9=class extends u{constructor(e){super(e,9)}},(s=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))},s.isNotification=function(e){const t=e;return t&&n.string(t.method)&&void 0===e.id},s.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}},9504:(e,t)=>{"use strict";let r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n},7061:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const n=r(9504);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise(((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()}))}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate((()=>this.doRunNext()))}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then((t=>{this._active--,e.resolve(t),this.runNext()}),(t=>{this._active--,e.reject(t),this.runNext()})):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},3540:(e,t,r)=>{"use strict";e.exports=r(5618)},5618:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const s=r(5781);i(r(5781),t),i(r(1156),t),t.createProtocolConnection=function(e,t,r,n){return(0,s.createMessageConnection)(e,t,r,n)}},1156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.LSPErrorCodes=t.createProtocolConnection=void 0,i(r(5929),t),i(r(9360),t),i(r(6606),t),i(r(5318),t);var s,a=r(978);Object.defineProperty(t,"createProtocolConnection",{enumerable:!0,get:function(){return a.createProtocolConnection}}),(s=t.LSPErrorCodes||(t.LSPErrorCodes={})).lspReservedErrorRangeStart=-32899,s.RequestFailed=-32803,s.ServerCancelled=-32802,s.ContentModified=-32801,s.RequestCancelled=-32800,s.lspReservedErrorRangeEnd=-32800},978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createProtocolConnection=void 0;const n=r(5929);t.createProtocolConnection=function(e,t,r,i){return n.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,n.createMessageConnection)(e,t,r,i)}},6606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProtocolNotificationType=t.ProtocolNotificationType0=t.ProtocolRequestType=t.ProtocolRequestType0=t.RegistrationType=t.MessageDirection=void 0;const n=r(5929);var i;(i=t.MessageDirection||(t.MessageDirection={})).clientToServer="clientToServer",i.serverToClient="serverToClient",i.both="both",t.RegistrationType=class{constructor(e){this.method=e}};class s extends n.RequestType0{constructor(e){super(e)}}t.ProtocolRequestType0=s;class a extends n.RequestType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolRequestType=a;class o extends n.NotificationType0{constructor(e){super(e)}}t.ProtocolNotificationType0=o;class u extends n.NotificationType{constructor(e){super(e,n.ParameterStructures.byName)}}t.ProtocolNotificationType=u},2807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.CallHierarchyPrepareRequest=void 0;const n=r(6606);var i,s,a;(a=t.CallHierarchyPrepareRequest||(t.CallHierarchyPrepareRequest={})).method="textDocument/prepareCallHierarchy",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method),(s=t.CallHierarchyIncomingCallsRequest||(t.CallHierarchyIncomingCallsRequest={})).method="callHierarchy/incomingCalls",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method),(i=t.CallHierarchyOutgoingCallsRequest||(t.CallHierarchyOutgoingCallsRequest={})).method="callHierarchy/outgoingCalls",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},4634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPresentationRequest=t.DocumentColorRequest=void 0;const n=r(6606);var i,s;(s=t.DocumentColorRequest||(t.DocumentColorRequest={})).method="textDocument/documentColor",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method),(i=t.ColorPresentationRequest||(t.ColorPresentationRequest={})).method="textDocument/colorPresentation",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},5542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationRequest=void 0;const n=r(6606);var i;(i=t.ConfigurationRequest||(t.ConfigurationRequest={})).method="workspace/configuration",i.messageDirection=n.MessageDirection.serverToClient,i.type=new n.ProtocolRequestType(i.method)},5004:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeclarationRequest=void 0;const n=r(6606);var i;(i=t.DeclarationRequest||(t.DeclarationRequest={})).method="textDocument/declaration",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},3933:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=void 0;const n=r(5929),i=r(9436),s=r(6606);var a,o,u,l;(t.DiagnosticServerCancellationData||(t.DiagnosticServerCancellationData={})).is=function(e){const t=e;return t&&i.boolean(t.retriggerRequest)},(l=t.DocumentDiagnosticReportKind||(t.DocumentDiagnosticReportKind={})).Full="full",l.Unchanged="unchanged",(u=t.DocumentDiagnosticRequest||(t.DocumentDiagnosticRequest={})).method="textDocument/diagnostic",u.messageDirection=s.MessageDirection.clientToServer,u.type=new s.ProtocolRequestType(u.method),u.partialResult=new n.ProgressType,(o=t.WorkspaceDiagnosticRequest||(t.WorkspaceDiagnosticRequest={})).method="workspace/diagnostic",o.messageDirection=s.MessageDirection.clientToServer,o.type=new s.ProtocolRequestType(o.method),o.partialResult=new n.ProgressType,(a=t.DiagnosticRefreshRequest||(t.DiagnosticRefreshRequest={})).method="workspace/diagnostic/refresh",a.messageDirection=s.MessageDirection.clientToServer,a.type=new s.ProtocolRequestType0(a.method)},9478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.DidRenameFilesNotification=t.WillRenameFilesRequest=t.DidCreateFilesNotification=t.WillCreateFilesRequest=t.FileOperationPatternKind=void 0;const n=r(6606);var i,s,a,o,u,l,p;(p=t.FileOperationPatternKind||(t.FileOperationPatternKind={})).file="file",p.folder="folder",(l=t.WillCreateFilesRequest||(t.WillCreateFilesRequest={})).method="workspace/willCreateFiles",l.messageDirection=n.MessageDirection.clientToServer,l.type=new n.ProtocolRequestType(l.method),(u=t.DidCreateFilesNotification||(t.DidCreateFilesNotification={})).method="workspace/didCreateFiles",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolNotificationType(u.method),(o=t.WillRenameFilesRequest||(t.WillRenameFilesRequest={})).method="workspace/willRenameFiles",o.messageDirection=n.MessageDirection.clientToServer,o.type=new n.ProtocolRequestType(o.method),(a=t.DidRenameFilesNotification||(t.DidRenameFilesNotification={})).method="workspace/didRenameFiles",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolNotificationType(a.method),(s=t.DidDeleteFilesNotification||(t.DidDeleteFilesNotification={})).method="workspace/didDeleteFiles",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolNotificationType(s.method),(i=t.WillDeleteFilesRequest||(t.WillDeleteFilesRequest={})).method="workspace/willDeleteFiles",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FoldingRangeRequest=void 0;const n=r(6606);var i;(i=t.FoldingRangeRequest||(t.FoldingRangeRequest={})).method="textDocument/foldingRange",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},1160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImplementationRequest=void 0;const n=r(6606);var i;(i=t.ImplementationRequest||(t.ImplementationRequest={})).method="textDocument/implementation",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},2866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=void 0;const n=r(6606);var i,s,a;(a=t.InlayHintRequest||(t.InlayHintRequest={})).method="textDocument/inlayHint",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method),(s=t.InlayHintResolveRequest||(t.InlayHintResolveRequest={})).method="inlayHint/resolve",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method),(i=t.InlayHintRefreshRequest||(t.InlayHintRefreshRequest={})).method="workspace/inlayHint/refresh",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType0(i.method)},6226:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueRefreshRequest=t.InlineValueRequest=void 0;const n=r(6606);var i,s;(s=t.InlineValueRequest||(t.InlineValueRequest={})).method="textDocument/inlineValue",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method),(i=t.InlineValueRefreshRequest||(t.InlineValueRefreshRequest={})).method="workspace/inlineValue/refresh",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType0(i.method)},5318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceSymbolRequest=t.CodeActionResolveRequest=t.CodeActionRequest=t.DocumentSymbolRequest=t.DocumentHighlightRequest=t.ReferencesRequest=t.DefinitionRequest=t.SignatureHelpRequest=t.SignatureHelpTriggerKind=t.HoverRequest=t.CompletionResolveRequest=t.CompletionRequest=t.CompletionTriggerKind=t.PublishDiagnosticsNotification=t.WatchKind=t.RelativePattern=t.FileChangeType=t.DidChangeWatchedFilesNotification=t.WillSaveTextDocumentWaitUntilRequest=t.WillSaveTextDocumentNotification=t.TextDocumentSaveReason=t.DidSaveTextDocumentNotification=t.DidCloseTextDocumentNotification=t.DidChangeTextDocumentNotification=t.TextDocumentContentChangeEvent=t.DidOpenTextDocumentNotification=t.TextDocumentSyncKind=t.TelemetryEventNotification=t.LogMessageNotification=t.ShowMessageRequest=t.ShowMessageNotification=t.MessageType=t.DidChangeConfigurationNotification=t.ExitNotification=t.ShutdownRequest=t.InitializedNotification=t.InitializeErrorCodes=t.InitializeRequest=t.WorkDoneProgressOptions=t.TextDocumentRegistrationOptions=t.StaticRegistrationOptions=t.PositionEncodingKind=t.FailureHandlingKind=t.ResourceOperationKind=t.UnregistrationRequest=t.RegistrationRequest=t.DocumentSelector=t.NotebookCellTextDocumentFilter=t.NotebookDocumentFilter=t.TextDocumentFilter=void 0,t.TypeHierarchySubtypesRequest=t.TypeHierarchyPrepareRequest=t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=t.WillDeleteFilesRequest=t.DidDeleteFilesNotification=t.WillRenameFilesRequest=t.DidRenameFilesNotification=t.WillCreateFilesRequest=t.DidCreateFilesNotification=t.FileOperationPatternKind=t.LinkedEditingRangeRequest=t.ShowDocumentRequest=t.SemanticTokensRegistrationType=t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.TokenFormat=t.CallHierarchyPrepareRequest=t.CallHierarchyOutgoingCallsRequest=t.CallHierarchyIncomingCallsRequest=t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=t.SelectionRangeRequest=t.DeclarationRequest=t.FoldingRangeRequest=t.ColorPresentationRequest=t.DocumentColorRequest=t.ConfigurationRequest=t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=t.TypeDefinitionRequest=t.ImplementationRequest=t.ApplyWorkspaceEditRequest=t.ExecuteCommandRequest=t.PrepareRenameRequest=t.RenameRequest=t.PrepareSupportDefaultBehavior=t.DocumentOnTypeFormattingRequest=t.DocumentRangeFormattingRequest=t.DocumentFormattingRequest=t.DocumentLinkResolveRequest=t.DocumentLinkRequest=t.CodeLensRefreshRequest=t.CodeLensResolveRequest=t.CodeLensRequest=t.WorkspaceSymbolResolveRequest=void 0,t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=t.DiagnosticRefreshRequest=t.WorkspaceDiagnosticRequest=t.DocumentDiagnosticRequest=t.DocumentDiagnosticReportKind=t.DiagnosticServerCancellationData=t.InlayHintRefreshRequest=t.InlayHintResolveRequest=t.InlayHintRequest=t.InlineValueRefreshRequest=t.InlineValueRequest=t.TypeHierarchySupertypesRequest=void 0;const n=r(6606),i=r(9360),s=r(9436),a=r(1160);Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return a.ImplementationRequest}});const o=r(2571);Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return o.TypeDefinitionRequest}});const u=r(9861);Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return u.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return u.DidChangeWorkspaceFoldersNotification}});const l=r(5542);Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return l.ConfigurationRequest}});const p=r(4634);Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return p.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return p.ColorPresentationRequest}});const m=r(492);Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return m.FoldingRangeRequest}});const d=r(5004);Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return d.DeclarationRequest}});const g=r(6089);Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return g.SelectionRangeRequest}});const c=r(2789);Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return c.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return c.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return c.WorkDoneProgressCancelNotification}});const y=r(2807);Object.defineProperty(t,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:function(){return y.CallHierarchyIncomingCallsRequest}}),Object.defineProperty(t,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:function(){return y.CallHierarchyOutgoingCallsRequest}}),Object.defineProperty(t,"CallHierarchyPrepareRequest",{enumerable:!0,get:function(){return y.CallHierarchyPrepareRequest}});const h=r(912);Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return h.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return h.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return h.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return h.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return h.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return h.SemanticTokensRegistrationType}});const _=r(210);Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return _.ShowDocumentRequest}});const f=r(5526);Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return f.LinkedEditingRangeRequest}});const b=r(9478);Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return b.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return b.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return b.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return b.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return b.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return b.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return b.WillDeleteFilesRequest}});const q=r(5705);Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return q.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return q.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return q.MonikerRequest}});const R=r(9219);Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return R.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return R.TypeHierarchySupertypesRequest}});const v=r(6226);Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return v.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return v.InlineValueRefreshRequest}});const w=r(2866);Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return w.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return w.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return w.InlayHintRefreshRequest}});const T=r(3933);Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return T.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return T.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return T.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return T.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return T.DiagnosticRefreshRequest}});const k=r(8611);var P,E,j,G,A,S,O,I,M,z,D,L,x,C,N,U,F,B,W,H,$,K,Y,Q,V,X,J,Z,ee,te,re,ne,ie,se,ae,oe,ue,le,pe,me,de,ge,ce,ye,he,_e,fe,be,qe,Re,ve,we,Te,ke,Pe,Ee,je,Ge,Ae;Object.defineProperty(t,"NotebookCellKind",{enumerable:!0,get:function(){return k.NotebookCellKind}}),Object.defineProperty(t,"ExecutionSummary",{enumerable:!0,get:function(){return k.ExecutionSummary}}),Object.defineProperty(t,"NotebookCell",{enumerable:!0,get:function(){return k.NotebookCell}}),Object.defineProperty(t,"NotebookDocument",{enumerable:!0,get:function(){return k.NotebookDocument}}),Object.defineProperty(t,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:function(){return k.NotebookDocumentSyncRegistrationType}}),Object.defineProperty(t,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidOpenNotebookDocumentNotification}}),Object.defineProperty(t,"NotebookCellArrayChange",{enumerable:!0,get:function(){return k.NotebookCellArrayChange}}),Object.defineProperty(t,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidChangeNotebookDocumentNotification}}),Object.defineProperty(t,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidSaveNotebookDocumentNotification}}),Object.defineProperty(t,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:function(){return k.DidCloseNotebookDocumentNotification}}),function(e){e.is=function(e){const t=e;return s.string(t.language)||s.string(t.scheme)||s.string(t.pattern)}}(P=t.TextDocumentFilter||(t.TextDocumentFilter={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebookType)||s.string(t.scheme)||s.string(t.pattern))}}(E=t.NotebookDocumentFilter||(t.NotebookDocumentFilter={})),function(e){e.is=function(e){const t=e;return s.objectLiteral(t)&&(s.string(t.notebook)||E.is(t.notebook))&&(void 0===t.language||s.string(t.language))}}(j=t.NotebookCellTextDocumentFilter||(t.NotebookCellTextDocumentFilter={})),function(e){e.is=function(e){if(!Array.isArray(e))return!1;for(let t of e)if(!s.string(t)&&!P.is(t)&&!j.is(t))return!1;return!0}}(G=t.DocumentSelector||(t.DocumentSelector={})),(Ae=t.RegistrationRequest||(t.RegistrationRequest={})).method="client/registerCapability",Ae.messageDirection=n.MessageDirection.serverToClient,Ae.type=new n.ProtocolRequestType(Ae.method),(Ge=t.UnregistrationRequest||(t.UnregistrationRequest={})).method="client/unregisterCapability",Ge.messageDirection=n.MessageDirection.serverToClient,Ge.type=new n.ProtocolRequestType(Ge.method),(je=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",je.Rename="rename",je.Delete="delete",(Ee=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",Ee.Transactional="transactional",Ee.TextOnlyTransactional="textOnlyTransactional",Ee.Undo="undo",(Pe=t.PositionEncodingKind||(t.PositionEncodingKind={})).UTF8="utf-8",Pe.UTF16="utf-16",Pe.UTF32="utf-32",(t.StaticRegistrationOptions||(t.StaticRegistrationOptions={})).hasId=function(e){const t=e;return t&&s.string(t.id)&&t.id.length>0},(t.TextDocumentRegistrationOptions||(t.TextDocumentRegistrationOptions={})).is=function(e){const t=e;return t&&(null===t.documentSelector||G.is(t.documentSelector))},(ke=t.WorkDoneProgressOptions||(t.WorkDoneProgressOptions={})).is=function(e){const t=e;return s.objectLiteral(t)&&(void 0===t.workDoneProgress||s.boolean(t.workDoneProgress))},ke.hasWorkDoneProgress=function(e){const t=e;return t&&s.boolean(t.workDoneProgress)},(Te=t.InitializeRequest||(t.InitializeRequest={})).method="initialize",Te.messageDirection=n.MessageDirection.clientToServer,Te.type=new n.ProtocolRequestType(Te.method),(t.InitializeErrorCodes||(t.InitializeErrorCodes={})).unknownProtocolVersion=1,(we=t.InitializedNotification||(t.InitializedNotification={})).method="initialized",we.messageDirection=n.MessageDirection.clientToServer,we.type=new n.ProtocolNotificationType(we.method),(ve=t.ShutdownRequest||(t.ShutdownRequest={})).method="shutdown",ve.messageDirection=n.MessageDirection.clientToServer,ve.type=new n.ProtocolRequestType0(ve.method),(Re=t.ExitNotification||(t.ExitNotification={})).method="exit",Re.messageDirection=n.MessageDirection.clientToServer,Re.type=new n.ProtocolNotificationType0(Re.method),(qe=t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).method="workspace/didChangeConfiguration",qe.messageDirection=n.MessageDirection.clientToServer,qe.type=new n.ProtocolNotificationType(qe.method),(be=t.MessageType||(t.MessageType={})).Error=1,be.Warning=2,be.Info=3,be.Log=4,(fe=t.ShowMessageNotification||(t.ShowMessageNotification={})).method="window/showMessage",fe.messageDirection=n.MessageDirection.serverToClient,fe.type=new n.ProtocolNotificationType(fe.method),(_e=t.ShowMessageRequest||(t.ShowMessageRequest={})).method="window/showMessageRequest",_e.messageDirection=n.MessageDirection.serverToClient,_e.type=new n.ProtocolRequestType(_e.method),(he=t.LogMessageNotification||(t.LogMessageNotification={})).method="window/logMessage",he.messageDirection=n.MessageDirection.serverToClient,he.type=new n.ProtocolNotificationType(he.method),(ye=t.TelemetryEventNotification||(t.TelemetryEventNotification={})).method="telemetry/event",ye.messageDirection=n.MessageDirection.serverToClient,ye.type=new n.ProtocolNotificationType(ye.method),(ce=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,ce.Full=1,ce.Incremental=2,(ge=t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).method="textDocument/didOpen",ge.messageDirection=n.MessageDirection.clientToServer,ge.type=new n.ProtocolNotificationType(ge.method),(de=t.TextDocumentContentChangeEvent||(t.TextDocumentContentChangeEvent={})).isIncremental=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},de.isFull=function(e){let t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},(me=t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).method="textDocument/didChange",me.messageDirection=n.MessageDirection.clientToServer,me.type=new n.ProtocolNotificationType(me.method),(pe=t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).method="textDocument/didClose",pe.messageDirection=n.MessageDirection.clientToServer,pe.type=new n.ProtocolNotificationType(pe.method),(le=t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).method="textDocument/didSave",le.messageDirection=n.MessageDirection.clientToServer,le.type=new n.ProtocolNotificationType(le.method),(ue=t.TextDocumentSaveReason||(t.TextDocumentSaveReason={})).Manual=1,ue.AfterDelay=2,ue.FocusOut=3,(oe=t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).method="textDocument/willSave",oe.messageDirection=n.MessageDirection.clientToServer,oe.type=new n.ProtocolNotificationType(oe.method),(ae=t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).method="textDocument/willSaveWaitUntil",ae.messageDirection=n.MessageDirection.clientToServer,ae.type=new n.ProtocolRequestType(ae.method),(se=t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).method="workspace/didChangeWatchedFiles",se.messageDirection=n.MessageDirection.clientToServer,se.type=new n.ProtocolNotificationType(se.method),(ie=t.FileChangeType||(t.FileChangeType={})).Created=1,ie.Changed=2,ie.Deleted=3,(t.RelativePattern||(t.RelativePattern={})).is=function(e){const t=e;return s.objectLiteral(t)&&(i.URI.is(t.baseUri)||i.WorkspaceFolder.is(t.baseUri))&&s.string(t.pattern)},(ne=t.WatchKind||(t.WatchKind={})).Create=1,ne.Change=2,ne.Delete=4,(re=t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).method="textDocument/publishDiagnostics",re.messageDirection=n.MessageDirection.serverToClient,re.type=new n.ProtocolNotificationType(re.method),(te=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,te.TriggerCharacter=2,te.TriggerForIncompleteCompletions=3,(ee=t.CompletionRequest||(t.CompletionRequest={})).method="textDocument/completion",ee.messageDirection=n.MessageDirection.clientToServer,ee.type=new n.ProtocolRequestType(ee.method),(Z=t.CompletionResolveRequest||(t.CompletionResolveRequest={})).method="completionItem/resolve",Z.messageDirection=n.MessageDirection.clientToServer,Z.type=new n.ProtocolRequestType(Z.method),(J=t.HoverRequest||(t.HoverRequest={})).method="textDocument/hover",J.messageDirection=n.MessageDirection.clientToServer,J.type=new n.ProtocolRequestType(J.method),(X=t.SignatureHelpTriggerKind||(t.SignatureHelpTriggerKind={})).Invoked=1,X.TriggerCharacter=2,X.ContentChange=3,(V=t.SignatureHelpRequest||(t.SignatureHelpRequest={})).method="textDocument/signatureHelp",V.messageDirection=n.MessageDirection.clientToServer,V.type=new n.ProtocolRequestType(V.method),(Q=t.DefinitionRequest||(t.DefinitionRequest={})).method="textDocument/definition",Q.messageDirection=n.MessageDirection.clientToServer,Q.type=new n.ProtocolRequestType(Q.method),(Y=t.ReferencesRequest||(t.ReferencesRequest={})).method="textDocument/references",Y.messageDirection=n.MessageDirection.clientToServer,Y.type=new n.ProtocolRequestType(Y.method),(K=t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).method="textDocument/documentHighlight",K.messageDirection=n.MessageDirection.clientToServer,K.type=new n.ProtocolRequestType(K.method),($=t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).method="textDocument/documentSymbol",$.messageDirection=n.MessageDirection.clientToServer,$.type=new n.ProtocolRequestType($.method),(H=t.CodeActionRequest||(t.CodeActionRequest={})).method="textDocument/codeAction",H.messageDirection=n.MessageDirection.clientToServer,H.type=new n.ProtocolRequestType(H.method),(W=t.CodeActionResolveRequest||(t.CodeActionResolveRequest={})).method="codeAction/resolve",W.messageDirection=n.MessageDirection.clientToServer,W.type=new n.ProtocolRequestType(W.method),(B=t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).method="workspace/symbol",B.messageDirection=n.MessageDirection.clientToServer,B.type=new n.ProtocolRequestType(B.method),(F=t.WorkspaceSymbolResolveRequest||(t.WorkspaceSymbolResolveRequest={})).method="workspaceSymbol/resolve",F.messageDirection=n.MessageDirection.clientToServer,F.type=new n.ProtocolRequestType(F.method),(U=t.CodeLensRequest||(t.CodeLensRequest={})).method="textDocument/codeLens",U.messageDirection=n.MessageDirection.clientToServer,U.type=new n.ProtocolRequestType(U.method),(N=t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).method="codeLens/resolve",N.messageDirection=n.MessageDirection.clientToServer,N.type=new n.ProtocolRequestType(N.method),(C=t.CodeLensRefreshRequest||(t.CodeLensRefreshRequest={})).method="workspace/codeLens/refresh",C.messageDirection=n.MessageDirection.serverToClient,C.type=new n.ProtocolRequestType0(C.method),(x=t.DocumentLinkRequest||(t.DocumentLinkRequest={})).method="textDocument/documentLink",x.messageDirection=n.MessageDirection.clientToServer,x.type=new n.ProtocolRequestType(x.method),(L=t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).method="documentLink/resolve",L.messageDirection=n.MessageDirection.clientToServer,L.type=new n.ProtocolRequestType(L.method),(D=t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).method="textDocument/formatting",D.messageDirection=n.MessageDirection.clientToServer,D.type=new n.ProtocolRequestType(D.method),(z=t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).method="textDocument/rangeFormatting",z.messageDirection=n.MessageDirection.clientToServer,z.type=new n.ProtocolRequestType(z.method),(M=t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).method="textDocument/onTypeFormatting",M.messageDirection=n.MessageDirection.clientToServer,M.type=new n.ProtocolRequestType(M.method),(t.PrepareSupportDefaultBehavior||(t.PrepareSupportDefaultBehavior={})).Identifier=1,(I=t.RenameRequest||(t.RenameRequest={})).method="textDocument/rename",I.messageDirection=n.MessageDirection.clientToServer,I.type=new n.ProtocolRequestType(I.method),(O=t.PrepareRenameRequest||(t.PrepareRenameRequest={})).method="textDocument/prepareRename",O.messageDirection=n.MessageDirection.clientToServer,O.type=new n.ProtocolRequestType(O.method),(S=t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).method="workspace/executeCommand",S.messageDirection=n.MessageDirection.clientToServer,S.type=new n.ProtocolRequestType(S.method),(A=t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).method="workspace/applyEdit",A.messageDirection=n.MessageDirection.serverToClient,A.type=new n.ProtocolRequestType("workspace/applyEdit")},5526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeRequest=void 0;const n=r(6606);var i;(i=t.LinkedEditingRangeRequest||(t.LinkedEditingRangeRequest={})).method="textDocument/linkedEditingRange",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},5705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerRequest=t.MonikerKind=t.UniquenessLevel=void 0;const n=r(6606);var i,s,a;(a=t.UniquenessLevel||(t.UniquenessLevel={})).document="document",a.project="project",a.group="group",a.scheme="scheme",a.global="global",(s=t.MonikerKind||(t.MonikerKind={})).$import="import",s.$export="export",s.local="local",(i=t.MonikerRequest||(t.MonikerRequest={})).method="textDocument/moniker",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},8611:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidCloseNotebookDocumentNotification=t.DidSaveNotebookDocumentNotification=t.DidChangeNotebookDocumentNotification=t.NotebookCellArrayChange=t.DidOpenNotebookDocumentNotification=t.NotebookDocumentSyncRegistrationType=t.NotebookDocument=t.NotebookCell=t.ExecutionSummary=t.NotebookCellKind=void 0;const n=r(9360),i=r(9436),s=r(6606);var a,o,u,l,p,m,d,g,c,y;!function(e){e.Markup=1,e.Code=2,e.is=function(e){return 1===e||2===e}}(a=t.NotebookCellKind||(t.NotebookCellKind={})),function(e){e.create=function(e,t){const r={executionOrder:e};return!0!==t&&!1!==t||(r.success=t),r},e.is=function(e){const t=e;return i.objectLiteral(t)&&n.uinteger.is(t.executionOrder)&&(void 0===t.success||i.boolean(t.success))},e.equals=function(e,t){return e===t||null!=e&&null!=t&&e.executionOrder===t.executionOrder&&e.success===t.success}}(o=t.ExecutionSummary||(t.ExecutionSummary={})),function(e){function t(e,r){if(e===r)return!0;if(null==e||null==r)return!1;if(typeof e!=typeof r)return!1;if("object"!=typeof e)return!1;const n=Array.isArray(e),s=Array.isArray(r);if(n!==s)return!1;if(n&&s){if(e.length!==r.length)return!1;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkDoneProgressCancelNotification=t.WorkDoneProgressCreateRequest=t.WorkDoneProgress=void 0;const n=r(5929),i=r(6606);var s,a,o;(o=t.WorkDoneProgress||(t.WorkDoneProgress={})).type=new n.ProgressType,o.is=function(e){return e===o.type},(a=t.WorkDoneProgressCreateRequest||(t.WorkDoneProgressCreateRequest={})).method="window/workDoneProgress/create",a.messageDirection=i.MessageDirection.serverToClient,a.type=new i.ProtocolRequestType(a.method),(s=t.WorkDoneProgressCancelNotification||(t.WorkDoneProgressCancelNotification={})).method="window/workDoneProgress/cancel",s.messageDirection=i.MessageDirection.clientToServer,s.type=new i.ProtocolNotificationType(s.method)},6089:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRangeRequest=void 0;const n=r(6606);var i;(i=t.SelectionRangeRequest||(t.SelectionRangeRequest={})).method="textDocument/selectionRange",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensRefreshRequest=t.SemanticTokensRangeRequest=t.SemanticTokensDeltaRequest=t.SemanticTokensRequest=t.SemanticTokensRegistrationType=t.TokenFormat=void 0;const n=r(6606);var i,s,a,o,u;(t.TokenFormat||(t.TokenFormat={})).Relative="relative",function(e){e.method="textDocument/semanticTokens",e.type=new n.RegistrationType(e.method)}(i=t.SemanticTokensRegistrationType||(t.SemanticTokensRegistrationType={})),(u=t.SemanticTokensRequest||(t.SemanticTokensRequest={})).method="textDocument/semanticTokens/full",u.messageDirection=n.MessageDirection.clientToServer,u.type=new n.ProtocolRequestType(u.method),u.registrationMethod=i.method,(o=t.SemanticTokensDeltaRequest||(t.SemanticTokensDeltaRequest={})).method="textDocument/semanticTokens/full/delta",o.messageDirection=n.MessageDirection.clientToServer,o.type=new n.ProtocolRequestType(o.method),o.registrationMethod=i.method,(a=t.SemanticTokensRangeRequest||(t.SemanticTokensRangeRequest={})).method="textDocument/semanticTokens/range",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method),a.registrationMethod=i.method,(s=t.SemanticTokensRefreshRequest||(t.SemanticTokensRefreshRequest={})).method="workspace/semanticTokens/refresh",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType0(s.method)},210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentRequest=void 0;const n=r(6606);var i;(i=t.ShowDocumentRequest||(t.ShowDocumentRequest={})).method="window/showDocument",i.messageDirection=n.MessageDirection.serverToClient,i.type=new n.ProtocolRequestType(i.method)},2571:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeDefinitionRequest=void 0;const n=r(6606);var i;(i=t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).method="textDocument/typeDefinition",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},9219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchySubtypesRequest=t.TypeHierarchySupertypesRequest=t.TypeHierarchyPrepareRequest=void 0;const n=r(6606);var i,s,a;(a=t.TypeHierarchyPrepareRequest||(t.TypeHierarchyPrepareRequest={})).method="textDocument/prepareTypeHierarchy",a.messageDirection=n.MessageDirection.clientToServer,a.type=new n.ProtocolRequestType(a.method),(s=t.TypeHierarchySupertypesRequest||(t.TypeHierarchySupertypesRequest={})).method="typeHierarchy/supertypes",s.messageDirection=n.MessageDirection.clientToServer,s.type=new n.ProtocolRequestType(s.method),(i=t.TypeHierarchySubtypesRequest||(t.TypeHierarchySubtypesRequest={})).method="typeHierarchy/subtypes",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolRequestType(i.method)},9861:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DidChangeWorkspaceFoldersNotification=t.WorkspaceFoldersRequest=void 0;const n=r(6606);var i,s;(s=t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).method="workspace/workspaceFolders",s.messageDirection=n.MessageDirection.serverToClient,s.type=new n.ProtocolRequestType0(s.method),(i=t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).method="workspace/didChangeWorkspaceFolders",i.messageDirection=n.MessageDirection.clientToServer,i.type=new n.ProtocolNotificationType(i.method)},9436:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.objectLiteral=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every((e=>r(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.objectLiteral=function(e){return null!==e&&"object"==typeof e}},9360:(e,t,r)=>{"use strict";var n,i,s,a,o,u,l,p,m,d,g,c,y,h,_,f,b,q,R,v,w,T,k,P,E,j,G,A;r.r(t),r.d(t,{AnnotatedTextEdit:()=>k,ChangeAnnotation:()=>w,ChangeAnnotationIdentifier:()=>T,CodeAction:()=>se,CodeActionContext:()=>ie,CodeActionKind:()=>re,CodeActionTriggerKind:()=>ne,CodeDescription:()=>b,CodeLens:()=>ae,Color:()=>m,ColorInformation:()=>d,ColorPresentation:()=>g,Command:()=>R,CompletionItem:()=>B,CompletionItemKind:()=>L,CompletionItemLabelDetails:()=>F,CompletionItemTag:()=>C,CompletionList:()=>W,CreateFile:()=>E,DeleteFile:()=>G,Diagnostic:()=>q,DiagnosticRelatedInformation:()=>h,DiagnosticSeverity:()=>_,DiagnosticTag:()=>f,DocumentHighlight:()=>V,DocumentHighlightKind:()=>Q,DocumentLink:()=>ue,DocumentSymbol:()=>te,DocumentUri:()=>n,EOL:()=>ke,FoldingRange:()=>y,FoldingRangeKind:()=>c,FormattingOptions:()=>oe,Hover:()=>$,InlayHint:()=>be,InlayHintKind:()=>_e,InlayHintLabelPart:()=>fe,InlineValueContext:()=>he,InlineValueEvaluatableExpression:()=>ye,InlineValueText:()=>ge,InlineValueVariableLookup:()=>ce,InsertReplaceEdit:()=>N,InsertTextFormat:()=>x,InsertTextMode:()=>U,Location:()=>l,LocationLink:()=>p,MarkedString:()=>H,MarkupContent:()=>D,MarkupKind:()=>z,OptionalVersionedTextDocumentIdentifier:()=>I,ParameterInformation:()=>K,Position:()=>o,Range:()=>u,RenameFile:()=>j,SelectionRange:()=>le,SemanticTokenModifiers:()=>me,SemanticTokenTypes:()=>pe,SemanticTokens:()=>de,SignatureInformation:()=>Y,SymbolInformation:()=>Z,SymbolKind:()=>X,SymbolTag:()=>J,TextDocument:()=>Te,TextDocumentEdit:()=>P,TextDocumentIdentifier:()=>S,TextDocumentItem:()=>M,TextEdit:()=>v,URI:()=>i,VersionedTextDocumentIdentifier:()=>O,WorkspaceChange:()=>we,WorkspaceEdit:()=>A,WorkspaceFolder:()=>qe,WorkspaceSymbol:()=>ee,integer:()=>s,uinteger:()=>a}),function(e){e.is=function(e){return"string"==typeof e}}(n||(n={})),function(e){e.is=function(e){return"string"==typeof e}}(i||(i={})),function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(s||(s={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647,e.is=function(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}}(a||(a={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=a.MAX_VALUE),t===Number.MAX_VALUE&&(t=a.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.line)&&Pe.uinteger(t.character)}}(o||(o={})),function(e){e.create=function(e,t,r,n){if(Pe.uinteger(e)&&Pe.uinteger(t)&&Pe.uinteger(r)&&Pe.uinteger(n))return{start:o.create(e,t),end:o.create(r,n)};if(o.is(e)&&o.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments[".concat(e,", ").concat(t,", ").concat(r,", ").concat(n,"]"))},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&o.is(t.start)&&o.is(t.end)}}(u||(u={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&u.is(t.range)&&(Pe.string(t.uri)||Pe.undefined(t.uri))}}(l||(l={})),function(e){e.create=function(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&u.is(t.targetRange)&&Pe.string(t.targetUri)&&u.is(t.targetSelectionRange)&&(u.is(t.originSelectionRange)||Pe.undefined(t.originSelectionRange))}}(p||(p={})),function(e){e.create=function(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.numberRange(t.red,0,1)&&Pe.numberRange(t.green,0,1)&&Pe.numberRange(t.blue,0,1)&&Pe.numberRange(t.alpha,0,1)}}(m||(m={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&u.is(t.range)&&m.is(t.color)}}(d||(d={})),function(e){e.create=function(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.undefined(t.textEdit)||v.is(t))&&(Pe.undefined(t.additionalTextEdits)||Pe.typedArray(t.additionalTextEdits,v.is))}}(g||(g={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(c||(c={})),function(e){e.create=function(e,t,r,n,i,s){var a={startLine:e,endLine:t};return Pe.defined(r)&&(a.startCharacter=r),Pe.defined(n)&&(a.endCharacter=n),Pe.defined(i)&&(a.kind=i),Pe.defined(s)&&(a.collapsedText=s),a},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.uinteger(t.startLine)&&Pe.uinteger(t.startLine)&&(Pe.undefined(t.startCharacter)||Pe.uinteger(t.startCharacter))&&(Pe.undefined(t.endCharacter)||Pe.uinteger(t.endCharacter))&&(Pe.undefined(t.kind)||Pe.string(t.kind))}}(y||(y={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Pe.defined(t)&&l.is(t.location)&&Pe.string(t.message)}}(h||(h={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(_||(_={})),function(e){e.Unnecessary=1,e.Deprecated=2}(f||(f={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.href)}}(b||(b={})),function(e){e.create=function(e,t,r,n,i,s){var a={range:e,message:t};return Pe.defined(r)&&(a.severity=r),Pe.defined(n)&&(a.code=n),Pe.defined(i)&&(a.source=i),Pe.defined(s)&&(a.relatedInformation=s),a},e.is=function(e){var t,r=e;return Pe.defined(r)&&u.is(r.range)&&Pe.string(r.message)&&(Pe.number(r.severity)||Pe.undefined(r.severity))&&(Pe.integer(r.code)||Pe.string(r.code)||Pe.undefined(r.code))&&(Pe.undefined(r.codeDescription)||Pe.string(null===(t=r.codeDescription)||void 0===t?void 0:t.href))&&(Pe.string(r.source)||Pe.undefined(r.source))&&(Pe.undefined(r.relatedInformation)||Pe.typedArray(r.relatedInformation,h.is))}}(q||(q={})),function(e){e.create=function(e,t){for(var r=[],n=2;n0&&(i.arguments=r),i},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.title)&&Pe.string(t.command)}}(R||(R={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.newText)&&u.is(t.range)}}(v||(v={})),function(e){e.create=function(e,t,r){var n={label:e};return void 0!==t&&(n.needsConfirmation=t),void 0!==r&&(n.description=r),n},e.is=function(e){var t=e;return Pe.objectLiteral(t)&&Pe.string(t.label)&&(Pe.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Pe.string(t.description)||void 0===t.description)}}(w||(w={})),function(e){e.is=function(e){var t=e;return Pe.string(t)}}(T||(T={})),function(e){e.replace=function(e,t,r){return{range:e,newText:t,annotationId:r}},e.insert=function(e,t,r){return{range:{start:e,end:e},newText:t,annotationId:r}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return v.is(t)&&(w.is(t.annotationId)||T.is(t.annotationId))}}(k||(k={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Pe.defined(t)&&I.is(t.textDocument)&&Array.isArray(t.edits)}}(P||(P={})),function(e){e.create=function(e,t,r){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}}(E||(E={})),function(e){e.create=function(e,t,r,n){var i={kind:"rename",oldUri:e,newUri:t};return void 0===r||void 0===r.overwrite&&void 0===r.ignoreIfExists||(i.options=r),void 0!==n&&(i.annotationId=n),i},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Pe.string(t.oldUri)&&Pe.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Pe.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Pe.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}}(j||(j={})),function(e){e.create=function(e,t,r){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),void 0!==r&&(n.annotationId=r),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Pe.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Pe.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Pe.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||T.is(t.annotationId))}}(G||(G={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Pe.string(e.kind)?E.is(e)||j.is(e)||G.is(e):P.is(e)})))}}(A||(A={}));var S,O,I,M,z,D,L,x,C,N,U,F,B,W,H,$,K,Y,Q,V,X,J,Z,ee,te,re,ne,ie,se,ae,oe,ue,le,pe,me,de,ge,ce,ye,he,_e,fe,be,qe,Re=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,r){var n,i;if(void 0===r?n=v.insert(e,t):T.is(r)?(i=r,n=k.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=k.insert(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.replace=function(e,t,r){var n,i;if(void 0===r?n=v.replace(e,t):T.is(r)?(i=r,n=k.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=k.replace(e,t,i)),this.edits.push(n),void 0!==i)return i},e.prototype.delete=function(e,t){var r,n;if(void 0===t?r=v.del(e):T.is(t)?(n=t,r=k.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),r=k.del(e,n)),this.edits.push(r),void 0!==n)return n},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),ve=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var r;if(T.is(e)?r=e:(r=this.nextId(),t=e),void 0!==this._annotations[r])throw new Error("Id ".concat(r," is already in use."));if(void 0===t)throw new Error("No annotation provided for id ".concat(r));return this._annotations[r]=t,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}(),we=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ve(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(P.is(e)){var r=new Re(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=r}}))):e.changes&&Object.keys(e.changes).forEach((function(r){var n=new Re(e.changes[r]);t._textEditChanges[r]=n}))):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(I.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(n=this._textEditChanges[t.uri])){var r={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(r),n=new Re(i,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var n;if(!(n=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,n=new Re(i),this._textEditChanges[e]=n}return n},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new ve,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,s;if(w.is(t)||T.is(t)?n=t:r=t,void 0===n?i=E.create(e,r):(s=T.is(n)?n:this._changeAnnotations.manage(n),i=E.create(e,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s},e.prototype.renameFile=function(e,t,r,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var i,s,a;if(w.is(r)||T.is(r)?i=r:n=r,void 0===i?s=j.create(e,t,n):(a=T.is(i)?i:this._changeAnnotations.manage(i),s=j.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(s),void 0!==a)return a},e.prototype.deleteFile=function(e,t,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var n,i,s;if(w.is(t)||T.is(t)?n=t:r=t,void 0===n?i=G.create(e,r):(s=T.is(n)?n:this._changeAnnotations.manage(n),i=G.create(e,r,s)),this._workspaceEdit.documentChanges.push(i),void 0!==s)return s},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)}}(S||(S={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.integer(t.version)}}(O||(O={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&(null===t.version||Pe.integer(t.version))}}(I||(I={})),function(e){e.create=function(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}},e.is=function(e){var t=e;return Pe.defined(t)&&Pe.string(t.uri)&&Pe.string(t.languageId)&&Pe.integer(t.version)&&Pe.string(t.text)}}(M||(M={})),function(e){e.PlainText="plaintext",e.Markdown="markdown",e.is=function(t){var r=t;return r===e.PlainText||r===e.Markdown}}(z||(z={})),function(e){e.is=function(e){var t=e;return Pe.objectLiteral(e)&&z.is(t.kind)&&Pe.string(t.value)}}(D||(D={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(L||(L={})),function(e){e.PlainText=1,e.Snippet=2}(x||(x={})),function(e){e.Deprecated=1}(C||(C={})),function(e){e.create=function(e,t,r){return{newText:e,insert:t,replace:r}},e.is=function(e){var t=e;return t&&Pe.string(t.newText)&&u.is(t.insert)&&u.is(t.replace)}}(N||(N={})),function(e){e.asIs=1,e.adjustIndentation=2}(U||(U={})),function(e){e.is=function(e){var t=e;return t&&(Pe.string(t.detail)||void 0===t.detail)&&(Pe.string(t.description)||void 0===t.description)}}(F||(F={})),function(e){e.create=function(e){return{label:e}}}(B||(B={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(W||(W={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Pe.string(t)||Pe.objectLiteral(t)&&Pe.string(t.language)&&Pe.string(t.value)}}(H||(H={})),function(e){e.is=function(e){var t=e;return!!t&&Pe.objectLiteral(t)&&(D.is(t.contents)||H.is(t.contents)||Pe.typedArray(t.contents,H.is))&&(void 0===e.range||u.is(e.range))}}($||($={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(K||(K={})),function(e){e.create=function(e,t){for(var r=[],n=2;n=0;a--){var o=i[a],u=e.offsetAt(o.range.start),l=e.offsetAt(o.range.end);if(!(l<=s))throw new Error("Overlapping edit");n=n.substring(0,u)+o.newText+n.substring(l,n.length),s=u}return n}}(Te||(Te={}));var Pe,Ee=function(){function e(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,r=!0,n=0;n0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),r=0,n=t.length;if(0===n)return o.create(0,e);for(;re?n=i:r=i+1}var s=r-1;return o.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],n=e.line+1{"use strict";e.exports=r(5061)},5061:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=void 0;const s=r(9315);i(r(3540),t),i(r(9315),t);let a=!1;const o={initialize:e=>{},get shutdownReceived(){return a},set shutdownReceived(e){a=e},exit:e=>{}};t.createConnection=function(e,t,r,n){let i,a,u,l;return void 0!==e&&"features"===e.__brand&&(i=e,e=t,t=r,r=n),s.ConnectionStrategy.is(e)||s.ConnectionOptions.is(e)?l=e:(a=e,u=t,l=r),(0,s.createConnection)((e=>(0,s.createProtocolConnection)(a,u,e,l)),o,i)}},9315:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ProposedFeatures=t.NotebookDocuments=t.TextDocuments=t.SemanticTokensBuilder=void 0;const s=r(8741);Object.defineProperty(t,"SemanticTokensBuilder",{enumerable:!0,get:function(){return s.SemanticTokensBuilder}}),i(r(5618),t);const a=r(6524);Object.defineProperty(t,"TextDocuments",{enumerable:!0,get:function(){return a.TextDocuments}});const o=r(2206);Object.defineProperty(t,"NotebookDocuments",{enumerable:!0,get:function(){return o.NotebookDocuments}}),i(r(9172),t),(t.ProposedFeatures||(t.ProposedFeatures={})).all={__brand:"features"}},5580:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CallHierarchyFeature=void 0;const n=r(5618);t.CallHierarchyFeature=e=>class extends e{get callHierarchy(){return{onPrepare:e=>this.connection.onRequest(n.CallHierarchyPrepareRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0))),onIncomingCalls:e=>{const t=n.CallHierarchyIncomingCallsRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onOutgoingCalls:e=>{const t=n.CallHierarchyOutgoingCallsRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},6457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationFeature=void 0;const n=r(5618),i=r(7473);t.ConfigurationFeature=e=>class extends e{getConfiguration(e){return e?i.string(e)?this._getConfiguration({section:e}):this._getConfiguration(e):this._getConfiguration({})}_getConfiguration(e){let t={items:Array.isArray(e)?e:[e]};return this.connection.sendRequest(n.ConfigurationRequest.type,t).then((t=>Array.isArray(t)?Array.isArray(e)?t:t[0]:Array.isArray(e)?[]:null))}}},2624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticFeature=void 0;const n=r(5618);t.DiagnosticFeature=e=>class extends e{get diagnostics(){return{refresh:()=>this.connection.sendRequest(n.DiagnosticRefreshRequest.type),on:e=>this.connection.onRequest(n.DocumentDiagnosticRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n.DocumentDiagnosticRequest.partialResult,t)))),onWorkspace:e=>this.connection.onRequest(n.WorkspaceDiagnosticRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),this.attachPartialResultProgress(n.WorkspaceDiagnosticRequest.partialResult,t))))}}}},9515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileOperationsFeature=void 0;const n=r(5618);t.FileOperationsFeature=e=>class extends e{onDidCreateFiles(e){return this.connection.onNotification(n.DidCreateFilesNotification.type,(t=>{e(t)}))}onDidRenameFiles(e){return this.connection.onNotification(n.DidRenameFilesNotification.type,(t=>{e(t)}))}onDidDeleteFiles(e){return this.connection.onNotification(n.DidDeleteFilesNotification.type,(t=>{e(t)}))}onWillCreateFiles(e){return this.connection.onRequest(n.WillCreateFilesRequest.type,((t,r)=>e(t,r)))}onWillRenameFiles(e){return this.connection.onRequest(n.WillRenameFilesRequest.type,((t,r)=>e(t,r)))}onWillDeleteFiles(e){return this.connection.onRequest(n.WillDeleteFilesRequest.type,((t,r)=>e(t,r)))}}},8633:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlayHintFeature=void 0;const n=r(5618);t.InlayHintFeature=e=>class extends e{get inlayHint(){return{refresh:()=>this.connection.sendRequest(n.InlayHintRefreshRequest.type),on:e=>this.connection.onRequest(n.InlayHintRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t)))),resolve:e=>this.connection.onRequest(n.InlayHintResolveRequest.type,((t,r)=>e(t,r)))}}}},3897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InlineValueFeature=void 0;const n=r(5618);t.InlineValueFeature=e=>class extends e{get inlineValue(){return{refresh:()=>this.connection.sendRequest(n.InlineValueRefreshRequest.type),on:e=>this.connection.onRequest(n.InlineValueRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t))))}}}},9875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedEditingRangeFeature=void 0;const n=r(5618);t.LinkedEditingRangeFeature=e=>class extends e{onLinkedEditingRange(e){return this.connection.onRequest(n.LinkedEditingRangeRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0)))}}},7398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MonikerFeature=void 0;const n=r(5618);t.MonikerFeature=e=>class extends e{get moniker(){return{on:e=>{const t=n.MonikerRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},2206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookDocuments=t.NotebookSyncFeature=void 0;const n=r(5618),i=r(6524);t.NotebookSyncFeature=e=>class extends e{get synchronization(){return{onDidOpenNotebookDocument:e=>this.connection.onNotification(n.DidOpenNotebookDocumentNotification.type,(t=>{e(t)})),onDidChangeNotebookDocument:e=>this.connection.onNotification(n.DidChangeNotebookDocumentNotification.type,(t=>{e(t)})),onDidSaveNotebookDocument:e=>this.connection.onNotification(n.DidSaveNotebookDocumentNotification.type,(t=>{e(t)})),onDidCloseNotebookDocument:e=>this.connection.onNotification(n.DidCloseNotebookDocumentNotification.type,(t=>{e(t)}))}}};class s{onDidOpenTextDocument(e){return this.openHandler=e,n.Disposable.create((()=>{this.openHandler=void 0}))}openTextDocument(e){this.openHandler&&this.openHandler(e)}onDidChangeTextDocument(e){return this.changeHandler=e,n.Disposable.create((()=>{this.changeHandler=e}))}changeTextDocument(e){this.changeHandler&&this.changeHandler(e)}onDidCloseTextDocument(e){return this.closeHandler=e,n.Disposable.create((()=>{this.closeHandler=void 0}))}closeTextDocument(e){this.closeHandler&&this.closeHandler(e)}onWillSaveTextDocument(){return s.NULL_DISPOSE}onWillSaveTextDocumentWaitUntil(){return s.NULL_DISPOSE}onDidSaveTextDocument(){return s.NULL_DISPOSE}}s.NULL_DISPOSE=Object.freeze({dispose:()=>{}}),t.NotebookDocuments=class{constructor(e){e instanceof i.TextDocuments?this._cellTextDocuments=e:this._cellTextDocuments=new i.TextDocuments(e),this.notebookDocuments=new Map,this.notebookCellMap=new Map,this._onDidOpen=new n.Emitter,this._onDidChange=new n.Emitter,this._onDidSave=new n.Emitter,this._onDidClose=new n.Emitter}get cellTextDocuments(){return this._cellTextDocuments}getCellTextDocument(e){return this._cellTextDocuments.get(e.document)}getNotebookDocument(e){return this.notebookDocuments.get(e)}getNotebookCell(e){const t=this.notebookCellMap.get(e);return t&&t[0]}findNotebookDocumentForCell(e){const t="string"==typeof e?e:e.document,r=this.notebookCellMap.get(t);return r&&r[1]}get onDidOpen(){return this._onDidOpen.event}get onDidSave(){return this._onDidSave.event}get onDidChange(){return this._onDidChange.event}get onDidClose(){return this._onDidClose.event}listen(e){const t=new s,r=[];return r.push(this.cellTextDocuments.listen(t)),r.push(e.notebooks.synchronization.onDidOpenNotebookDocument((e=>{this.notebookDocuments.set(e.notebookDocument.uri,e.notebookDocument);for(const r of e.cellTextDocuments)t.openTextDocument({textDocument:r});this.updateCellMap(e.notebookDocument),this._onDidOpen.fire(e.notebookDocument)}))),r.push(e.notebooks.synchronization.onDidChangeNotebookDocument((e=>{const r=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0===r)return;r.version=e.notebookDocument.version;const n=r.metadata;let i=!1;const s=e.change;void 0!==s.metadata&&(i=!0,r.metadata=s.metadata);const a=[],o=[],u=[],l=[];if(void 0!==s.cells){const e=s.cells;if(void 0!==e.structure){const n=e.structure.array;if(r.cells.splice(n.start,n.deleteCount,...void 0!==n.cells?n.cells:[]),void 0!==e.structure.didOpen)for(const r of e.structure.didOpen)t.openTextDocument({textDocument:r}),a.push(r.uri);if(e.structure.didClose)for(const r of e.structure.didClose)t.closeTextDocument({textDocument:r}),o.push(r.uri)}if(void 0!==e.data){const t=new Map(e.data.map((e=>[e.document,e])));for(let e=0;e<=r.cells.length;e++){const n=t.get(r.cells[e].document);if(void 0!==n){const i=r.cells.splice(e,1,n);if(u.push({old:i[0],new:n}),t.delete(n.document),0===t.size)break}}}if(void 0!==e.textContent)for(const r of e.textContent)t.changeTextDocument({textDocument:r.document,contentChanges:r.changes}),l.push(r.document.uri)}this.updateCellMap(r);const p={notebookDocument:r};i&&(p.metadata={old:n,new:r.metadata});const m=[];for(const e of a)m.push(this.getNotebookCell(e));const d=[];for(const e of o)d.push(this.getNotebookCell(e));const g=[];for(const e of l)g.push(this.getNotebookCell(e));(m.length>0||d.length>0||u.length>0||g.length>0)&&(p.cells={added:m,removed:d,changed:{data:u,textContent:g}}),void 0===p.metadata&&void 0===p.cells||this._onDidChange.fire(p)}))),r.push(e.notebooks.synchronization.onDidSaveNotebookDocument((e=>{const t=this.notebookDocuments.get(e.notebookDocument.uri);void 0!==t&&this._onDidSave.fire(t)}))),r.push(e.notebooks.synchronization.onDidCloseNotebookDocument((e=>{const r=this.notebookDocuments.get(e.notebookDocument.uri);if(void 0!==r){this._onDidClose.fire(r);for(const r of e.cellTextDocuments)t.closeTextDocument({textDocument:r});this.notebookDocuments.delete(e.notebookDocument.uri);for(const e of r.cells)this.notebookCellMap.delete(e.document)}}))),n.Disposable.create((()=>{r.forEach((e=>e.dispose()))}))}updateCellMap(e){for(const t of e.cells)this.notebookCellMap.set(t.document,[t,e])}}},124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attachPartialResult=t.ProgressFeature=t.attachWorkDone=void 0;const n=r(5618),i=r(5478);class s{constructor(e,t){this._connection=e,this._token=t,s.Instances.set(this._token,this)}begin(e,t,r,i){let s={kind:"begin",title:e,percentage:t,message:r,cancellable:i};this._connection.sendProgress(n.WorkDoneProgress.type,this._token,s)}report(e,t){let r={kind:"report"};"number"==typeof e?(r.percentage=e,void 0!==t&&(r.message=t)):r.message=e,this._connection.sendProgress(n.WorkDoneProgress.type,this._token,r)}done(){s.Instances.delete(this._token),this._connection.sendProgress(n.WorkDoneProgress.type,this._token,{kind:"end"})}}s.Instances=new Map;class a extends s{constructor(e,t){super(e,t),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose(),super.done()}cancel(){this._source.cancel()}}class o{constructor(){}begin(){}report(){}done(){}}class u extends o{constructor(){super(),this._source=new n.CancellationTokenSource}get token(){return this._source.token}done(){this._source.dispose()}cancel(){this._source.cancel()}}var l;t.attachWorkDone=function(e,t){if(void 0===t||void 0===t.workDoneToken)return new o;const r=t.workDoneToken;return delete t.workDoneToken,new s(e,r)},t.ProgressFeature=e=>class extends e{constructor(){super(),this._progressSupported=!1}initialize(e){super.initialize(e),!0===e?.window?.workDoneProgress&&(this._progressSupported=!0,this.connection.onNotification(n.WorkDoneProgressCancelNotification.type,(e=>{let t=s.Instances.get(e.token);(t instanceof a||t instanceof u)&&t.cancel()})))}attachWorkDoneProgress(e){return void 0===e?new o:new s(this.connection,e)}createWorkDoneProgress(){if(this._progressSupported){const e=(0,i.generateUuid)();return this.connection.sendRequest(n.WorkDoneProgressCreateRequest.type,{token:e}).then((()=>new a(this.connection,e)))}return Promise.resolve(new u)}},function(e){e.type=new n.ProgressType}(l||(l={}));class p{constructor(e,t){this._connection=e,this._token=t}report(e){this._connection.sendProgress(l.type,this._token,e)}}t.attachPartialResult=function(e,t){if(void 0===t||void 0===t.partialResultToken)return;const r=t.partialResultToken;return delete t.partialResultToken,new p(e,r)}},8741:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticTokensBuilder=t.SemanticTokensDiff=t.SemanticTokensFeature=void 0;const n=r(5618);t.SemanticTokensFeature=e=>class extends e{get semanticTokens(){return{refresh:()=>this.connection.sendRequest(n.SemanticTokensRefreshRequest.type),on:e=>{const t=n.SemanticTokensRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onDelta:e=>{const t=n.SemanticTokensDeltaRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onRange:e=>{const t=n.SemanticTokensRangeRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}};class i{constructor(e,t){this.originalSequence=e,this.modifiedSequence=t}computeDiff(){const e=this.originalSequence.length,t=this.modifiedSequence.length;let r=0;for(;r=r&&i>=r&&this.originalSequence[n]===this.modifiedSequence[i];)n--,i--;(n0&&(s-=this._prevLine,0===s&&(a-=this._prevChar)),this._data[this._dataLen++]=s,this._data[this._dataLen++]=a,this._data[this._dataLen++]=r,this._data[this._dataLen++]=n,this._data[this._dataLen++]=i,this._prevLine=e,this._prevChar=t}get id(){return this._id.toString()}previousResult(e){this.id===e&&(this._prevData=this._data),this.initialize()}build(){return this._prevData=void 0,{resultId:this.id,data:this._data}}canBuildEdits(){return void 0!==this._prevData}buildEdits(){return void 0!==this._prevData?{resultId:this.id,edits:new i(this._prevData,this._data).computeDiff()}:this.build()}}},9172:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConnection=t.combineFeatures=t.combineNotebooksFeatures=t.combineLanguagesFeatures=t.combineWorkspaceFeatures=t.combineWindowFeatures=t.combineClientFeatures=t.combineTracerFeatures=t.combineTelemetryFeatures=t.combineConsoleFeatures=t._NotebooksImpl=t._LanguagesImpl=t.BulkUnregistration=t.BulkRegistration=t.ErrorMessageTracker=void 0;const n=r(5618),i=r(7473),s=r(5478),a=r(124),o=r(6457),u=r(4778),l=r(5580),p=r(8741),m=r(1219),d=r(9515),g=r(9875),c=r(3956),y=r(3897),h=r(8633),_=r(2624),f=r(2206),b=r(7398);function q(e){if(null!==e)return e}t.ErrorMessageTracker=class{constructor(){this._messages=Object.create(null)}add(e){let t=this._messages[e];t||(t=0),t++,this._messages[e]=t}sendErrors(e){Object.keys(this._messages).forEach((t=>{e.window.showErrorMessage(t)}))}};class R{constructor(){}rawAttach(e){this._rawConnection=e}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}fillServerCapabilities(e){}initialize(e){}error(e){this.send(n.MessageType.Error,e)}warn(e){this.send(n.MessageType.Warning,e)}info(e){this.send(n.MessageType.Info,e)}log(e){this.send(n.MessageType.Log,e)}send(e,t){this._rawConnection&&this._rawConnection.sendNotification(n.LogMessageNotification.type,{type:e,message:t}).catch((()=>{(0,n.RAL)().console.error("Sending log message failed")}))}}const v=(0,m.ShowDocumentFeature)((0,a.ProgressFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}showErrorMessage(e,...t){let r={type:n.MessageType.Error,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(q)}showWarningMessage(e,...t){let r={type:n.MessageType.Warning,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(q)}showInformationMessage(e,...t){let r={type:n.MessageType.Info,message:e,actions:t};return this.connection.sendRequest(n.ShowMessageRequest.type,r).then(q)}}));(t.BulkRegistration||(t.BulkRegistration={})).create=function(){return new w};class w{constructor(){this._registrations=[],this._registered=new Set}add(e,t){const r=i.string(e)?e:e.method;if(this._registered.has(r))throw new Error(`${r} is already added to this registration`);const n=s.generateUuid();this._registrations.push({id:n,method:r,registerOptions:t||{}}),this._registered.add(r)}asRegistrationParams(){return{registrations:this._registrations}}}(t.BulkUnregistration||(t.BulkUnregistration={})).create=function(){return new T(void 0,[])};class T{constructor(e,t){this._connection=e,this._unregistrations=new Map,t.forEach((e=>{this._unregistrations.set(e.method,e)}))}get isAttached(){return!!this._connection}attach(e){this._connection=e}add(e){this._unregistrations.set(e.method,e)}dispose(){let e=[];for(let t of this._unregistrations.values())e.push(t);let t={unregisterations:e};this._connection.sendRequest(n.UnregistrationRequest.type,t).catch((()=>{this._connection.console.info("Bulk unregistration failed.")}))}disposeSingle(e){const t=i.string(e)?e:e.method,r=this._unregistrations.get(t);if(!r)return!1;let s={unregisterations:[r]};return this._connection.sendRequest(n.UnregistrationRequest.type,s).then((()=>{this._unregistrations.delete(t)}),(e=>{this._connection.console.info(`Un-registering request handler for ${r.id} failed.`)})),!0}}class k{attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}register(e,t,r){return e instanceof w?this.registerMany(e):e instanceof T?this.registerSingle1(e,t,r):this.registerSingle2(e,t)}registerSingle1(e,t,r){const a=i.string(t)?t:t.method,o=s.generateUuid();let u={registrations:[{id:o,method:a,registerOptions:r||{}}]};return e.isAttached||e.attach(this.connection),this.connection.sendRequest(n.RegistrationRequest.type,u).then((t=>(e.add({id:o,method:a}),e)),(e=>(this.connection.console.info(`Registering request handler for ${a} failed.`),Promise.reject(e))))}registerSingle2(e,t){const r=i.string(e)?e:e.method,a=s.generateUuid();let o={registrations:[{id:a,method:r,registerOptions:t||{}}]};return this.connection.sendRequest(n.RegistrationRequest.type,o).then((e=>n.Disposable.create((()=>{this.unregisterSingle(a,r).catch((()=>{this.connection.console.info(`Un-registering capability with id ${a} failed.`)}))}))),(e=>(this.connection.console.info(`Registering request handler for ${r} failed.`),Promise.reject(e))))}unregisterSingle(e,t){let r={unregisterations:[{id:e,method:t}]};return this.connection.sendRequest(n.UnregistrationRequest.type,r).catch((()=>{this.connection.console.info(`Un-registering request handler for ${e} failed.`)}))}registerMany(e){let t=e.asRegistrationParams();return this.connection.sendRequest(n.RegistrationRequest.type,t).then((()=>new T(this._connection,t.registrations.map((e=>({id:e.id,method:e.method}))))),(e=>(this.connection.console.info("Bulk registration failed."),Promise.reject(e))))}}const P=(0,d.FileOperationsFeature)((0,u.WorkspaceFoldersFeature)((0,o.ConfigurationFeature)(class{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}applyEdit(e){let t=(r=e)&&r.edit?e:{edit:e};var r;return this.connection.sendRequest(n.ApplyWorkspaceEditRequest.type,t)}})));class E{constructor(){this._trace=n.Trace.Off}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}set trace(e){this._trace=e}log(e,t){this._trace!==n.Trace.Off&&this.connection.sendNotification(n.LogTraceNotification.type,{message:e,verbose:this._trace===n.Trace.Verbose?t:void 0}).catch((()=>{}))}}class j{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}logEvent(e){this.connection.sendNotification(n.TelemetryEventNotification.type,e).catch((()=>{this.connection.console.log("Sending TelemetryEventNotification failed")}))}}class G{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,a.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,a.attachPartialResult)(this.connection,t)}}t._LanguagesImpl=G;const A=(0,b.MonikerFeature)((0,_.DiagnosticFeature)((0,h.InlayHintFeature)((0,y.InlineValueFeature)((0,c.TypeHierarchyFeature)((0,g.LinkedEditingRangeFeature)((0,p.SemanticTokensFeature)((0,l.CallHierarchyFeature)(G))))))));class S{constructor(){}attach(e){this._connection=e}get connection(){if(!this._connection)throw new Error("Remote is not attached to a connection yet.");return this._connection}initialize(e){}fillServerCapabilities(e){}attachWorkDoneProgress(e){return(0,a.attachWorkDone)(this.connection,e)}attachPartialResultProgress(e,t){return(0,a.attachPartialResult)(this.connection,t)}}t._NotebooksImpl=S;const O=(0,f.NotebookSyncFeature)(S);function I(e,t){return function(r){return t(e(r))}}function M(e,t){return function(r){return t(e(r))}}function z(e,t){return function(r){return t(e(r))}}function D(e,t){return function(r){return t(e(r))}}function L(e,t){return function(r){return t(e(r))}}function x(e,t){return function(r){return t(e(r))}}function C(e,t){return function(r){return t(e(r))}}function N(e,t){return function(r){return t(e(r))}}t.combineConsoleFeatures=I,t.combineTelemetryFeatures=M,t.combineTracerFeatures=z,t.combineClientFeatures=D,t.combineWindowFeatures=L,t.combineWorkspaceFeatures=x,t.combineLanguagesFeatures=C,t.combineNotebooksFeatures=N,t.combineFeatures=function(e,t){function r(e,t,r){return e&&t?r(e,t):e||t}return{__brand:"features",console:r(e.console,t.console,I),tracer:r(e.tracer,t.tracer,z),telemetry:r(e.telemetry,t.telemetry,M),client:r(e.client,t.client,D),window:r(e.window,t.window,L),workspace:r(e.workspace,t.workspace,x),languages:r(e.languages,t.languages,C),notebooks:r(e.notebooks,t.notebooks,N)}},t.createConnection=function(e,t,r){const s=r&&r.console?new(r.console(R)):new R,o=e(s);s.rawAttach(o);const u=r&&r.tracer?new(r.tracer(E)):new E,l=r&&r.telemetry?new(r.telemetry(j)):new j,p=r&&r.client?new(r.client(k)):new k,m=r&&r.window?new(r.window(v)):new v,d=r&&r.workspace?new(r.workspace(P)):new P,g=r&&r.languages?new(r.languages(A)):new A,c=r&&r.notebooks?new(r.notebooks(O)):new O,y=[s,u,l,p,m,d,g,c];let h,_,f,b={listen:()=>o.listen(),sendRequest:(e,...t)=>o.sendRequest(i.string(e)?e:e.method,...t),onRequest:(e,t)=>o.onRequest(e,t),sendNotification:(e,t)=>{const r=i.string(e)?e:e.method;return 1===arguments.length?o.sendNotification(r):o.sendNotification(r,t)},onNotification:(e,t)=>o.onNotification(e,t),onProgress:o.onProgress,sendProgress:o.sendProgress,onInitialize:e=>(_=e,{dispose:()=>{_=void 0}}),onInitialized:e=>o.onNotification(n.InitializedNotification.type,e),onShutdown:e=>(h=e,{dispose:()=>{h=void 0}}),onExit:e=>(f=e,{dispose:()=>{f=void 0}}),get console(){return s},get telemetry(){return l},get tracer(){return u},get client(){return p},get window(){return m},get workspace(){return d},get languages(){return g},get notebooks(){return c},onDidChangeConfiguration:e=>o.onNotification(n.DidChangeConfigurationNotification.type,e),onDidChangeWatchedFiles:e=>o.onNotification(n.DidChangeWatchedFilesNotification.type,e),__textDocumentSync:void 0,onDidOpenTextDocument:e=>o.onNotification(n.DidOpenTextDocumentNotification.type,e),onDidChangeTextDocument:e=>o.onNotification(n.DidChangeTextDocumentNotification.type,e),onDidCloseTextDocument:e=>o.onNotification(n.DidCloseTextDocumentNotification.type,e),onWillSaveTextDocument:e=>o.onNotification(n.WillSaveTextDocumentNotification.type,e),onWillSaveTextDocumentWaitUntil:e=>o.onRequest(n.WillSaveTextDocumentWaitUntilRequest.type,e),onDidSaveTextDocument:e=>o.onNotification(n.DidSaveTextDocumentNotification.type,e),sendDiagnostics:e=>o.sendNotification(n.PublishDiagnosticsNotification.type,e),onHover:e=>o.onRequest(n.HoverRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),void 0))),onCompletion:e=>o.onRequest(n.CompletionRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onCompletionResolve:e=>o.onRequest(n.CompletionResolveRequest.type,e),onSignatureHelp:e=>o.onRequest(n.SignatureHelpRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),void 0))),onDeclaration:e=>o.onRequest(n.DeclarationRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onDefinition:e=>o.onRequest(n.DefinitionRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onTypeDefinition:e=>o.onRequest(n.TypeDefinitionRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onImplementation:e=>o.onRequest(n.ImplementationRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onReferences:e=>o.onRequest(n.ReferencesRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onDocumentHighlight:e=>o.onRequest(n.DocumentHighlightRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onDocumentSymbol:e=>o.onRequest(n.DocumentSymbolRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onWorkspaceSymbol:e=>o.onRequest(n.WorkspaceSymbolRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onWorkspaceSymbolResolve:e=>o.onRequest(n.WorkspaceSymbolResolveRequest.type,e),onCodeAction:e=>o.onRequest(n.CodeActionRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onCodeActionResolve:e=>o.onRequest(n.CodeActionResolveRequest.type,((t,r)=>e(t,r))),onCodeLens:e=>o.onRequest(n.CodeLensRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onCodeLensResolve:e=>o.onRequest(n.CodeLensResolveRequest.type,((t,r)=>e(t,r))),onDocumentFormatting:e=>o.onRequest(n.DocumentFormattingRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),void 0))),onDocumentRangeFormatting:e=>o.onRequest(n.DocumentRangeFormattingRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),void 0))),onDocumentOnTypeFormatting:e=>o.onRequest(n.DocumentOnTypeFormattingRequest.type,((t,r)=>e(t,r))),onRenameRequest:e=>o.onRequest(n.RenameRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),void 0))),onPrepareRename:e=>o.onRequest(n.PrepareRenameRequest.type,((t,r)=>e(t,r))),onDocumentLinks:e=>o.onRequest(n.DocumentLinkRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onDocumentLinkResolve:e=>o.onRequest(n.DocumentLinkResolveRequest.type,((t,r)=>e(t,r))),onDocumentColor:e=>o.onRequest(n.DocumentColorRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onColorPresentation:e=>o.onRequest(n.ColorPresentationRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onFoldingRanges:e=>o.onRequest(n.FoldingRangeRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onSelectionRanges:e=>o.onRequest(n.SelectionRangeRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),(0,a.attachPartialResult)(o,t)))),onExecuteCommand:e=>o.onRequest(n.ExecuteCommandRequest.type,((t,r)=>e(t,r,(0,a.attachWorkDone)(o,t),void 0))),dispose:()=>o.dispose()};for(let e of y)e.attach(b);return o.onRequest(n.InitializeRequest.type,(e=>{t.initialize(e),i.string(e.trace)&&(u.trace=n.Trace.fromString(e.trace));for(let t of y)t.initialize(e.capabilities);if(_){let t=_(e,(new n.CancellationTokenSource).token,(0,a.attachWorkDone)(o,e),void 0);return(r=t,r instanceof Promise?r:i.thenable(r)?new Promise(((e,t)=>{r.then((t=>e(t)),(e=>t(e)))})):Promise.resolve(r)).then((e=>{if(e instanceof n.ResponseError)return e;let t=e;t||(t={capabilities:{}});let r=t.capabilities;r||(r={},t.capabilities=r),void 0===r.textDocumentSync||null===r.textDocumentSync?r.textDocumentSync=i.number(b.__textDocumentSync)?b.__textDocumentSync:n.TextDocumentSyncKind.None:i.number(r.textDocumentSync)||i.number(r.textDocumentSync.change)||(r.textDocumentSync.change=i.number(b.__textDocumentSync)?b.__textDocumentSync:n.TextDocumentSyncKind.None);for(let e of y)e.fillServerCapabilities(r);return t}))}{let e={capabilities:{textDocumentSync:n.TextDocumentSyncKind.None}};for(let t of y)t.fillServerCapabilities(e.capabilities);return e}var r})),o.onRequest(n.ShutdownRequest.type,(()=>(t.shutdownReceived=!0,h?h((new n.CancellationTokenSource).token):void 0))),o.onNotification(n.ExitNotification.type,(()=>{try{f&&f()}finally{t.shutdownReceived?t.exit(0):t.exit(1)}})),o.onNotification(n.SetTraceNotification.type,(e=>{u.trace=n.Trace.fromString(e.value)})),b}},1219:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShowDocumentFeature=void 0;const n=r(5618);t.ShowDocumentFeature=e=>class extends e{showDocument(e){return this.connection.sendRequest(n.ShowDocumentRequest.type,e)}}},6524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TextDocuments=void 0;const n=r(5618);t.TextDocuments=class{constructor(e){this._configuration=e,this._syncedDocuments=new Map,this._onDidChangeContent=new n.Emitter,this._onDidOpen=new n.Emitter,this._onDidClose=new n.Emitter,this._onDidSave=new n.Emitter,this._onWillSave=new n.Emitter}get onDidOpen(){return this._onDidOpen.event}get onDidChangeContent(){return this._onDidChangeContent.event}get onWillSave(){return this._onWillSave.event}onWillSaveWaitUntil(e){this._willSaveWaitUntil=e}get onDidSave(){return this._onDidSave.event}get onDidClose(){return this._onDidClose.event}get(e){return this._syncedDocuments.get(e)}all(){return Array.from(this._syncedDocuments.values())}keys(){return Array.from(this._syncedDocuments.keys())}listen(e){e.__textDocumentSync=n.TextDocumentSyncKind.Incremental;const t=[];return t.push(e.onDidOpenTextDocument((e=>{const t=e.textDocument,r=this._configuration.create(t.uri,t.languageId,t.version,t.text);this._syncedDocuments.set(t.uri,r);const n=Object.freeze({document:r});this._onDidOpen.fire(n),this._onDidChangeContent.fire(n)}))),t.push(e.onDidChangeTextDocument((e=>{const t=e.textDocument,r=e.contentChanges;if(0===r.length)return;const{version:n}=t;if(null==n)throw new Error(`Received document change event for ${t.uri} without valid version identifier`);let i=this._syncedDocuments.get(t.uri);void 0!==i&&(i=this._configuration.update(i,r,n),this._syncedDocuments.set(t.uri,i),this._onDidChangeContent.fire(Object.freeze({document:i})))}))),t.push(e.onDidCloseTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&(this._syncedDocuments.delete(e.textDocument.uri),this._onDidClose.fire(Object.freeze({document:t})))}))),t.push(e.onWillSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onWillSave.fire(Object.freeze({document:t,reason:e.reason}))}))),t.push(e.onWillSaveTextDocumentWaitUntil(((e,t)=>{let r=this._syncedDocuments.get(e.textDocument.uri);return void 0!==r&&this._willSaveWaitUntil?this._willSaveWaitUntil(Object.freeze({document:r,reason:e.reason}),t):[]}))),t.push(e.onDidSaveTextDocument((e=>{let t=this._syncedDocuments.get(e.textDocument.uri);void 0!==t&&this._onDidSave.fire(Object.freeze({document:t}))}))),n.Disposable.create((()=>{t.forEach((e=>e.dispose()))}))}}},3956:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHierarchyFeature=void 0;const n=r(5618);t.TypeHierarchyFeature=e=>class extends e{get typeHierarchy(){return{onPrepare:e=>this.connection.onRequest(n.TypeHierarchyPrepareRequest.type,((t,r)=>e(t,r,this.attachWorkDoneProgress(t),void 0))),onSupertypes:e=>{const t=n.TypeHierarchySupertypesRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))},onSubtypes:e=>{const t=n.TypeHierarchySubtypesRequest.type;return this.connection.onRequest(t,((r,n)=>e(r,n,this.attachWorkDoneProgress(r),this.attachPartialResultProgress(t,r))))}}}}},7473:(e,t)=>{"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.thenable=t.typedArray=t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=n,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>r(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&n(e.then)}},5478:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUuid=t.parse=t.isUUID=t.v4=t.empty=void 0;class r{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class n extends r{constructor(){super([n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),"-","4",n._randomHex(),n._randomHex(),n._randomHex(),"-",n._oneOf(n._timeHighBits),n._randomHex(),n._randomHex(),n._randomHex(),"-",n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex(),n._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return n._oneOf(n._chars)}}function i(){return new n}n._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],n._timeHighBits=["8","9","a","b"],t.empty=new r("00000000-0000-0000-0000-000000000000"),t.v4=i;const s=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function a(e){return s.test(e)}t.isUUID=a,t.parse=function(e){if(!a(e))throw new Error("invalid uuid");return new r(e)},t.generateUuid=function(){return i().asHex()}},4778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFoldersFeature=void 0;const n=r(5618);t.WorkspaceFoldersFeature=e=>class extends e{constructor(){super(),this._notificationIsAutoRegistered=!1}initialize(e){super.initialize(e);let t=e.workspace;t&&t.workspaceFolders&&(this._onDidChangeWorkspaceFolders=new n.Emitter,this.connection.onNotification(n.DidChangeWorkspaceFoldersNotification.type,(e=>{this._onDidChangeWorkspaceFolders.fire(e.event)})))}fillServerCapabilities(e){super.fillServerCapabilities(e);const t=e.workspace?.workspaceFolders?.changeNotifications;this._notificationIsAutoRegistered=!0===t||"string"==typeof t}getWorkspaceFolders(){return this.connection.sendRequest(n.WorkspaceFoldersRequest.type)}get onDidChangeWorkspaceFolders(){if(!this._onDidChangeWorkspaceFolders)throw new Error("Client doesn't support sending workspace folder change events.");return this._notificationIsAutoRegistered||this._unregistration||(this._unregistration=this.connection.client.register(n.DidChangeWorkspaceFoldersNotification.type)),this._onDidChangeWorkspaceFolders.event}}},8889:(e,t,r)=>{"use strict";e.exports=r(5061)},9557:e=>{e.exports=function e(t,r){if(t&&r)return e(t)(r);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){n[e]=t[e]})),n;function n(){for(var e=new Array(arguments.length),r=0;r{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e,t,n=r(4401),i=r(8889);class s{}class a extends s{constructor(e,t){super(),this.literal=e,this.token=t}accept(e){return e.visitLiteral(this)}}class o extends s{constructor(e,t){super(),this.operator=e,this.expr=t}accept(e){return e.visitUnary(this)}}class u extends s{constructor(e,t){super(),this.functionName=e,this.args=t}accept(e){return e.visitFunctionCall(this)}}class l extends s{constructor(e,t,r){super(),this.left=e,this.operator=t,this.right=r}accept(e){return e.visitBinary(this)}}class p extends s{constructor(e,t){super(),this.operator=e,this.args=t}accept(e){return e.visitLogical(this)}}class m extends s{constructor(e){super(),this.group=e}accept(e){return e.visitGrouping(this)}}class d extends s{constructor(e){super(),this.name=e}accept(e){return e.visitContextAccess(this)}}class g extends s{constructor(e,t){super(),this.expr=e,this.index=t}accept(e){return e.visitIndexAccess(this)}}class c extends s{accept(){throw new Error("Method not implemented.")}}function y(t){switch(t){case e.Array:return"Array";case e.Boolean:return"Boolean";case e.Null:return"Null";case e.Number:return"Number";case e.Dictionary:return"Object";case e.String:return"String"}return"unknown"}!function(e){e[e.String=0]="String",e[e.Array=1]="Array",e[e.Dictionary=2]="Dictionary",e[e.Boolean=3]="Boolean",e[e.Number=4]="Number",e[e.CaseSensitiveDictionary=5]="CaseSensitiveDictionary",e[e.Null=6]="Null"}(e||(e={}));class h{constructor(...t){this.keys=[],this.v=[],this.indexMap={},this.kind=e.Dictionary,this.primitive=!1;for(const e of t)this.add(e.key,e.value)}coerceString(){return y(this.kind)}number(){return NaN}add(e,t){e.toLowerCase()in this.indexMap||(this.keys.push(e),this.v.push(t),this.indexMap[e.toLowerCase()]=this.v.length-1)}get(e){const t=this.indexMap[e.toLowerCase()];if(void 0!==t)return this.v[t]}values(){return this.v}pairs(){const e=[];for(const t of this.keys)e.push({key:t,value:this.v[this.indexMap[t.toLowerCase()]]});return e}}function _(t){return t.kind===e.Dictionary}class f{constructor(...t){this.v=[],this.kind=e.Array,this.primitive=!1;for(const e of t)this.add(e)}coerceString(){return y(this.kind)}number(){return NaN}add(e){this.v.push(e)}get(e){return this.v[e]}values(){return this.v}}class b{constructor(t){this.value=t,this.kind=e.Boolean,this.primitive=!0}coerceString(){return this.value?"true":"false"}number(){return this.value?1:0}}class q{constructor(){this.kind=e.Null,this.primitive=!0}coerceString(){return""}number(){return 0}}class R{constructor(t){this.value=t,this.kind=e.Number,this.primitive=!0}coerceString(){return 0===this.value?"0":(+this.value.toFixed(15)).toString()}number(){return this.value}}class v{constructor(t){this.value=t,this.kind=e.String,this.primitive=!0}coerceString(){return this.value}number(){return Number(this.value)}}function w(e,t){if(t instanceof q)return null;if(t instanceof b)return t.value;if(t instanceof R)return t.number();if(t instanceof v)return t.coerceString();if(t instanceof f)return t.values();if(t instanceof h){const e=t.pairs(),r={};for(const t of e)r[t.key]=t.value;return r}return t}function T(e,t){return null===t?new q:"string"==typeof t?new v(t):"number"==typeof t?new R(t):"boolean"==typeof t?new b(t):Array.isArray(t)?new f(...t):"object"==typeof t?new h(...Object.keys(t).map((e=>({key:e,value:t[e]})))):t}class k extends f{}!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.LEFT_PAREN=1]="LEFT_PAREN",e[e.RIGHT_PAREN=2]="RIGHT_PAREN",e[e.LEFT_BRACKET=3]="LEFT_BRACKET",e[e.RIGHT_BRACKET=4]="RIGHT_BRACKET",e[e.COMMA=5]="COMMA",e[e.DOT=6]="DOT",e[e.BANG=7]="BANG",e[e.BANG_EQUAL=8]="BANG_EQUAL",e[e.EQUAL_EQUAL=9]="EQUAL_EQUAL",e[e.GREATER=10]="GREATER",e[e.GREATER_EQUAL=11]="GREATER_EQUAL",e[e.LESS=12]="LESS",e[e.LESS_EQUAL=13]="LESS_EQUAL",e[e.AND=14]="AND",e[e.OR=15]="OR",e[e.STAR=16]="STAR",e[e.NUMBER=17]="NUMBER",e[e.STRING=18]="STRING",e[e.IDENTIFIER=19]="IDENTIFIER",e[e.TRUE=20]="TRUE",e[e.FALSE=21]="FALSE",e[e.NULL=22]="NULL",e[e.EOF=23]="EOF"}(t||(t={}));class P{constructor(e){this.input=e,this.start=0,this.offset=0,this.line=0,this.lastLineOffset=0,this.tokens=[]}lex(){if(this.input.length>G)throw new Error("ErrorExceededMaxLength");for(;!this.atEnd();){this.start=this.offset;const e=this.next();switch(e){case"(":this.addToken(t.LEFT_PAREN);break;case")":this.addToken(t.RIGHT_PAREN);break;case"[":this.addToken(t.LEFT_BRACKET);break;case"]":this.addToken(t.RIGHT_BRACKET);break;case",":this.addToken(t.COMMA);break;case".":this.previous()!=t.IDENTIFIER&&this.previous()!=t.RIGHT_BRACKET&&this.previous()!=t.RIGHT_PAREN&&this.previous()!=t.STAR?this.consumeNumber():this.addToken(t.DOT);break;case"-":case"+":this.consumeNumber();break;case"!":this.addToken(this.match("=")?t.BANG_EQUAL:t.BANG);break;case"=":if(!this.match("=")){this.consumeIdentifier();break}this.addToken(t.EQUAL_EQUAL);break;case"<":this.addToken(this.match("=")?t.LESS_EQUAL:t.LESS);break;case">":this.addToken(this.match("=")?t.GREATER_EQUAL:t.GREATER);break;case"&":if(!this.match("&")){this.consumeIdentifier();break}this.addToken(t.AND);break;case"|":if(!this.match("|")){this.consumeIdentifier();break}this.addToken(t.OR);break;case"*":this.addToken(t.STAR);break;case" ":case"\r":case"\t":break;case"\n":++this.line,this.lastLineOffset=this.offset;break;case"'":this.consumeString();break;default:!0===E(e)?this.consumeNumber():this.consumeIdentifier()}}return this.tokens.push({type:t.EOF,lexeme:"",range:this.range()}),{tokens:this.tokens}}pos(){return{line:this.line,column:this.start-this.lastLineOffset}}endPos(){return{line:this.line,column:this.offset-this.lastLineOffset}}range(){return{start:this.pos(),end:this.endPos()}}atEnd(){return this.offset>=this.input.length}peek(){return this.atEnd()?"\0":this.input[this.offset]}peekNext(){return this.offset+1>=this.input.length?"\0":this.input[this.offset+1]}previous(){const e=this.tokens.length;return 0==e?t.EOF:this.tokens[e-1].type}next(){return this.input[this.offset++]}match(e){return!this.atEnd()&&this.input[this.offset]===e&&(this.offset++,!0)}addToken(e,t){this.tokens.push({type:e,lexeme:this.input.substring(this.start,this.offset),range:this.range(),value:t})}consumeNumber(){for(;!(this.atEnd()||j(this.peek())&&"."!=this.peek());)this.next();const e=this.input.substring(this.start,this.offset),r=new v(e).number();if(isNaN(r))throw new Error(`Unexpected symbol: '${e}'. Located at position ${this.start+1} within expression: ${this.input}`);this.addToken(t.NUMBER,r)}consumeString(){for(;("'"!==this.peek()||"'"===this.peekNext())&&!this.atEnd();)"\n"===this.peek()&&this.line++,"'"===this.peek()&&"'"===this.peekNext()&&this.next(),this.next();if(this.atEnd())throw new Error(`Unexpected symbol: '${this.input.substring(this.start)}'. Located at position ${this.start+1} within expression: ${this.input}`);this.next();let e=this.input.substring(this.start+1,this.offset-1);e=e.replace("''","'"),this.addToken(t.STRING,e)}consumeIdentifier(){for(;!this.atEnd()&&!j(this.peek());)this.next();let e,r=t.IDENTIFIER;const n=this.input.substring(this.start,this.offset);if(this.previous()!=t.DOT)switch(n){case"true":r=t.TRUE;break;case"false":r=t.FALSE;break;case"null":r=t.NULL;break;case"NaN":r=t.NUMBER,e=NaN;break;case"Infinity":r=t.NUMBER,e=1/0}if(!function(e){if(""==e)return!1;const t=e[0];if(t>="a"&&t<="z"||t>="A"&&t<="Z"||"_"==t){for(const t of e.substring(1).split(""))if(!(t>="a"&&t<="z"||t>="A"&&t<="Z"||t>="0"&&t<="9"||"_"==t||"-"==t))return!1;return!0}return!1}(n))throw new Error(`Unexpected symbol: '${n}'. Located at position ${this.start+1} within expression: ${this.input}`);this.addToken(r,e)}}function E(e){return e>="0"&&e<="9"}function j(e){switch(e){case"(":case"[":case")":case"]":case",":case".":case"!":case">":case"<":case"=":case"&":case"|":return!0}return/\s/.test(e)}const G=21e3;var A;!function(e){e[e.ErrorUnexpectedSymbol=0]="ErrorUnexpectedSymbol",e[e.ErrorUnrecognizedNamedValue=1]="ErrorUnrecognizedNamedValue",e[e.ErrorUnexpectedEndOfExpression=2]="ErrorUnexpectedEndOfExpression",e[e.ErrorExceededMaxDepth=3]="ErrorExceededMaxDepth",e[e.ErrorExceededMaxLength=4]="ErrorExceededMaxLength",e[e.ErrorTooFewParameters=5]="ErrorTooFewParameters",e[e.ErrorTooManyParameters=6]="ErrorTooManyParameters",e[e.ErrorUnrecognizedContext=7]="ErrorUnrecognizedContext",e[e.ErrorUnrecognizedFunction=8]="ErrorUnrecognizedFunction"}(A||(A={}));class S extends Error{constructor(e,r){super(`${function(e){switch(e){case A.ErrorUnexpectedEndOfExpression:return"Unexpected end of expression";case A.ErrorUnexpectedSymbol:return"Unexpected symbol";case A.ErrorUnrecognizedNamedValue:return"Unrecognized named-value";case A.ErrorExceededMaxDepth:return"Exceeded max expression depth 50";case A.ErrorExceededMaxLength:return`Exceeded max expression length ${G}`;case A.ErrorTooFewParameters:return"Too few parameters supplied";case A.ErrorTooManyParameters:return"Too many parameters supplied";case A.ErrorUnrecognizedContext:return"Unrecognized named-value";case A.ErrorUnrecognizedFunction:return"Unrecognized function";default:return"Unknown error"}}(e)}: '${function(e){switch(e.type){case t.EOF:return"EOF";case t.NUMBER:return e.lexeme;case t.STRING:return e.value.toString();default:return e.lexeme}}(r)}'`),this.typ=e,this.tok=r,this.pos=this.tok.range.start}}class O extends Error{}function I(t){switch(t.kind){case e.Null:return!0;case e.Boolean:return!t.value;case e.Number:{const e=t.value;return 0===e||isNaN(e)}case e.String:return 0===t.value.length}return!1}function M(e){return!I(e)}function z(t,r){let n=t,i=r;if(t.kind===r.kind)return[n,i];switch(t.kind){case e.Number:if(r.kind===e.String)return i=new R(r.number()),[n,i];break;case e.String:if(r.kind===e.Number)return n=new R(t.number()),[n,i];break;case e.Null:case e.Boolean:return n=new R(t.number()),z(n,i)}switch(r.kind){case e.Null:case e.Boolean:return i=new R(r.number()),z(n,i)}return[n,i]}function D(t,r){const[n,i]=z(t,r);if(n.kind!=i.kind)return!1;switch(n.kind){case e.Null:return!0;case e.Number:{const e=n.value,t=i.value;return!isNaN(e)&&!isNaN(t)&&e==t}case e.String:{const e=n.value,t=i.value;return C(e)===C(t)}case e.Boolean:return n.value==i.value;case e.Dictionary:case e.Array:return n===i}return!1}function L(t,r){const[n,i]=z(t,r);if(n.kind!=i.kind)return!1;switch(n.kind){case e.Number:{const e=n.value,t=i.value;return!isNaN(e)&&!isNaN(t)&&e>t}case e.String:{let e=n.value,t=i.value;return e=C(e),t=C(t),e>t}case e.Boolean:{const e=n.value,t=i.value;return e&&!t}}return!1}function x(t,r){const[n,i]=z(t,r);if(n.kind!=i.kind)return!1;switch(n.kind){case e.Number:{const e=n.value,t=i.value;return!isNaN(e)&&!isNaN(t)&&et?e[t]:"\0"}function U(e,t){let r=0;for(;;){const n=N(e,t+r);if(!(n>="0"&&n<="9"))break;r++}if(r<1)return{success:!1};const n=t+r-1,i=parseInt(e.substr(t,r));return{success:!isNaN(i),result:i,endIndex:n}}const F={contains:{name:"contains",description:"`contains( search, item )`\n\nReturns `true` if `search` contains `item`. If `search` is an array, this function returns `true` if the `item` is an element in the array. If `search` is a string, this function returns `true` if the `item` is a substring of `search`. This function is not case sensitive. Casts values to a string.",minArgs:2,maxArgs:2,call:(...t)=>{const r=t[0],n=t[1];if(r.primitive){const e=r.coerceString();if(n.primitive){const t=n.coerceString();return new b(e.toLowerCase().includes(t.toLowerCase()))}}else if(r.kind===e.Array){const e=r;if(0===e.values().length)return new b(!1);for(const t of e.values())if(D(n,t))return new b(!0)}return new b(!1)}},endswith:{name:"endsWith",description:"`endsWith( searchString, searchValue )`\n\nReturns `true` if `searchString` ends with `searchValue`. This function is not case sensitive. Casts values to a string.",minArgs:2,maxArgs:2,call:(...e)=>{const t=e[0];if(!t.primitive)return new b(!1);const r=e[1];if(!r.primitive)return new b(!1);const n=C(t.coerceString()),i=C(r.coerceString());return new b(n.endsWith(i))}},format:{name:"format",description:"`format( string, replaceValue0, replaceValue1, ..., replaceValueN)`\n\nReplaces values in the `string`, with the variable `replaceValueN`. Variables in the `string` are specified using the `{N}` syntax, where `N` is an integer. You must specify at least one `replaceValue` and `string`. There is no maximum for the number of variables (`replaceValueN`) you can use. Escape curly braces using double braces.",minArgs:1,maxArgs:255,call:(...e)=>{const t=e[0].coerceString(),r=[];let n=0;for(;n=0&&(s<0||s>i)){if("{"===N(t,i+1)){r.push(t.substr(n,i-n+1)),n=i+2;continue}if(s>i+1){const a=U(t,i+1);if(a.success){if(1+a.result>e.length-1)throw new Error(`The following format string references more arguments than were supplied: ${t}`);i>n&&r.push(t.substr(n,i-n)),r.push(`${e[1+a.result].coerceString()}`),n=s+1;continue}}throw new Error(`The following format string is invalid: ${t}`)}if(!(s>=0)){r.push(t.substr(n));break}if("}"!==N(t,s+1))throw new Error(`The following format string is invalid: ${t}`);r.push(t.substr(n,s-n+1)),n=s+2}return new v(r.join(""))}},fromjson:{name:"fromJson",description:"`fromJSON(value)`\n\nReturns a JSON object or JSON data type for `value`. You can use this function to provide a JSON object as an evaluated expression or to convert environment variables from a string.",minArgs:1,maxArgs:1,call:(...e)=>{const t=e[0].coerceString();if(""===t.trim())throw new Error("empty input");try{return JSON.parse(t,T)}catch(e){throw new O("Error parsing JSON when evaluating fromJson",{cause:e})}}},join:{name:"join",description:"`join( array, optionalSeparator )`\n\nThe value for `array` can be an array or a string. All values in `array` are concatenated into a string. If you provide `optionalSeparator`, it is inserted between the concatenated values. Otherwise, the default separator `,` is used. Casts values to a string.",minArgs:1,maxArgs:2,call:(...t)=>{if(t[0].primitive)return new v(t[0].coerceString());if(t[0].kind===e.Array){let e=",";return t.length>1&&t[1].primitive&&(e=t[1].coerceString()),new v(t[0].values().map((e=>e.coerceString())).join(e))}return new v("")}},startswith:{name:"startsWith",description:"`startsWith( searchString, searchValue )`\n\nReturns `true` when `searchString` starts with `searchValue`. This function is not case sensitive. Casts values to a string.",minArgs:2,maxArgs:2,call:(...e)=>{const t=e[0];if(!t.primitive)return new b(!1);const r=e[1];if(!r.primitive)return new b(!1);const n=C(t.coerceString()),i=C(r.coerceString());return new b(n.startsWith(i))}},tojson:{name:"toJson",description:"`toJSON(value)`\n\nReturns a pretty-print JSON representation of `value`. You can use this function to debug the information provided in contexts.",minArgs:1,maxArgs:1,call:(...e)=>new v(JSON.stringify(e[0],w," "))}};class B{constructor(e,t){if(this.star=e,t&&!e){t.primitive&&(this.str=t.coerceString());let e=t.number();!isNaN(e)&&isFinite(e)&&e>=0&&(e=Math.floor(e),this.int=e)}}}class W{constructor(e,t,r){this.n=e,this.context=t,this.functions=r}evaluate(){return this.eval(this.n)}eval(e){return e.accept(this)}visitLiteral(e){return e.literal}visitUnary(e){const r=this.eval(e.expr);if(e.operator.type===t.BANG)return new b(I(r));throw new Error(`unknown unary operator: ${e.operator.lexeme}`)}visitBinary(e){const r=this.eval(e.left),n=this.eval(e.right);switch(e.operator.type){case t.EQUAL_EQUAL:return new b(D(r,n));case t.BANG_EQUAL:return new b(!D(r,n));case t.GREATER:return new b(L(r,n));case t.GREATER_EQUAL:return new b(D(r,n)||L(r,n));case t.LESS:return new b(x(r,n));case t.LESS_EQUAL:return new b(D(r,n)||x(r,n))}throw new Error(`unknown binary operator: ${e.operator.lexeme}`)}visitLogical(e){let r;for(const n of e.args)if(r=this.eval(n),e.operator.type===t.AND&&I(r)||e.operator.type===t.OR&&M(r))break;return r}visitGrouping(e){return this.eval(e.group)}visitContextAccess(e){return this.context.get(e.name.lexeme)}visitIndexAccess(t){let r;if(t.index instanceof c)r=new B(!0,void 0);else{let e;try{e=this.eval(t.index)}catch(e){throw new Error(`could not evaluate index for index access: ${e.message}`,{cause:e})}r=new B(!1,e)}const n=this.eval(t.expr);let i;switch(n.kind){case e.Array:{const t=n;i=t instanceof k?function(t,r){const n=new k;for(const i of t.values())switch(i.kind){case e.Dictionary:{const e=i;if(r.star)for(const t of e.values())n.add(t);else if(void 0!==r.str){const t=e.get(r.str);void 0!==t&&n.add(t)}break}case e.Array:{const e=i;if(r.star)for(const t of e.values())n.add(t);else void 0!==r.int&&r.intthis.eval(e))),r=e.functionName.lexeme.toLowerCase();return(this.functions?.get(r)||F[r]).call(...t)}}class H{constructor(e,t,r){this.tokens=e,this.offset=0,this.depth=0,this.extContexts=new Map,this.extFuncs=new Map;for(const e of t)this.extContexts.set(e.toLowerCase(),!0);for(const{name:e,func:t}of r.map((e=>({name:e.name,func:e}))))this.extFuncs.set(e.toLowerCase(),t);this.context={allowUnknownKeywords:!1,extensionContexts:this.extContexts,extensionFunctions:this.extFuncs}}parse(){let e;if(this.atEnd())return e;if(e=this.expression(),!this.atEnd())throw this.buildError(A.ErrorUnexpectedSymbol,this.peek());return e}expression(){this.incrDepth();try{return this.logicalOr()}finally{this.decrDepth()}}logicalOr(){let e=this.logicalAnd();if(this.check(t.OR)){this.incrDepth();try{const r=new p(this.peek(),[e]);for(e=r;this.match(t.OR);){const e=this.logicalAnd();r.args.push(e)}}finally{this.decrDepth()}}return e}logicalAnd(){let e=this.equality();if(this.check(t.AND)){this.incrDepth();try{const r=new p(this.peek(),[e]);for(e=r;this.match(t.AND);){const e=this.equality();r.args.push(e)}}finally{this.decrDepth()}}return e}equality(){let e=this.comparison();for(;this.match(t.BANG_EQUAL,t.EQUAL_EQUAL);){const t=this.previous(),r=this.comparison();e=new l(e,t,r)}return e}comparison(){let e=this.unary();for(;this.match(t.GREATER,t.GREATER_EQUAL,t.LESS,t.LESS_EQUAL);){const t=this.previous(),r=this.unary();e=new l(e,t,r)}return e}unary(){if(this.match(t.BANG)){this.incrDepth();const e=this.previous(),t=this.unary();try{return new o(e,t)}finally{this.decrDepth()}}return this.index()}index(){let e=this.call(),r=0;if(e instanceof m||e instanceof u||e instanceof d){let n=!0;for(;n;)switch(!0){case this.match(t.LEFT_BRACKET):{let n;n=this.match(t.STAR)?new c:this.expression(),this.consume(t.RIGHT_BRACKET,A.ErrorUnexpectedSymbol),this.incrDepth(),r++,e=new g(e,n);break}case this.match(t.DOT):if(this.incrDepth(),r++,this.match(t.IDENTIFIER)){const t=this.previous();e=new g(e,new a(new v(t.lexeme),t))}else{if(!this.match(t.STAR))throw this.buildError(A.ErrorUnexpectedSymbol,this.peek());e=new g(e,new c)}break;default:n=!1}}for(let e=0;ei.maxArgs)throw new S(A.ErrorTooManyParameters,t)}else if(!e.allowUnknownKeywords)throw new S(A.ErrorUnrecognizedFunction,t)}(this.context,e,r.length),new u(e,r)}primary(){switch(!0){case this.match(t.FALSE):return new a(new b(!1),this.previous());case this.match(t.TRUE):return new a(new b(!0),this.previous());case this.match(t.NULL):return new a(new q,this.previous());case this.match(t.NUMBER):return new a(new R(this.previous().value),this.previous());case this.match(t.STRING):return new a(new v(this.previous().value),this.previous());case this.match(t.LEFT_PAREN):{const e=this.expression();if(this.atEnd())throw this.buildError(A.ErrorUnexpectedEndOfExpression,this.previous());return this.consume(t.RIGHT_PAREN,A.ErrorUnexpectedSymbol),new m(e)}case this.atEnd():throw this.buildError(A.ErrorUnexpectedEndOfExpression,this.previous())}throw this.buildError(A.ErrorUnexpectedSymbol,this.peek())}match(...e){for(const t of e)if(this.check(t))return this.next(),!0;return!1}check(e){return!this.atEnd()&&this.peek().type==e}atEnd(){return this.peek().type==t.EOF}next(){return this.atEnd()||this.offset++,this.previous()}peek(){return this.tokens[this.offset]}previous(){return this.tokens[this.offset-1]}consume(e,t){if(!this.check(e))throw this.buildError(t,this.peek());this.next()}incrDepth(){if(this.depth++,this.depth>50)throw this.buildError(A.ErrorExceededMaxDepth,this.peek())}decrDepth(){this.depth--}buildError(e,t){return new S(e,t)}}function $(e){return _(e)?e.pairs().map((e=>function(e){const t=e.key.toString(),r=t.indexOf("("),n=r>=0&&t.indexOf(")")>=0;return{label:n?t.substring(0,r):t,description:e.description,function:n}}(e))).sort(((e,t)=>e.label.localeCompare(t.label))):[]}function K(t){return t.kind===e.Dictionary&&t instanceof Y}class Y extends h{constructor(...e){super(),this.descriptions=new Map,this.complete=!0;for(const t of e)this.add(t.key,t.value,t.description)}add(e,t,r){void 0===this.get(e)&&(super.add(e,t),r&&this.descriptions.set(e,r))}pairs(){return super.pairs().map((e=>({...e,description:this.descriptions.get(e.key)})))}getDescription(e){return this.descriptions.get(e)}}var Q,V;function X(e){switch(e){case Q.String:return"StringToken";case Q.Sequence:return"SequenceToken";case Q.Mapping:return"MappingToken";case Q.BasicExpression:return"BasicExpressionToken";case Q.InsertExpression:return"InsertExpressionToken";case Q.Boolean:return"BooleanToken";case Q.Number:return"NumberToken";case Q.Null:return"NullToken";default:throw new Error(`Unhandled token type: ${e} ${e}}`)}}!function(e){e[e.String=0]="String",e[e.Sequence=1]="Sequence",e[e.Mapping=2]="Mapping",e[e.BasicExpression=3]="BasicExpression",e[e.InsertExpression=4]="InsertExpression",e[e.Boolean=5]="Boolean",e[e.Number=6]="Number",e[e.Null=7]="Null"}(Q||(Q={}));class J{constructor(e,t){this.index=-1,this.isKey=!1,this.parent=e,this._token=t,this.current=t}moveNext(e){switch(this._token.templateTokenType){case Q.Sequence:{const e=this._token;return++this.indexe.length>0));if(!n||!i||!r)throw new Error(`Invalid file reference: ${e}`);return{repository:i,owner:n,path:s.join("/"),version:r}}class re{constructor(e,t,r,n){this.rawMessage=e,this.prefix=t,this.code=r,this.range=n}get message(){return this.prefix?`${this.prefix}: ${this.rawMessage}`:this.rawMessage}toString(){return this.message}}class ne{constructor(e,t,r){this._fileIds={},this._fileNames=[],this.expressionFunctions=[],this.expressionNamedContexts=[],this.state={},this.errors=e,this.schema=t,this.trace=r}error(e,t,r){const n=e,i=r||n?.range,s=this.getErrorPrefix(n?.file??e,n?.line,n?.col),a=t?.message??String(t),o=new re(a,s,void 0,i);this.errors.add(o),this.trace.error(o.message)}getFileId(e){const t=e.toUpperCase();let r=this._fileIds[t];return void 0===r&&(r=this._fileNames.length+1,this._fileIds[t]=r,this._fileNames.push(e)),r}getFileName(e){return this._fileNames.length>=e?this._fileNames[e-1]:void 0}getFileTable(){return this._fileNames.slice()}getErrorPrefix(e,t,r){const n=void 0!==e?this.getFileName(e):void 0;return n?void 0!==t&&void 0!==r?`${n} (Line: ${t}, Col: ${r})`:n:void 0!==t&&void 0!==r?`(Line: ${t}, Col: ${r})`:""}}class ie{constructor(e,t){this._errors=[],this._maxErrors=e??0,this._maxMessageLength=t??0}get count(){return this._errors.length}add(e){for(let t of Array.isArray(e)?e:[e])(this._maxErrors<=0||this._errors.length0&&t.message.length>this._maxMessageLength&&(t=new re(t.message.substring(0,this._maxMessageLength)+"[...]",t.prefix,t.code,t.range)),this._errors.push(t))}check(e){if(!(this._errors.length<=0))throw e||(e="The template is not valid."),new Error(`${e} ${this._errors.map((e=>e.message)).join(",")}`)}clear(){this._errors=[]}getErrors(){return this._errors.slice()}}class se{constructor(e,t){this.isDefinitionInfo=!0;const r=!0===e?.isDefinitionInfo?e:void 0;if(this._schema=void 0===r?e:r._schema,this.definition="string"==typeof t?this._schema.getDefinition(t):t,this.definition.readerContext.length>0){this.allowedContext=[];const e={};for(const t of r?.allowedContext??[])this.allowedContext.push(t),e[t.toUpperCase()]=!0;for(const t of this.definition.readerContext){const r=t.toUpperCase();e[r]||(this.allowedContext.push(t),e[r]=!0)}}else this.allowedContext=r?.allowedContext??[]}getScalarDefinitions(){return this._schema.getScalarDefinitions(this.definition)}getDefinitionsOfType(e){return this._schema.getDefinitionsOfType(this.definition,e)}}!function(e){e[e.Null=0]="Null",e[e.Boolean=1]="Boolean",e[e.Number=2]="Number",e[e.String=3]="String",e[e.Sequence=4]="Sequence",e[e.Mapping=5]="Mapping",e[e.OneOf=6]="OneOf",e[e.AllowedValues=7]="AllowedValues"}(V||(V={}));const ae="allowed-values",oe="any",ue="boolean",le="boolean-definition",pe="boolean-definition-properties",me="constant",de="context",ge="definition",ce="definitions",ye="description",he="ignore-case",_e="insert",fe="is-expression",be="item-type",qe="loose-key-type",Re="loose-value-type",ve="MAX",we="mapping",Te="mapping-definition",ke="mapping-definition-properties",Pe="mapping-property-value",Ee="non-empty-string",je="null",Ge="null-definition",Ae="null-definition-properties",Se="number",Oe="number-definition",Ie="number-definition-properties",Me="one-of",ze="one-of-definition",De="${{",Le="property-value",xe="properties",Ce="required",Ne="require-non-empty",Ue="sequence",Fe="sequence-definition",Be="sequence-definition-properties",We="type",He="sequence-of-non-empty-string",$e="string",Ke="string-definition",Ye="string-definition-properties",Qe="template-schema",Ve="version";class Xe{constructor(e,t){if(this.readerContext=[],this.evaluatorContext=[],this.key=e,t)for(let e=0;e0?t.substr(0,s+1)+")":t,o=a.toUpperCase();if(i[o])throw new Error(`Duplicate context item '${a}'`);i[o]=!0,this.evaluatorContext.push(a)}break}case ye:{const r=t.get(e).value;this.description=r.assertString(ye).value,t.remove(e);break}default:e++}}}class Je extends Xe{constructor(e,t){super(e,t)}}class Ze extends Je{constructor(e,t){if(super(e,t),this.constant="",this.ignoreCase=!1,this.requireNonEmpty=!1,this.isExpression=!1,t)for(const e of t){const t=e.key.assertString(`${ge} key`);switch(t.value){case $e:{const t=e.value.assertMapping(`${ge} ${$e}`);for(const e of t){const t=e.key.assertString(`${ge} ${$e} key`);switch(t.value){case me:{const t=e.value.assertString(`${ge} ${$e} ${me}`);this.constant=t.value;break}case he:{const t=e.value.assertBoolean(`${ge} ${$e} ${he}`);this.ignoreCase=t.value;break}case Ne:{const t=e.value.assertBoolean(`${ge} ${$e} ${Ne}`);this.requireNonEmpty=t.value;break}case fe:{const t=e.value.assertBoolean(`${ge} ${$e} ${fe}`);this.isExpression=t.value;break}default:t.assertUnexpectedValue(`${ge} ${$e} key`)}}break}default:t.assertUnexpectedValue(`${ge} key`)}}}get definitionType(){return V.String}isMatch(e){if(e.templateTokenType===Q.String){const t=e.value;return this.constant?this.ignoreCase?this.constant.toUpperCase()===t.toUpperCase():this.constant===t:!this.requireNonEmpty||!!t}return!1}validate(){if(this.constant&&this.requireNonEmpty)throw new Error(`Properties '${me}' and '${Ne}' cannot both be set`)}}class et extends ee{constructor(e,t,r,n){super(e,t,r,n)}get isScalar(){return!0}static trimDisplayString(e){let t=e.trimStart();const r=t.indexOf("\n"),n=t.indexOf("\r");return(r>=0||n>=0)&&(t=t.substr(0,Math.min(r>=0?r:Number.MAX_VALUE,n>=0?n:Number.MAX_VALUE))),t}}class tt extends et{constructor(e,t,r,n){super(e,t,r,n)}get isLiteral(){return!0}get isExpression(){return!1}toDisplayString(){return et.trimDisplayString(this.toString())}assertUnexpectedValue(e){throw new Error(`Error while reading '${e}'. Unexpected value '${this.toString()}'`)}}class rt extends tt{constructor(e,t,r,n,i){super(Q.String,e,t,n),this.value=r,this.source=i}clone(e){return e?new rt(void 0,void 0,this.value,this.definitionInfo,this.source):new rt(this.file,this.range,this.value,this.definitionInfo,this.source)}toString(){return this.value}toJSON(){return this.value}}class nt extends tt{constructor(e,t,r,n){super(Q.Number,e,t,n),this.num=r}get value(){return this.num}clone(e){return e?new nt(void 0,void 0,this.num,this.definitionInfo):new nt(this.file,this.range,this.num,this.definitionInfo)}toString(){return`${this.num}`}toJSON(){return this.num}}class it extends tt{constructor(e,t,r,n){super(Q.Boolean,e,t,n),this.bool=r}get value(){return this.bool}clone(e){return e?new it(void 0,void 0,this.bool,this.definitionInfo):new it(this.file,this.range,this.bool,this.definitionInfo)}toString(){return this.bool?"true":"false"}toJSON(){return this.bool}}class st extends tt{constructor(e,t,r){super(Q.Null,e,t,r)}clone(e){return e?new st(void 0,void 0,this.definitionInfo):new st(this.file,this.range,this.definitionInfo)}toString(){return""}toJSON(){return null}}class at{constructor(e,t){this.key=e,this.value=t}}class ot extends ee{constructor(e,t,r){super(Q.Sequence,e,t,r),this.seq=[]}get count(){return this.seq.length}get isScalar(){return!1}get isLiteral(){return!1}get isExpression(){return!1}add(e){this.seq.push(e)}get(e){return this.seq[e]}clone(e){const t=e?new ot(void 0,void 0,this.definitionInfo):new ot(this.file,this.range,this.definitionInfo);for(const r of this.seq)t.add(r.clone(e));return t}toJSON(){return{type:Q.Sequence,seq:this.seq}}*[Symbol.iterator](){for(const e of this.seq)yield e}}class ut extends ee{constructor(e,t,r){super(Q.Mapping,e,t,r),this.map=[]}get count(){return this.map.length}get isScalar(){return!1}get isLiteral(){return!1}get isExpression(){return!1}add(e,t){this.map.push(new at(e,t))}get(e){return this.map[e]}find(e){const t=this.map.find((t=>t.key.toString()===e));return t?.value}remove(e){this.map.splice(e,1)}clone(e){const t=e?new ut(void 0,void 0,this.definitionInfo):new ut(this.file,this.range,this.definitionInfo);for(const r of this.map)t.add(r.key.clone(e),r.value.clone(e));return t}toJSON(){const e=[];for(const t of this.map)e.push({Key:t.key,Value:t.value});return{type:Q.Mapping,map:e}}*[Symbol.iterator](){for(const e of this.map)yield e}}function lt(e){const t=/^([a-zA-Z0-9_]+)\(([0-9]+),([0-9]+|MAX)\)$/,r=[],n=[];if(e.length>0)for(const i of e){const e=i.match(t);if(e){const t=e[1],r=Number.parseInt(e[2]),i=e[3],s=i===ve?Number.MAX_SAFE_INTEGER:Number.parseInt(i);n.push({name:t,minArgs:r,maxArgs:s})}else r.push(i)}return{namedContexts:r,functions:n}}class pt extends et{constructor(e,t,r,n,i){super(e,t,r,i),this.directive=n}get isLiteral(){return!1}get isExpression(){return!0}static validateExpression(e,t){const{namedContexts:r,functions:n}=lt(t),i=new P(e).lex();new H(i.tokens,r,n).parse()}}class mt extends pt{constructor(e,t,r,n,i,s,a){super(Q.BasicExpression,e,t,void 0,n),this.expr=r,this.source=s,this.originalExpressions=i,this.expressionRange=a}get expression(){return this.expr}clone(e){return e?new mt(void 0,void 0,this.expr,this.definitionInfo,this.originalExpressions,this.source,this.expressionRange):new mt(this.file,this.range,this.expr,this.definitionInfo,this.originalExpressions,this.source,this.expressionRange)}toString(){return`${De} ${this.expr} }}`}toDisplayString(){return et.trimDisplayString(this.toString())}toJSON(){return{type:Q.BasicExpression,expr:this.expr}}}class dt extends pt{constructor(e,t,r){super(Q.InsertExpression,e,t,_e,r)}clone(e){return e?new dt(void 0,void 0,this.definitionInfo):new dt(this.file,this.range,this.definitionInfo)}toString(){return`${De} ${_e} }}`}toDisplayString(){return et.trimDisplayString(this.toString())}toJSON(){return{type:Q.InsertExpression,expr:"insert"}}}function gt(e){return e.isLiteral}function ct(e){return e.isScalar}function yt(e){return gt(e)&&e.templateTokenType===Q.String}function ht(e){return ct(e)&&e.templateTokenType===Q.BasicExpression}function _t(e){return e instanceof ot}function ft(e){return e instanceof ut}const bt=/\s/;function qt(e,t,r,n){const i=new Rt(e,r,n);let s;try{r.validateStart();const n=new se(e.schema,t);s=i.readValue(n),r.validateEnd()}catch(t){e.error(n,t)}return s}class Rt{constructor(e,t,r){this._context=e,this._schema=e.schema,this._objectReader=t,this._fileId=r}readValue(e){const t=this._objectReader.allowLiteral();if(t){let r=this.parseScalar(t,e);return r=this.validate(r,e),r}const r=this._objectReader.allowSequenceStart();if(r){const t=e.getDefinitionsOfType(V.Sequence)[0];if(t){const n=new se(e,t.itemType);for(;!this._objectReader.allowSequenceEnd();){const e=this.readValue(n);r.add(e)}}else for(this._context.error(r,"A sequence was not expected");!this._objectReader.allowSequenceEnd();)this.skipValue();return r.definitionInfo=e,r}const n=this._objectReader.allowMappingStart();if(n){const t=e.getDefinitionsOfType(V.Mapping);if(t.length>0)if(t.length>1||Object.keys(t[0].properties).length>0||!t[0].looseKeyType)this.handleMappingWithWellKnownProperties(e,t,n);else{const r=new se(e,t[0].looseKeyType),i=new se(e,t[0].looseValueType);this.handleMappingWithAllLooseProperties(e,r,i,t[0],n)}else for(this._context.error(n,"A mapping was not expected");!this._objectReader.allowMappingEnd();)this.skipValue(),this.skipValue();return n.definitionInfo||(n.definitionInfo=e),n}throw new Error("Expected a scalar value, a sequence, or a mapping")}handleMappingWithWellKnownProperties(e,t,r){let n,i,s,a;t[0].looseKeyType&&(n=t[0].looseKeyType,i=t[0].looseValueType);const o={};let u,l=!1;for(;u=this._objectReader.allowLiteral();){const p=this.parseScalar(u,e);if(p.isExpression){if(l=!0,e.allowedContext.length>0){const t=new se(e,oe);r.add(p,this.readValue(t))}else this._context.error(p,"A template expression is not allowed in this context"),this.skipValue();continue}const m=p.templateTokenType===Q.String?p:new rt(p.file,p.range,p.toString(),p.definitionInfo);if(m.value){const e=m.value.toUpperCase();if(o[e]){this._context.error(m,`'${m.value}' is already defined`),this.skipValue();continue}o[e]=!0}const d=this._schema.matchPropertyAndFilter(t,m.value);if(d){const t=new se(e,d.type);m.definitionInfo=t,d.description&&(m.description=d.description);const n=this.readValue(t);r.add(m,n)}else if(n){s||(s=new se(e,n),a=new se(e,i)),this.validate(m,s);const o=new se(e,t[0].looseValueType);m.definitionInfo=o;const u=this.readValue(a);r.add(m,u)}else this._context.error(m,`Unexpected value '${m.value}'`),this.skipValue()}if(1===t.length&&(r.definitionInfo=new se(e,t[0])),t.length>1){const e={};for(const r of t)for(const t of Object.keys(r.properties))e[t]=(e[t]??0)+1;const n=[];for(const t of Object.keys(e))1===e[t]&&n.push(t);this._context.error(r,`There's not enough info to determine what you meant. Add one of these properties: ${n.sort().join(", ")}`)}else if(1===t.length&&!l)for(const e of Object.keys(t[0].properties))t[0].properties[e].required&&!o[e.toUpperCase()]&&this._context.error(r,`Required property is missing: ${e}`);this.expectMappingEnd()}handleMappingWithAllLooseProperties(e,t,r,n,i){let s;const a={};let o;for(;o=this._objectReader.allowLiteral();){const u=this.parseScalar(o,e);if(u.definitionInfo=t,u.isExpression){e.allowedContext.length>0?(s=this.readValue(r),i.add(u,s)):(this._context.error(u,"A template expression is not allowed in this context"),this.skipValue());continue}const l=u.templateTokenType===Q.String?u:new rt(u.file,u.range,u.toString(),u.definitionInfo);if(l.value){const e=l.value.toUpperCase();if(a[e]){this._context.error(l,`'${l.value}' is already defined`),this.skipValue();continue}a[e]=!0}this.validate(l,t);const p=new se(e,n.looseValueType);l.definitionInfo=p,s=this.readValue(r),i.add(l,s)}this.expectMappingEnd()}expectMappingEnd(){if(!this._objectReader.allowMappingEnd())throw new Error("Expected mapping end")}skipValue(){if(this._objectReader.allowLiteral());else if(this._objectReader.allowSequenceStart())for(;!this._objectReader.allowSequenceEnd();)this.skipValue();else{if(!this._objectReader.allowMappingStart())throw new Error("Expected a scalar value, a sequence, or a mapping");for(;!this._objectReader.allowMappingEnd();)this.skipValue(),this.skipValue()}}validate(e,t){switch(e.templateTokenType){case Q.Null:case Q.Boolean:case Q.Number:case Q.String:{const r=e,n=t.getScalarDefinitions();let i;if(i=n.find((e=>e.isMatch(r))))return e.definitionInfo=new se(t,i),e;if(r.templateTokenType!==Q.String){const e=new rt(r.file,r.range,r.toString(),r.definitionInfo);if(i=n.find((t=>t.isMatch(e))))return e.definitionInfo=new se(t,i),e}return this._context.error(r,`Unexpected value '${r.toString()}'`),e}case Q.BasicExpression:return 0===t.allowedContext.length&&this._context.error(e,"A template expression is not allowed in this context"),e;default:return this._context.error(e,`Unexpected value '${e.toString()}'`),e}}parseScalar(e,t){if(!yt(e)||!e.value)return e;const r=t.allowedContext,n=e.source||e.value;let i=n.indexOf(De);if(i<0){if(t.definition instanceof Ze&&t.definition.isExpression){const i=this.parseIntoExpressionToken(e.range,n,r,e,t);if(i)return i}return e}let s=!1;const a=[];let o=0;for(;o0&&e[e.length-1].templateTokenType===Q.String){const i=e[e.length-1];e[e.length-1]=new rt(this._fileId,t,`${i.value}${r}`,n)}else e.push(new rt(this._fileId,t,r,n))}matchDirective(e,t,r){const n=[];if(e.startsWith(t)&&(e.length===t.length||bt.test(e[t.length]))){let i=t.length,s=!1,a=0;for(let t=i;t0)throw new Error(`'${t}' is a one-of definition and references another definition that defines context. This is currently not supported.`);switch(d.definitionType){case V.Mapping:{const e=d;n.push(e),e.looseKeyType&&(r=!0);break}case V.Sequence:if(s)throw new Error(`'${t}' refers to more than one definition of type '${Ue}'`);s=d;break;case V.Null:if(a)throw new Error(`'${t}' refers to more than one definition of type '${je}'`);a=d;break;case V.Boolean:if(o)throw new Error(`'${t}' refers to more than one definition of type '${ue}'`);o=d;break;case V.Number:if(u)throw new Error(`'${t}' refers to more than one definition of type '${Se}'`);u=d;break;case V.String:{const e=d;if(l.length>0&&(!l[0].constant||!e.constant))throw new Error(`'${t}' refers to more than one 'scalar', but some do not set '${me}'`);l.push(e);break}case V.OneOf:if(i)throw new Error(`'${t}' contains multiple allowed-values definitions`);i=d;break;default:throw new Error(`'${t}' refers to a definition with type '${d.definitionType}'`)}}if(n.length>1){if(r)throw new Error(`'${t}' refers to two mappings and at least one sets '${qe}'. This is not currently supported.`);const e={};for(const r of n)for(const n of Object.keys(r.properties)){const i=r.properties[n],s=e[n];if(s){if(s.type===i.type)continue;throw new Error(`'${t}' contains two mappings with the same property, but each refers to a different type. All matching properties must refer to the same type.`)}e[n]=i}}}}class It extends Xe{constructor(e,t){if(super(e,t),this.itemType="",t)for(const e of t){const t=e.key.assertString(`${ge} key`);switch(t.value){case Ue:{const t=e.value.assertMapping(`${ge} ${Ue}`);for(const e of t){const t=e.key.assertString(`${ge} ${Ue} key`);switch(t.value){case be:{const t=e.value.assertString(`${ge} ${Ue} ${be}`);this.itemType=t.value;break}default:t.assertUnexpectedValue(`${ge} ${Ue} key`)}}break}default:t.assertUnexpectedValue(`${ge} key`)}}}get definitionType(){return V.Sequence}validate(e,t){if(!this.itemType)throw new Error(`'${t}' does not defined '${be}'`);e.getDefinition(this.itemType)}}class Mt{constructor(e){this.definitions={},this.version="",this.definitions[je]=new At(je),this.definitions[ue]=new Et(ue),this.definitions[Se]=new St(Se),this.definitions[$e]=new Ze($e);const t=new It(Ue);t.itemType=oe,this.definitions[t.key]=t;const r=new Gt(we);r.looseKeyType=$e,r.looseValueType=oe,this.definitions[r.key]=r;const n=new Ot(oe);if(n.oneOf.push(je),n.oneOf.push(ue),n.oneOf.push(Se),n.oneOf.push($e),n.oneOf.push(Ue),n.oneOf.push(we),this.definitions[n.key]=n,e)for(const t of e){const e=t.key.assertString(`${Qe} key`);switch(e.value){case Ve:this.version=t.value.assertString(`${Qe} ${Ve}`).value;break;case ce:{const e=t.value.assertMapping(`${Qe} ${ce}`);for(const t of e){const e=t.key.assertString(`${Qe} ${ce} key`),r=t.value.assertMapping(`${Qe} ${ce} value`);let n;for(const i of r){const s=i.key.assertString(`${ge} key`),a=t.value;switch(s.value){case je:n=new At(e.value,r);break;case ue:n=new Et(e.value,r);break;case Se:n=new St(e.value,r);break;case $e:n=new Ze(e.value,r);break;case Ue:n=new It(e.value,r);break;case we:n=new Gt(e.value,r);break;case Me:n=new Ot(e.value,r);break;case ae:for(const t of a)if(t.value.templateTokenType===Q.Sequence){const r=t.value;for(const t of r)if(t.templateTokenType===Q.String){const r=t,n=e.value+"-"+r.value,i=new Ze(n);i.constant=r.toDisplayString(),this.definitions[n]=i}}n=new Ot(e.value,r);break;case de:case ye:continue;default:s.assertUnexpectedValue(`${ge} mapping key`)}break}if(!n)throw new Error(`Not enough information to construct definition '${e.value}'`);this.definitions[e.value]=n}break}default:e.assertUnexpectedValue(`${Qe} key`)}}}getDefinition(e){const t=this.definitions[e];if(t)return t;throw new Error(`Schema definition '${e}' not found`)}getScalarDefinitions(e){const t=[];switch(e.definitionType){case V.Null:case V.Boolean:case V.Number:case V.String:t.push(e);break;case V.OneOf:{const r=e;for(const e of r.oneOf){const r=this.getDefinition(e);t.push(...this.getScalarDefinitions(r))}break}}return t}getDefinitionsOfType(e,t){const r=[];if(e.definitionType===t)r.push(e);else if(e.definitionType===V.OneOf){const n=e;for(const e of n.oneOf){const n=this.getDefinition(e);n.definitionType===t&&r.push(n)}}return r}matchPropertyAndFilter(e,t){let r,n=!1;for(const i of e){const e=i.properties[t];e?r=e:n=!0}if(r&&n)for(let r=0;r` is a map of the input\'s metadata. The `` must be a unique identifier within the outputs object and must start with a letter or _ and contain only alphanumeric characters, -, or _."},"workflow-call-output-definition":{"mapping":{"properties":{"description":{"type":"string","description":"A string description of the output parameter."},"value":{"type":"workflow-output-context","required":true}}}},"workflow-output-context":{"description":"The value to assign to the output parameter.","context":["github","inputs","vars","jobs"],"string":{}},"workflow-dispatch-string":{"description":"The `workflow_dispatch` event allows you to manually trigger a workflow run. A workflow can be manually triggered using the GitHub API, GitHub CLI, or GitHub browser interface.","string":{"constant":"workflow_dispatch"}},"workflow-dispatch":{"description":"The `workflow_dispatch` event allows you to manually trigger a workflow run. A workflow can be manually triggered using the GitHub API, GitHub CLI, or GitHub browser interface.","one-of":["null","workflow-dispatch-mapping"]},"workflow-dispatch-mapping":{"mapping":{"properties":{"inputs":"workflow-dispatch-inputs"}}},"workflow-dispatch-inputs":{"description":"You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the `ref` and any `inputs`. When the workflow runs, you can access the input values in the `inputs` context.","mapping":{"loose-key-type":"workflow-dispatch-input-name","loose-value-type":"workflow-dispatch-input"}},"workflow-dispatch-input-name":{"string":{"require-non-empty":true},"description":"A string identifier to associate with the input. The value of is a map of the input\'s metadata. The must be a unique identifier within the inputs object. The must start with a letter or _ and contain only alphanumeric characters, -, or _."},"workflow-dispatch-input":{"mapping":{"properties":{"description":{"type":"string","description":"A string description of the input parameter."},"type":{"type":"workflow-dispatch-input-type"},"required":{"type":"boolean","description":"A boolean to indicate whether the workflow requires the input parameter. Set to true when the parameter is required."},"default":"workflow-dispatch-input-default","options":{"type":"sequence-of-non-empty-string","description":"The options of the dropdown list, if the type is a choice."}}}},"workflow-dispatch-input-type":{"description":"A string representing the type of the input. This must be one of: `boolean`, `number`, `string`, `choice`, or `environment`.","one-of":["input-type-string","input-type-boolean","input-type-number","input-type-environment","input-type-choice"]},"workflow-dispatch-input-default":{"description":"The default value is used when an input parameter isn\'t specified in a workflow file.","one-of":["string","boolean","number"]},"permissions":{"description":"You can use `permissions` to modify the default permissions granted to the `GITHUB_TOKEN`, adding or removing access as required, so that you only allow the minimum required access.\\n\\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#permissions)","one-of":["permissions-mapping","permission-level-shorthand-read-all","permission-level-shorthand-write-all"]},"permissions-mapping":{"mapping":{"properties":{"actions":{"type":"permission-level-any","description":"Actions workflows, workflow runs, and artifacts."},"attestations":{"type":"permission-level-any","description":"Artifact attestations."},"checks":{"type":"permission-level-any","description":"Check runs and check suites."},"contents":{"type":"permission-level-any","description":"Repository contents, commits, branches, downloads, releases, and merges."},"deployments":{"type":"permission-level-any","description":"Deployments and deployment statuses."},"discussions":{"type":"permission-level-any","description":"Discussions and related comments and labels."},"id-token":{"type":"permission-level-write-or-no-access","description":"Token to request an OpenID Connect token."},"issues":{"type":"permission-level-any","description":"Issues and related comments, assignees, labels, and milestones."},"packages":{"type":"permission-level-any","description":"Packages published to the GitHub Package Platform."},"pages":{"type":"permission-level-any","description":"Retrieve Pages statuses, configuration, and builds, as well as create new builds."},"pull-requests":{"type":"permission-level-any","description":"Pull requests and related comments, assignees, labels, milestones, and merges."},"repository-projects":{"type":"permission-level-any","description":"Classic projects within a repository."},"security-events":{"type":"permission-level-any","description":"Code scanning and Dependabot alerts."},"statuses":{"type":"permission-level-any","description":"Commit statuses."}}}},"permission-level-any":{"description":"The permission level for the `GITHUB_TOKEN`.","one-of":["permission-level-read","permission-level-write","permission-level-no-access"]},"permission-level-read-or-no-access":{"one-of":["permission-level-read","permission-level-no-access"]},"permission-level-write-or-no-access":{"one-of":["permission-level-write","permission-level-no-access"]},"permission-level-read":{"description":"The permission level for the `GITHUB_TOKEN`. Grants `read` permission for the specified scope.","string":{"constant":"read"}},"permission-level-write":{"description":"The permission level for the `GITHUB_TOKEN`. Grants `write` permission for the specified scope.","string":{"constant":"write"}},"permission-level-no-access":{"description":"The permission level for the `GITHUB_TOKEN`. Restricts all access for the specified scope.","string":{"constant":"none"}},"permission-level-shorthand-read-all":{"description":"The permission level for the `GITHUB_TOKEN`. Grants `read` access for all scopes.","string":{"constant":"read-all"}},"permission-level-shorthand-write-all":{"description":"The permission level for the `GITHUB_TOKEN`. Grants `write` access for all scopes.","string":{"constant":"write-all"}},"workflow-defaults":{"description":"Use `defaults` to create a map of default settings that will apply to all jobs in the workflow. You can also set default settings that are only available to a job.\\n\\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#defaults)","mapping":{"properties":{"run":"workflow-defaults-run"}}},"workflow-defaults-run":{"mapping":{"properties":{"shell":"shell","working-directory":"working-directory"}}},"workflow-env":{"description":"A map of environment variables that are available to the steps of all jobs in the workflow. You can also set environment variables that are only available to the steps of a single job or to a single step.\\n\\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#env)","context":["github","inputs","vars","secrets"],"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"string"}},"jobs":{"description":"A workflow run is made up of one or more `jobs`, which run in parallel by default. To run jobs sequentially, you can define dependencies on other jobs using the `jobs..needs` keyword. Each job runs in a runner environment specified by `runs-on`.\\n\\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#jobs)","mapping":{"loose-key-type":"job-id","loose-value-type":"job"}},"job-id":{"string":{"require-non-empty":true},"description":"A unique identifier for the job. The identifier must start with a letter or _ and contain only alphanumeric characters, -, or _."},"job":{"description":"Each job must have an id to associate with the job. The key `job_id` is a string and its value is a map of the job\'s configuration data. You must replace `` with a string that is unique to the jobs object. The `` must start with a letter or _ and contain only alphanumeric characters, -, or _.","one-of":["job-factory","workflow-job"]},"job-factory":{"mapping":{"properties":{"needs":"needs","if":"job-if","strategy":"strategy","name":{"type":"string-strategy-context","description":"The name of the job displayed on GitHub."},"runs-on":{"type":"runs-on","required":true},"timeout-minutes":{"type":"number-strategy-context","description":"The maximum number of minutes to let a workflow run before GitHub automatically cancels it. Default: 360"},"cancel-timeout-minutes":"number-strategy-context","continue-on-error":{"type":"boolean-strategy-context","description":"Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails."},"container":"container","services":"services","env":"job-env","environment":"job-environment","permissions":"permissions","concurrency":"job-concurrency","outputs":"job-outputs","defaults":"job-defaults","steps":"steps"}}},"workflow-job":{"mapping":{"properties":{"name":{"type":"string-strategy-context","description":"The name of the job displayed on GitHub."},"uses":{"description":"The location and version of a reusable workflow file to run as a job. Use one of the following formats:\\n\\n* `{owner}/{repo}/.github/workflows/{filename}@{ref}` for reusable workflows in public and private repositories.\\n* `./.github/workflows/{filename}` for reusable workflows in the same repository.\\n\\n{ref} can be a SHA, a release tag, or a branch name. Using the commit SHA is the safest for stability and security.","type":"non-empty-string","required":true},"with":"workflow-job-with","secrets":"workflow-job-secrets","needs":"needs","if":"job-if","permissions":"permissions","concurrency":"job-concurrency","strategy":"strategy"}}},"workflow-job-with":{"description":"When a job is used to call a reusable workflow, you can use `with` to provide a map of inputs that are passed to the called workflow.\\n\\nAny inputs that you pass must match the input specifications defined in the called workflow.","mapping":{"loose-key-type":"non-empty-string","loose-value-type":"scalar-needs-context"}},"workflow-job-secrets":{"description":"When a job is used to call a reusable workflow, you can use `secrets` to provide a map of secrets that are passed to the called workflow.\\n\\nAny secrets that you pass must match the names defined in the called workflow.","one-of":["workflow-job-secrets-mapping","workflow-job-secrets-inherit"]},"workflow-job-secrets-mapping":{"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"scalar-needs-context-with-secrets"}},"workflow-job-secrets-inherit":{"string":{"constant":"inherit"}},"needs":{"description":"Use `needs` to identify any jobs that must complete successfully before this job will run. It can be a string or array of strings. If a job fails, all jobs that need it are skipped unless the jobs use a conditional expression that causes the job to continue. If a run contains a series of jobs that need each other, a failure applies to all jobs in the dependency chain from the point of failure onwards.","one-of":["sequence-of-non-empty-string","non-empty-string"]},"job-if":{"description":"You can use the `if` conditional to prevent a job from running unless a condition is met. You can use any supported context and expression to create a conditional.","context":["github","inputs","vars","needs","always(0,0)","failure(0,MAX)","cancelled(0,0)","success(0,MAX)"],"string":{"is-expression":true}},"job-if-result":{"context":["github","inputs","vars","needs","always(0,0)","failure(0,MAX)","cancelled(0,0)","success(0,MAX)"],"one-of":["null","boolean","number","string","sequence","mapping"]},"strategy":{"description":"Use `strategy` to use a matrix strategy for your jobs. A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based on the combinations of the variables. ","context":["github","inputs","vars","needs"],"mapping":{"properties":{"fail-fast":{"type":"boolean","description":"Setting `fail-fast` to `false` prevents GitHub from canceling all in-progress jobs if any matrix job fails. Default: `true`"},"max-parallel":{"type":"number","description":"The maximum number of jobs that can run simultaneously when using a matrix job strategy. By default, GitHub will maximize the number of jobs run in parallel depending on runner availability."},"matrix":"matrix"}}},"matrix":{"description":"Use `matrix` to define a matrix of different job configurations. Within your matrix, define one or more variables followed by an array of values.","mapping":{"properties":{"include":{"type":"matrix-filter","description":"Use `include` to expand existing matrix configurations or to add new configurations. The value of `include` is a list of objects.\\n\\nFor each object in the `include` list, the key:value pairs in the object will be added to each of the matrix combinations if none of the key:value pairs overwrite any of the original matrix values. If the object cannot be added to any of the matrix combinations, a new matrix combination will be created instead. Note that the original matrix values will not be overwritten, but added matrix values can be overwritten."},"exclude":{"type":"matrix-filter","description":"To remove specific configurations defined in the matrix, use `exclude`. An excluded configuration only has to be a partial match for it to be excluded."}},"loose-key-type":"non-empty-string","loose-value-type":"sequence"}},"matrix-filter":{"sequence":{"item-type":"matrix-filter-item"}},"matrix-filter-item":{"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"any"}},"runs-on":{"description":"Use `runs-on` to define the type of machine to run the job on.\\n* The destination machine can be either a GitHub-hosted runner, larger runner, or a self-hosted runner.\\n* You can target runners based on the labels assigned to them, or their group membership, or a combination of these.\\n* You can provide `runs-on` as a single string or as an array of strings.\\n* If you specify an array of strings, your workflow will execute on any runner that matches all of the specified `runs-on` values.\\n* If you would like to run your workflow on multiple machines, use `jobs..strategy`.","context":["github","inputs","vars","needs","strategy","matrix"],"one-of":["non-empty-string","sequence-of-non-empty-string","runs-on-mapping"]},"runs-on-mapping":{"mapping":{"properties":{"group":{"description":"The group from which to select a runner.","type":"non-empty-string"},"labels":"runs-on-labels"}}},"runs-on-labels":{"description":"The label by which to filter for available runners.","one-of":["non-empty-string","sequence-of-non-empty-string"]},"job-env":{"description":"A map of variables that are available to all steps in the job.","context":["github","inputs","vars","needs","strategy","matrix","secrets"],"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"string"}},"workflow-concurrency":{"description":"Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression.\\n\\nYou can also specify `concurrency` at the job level.\\n\\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)","context":["github","inputs","vars"],"one-of":["string","concurrency-mapping"]},"job-concurrency":{"description":"Concurrency ensures that only a single job using the same concurrency group will run at a time. A concurrency group can be any string or expression. The expression can use any context except for the `secrets` context.\\n\\nYou can also specify `concurrency` at the workflow level.","context":["github","inputs","vars","needs","strategy","matrix"],"one-of":["non-empty-string","concurrency-mapping"]},"concurrency-mapping":{"description":"Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time. A concurrency group can be any string or expression.\\n\\nYou can also specify `concurrency` at the job level.\\n\\n[Documentation](https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#concurrency)","mapping":{"properties":{"group":{"type":"non-empty-string","required":true,"description":"When a concurrent job or workflow is queued, if another job or workflow using the same concurrency group in the repository is in progress, the queued job or workflow will be `pending`. Any previously pending job or workflow in the concurrency group will be canceled. To also cancel any currently running job or workflow in the same concurrency group, specify `cancel-in-progress: true`."},"cancel-in-progress":{"type":"boolean","description":"To cancel any currently running job or workflow in the same concurrency group, specify cancel-in-progress: true."}}}},"job-environment":{"description":"The environment that the job references. All environment protection rules must pass before a job referencing the environment is sent to a runner.","context":["github","inputs","vars","needs","strategy","matrix"],"one-of":["string","job-environment-mapping"]},"job-environment-mapping":{"mapping":{"properties":{"name":{"type":"job-environment-name","required":true},"url":{"type":"string-runner-context-no-secrets","description":"The environment URL, which maps to `environment_url` in the deployments API."}}}},"job-environment-name":{"description":"The name of the environment used by the job.","context":["github","inputs","vars","needs","strategy","matrix"],"string":{}},"job-defaults":{"description":"A map of default settings that will apply to all steps in the job. You can also set default settings for the entire workflow.","mapping":{"properties":{"run":"job-defaults-run"}}},"job-defaults-run":{"context":["github","inputs","vars","strategy","matrix","needs","env"],"mapping":{"properties":{"shell":"shell","working-directory":"working-directory"}}},"job-outputs":{"description":"A map of outputs for a called workflow. Called workflow outputs are available to all downstream jobs in the caller workflow. Each output has an identifier, an optional `description,` and a `value`. The `value` must be set to the value of an output from a job within the called workflow.","mapping":{"loose-key-type":"non-empty-string","loose-value-type":"string-runner-context"}},"steps":{"description":"A job contains a sequence of tasks called `steps`. Steps can run commands, run setup tasks, or run an action in your repository, a public repository, or an action published in a Docker registry. Not all steps run actions, but all actions run as a step. Each step runs in its own process in the runner environment and has access to the workspace and filesystem. Because steps run in their own process, changes to environment variables are not preserved between steps. GitHub provides built-in steps to set up and complete a job. Must contain either `uses` or `run`.","sequence":{"item-type":"steps-item"}},"steps-item":{"one-of":["run-step","regular-step"]},"run-step":{"mapping":{"properties":{"name":"step-name","id":"step-id","if":"step-if","timeout-minutes":"step-timeout-minutes","run":{"type":"string-steps-context","description":"Runs command-line programs using the operating system\'s shell. If you do not provide a `name`, the step name will default to the text specified in the `run` command. Commands run using non-login shells by default. You can choose a different shell and customize the shell used to run commands. Each `run` keyword represents a new process and shell in the virtual environment. When you provide multi-line commands, each line runs in the same shell.","required":true},"continue-on-error":"step-continue-on-error","env":"step-env","working-directory":"string-steps-context","shell":"shell"}}},"regular-step":{"mapping":{"properties":{"name":"step-name","id":"step-id","if":"step-if","continue-on-error":"step-continue-on-error","timeout-minutes":"step-timeout-minutes","uses":{"type":"step-uses","required":true},"with":"step-with","env":"step-env"}}},"step-uses":{"description":"Selects an action to run as part of a step in your job. An action is a reusable unit of code. You can use an action defined in the same repository as the workflow, a public repository, or in a published Docker container image.","string":{"require-non-empty":true}},"step-continue-on-error":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"boolean":{},"description":"Prevents a job from failing when a step fails. Set to `true` to allow a job to pass when this step fails."},"step-id":{"string":{"require-non-empty":true},"description":"A unique identifier for the step. You can use the `id` to reference the step in contexts."},"step-if":{"context":["github","inputs","vars","needs","strategy","matrix","steps","job","runner","env","always(0,0)","failure(0,0)","cancelled(0,0)","success(0,0)","hashFiles(1,255)"],"description":"Use the `if` conditional to prevent a step from running unless a condition is met. Any supported context and expression can be used to create a conditional. Expressions in an `if` conditional do not require the bracketed expression syntax. When you use expressions in an `if` conditional, you may omit the expression syntax because GitHub automatically evaluates the `if` conditional as an expression.","string":{"is-expression":true}},"step-if-result":{"context":["github","inputs","vars","strategy","matrix","steps","job","runner","env","always(0,0)","failure(0,0)","cancelled(0,0)","success(0,0)","hashFiles(1,255)"],"one-of":["null","boolean","number","string","sequence","mapping"]},"step-env":{"description":"Sets variables for steps to use in the runner environment. You can also set variables for the entire workflow or a job.","context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"string"}},"step-name":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"string":{},"description":"A name for your step to display on GitHub."},"step-timeout-minutes":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"number":{},"description":"The maximum number of minutes to run the step before killing the process."},"step-with":{"description":"A map of the input parameters defined by the action. Each input parameter is a key/value pair. Input parameters are set as variables. When you specify an input in a workflow file or use a default input value, GitHub creates a variable for the input with the name `INPUT_`. The variable created converts input names to uppercase letters and replaces spaces with `_`.","context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"string"}},"container":{"description":"A container to run any steps in a job that don\'t already specify a container. If you have steps that use both script and container actions, the container actions will run as sibling containers on the same network with the same volume mounts.\\n\\nIf you do not set a container, all steps will run directly on the host specified by runs-on unless a step refers to an action configured to run in a container.","context":["github","inputs","vars","needs","strategy","matrix"],"one-of":["string","container-mapping"]},"container-mapping":{"mapping":{"properties":{"image":{"type":"non-empty-string","description":"Use `jobs..container.image` to define the Docker image to use as the container to run the action. The value can be the Docker Hub image or a registry name."},"options":{"type":"non-empty-string","description":"Use `jobs..container.options` to configure additional Docker container resource options."},"env":"container-env","ports":{"type":"sequence-of-non-empty-string","description":"Use `jobs..container.ports` to set an array of ports to expose on the container."},"volumes":{"type":"sequence-of-non-empty-string","description":"Use `jobs..container.volumes` to set an array of volumes for the container to use. You can use volumes to share data between services or other steps in a job. You can specify named Docker volumes, anonymous Docker volumes, or bind mounts on the host."},"credentials":"container-registry-credentials"}}},"services":{"description":"Additional containers to host services for a job in a workflow. These are useful for creating databases or cache services like redis. The runner on the virtual machine will automatically create a network and manage the life cycle of the service containers. When you use a service container for a job or your step uses container actions, you don\'t need to set port information to access the service. Docker automatically exposes all ports between containers on the same network. When both the job and the action run in a container, you can directly reference the container by its hostname. The hostname is automatically mapped to the service name. When a step does not use a container action, you must access the service using localhost and bind the ports.","context":["github","inputs","vars","needs","strategy","matrix"],"mapping":{"loose-key-type":"non-empty-string","loose-value-type":"services-container"}},"services-container":{"context":["github","inputs","vars","needs","strategy","matrix"],"one-of":["non-empty-string","container-mapping"]},"container-registry-credentials":{"description":"If the image\'s container registry requires authentication to pull the image, you can use `jobs..container.credentials` to set a map of the username and password. The credentials are the same values that you would provide to the `docker login` command.","context":["github","inputs","vars","secrets","env"],"mapping":{"properties":{"username":"non-empty-string","password":"non-empty-string"}}},"container-env":{"description":"Use `jobs..container.env` to set a map of variables in the container.","mapping":{"loose-key-type":"non-empty-string","loose-value-type":"string-runner-context"}},"non-empty-string":{"string":{"require-non-empty":true}},"sequence-of-non-empty-string":{"sequence":{"item-type":"non-empty-string"}},"boolean-needs-context":{"context":["github","inputs","vars","needs"],"boolean":{}},"number-needs-context":{"context":["github","inputs","vars","needs"],"number":{}},"string-needs-context":{"context":["github","inputs","vars","needs"],"string":{}},"scalar-needs-context":{"context":["github","inputs","vars","needs","strategy","matrix"],"one-of":["string","boolean","number"]},"scalar-needs-context-with-secrets":{"context":["github","inputs","vars","needs","secrets","strategy","matrix"],"one-of":["string","boolean","number"]},"boolean-strategy-context":{"context":["github","inputs","vars","needs","strategy","matrix"],"boolean":{}},"number-strategy-context":{"context":["github","inputs","vars","needs","strategy","matrix"],"number":{}},"string-strategy-context":{"context":["github","inputs","vars","needs","strategy","matrix"],"string":{}},"boolean-steps-context":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"boolean":{}},"number-steps-context":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"number":{}},"string-runner-context":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env"],"string":{}},"string-runner-context-no-secrets":{"context":["github","inputs","vars","needs","strategy","matrix","steps","job","runner","env"],"string":{}},"string-steps-context":{"context":["github","inputs","vars","needs","strategy","matrix","secrets","steps","job","runner","env","hashFiles(1,255)"],"string":{}},"shell":{"string":{"require-non-empty":true},"description":"Use `shell` to override the default shell settings in the runner\'s operating system. You can use built-in shell keywords, or you can define a custom set of shell options. The shell command that is run internally executes a temporary file that contains the commands specified in `run`."},"working-directory":{"string":{"require-non-empty":true},"description":"The `working-directory` keyword specifies the working directory where the command is run."},"cron-mapping":{"mapping":{"properties":{"cron":"cron-pattern"}}},"cron-pattern":{"string":{"require-non-empty":true}}}}');let Dt;function Lt(){if(void 0===Dt){const e=JSON.stringify(zt);Dt=Mt.load(new kt(void 0,e))}return Dt}const xt=Symbol.for("yaml.alias"),Ct=Symbol.for("yaml.document"),Nt=Symbol.for("yaml.map"),Ut=Symbol.for("yaml.pair"),Ft=Symbol.for("yaml.scalar"),Bt=Symbol.for("yaml.seq"),Wt=Symbol.for("yaml.node.type"),Ht=e=>!!e&&"object"==typeof e&&e[Wt]===xt,$t=e=>!!e&&"object"==typeof e&&e[Wt]===Ct,Kt=e=>!!e&&"object"==typeof e&&e[Wt]===Nt,Yt=e=>!!e&&"object"==typeof e&&e[Wt]===Ut,Qt=e=>!!e&&"object"==typeof e&&e[Wt]===Ft,Vt=e=>!!e&&"object"==typeof e&&e[Wt]===Bt;function Xt(e){if(e&&"object"==typeof e)switch(e[Wt]){case Nt:case Bt:return!0}return!1}function Jt(e){if(e&&"object"==typeof e)switch(e[Wt]){case xt:case Nt:case Ft:case Bt:return!0}return!1}const Zt=e=>(Qt(e)||Xt(e))&&!!e.anchor,er=Symbol("break visit"),tr=Symbol("skip children"),rr=Symbol("remove node");function nr(e,t){const r=or(t);$t(e)?ir(null,e.contents,r,Object.freeze([e]))===rr&&(e.contents=null):ir(null,e,r,Object.freeze([]))}function ir(e,t,r,n){const i=ur(e,t,r,n);if(Jt(i)||Yt(i))return lr(e,n,i),ir(e,i,r,n);if("symbol"!=typeof i)if(Xt(t)){n=Object.freeze(n.concat(t));for(let e=0;e"!==e[e.length-1]&&t("Verbatim tags must end with a >"),r)}const[,r,n]=e.match(/^(.*!)([^!]*)$/s);n||t(`The ${e} tag has no suffix`);const i=this.tags[r];if(i)try{return i+decodeURIComponent(n)}catch(e){return t(String(e)),null}return"!"===r?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[t,r]of Object.entries(this.tags))if(e.startsWith(r))return t+e.substring(r.length).replace(/[!,[\]{}]/g,(e=>pr[e]));return"!"===e[0]?e:`!<${e}>`}toString(e){const t=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let n;if(e&&r.length>0&&Jt(e.contents)){const t={};nr(e.contents,((e,r)=>{Jt(r)&&r.tag&&(t[r.tag]=!0)})),n=Object.keys(t)}else n=[];for(const[i,s]of r)"!!"===i&&"tag:yaml.org,2002:"===s||e&&!n.some((e=>e.startsWith(s)))||t.push(`%TAG ${i} ${s}`);return t.join("\n")}}function dr(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const t=JSON.stringify(e);throw new Error(`Anchor must not contain whitespace or control characters: ${t}`)}return!0}function gr(e){const t=new Set;return nr(e,{Value(e,r){r.anchor&&t.add(r.anchor)}}),t}function cr(e,t){for(let r=1;;++r){const n=`${e}${r}`;if(!t.has(n))return n}}function yr(e,t,r,n){if(n&&"object"==typeof n)if(Array.isArray(n))for(let t=0,r=n.length;thr(e,String(t),r)));if(e&&"function"==typeof e.toJSON){if(!r||!Zt(e))return e.toJSON(t,r);const n={aliasCount:0,count:1,res:void 0};r.anchors.set(e,n),r.onCreate=e=>{n.res=e,delete r.onCreate};const i=e.toJSON(t,r);return r.onCreate&&r.onCreate(i),i}return"bigint"!=typeof e||r?.keep?e:Number(e)}mr.defaultYaml={explicit:!1,version:"1.2"},mr.defaultTags={"!!":"tag:yaml.org,2002:"};class _r{constructor(e){Object.defineProperty(this,Wt,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:r,onAnchor:n,reviver:i}={}){if(!$t(e))throw new TypeError("A document argument is required");const s={anchors:new Map,doc:e,keep:!0,mapAsMap:!0===t,mapKeyWarned:!1,maxAliasCount:"number"==typeof r?r:100},a=hr(this,"",s);if("function"==typeof n)for(const{count:e,res:t}of s.anchors.values())n(t,e);return"function"==typeof i?yr(i,{"":a},"",a):a}}class fr extends _r{constructor(e){super(xt),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let t;return nr(e,{Node:(e,r)=>{if(r===this)return nr.BREAK;r.anchor===this.source&&(t=r)}}),t}toJSON(e,t){if(!t)return{source:this.source};const{anchors:r,doc:n,maxAliasCount:i}=t,s=this.resolve(n);if(!s){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(e)}let a=r.get(s);if(a||(hr(s,null,t),a=r.get(s)),!a||void 0===a.res)throw new ReferenceError("This should not happen: Alias anchor was not resolved?");if(i>=0&&(a.count+=1,0===a.aliasCount&&(a.aliasCount=br(n,s,r)),a.count*a.aliasCount>i))throw new ReferenceError("Excessive alias count indicates a resource exhaustion attack");return a.res}toString(e,t,r){const n=`*${this.source}`;if(e){if(dr(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(e)}if(e.implicitKey)return`${n} `}return n}}function br(e,t,r){if(Ht(t)){const n=t.resolve(e),i=r&&n&&r.get(n);return i?i.count*i.aliasCount:0}if(Xt(t)){let n=0;for(const i of t.items){const t=br(e,i,r);t>n&&(n=t)}return n}if(Yt(t)){const n=br(e,t.key,r),i=br(e,t.value,r);return Math.max(n,i)}return 1}const qr=e=>!e||"function"!=typeof e&&"object"!=typeof e;class Rr extends _r{constructor(e){super(Ft),this.value=e}toJSON(e,t){return t?.keep?this.value:hr(this.value,e,t)}toString(){return String(this.value)}}Rr.BLOCK_FOLDED="BLOCK_FOLDED",Rr.BLOCK_LITERAL="BLOCK_LITERAL",Rr.PLAIN="PLAIN",Rr.QUOTE_DOUBLE="QUOTE_DOUBLE",Rr.QUOTE_SINGLE="QUOTE_SINGLE";const vr="tag:yaml.org,2002:";function wr(e,t,r){if($t(e)&&(e=e.contents),Jt(e))return e;if(Yt(e)){const t=r.schema[Nt].createNode?.(r.schema,null,r);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||"undefined"!=typeof BigInt&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:n,onAnchor:i,onTagObj:s,schema:a,sourceObjects:o}=r;let u;if(n&&e&&"object"==typeof e){if(u=o.get(e),u)return u.anchor||(u.anchor=i(e)),new fr(u.anchor);u={anchor:null,node:null},o.set(e,u)}t?.startsWith("!!")&&(t=vr+t.slice(2));let l=function(e,t,r){if(t){const e=r.filter((e=>e.tag===t)),n=e.find((e=>!e.format))??e[0];if(!n)throw new Error(`Tag ${t} not found`);return n}return r.find((t=>t.identify?.(e)&&!t.format))}(e,t,a.tags);if(!l){if(e&&"function"==typeof e.toJSON&&(e=e.toJSON()),!e||"object"!=typeof e){const t=new Rr(e);return u&&(u.node=t),t}l=e instanceof Map?a[Nt]:Symbol.iterator in Object(e)?a[Bt]:a[Nt]}s&&(s(l),delete r.onTagObj);const p=l?.createNode?l.createNode(r.schema,e,r):"function"==typeof l?.nodeClass?.from?l.nodeClass.from(r.schema,e,r):new Rr(e);return t?p.tag=t:l.default||(p.tag=l.tag),u&&(u.node=p),p}function Tr(e,t,r){let n=r;for(let e=t.length-1;e>=0;--e){const r=t[e];if("number"==typeof r&&Number.isInteger(r)&&r>=0){const e=[];e[r]=n,n=e}else n=new Map([[r,n]])}return wr(n,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const kr=e=>null==e||"object"==typeof e&&!!e[Symbol.iterator]().next().done;class Pr extends _r{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map((t=>Jt(t)||Yt(t)?t.clone(e):t)),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(kr(e))this.add(t);else{const[r,...n]=e,i=this.get(r,!0);if(Xt(i))i.addIn(n,t);else{if(void 0!==i||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,Tr(this.schema,n,t))}}}deleteIn(e){const[t,...r]=e;if(0===r.length)return this.delete(t);const n=this.get(t,!0);if(Xt(n))return n.deleteIn(r);throw new Error(`Expected YAML collection at ${t}. Remaining path: ${r}`)}getIn(e,t){const[r,...n]=e,i=this.get(r,!0);return 0===n.length?!t&&Qt(i)?i.value:i:Xt(i)?i.getIn(n,t):void 0}hasAllNullValues(e){return this.items.every((t=>{if(!Yt(t))return!1;const r=t.value;return null==r||e&&Qt(r)&&null==r.value&&!r.commentBefore&&!r.comment&&!r.tag}))}hasIn(e){const[t,...r]=e;if(0===r.length)return this.has(t);const n=this.get(t,!0);return!!Xt(n)&&n.hasIn(r)}setIn(e,t){const[r,...n]=e;if(0===n.length)this.set(r,t);else{const e=this.get(r,!0);if(Xt(e))e.setIn(n,t);else{if(void 0!==e||!this.schema)throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`);this.set(r,Tr(this.schema,n,t))}}}}const Er=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function jr(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Gr=(e,t,r)=>e.endsWith("\n")?jr(r,t):r.includes("\n")?"\n"+jr(r,t):(e.endsWith(" ")?"":" ")+r,Ar="flow",Sr="block",Or="quoted";function Ir(e,t,r="flow",{indentAtStart:n,lineWidth:i=80,minContentWidth:s=20,onFold:a,onOverflow:o}={}){if(!i||i<0)return e;ii-Math.max(2,s)?l.push(0):g=i-n);let c=!1,y=-1,h=-1,_=-1;r===Sr&&(y=Mr(e,y,t.length),-1!==y&&(g=y+u));for(let n;n=e[y+=1];){if(r===Or&&"\\"===n){switch(h=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}_=y}if("\n"===n)r===Sr&&(y=Mr(e,y,t.length)),g=y+t.length+u,m=void 0;else{if(" "===n&&d&&" "!==d&&"\n"!==d&&"\t"!==d){const t=e[y+1];t&&" "!==t&&"\n"!==t&&"\t"!==t&&(m=y)}if(y>=g)if(m)l.push(m),g=m+u,m=void 0;else if(r===Or){for(;" "===d||"\t"===d;)d=n,n=e[y+=1],c=!0;const t=y>_+1?y-2:h-1;if(p[t])return e;l.push(t),p[t]=!0,g=t+u,m=void 0}else c=!0}d=n}if(c&&o&&o(),0===l.length)return e;a&&a();let f=e.slice(0,l[0]);for(let n=0;n({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Dr=e=>/^(%|---|\.\.\.)/m.test(e);function Lr(e,t){const r=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return r;const{implicitKey:n}=t,i=t.options.doubleQuotedMinMultiLineLength,s=t.indent||(Dr(e)?" ":"");let a="",o=0;for(let e=0,t=r[e];t;t=r[++e])if(" "===t&&"\\"===r[e+1]&&"n"===r[e+2]&&(a+=r.slice(o,e)+"\\ ",e+=1,o=e,t="\\"),"\\"===t)switch(r[e+1]){case"u":{a+=r.slice(o,e);const t=r.substr(e+2,4);switch(t){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:"00"===t.substr(0,2)?a+="\\x"+t.substr(2):a+=r.substr(e,6)}e+=5,o=e+1}break;case"n":if(n||'"'===r[e+2]||r.lengthn)return!0;if(r=t+1,i-r<=n)return!1}return!0}(r,u,l.length));if(!r)return p?"|\n":">\n";let m,d;for(d=r.length;d>0;--d){const e=r[d-1];if("\n"!==e&&"\t"!==e&&" "!==e)break}let g=r.substring(d);const c=g.indexOf("\n");-1===c?m="-":r===g||c!==g.length-1?(m="+",s&&s()):m="",g&&(r=r.slice(0,-g.length),"\n"===g[g.length-1]&&(g=g.slice(0,-1)),g=g.replace(Nr,`$&${l}`));let y,h=!1,_=-1;for(y=0;y{i=!0});const o=Ir(`${f}${e}${g}`,l,Sr,s);if(!i)return`>${b}\n${l}${o}`}return`|${b}\n${l}${f}${r=r.replace(/\n+/g,`$&${l}`)}${g}`}function Fr(e,t,r,n){const{implicitKey:i,inFlow:s}=t,a="string"==typeof e.value?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==Rr.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=Rr.QUOTE_DOUBLE);const u=e=>{switch(e){case Rr.BLOCK_FOLDED:case Rr.BLOCK_LITERAL:return i||s?Cr(a.value,t):Ur(a,t,r,n);case Rr.QUOTE_DOUBLE:return Lr(a.value,t);case Rr.QUOTE_SINGLE:return xr(a.value,t);case Rr.PLAIN:return function(e,t,r,n){const{type:i,value:s}=e,{actualString:a,implicitKey:o,indent:u,indentStep:l,inFlow:p}=t;if(o&&s.includes("\n")||p&&/[[\]{},]/.test(s))return Cr(s,t);if(!s||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(s))return o||p||!s.includes("\n")?Cr(s,t):Ur(e,t,r,n);if(!o&&!p&&i!==Rr.PLAIN&&s.includes("\n"))return Ur(e,t,r,n);if(Dr(s)){if(""===u)return t.forceBlockIndent=!0,Ur(e,t,r,n);if(o&&u===l)return Cr(s,t)}const m=s.replace(/\n+/g,`$&\n${u}`);if(a){const e=e=>e.default&&"tag:yaml.org,2002:str"!==e.tag&&e.test?.test(m),{compat:r,tags:n}=t.doc.schema;if(n.some(e)||r?.some(e))return Cr(s,t)}return o?m:Ir(m,u,Ar,zr(t,!1))}(a,t,r,n);default:return null}};let l=u(o);if(null===l){const{defaultKeyType:e,defaultStringType:r}=t.options,n=i&&e||r;if(l=u(n),null===l)throw new Error(`Unsupported default string type ${n}`)}return l}function Br(e,t){const r=Object.assign({blockQuote:!0,commentString:Er,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let n;switch(r.collectionStyle){case"block":n=!1;break;case"flow":n=!0;break;default:n=null}return{anchors:new Set,doc:e,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:"number"==typeof r.indent?" ".repeat(r.indent):" ",inFlow:n,options:r}}function Wr(e,t,r,n){if(Yt(e))return e.toString(t,r,n);if(Ht(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i;const s=Jt(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i||(i=function(e,t){if(t.tag){const r=e.filter((e=>e.tag===t.tag));if(r.length>0)return r.find((e=>e.format===t.format))??r[0]}let r,n;if(Qt(t)){n=t.value;let i=e.filter((e=>e.identify?.(n)));if(i.length>1){const e=i.filter((e=>e.test));e.length>0&&(i=e)}r=i.find((e=>e.format===t.format))??i.find((e=>!e.format))}else n=t,r=e.find((e=>e.nodeClass&&n instanceof e.nodeClass));if(!r)throw new Error(`Tag not resolved for ${n?.constructor?.name??typeof n} value`);return r}(t.doc.schema.tags,s));const a=function(e,t,{anchors:r,doc:n}){if(!n.directives)return"";const i=[],s=(Qt(e)||Xt(e))&&e.anchor;s&&dr(s)&&(r.add(s),i.push(`&${s}`));const a=e.tag?e.tag:t.default?null:t.tag;return a&&i.push(n.directives.tagString(a)),i.join(" ")}(s,i,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const o="function"==typeof i.stringify?i.stringify(s,t,r,n):Qt(s)?Fr(s,t,r,n):s.toString(t,r,n);return a?Qt(s)||"{"===o[0]||"["===o[0]?`${a} ${o}`:`${a}\n${t.indent}${o}`:o}function Hr(e,t){"debug"!==e&&"warn"!==e||console.warn(t)}const $r="<<",Kr={identify:e=>e===$r||"symbol"==typeof e&&e.description===$r,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Rr(Symbol($r)),{addToJSMap:Yr}),stringify:()=>$r};function Yr(e,t,r){if(r=e&&Ht(r)?r.resolve(e.doc):r,Vt(r))for(const n of r.items)Qr(e,t,n);else if(Array.isArray(r))for(const n of r)Qr(e,t,n);else Qr(e,t,r)}function Qr(e,t,r){const n=e&&Ht(r)?r.resolve(e.doc):r;if(!Kt(n))throw new Error("Merge sources must be maps or map aliases");const i=n.toJSON(null,e,Map);for(const[e,r]of i)t instanceof Map?t.has(e)||t.set(e,r):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:r,writable:!0,enumerable:!0,configurable:!0});return t}function Vr(e,t,{key:r,value:n}){if(Jt(r)&&r.addToJSMap)r.addToJSMap(e,t,n);else if(((e,t)=>(Kr.identify(t)||Qt(t)&&(!t.type||t.type===Rr.PLAIN)&&Kr.identify(t.value))&&e?.doc.schema.tags.some((e=>e.tag===Kr.tag&&e.default)))(e,r))Yr(e,t,n);else{const i=hr(r,"",e);if(t instanceof Map)t.set(i,hr(n,i,e));else if(t instanceof Set)t.add(i);else{const s=function(e,t,r){if(null===t)return"";if("object"!=typeof t)return String(t);if(Jt(e)&&r?.doc){const t=Br(r.doc,{});t.anchors=new Set;for(const e of r.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;const n=e.toString(t);if(!r.mapKeyWarned){let e=JSON.stringify(n);e.length>40&&(e=e.substring(0,36)+'..."'),Hr(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return n}return JSON.stringify(t)}(r,i,e),a=hr(n,s,e);s in t?Object.defineProperty(t,s,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[s]=a}}return t}function Xr(e,t,r){const n=wr(e,void 0,r),i=wr(t,void 0,r);return new Jr(n,i)}class Jr{constructor(e,t=null){Object.defineProperty(this,Wt,{value:Ut}),this.key=e,this.value=t}clone(e){let{key:t,value:r}=this;return Jt(t)&&(t=t.clone(e)),Jt(r)&&(r=r.clone(e)),new Jr(t,r)}toJSON(e,t){return Vr(t,t?.mapAsMap?new Map:{},this)}toString(e,t,r){return e?.doc?function({key:e,value:t},r,n,i){const{allNullValues:s,doc:a,indent:o,indentStep:u,options:{commentString:l,indentSeq:p,simpleKeys:m}}=r;let d=Jt(e)&&e.comment||null;if(m){if(d)throw new Error("With simple keys, key nodes cannot have comments");if(Xt(e)||!Jt(e)&&"object"==typeof e)throw new Error("With simple keys, collection cannot be used as a key value")}let g=!m&&(!e||d&&null==t&&!r.inFlow||Xt(e)||(Qt(e)?e.type===Rr.BLOCK_FOLDED||e.type===Rr.BLOCK_LITERAL:"object"==typeof e));r=Object.assign({},r,{allNullValues:!1,implicitKey:!g&&(m||!s),indent:o+u});let c,y,h,_=!1,f=!1,b=Wr(e,r,(()=>_=!0),(()=>f=!0));if(!g&&!r.inFlow&&b.length>1024){if(m)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");g=!0}if(r.inFlow){if(s||null==t)return _&&n&&n(),""===b?"?":g?`? ${b}`:b}else if(s&&!m||null==t&&g)return b=`? ${b}`,d&&!_?b+=Gr(b,r.indent,l(d)):f&&i&&i(),b;_&&(d=null),g?(d&&(b+=Gr(b,r.indent,l(d))),b=`? ${b}\n${o}:`):(b=`${b}:`,d&&(b+=Gr(b,r.indent,l(d)))),Jt(t)?(c=!!t.spaceBefore,y=t.commentBefore,h=t.comment):(c=!1,y=null,h=null,t&&"object"==typeof t&&(t=a.createNode(t))),r.implicitKey=!1,g||d||!Qt(t)||(r.indentAtStart=b.length+1),f=!1,p||!(u.length>=2)||r.inFlow||g||!Vt(t)||t.flow||t.tag||t.anchor||(r.indent=r.indent.substring(2));let q=!1;const R=Wr(t,r,(()=>q=!0),(()=>f=!0));let v=" ";if(d||c||y)v=c?"\n":"",y&&(v+=`\n${jr(l(y),r.indent)}`),""!==R||r.inFlow?v+=`\n${r.indent}`:"\n"===v&&(v="\n\n");else if(!g&&Xt(t)){const e=R[0],n=R.indexOf("\n"),i=-1!==n,s=r.inFlow??t.flow??0===t.items.length;if(i||!s){let t=!1;if(i&&("&"===e||"!"===e)){let r=R.indexOf(" ");"&"===e&&-1!==r&&ra=null),(()=>m=!0));a&&(o+=Gr(o,s,l(a))),m&&a&&(m=!1),d.push(n+o)}let g;if(0===d.length)g=i.start+i.end;else{g=d[0];for(let e=1;es=null));rp||a.includes("\n"))&&(l=!0),m.push(a),p=m.length}const{start:d,end:g}=r;if(0===m.length)return d+g;if(!l){const e=m.reduce(((e,t)=>e+t.length+2),2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=d;for(const t of m)e+=t?`\n${s}${i}${t}`:"\n";return`${e}\n${i}${g}`}return`${d}${a}${m.join(" ")}${a}${g}`}function rn({indent:e,options:{commentString:t}},r,n,i){if(n&&i&&(n=n.replace(/^\n+/,"")),n){const i=jr(t(n),e);r.push(i.trimStart())}}function nn(e,t){const r=Qt(t)?t.value:t;for(const n of e)if(Yt(n)){if(n.key===t||n.key===r)return n;if(Qt(n.key)&&n.key.value===r)return n}}class sn extends Pr{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Nt,e),this.items=[]}static from(e,t,r){const{keepUndefined:n,replacer:i}=r,s=new this(e),a=(e,a)=>{if("function"==typeof i)a=i.call(t,e,a);else if(Array.isArray(i)&&!i.includes(e))return;(void 0!==a||n)&&s.items.push(Xr(e,a,r))};if(t instanceof Map)for(const[e,r]of t)a(e,r);else if(t&&"object"==typeof t)for(const e of Object.keys(t))a(e,t[e]);return"function"==typeof e.sortMapEntries&&s.items.sort(e.sortMapEntries),s}add(e,t){let r;r=Yt(e)?e:e&&"object"==typeof e&&"key"in e?new Jr(e.key,e.value):new Jr(e,e?.value);const n=nn(this.items,r.key),i=this.schema?.sortMapEntries;if(n){if(!t)throw new Error(`Key ${r.key} already set`);Qt(n.value)&&qr(r.value)?n.value.value=r.value:n.value=r.value}else if(i){const e=this.items.findIndex((e=>i(r,e)<0));-1===e?this.items.push(r):this.items.splice(e,0,r)}else this.items.push(r)}delete(e){const t=nn(this.items,e);return!!t&&this.items.splice(this.items.indexOf(t),1).length>0}get(e,t){const r=nn(this.items,e),n=r?.value;return(!t&&Qt(n)?n.value:n)??void 0}has(e){return!!nn(this.items,e)}set(e,t){this.add(new Jr(e,t),!0)}toJSON(e,t,r){const n=r?new r:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(n);for(const e of this.items)Vr(t,n,e);return n}toString(e,t,r){if(!e)return JSON.stringify(this);for(const e of this.items)if(!Yt(e))throw new Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Zr(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:t})}}const an={collection:"map",default:!0,nodeClass:sn,tag:"tag:yaml.org,2002:map",resolve:(e,t)=>(Kt(e)||t("Expected a mapping for this tag"),e),createNode:(e,t,r)=>sn.from(e,t,r)};class on extends Pr{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Bt,e),this.items=[]}add(e){this.items.push(e)}delete(e){const t=un(e);return"number"==typeof t&&this.items.splice(t,1).length>0}get(e,t){const r=un(e);if("number"!=typeof r)return;const n=this.items[r];return!t&&Qt(n)?n.value:n}has(e){const t=un(e);return"number"==typeof t&&t=0?t:null}const ln={collection:"seq",default:!0,nodeClass:on,tag:"tag:yaml.org,2002:seq",resolve:(e,t)=>(Vt(e)||t("Expected a sequence for this tag"),e),createNode:(e,t,r)=>on.from(e,t,r)},pn={identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:(e,t,r,n)=>Fr(e,t=Object.assign({actualString:!0},t),r,n)},mn={identify:e=>null==e,createNode:()=>new Rr(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Rr(null),stringify:({source:e},t)=>"string"==typeof e&&mn.test.test(e)?e:t.options.nullStr},dn={identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Rr("t"===e[0]||"T"===e[0]),stringify:({source:e,value:t},r)=>e&&dn.test.test(e)&&t===("t"===e[0]||"T"===e[0])?e:t?r.options.trueStr:r.options.falseStr};function gn({format:e,minFractionDigits:t,tag:r,value:n}){if("bigint"==typeof n)return String(n);const i="number"==typeof n?n:Number(n);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let s=JSON.stringify(n);if(!e&&t&&(!r||"tag:yaml.org,2002:float"===r)&&/^\d/.test(s)){let e=s.indexOf(".");e<0&&(e=s.length,s+=".");let r=t-(s.length-e-1);for(;r-- >0;)s+="0"}return s}const cn={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},yn={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():gn(e)}},hn={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new Rr(parseFloat(e)),r=e.indexOf(".");return-1!==r&&"0"===e[e.length-1]&&(t.minFractionDigits=e.length-r-1),t},stringify:gn},_n=e=>"bigint"==typeof e||Number.isInteger(e),fn=(e,t,r,{intAsBigInt:n})=>n?BigInt(e):parseInt(e.substring(t),r);function bn(e,t,r){const{value:n}=e;return _n(n)&&n>=0?r+n.toString(t):gn(e)}const qn={identify:e=>_n(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,r)=>fn(e,2,8,r),stringify:e=>bn(e,8,"0o")},Rn={identify:_n,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,r)=>fn(e,0,10,r),stringify:gn},vn={identify:e=>_n(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,r)=>fn(e,2,16,r),stringify:e=>bn(e,16,"0x")},wn=[an,ln,pn,mn,dn,qn,Rn,vn,cn,yn,hn];function Tn(e){return"bigint"==typeof e||Number.isInteger(e)}const kn=({value:e})=>JSON.stringify(e),Pn=[an,ln].concat([{identify:e=>"string"==typeof e,default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:kn},{identify:e=>null==e,createNode:()=>new Rr(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:kn},{identify:e=>"boolean"==typeof e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>"true"===e,stringify:kn},{identify:Tn,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:r})=>r?BigInt(e):parseInt(e,10),stringify:({value:e})=>Tn(e)?e.toString():JSON.stringify(e)},{identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:kn}],{default:!0,tag:"",test:/^/,resolve:(e,t)=>(t(`Unresolved plain scalar ${JSON.stringify(e)}`),e)}),En={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if("function"==typeof atob){const t=atob(e.replace(/[\n\r]/g,"")),r=new Uint8Array(t.length);for(let e=0;e1&&t("Each pair must have its own sequence indicator");const e=n.items[0]||new Jr(new Rr(null));if(n.commentBefore&&(e.key.commentBefore=e.key.commentBefore?`${n.commentBefore}\n${e.key.commentBefore}`:n.commentBefore),n.comment){const t=e.value??e.key;t.comment=t.comment?`${n.comment}\n${t.comment}`:n.comment}n=e}e.items[r]=Yt(n)?n:new Jr(n)}}else t("Expected a sequence for this tag");return e}function Gn(e,t,r){const{replacer:n}=r,i=new on(e);i.tag="tag:yaml.org,2002:pairs";let s=0;if(t&&Symbol.iterator in Object(t))for(let e of t){let a,o;if("function"==typeof n&&(e=n.call(t,String(s++),e)),Array.isArray(e)){if(2!==e.length)throw new TypeError(`Expected [key, value] tuple: ${e}`);a=e[0],o=e[1]}else if(e&&e instanceof Object){const t=Object.keys(e);if(1!==t.length)throw new TypeError(`Expected tuple with one key, not ${t.length} keys`);a=t[0],o=e[a]}else a=e;i.items.push(Xr(a,o,r))}return i}const An={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:jn,createNode:Gn};class Sn extends on{constructor(){super(),this.add=sn.prototype.add.bind(this),this.delete=sn.prototype.delete.bind(this),this.get=sn.prototype.get.bind(this),this.has=sn.prototype.has.bind(this),this.set=sn.prototype.set.bind(this),this.tag=Sn.tag}toJSON(e,t){if(!t)return super.toJSON(e);const r=new Map;t?.onCreate&&t.onCreate(r);for(const e of this.items){let n,i;if(Yt(e)?(n=hr(e.key,"",t),i=hr(e.value,n,t)):n=hr(e,"",t),r.has(n))throw new Error("Ordered maps must not include duplicate keys");r.set(n,i)}return r}static from(e,t,r){const n=Gn(e,t,r),i=new this;return i.items=n.items,i}}Sn.tag="tag:yaml.org,2002:omap";const On={collection:"seq",identify:e=>e instanceof Map,nodeClass:Sn,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const r=jn(e,t),n=[];for(const{key:e}of r.items)Qt(e)&&(n.includes(e.value)?t(`Ordered maps must not include duplicate keys: ${e.value}`):n.push(e.value));return Object.assign(new Sn,r)},createNode:(e,t,r)=>Sn.from(e,t,r)};function In({value:e,source:t},r){return t&&(e?Mn:zn).test.test(t)?t:e?r.options.trueStr:r.options.falseStr}const Mn={identify:e=>!0===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new Rr(!0),stringify:In},zn={identify:e=>!1===e,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new Rr(!1),stringify:In},Dn={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>"nan"===e.slice(-3).toLowerCase()?NaN:"-"===e[0]?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:gn},Ln={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():gn(e)}},xn={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new Rr(parseFloat(e.replace(/_/g,""))),r=e.indexOf(".");if(-1!==r){const n=e.substring(r+1).replace(/_/g,"");"0"===n[n.length-1]&&(t.minFractionDigits=n.length)}return t},stringify:gn},Cn=e=>"bigint"==typeof e||Number.isInteger(e);function Nn(e,t,r,{intAsBigInt:n}){const i=e[0];if("-"!==i&&"+"!==i||(t+=1),e=e.substring(t).replace(/_/g,""),n){switch(r){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`}const t=BigInt(e);return"-"===i?BigInt(-1)*t:t}const s=parseInt(e,r);return"-"===i?-1*s:s}function Un(e,t,r){const{value:n}=e;if(Cn(n)){const e=n.toString(t);return n<0?"-"+r+e.substr(1):r+e}return gn(e)}const Fn={identify:Cn,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,r)=>Nn(e,2,2,r),stringify:e=>Un(e,2,"0b")},Bn={identify:Cn,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,r)=>Nn(e,1,8,r),stringify:e=>Un(e,8,"0")},Wn={identify:Cn,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,r)=>Nn(e,0,10,r),stringify:gn},Hn={identify:Cn,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,r)=>Nn(e,2,16,r),stringify:e=>Un(e,16,"0x")};class $n extends sn{constructor(e){super(e),this.tag=$n.tag}add(e){let t;t=Yt(e)?e:e&&"object"==typeof e&&"key"in e&&"value"in e&&null===e.value?new Jr(e.key,null):new Jr(e,null),nn(this.items,t.key)||this.items.push(t)}get(e,t){const r=nn(this.items,e);return!t&&Yt(r)?Qt(r.key)?r.key.value:r.key:r}set(e,t){if("boolean"!=typeof t)throw new Error("Expected boolean value for set(key, value) in a YAML set, not "+typeof t);const r=nn(this.items,e);r&&!t?this.items.splice(this.items.indexOf(r),1):!r&&t&&this.items.push(new Jr(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,r);throw new Error("Set items must all have null values")}static from(e,t,r){const{replacer:n}=r,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)"function"==typeof n&&(e=n.call(t,e,e)),i.items.push(Xr(e,null,r));return i}}$n.tag="tag:yaml.org,2002:set";const Kn={collection:"map",identify:e=>e instanceof Set,nodeClass:$n,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,r)=>$n.from(e,t,r),resolve(e,t){if(Kt(e)){if(e.hasAllNullValues(!0))return Object.assign(new $n,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function Yn(e,t){const r=e[0],n="-"===r||"+"===r?e.substring(1):e,i=e=>t?BigInt(e):Number(e),s=n.replace(/_/g,"").split(":").reduce(((e,t)=>e*i(60)+i(t)),i(0));return"-"===r?i(-1)*s:s}function Qn(e){let{value:t}=e,r=e=>e;if("bigint"==typeof t)r=e=>BigInt(e);else if(isNaN(t)||!isFinite(t))return gn(e);let n="";t<0&&(n="-",t*=r(-1));const i=r(60),s=[t%i];return t<60?s.unshift(0):(t=(t-s[0])/i,s.unshift(t%i),t>=60&&(t=(t-s[0])/i,s.unshift(t))),n+s.map((e=>String(e).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const Vn={identify:e=>"bigint"==typeof e||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:r})=>Yn(e,r),stringify:Qn},Xn={identify:e=>"number"==typeof e,default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>Yn(e,!1),stringify:Qn},Jn={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Jn.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,r,n,i,s,a,o]=t.map(Number),u=t[7]?Number((t[7]+"00").substr(1,3)):0;let l=Date.UTC(r,n-1,i,s||0,a||0,o||0,u);const p=t[8];if(p&&"Z"!==p){let e=Yn(p,!1);Math.abs(e)<30&&(e*=60),l-=6e4*e}return new Date(l)},stringify:({value:e})=>e.toISOString().replace(/(T00:00:00)?\.000Z$/,"")},Zn=[an,ln,pn,mn,Mn,zn,Fn,Bn,Wn,Hn,Dn,Ln,xn,En,Kr,On,An,Kn,Vn,Xn,Jn],ei=new Map([["core",wn],["failsafe",[an,ln,pn]],["json",Pn],["yaml11",Zn],["yaml-1.1",Zn]]),ti={binary:En,bool:dn,float:hn,floatExp:yn,floatNaN:cn,floatTime:Xn,int:Rn,intHex:vn,intOct:qn,intTime:Vn,map:an,merge:Kr,null:mn,omap:On,pairs:An,seq:ln,set:Kn,timestamp:Jn},ri={"tag:yaml.org,2002:binary":En,"tag:yaml.org,2002:merge":Kr,"tag:yaml.org,2002:omap":On,"tag:yaml.org,2002:pairs":An,"tag:yaml.org,2002:set":Kn,"tag:yaml.org,2002:timestamp":Jn};function ni(e,t,r){const n=ei.get(t);if(n&&!e)return r&&!n.includes(Kr)?n.concat(Kr):n.slice();let i=n;if(!i){if(!Array.isArray(e)){const e=Array.from(ei.keys()).filter((e=>"yaml11"!==e)).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${e} or define customTags array`)}i=[]}if(Array.isArray(e))for(const t of e)i=i.concat(t);else"function"==typeof e&&(i=e(i.slice()));return r&&(i=i.concat(Kr)),i.reduce(((e,t)=>{const r="string"==typeof t?ti[t]:t;if(!r){const e=JSON.stringify(t),r=Object.keys(ti).map((e=>JSON.stringify(e))).join(", ");throw new Error(`Unknown custom tag ${e}; use one of ${r}`)}return e.includes(r)||e.push(r),e}),[])}const ii=(e,t)=>e.keyt.key?1:0;class si{constructor({compat:e,customTags:t,merge:r,resolveKnownTags:n,schema:i,sortMapEntries:s,toStringDefaults:a}){this.compat=Array.isArray(e)?ni(e,"compat"):e?ni(null,e):null,this.name="string"==typeof i&&i||"core",this.knownTags=n?ri:{},this.tags=ni(t,this.name,r),this.toStringOptions=a??null,Object.defineProperty(this,Nt,{value:an}),Object.defineProperty(this,Ft,{value:pn}),Object.defineProperty(this,Bt,{value:ln}),this.sortMapEntries="function"==typeof s?s:!0===s?ii:null}clone(){const e=Object.create(si.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}class ai{constructor(e,t,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Wt,{value:Ct});let n=null;"function"==typeof t||Array.isArray(t)?n=t:void 0===r&&t&&(r=t,t=void 0);const i=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=i;let{version:s}=i;r?._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(s=this.directives.yaml.version)):this.directives=new mr({version:s}),this.setSchema(s,r),this.contents=void 0===e?null:this.createNode(e,n,r)}clone(){const e=Object.create(ai.prototype,{[Wt]:{value:Ct}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Jt(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){oi(this.contents)&&this.contents.add(e)}addIn(e,t){oi(this.contents)&&this.contents.addIn(e,t)}createAlias(e,t){if(!e.anchor){const r=gr(this);e.anchor=!t||r.has(t)?cr(t||"a",r):t}return new fr(e.anchor)}createNode(e,t,r){let n;if("function"==typeof t)e=t.call({"":e},"",e),n=t;else if(Array.isArray(t)){const e=e=>"number"==typeof e||e instanceof String||e instanceof Number,r=t.filter(e).map(String);r.length>0&&(t=t.concat(r)),n=t}else void 0===r&&t&&(r=t,t=void 0);const{aliasDuplicateObjects:i,anchorPrefix:s,flow:a,keepUndefined:o,onTagObj:u,tag:l}=r??{},{onAnchor:p,setAnchors:m,sourceObjects:d}=function(e,t){const r=[],n=new Map;let i=null;return{onAnchor:n=>{r.push(n),i||(i=gr(e));const s=cr(t,i);return i.add(s),s},setAnchors:()=>{for(const e of r){const t=n.get(e);if("object"!=typeof t||!t.anchor||!Qt(t.node)&&!Xt(t.node)){const t=new Error("Failed to resolve repeated object (this should not happen)");throw t.source=e,t}t.node.anchor=t.anchor}},sourceObjects:n}}(this,s||"a"),g=wr(e,l,{aliasDuplicateObjects:i??!0,keepUndefined:o??!1,onAnchor:p,onTagObj:u,replacer:n,schema:this.schema,sourceObjects:d});return a&&Xt(g)&&(g.flow=!0),m(),g}createPair(e,t,r={}){const n=this.createNode(e,null,r),i=this.createNode(t,null,r);return new Jr(n,i)}delete(e){return!!oi(this.contents)&&this.contents.delete(e)}deleteIn(e){return kr(e)?null!=this.contents&&(this.contents=null,!0):!!oi(this.contents)&&this.contents.deleteIn(e)}get(e,t){return Xt(this.contents)?this.contents.get(e,t):void 0}getIn(e,t){return kr(e)?!t&&Qt(this.contents)?this.contents.value:this.contents:Xt(this.contents)?this.contents.getIn(e,t):void 0}has(e){return!!Xt(this.contents)&&this.contents.has(e)}hasIn(e){return kr(e)?void 0!==this.contents:!!Xt(this.contents)&&this.contents.hasIn(e)}set(e,t){null==this.contents?this.contents=Tr(this.schema,[e],t):oi(this.contents)&&this.contents.set(e,t)}setIn(e,t){kr(e)?this.contents=t:null==this.contents?this.contents=Tr(this.schema,Array.from(e),t):oi(this.contents)&&this.contents.setIn(e,t)}setSchema(e,t={}){let r;switch("number"==typeof e&&(e=String(e)),e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new mr({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new mr({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const t=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${t}`)}}if(t.schema instanceof Object)this.schema=t.schema;else{if(!r)throw new Error("With a null YAML version, the { schema: Schema } option is required");this.schema=new si(Object.assign(r,t))}}toJS({json:e,jsonArg:t,mapAsMap:r,maxAliasCount:n,onAnchor:i,reviver:s}={}){const a={anchors:new Map,doc:this,keep:!e,mapAsMap:!0===r,mapKeyWarned:!1,maxAliasCount:"number"==typeof n?n:100},o=hr(this.contents,t??"",a);if("function"==typeof i)for(const{count:e,res:t}of a.anchors.values())i(t,e);return"function"==typeof s?yr(s,{"":o},"",o):o}toJSON(e,t){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:t})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const t=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${t}`)}return function(e,t){const r=[];let n=!0===t.directives;if(!1!==t.directives&&e.directives){const t=e.directives.toString(e);t?(r.push(t),n=!0):e.directives.docStart&&(n=!0)}n&&r.push("---");const i=Br(e,t),{commentString:s}=i.options;if(e.commentBefore){1!==r.length&&r.unshift("");const t=s(e.commentBefore);r.unshift(jr(t,""))}let a=!1,o=null;if(e.contents){if(Jt(e.contents)){if(e.contents.spaceBefore&&n&&r.push(""),e.contents.commentBefore){const t=s(e.contents.commentBefore);r.push(jr(t,""))}i.forceBlockIndent=!!e.comment,o=e.contents.comment}const t=o?void 0:()=>a=!0;let u=Wr(e.contents,i,(()=>o=null),t);o&&(u+=Gr(u,"",s(o))),"|"!==u[0]&&">"!==u[0]||"---"!==r[r.length-1]?r.push(u):r[r.length-1]=`--- ${u}`}else r.push(Wr(e.contents,i));if(e.directives?.docEnd)if(e.comment){const t=s(e.comment);t.includes("\n")?(r.push("..."),r.push(jr(t,""))):r.push(`... ${t}`)}else r.push("...");else{let t=e.comment;t&&a&&(t=t.replace(/^\n+/,"")),t&&(a&&!o||""===r[r.length-1]||r.push(""),r.push(jr(s(t),"")))}return r.join("\n")+"\n"}(this,e)}}function oi(e){if(Xt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class ui extends Error{constructor(e,t,r,n){super(),this.name=e,this.code=r,this.message=n,this.pos=t}}class li extends ui{constructor(e,t,r){super("YAMLParseError",e,t,r)}}class pi extends ui{constructor(e,t,r){super("YAMLWarning",e,t,r)}}const mi=(e,t)=>r=>{if(-1===r.pos[0])return;r.linePos=r.pos.map((e=>t.linePos(e)));const{line:n,col:i}=r.linePos[0];r.message+=` at line ${n}, column ${i}`;let s=i-1,a=e.substring(t.lineStarts[n-1],t.lineStarts[n]).replace(/[\n\r]+$/,"");if(s>=60&&a.length>80){const e=Math.min(s-39,a.length-79);a="…"+a.substring(e),s-=e-1}if(a.length>80&&(a=a.substring(0,79)+"…"),n>1&&/^ *$/.test(a.substring(0,s))){let r=e.substring(t.lineStarts[n-2],t.lineStarts[n-1]);r.length>80&&(r=r.substring(0,79)+"…\n"),a=r+a}if(/[^ ]/.test(a)){let e=1;const t=r.linePos[1];t&&t.line===n&&t.col>i&&(e=Math.max(1,Math.min(t.col-i,80-s)));const o=" ".repeat(s)+"^".repeat(e);r.message+=`:\n\n${a}\n${o}\n`}};function di(e,{flow:t,indicator:r,next:n,offset:i,onError:s,parentIndent:a,startOnNewline:o}){let u=!1,l=o,p=o,m="",d="",g=!1,c=!1,y=null,h=null,_=null,f=null,b=null,q=null,R=null;for(const i of e)switch(c&&("space"!==i.type&&"newline"!==i.type&&"comma"!==i.type&&s(i.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),c=!1),y&&(l&&"comment"!==i.type&&"newline"!==i.type&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),y=null),i.type){case"space":t||"doc-start"===r&&"flow-collection"===n?.type||!i.source.includes("\t")||(y=i),p=!0;break;case"comment":{p||s(i,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const e=i.source.substring(1)||" ";m?m+=d+e:m=e,d="",l=!1;break}case"newline":l?m?m+=i.source:q&&"seq-item-ind"===r||(u=!0):d+=i.source,l=!0,g=!0,(h||_)&&(f=i),p=!0;break;case"anchor":h&&s(i,"MULTIPLE_ANCHORS","A node can have at most one anchor"),i.source.endsWith(":")&&s(i.offset+i.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),h=i,null===R&&(R=i.offset),l=!1,p=!1,c=!0;break;case"tag":_&&s(i,"MULTIPLE_TAGS","A node can have at most one tag"),_=i,null===R&&(R=i.offset),l=!1,p=!1,c=!0;break;case r:(h||_)&&s(i,"BAD_PROP_ORDER",`Anchors and tags must be after the ${i.source} indicator`),q&&s(i,"UNEXPECTED_TOKEN",`Unexpected ${i.source} in ${t??"collection"}`),q=i,l="seq-item-ind"===r||"explicit-key-ind"===r,p=!1;break;case"comma":if(t){b&&s(i,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),b=i,l=!1,p=!1;break}default:s(i,"UNEXPECTED_TOKEN",`Unexpected ${i.type} token`),l=!1,p=!1}const v=e[e.length-1],w=v?v.offset+v.source.length:i;return c&&n&&"space"!==n.type&&"newline"!==n.type&&"comma"!==n.type&&("scalar"!==n.type||""!==n.source)&&s(n.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),y&&(l&&y.indent<=a||"block-map"===n?.type||"block-seq"===n?.type)&&s(y,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:b,found:q,spaceBefore:u,comment:m,hasNewline:g,anchor:h,tag:_,newlineAfterProp:f,end:w,start:R??w}}function gi(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes("\n"))return!0;if(e.end)for(const t of e.end)if("newline"===t.type)return!0;return!1;case"flow-collection":for(const t of e.items){for(const e of t.start)if("newline"===e.type)return!0;if(t.sep)for(const e of t.sep)if("newline"===e.type)return!0;if(gi(t.key)||gi(t.value))return!0}return!1;default:return!0}}function ci(e,t,r){if("flow-collection"===t?.type){const n=t.end[0];n.indent!==e||"]"!==n.source&&"}"!==n.source||!gi(t)||r(n,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function yi(e,t,r){const{uniqueKeys:n}=e.options;if(!1===n)return!1;const i="function"==typeof n?n:(e,t)=>e===t||Qt(e)&&Qt(t)&&e.value===t.value;return t.some((e=>i(e.key,r)))}const hi="All mapping items must start at the same column";function _i(e,t,r,n){let i="";if(e){let s=!1,a="";for(const o of e){const{source:e,type:u}=o;switch(u){case"space":s=!0;break;case"comment":{r&&!s&&n(o,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=e.substring(1)||" ";i?i+=a+t:i=t,a="";break}case"newline":i&&(a+=e),s=!0;break;default:n(o,"UNEXPECTED_TOKEN",`Unexpected ${u} at node end`)}t+=e.length}}return{comment:i,offset:t}}const fi="Block collections are not allowed within flow collections",bi=e=>e&&("block-map"===e.type||"block-seq"===e.type);function qi(e,t,r,n,i,s){const a="block-map"===r.type?function({composeNode:e,composeEmptyNode:t},r,n,i,s){const a=new(s?.nodeClass??sn)(r.schema);r.atRoot&&(r.atRoot=!1);let o=n.offset,u=null;for(const s of n.items){const{start:l,key:p,sep:m,value:d}=s,g=di(l,{indicator:"explicit-key-ind",next:p??m?.[0],offset:o,onError:i,parentIndent:n.indent,startOnNewline:!0}),c=!g.found;if(c){if(p&&("block-seq"===p.type?i(o,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in p&&p.indent!==n.indent&&i(o,"BAD_INDENT",hi)),!g.anchor&&!g.tag&&!m){u=g.end,g.comment&&(a.comment?a.comment+="\n"+g.comment:a.comment=g.comment);continue}(g.newlineAfterProp||gi(p))&&i(p??l[l.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else g.found?.indent!==n.indent&&i(o,"BAD_INDENT",hi);r.atKey=!0;const y=g.end,h=p?e(r,p,g,i):t(r,y,l,null,g,i);r.schema.compat&&ci(n.indent,p,i),r.atKey=!1,yi(r,a.items,h)&&i(y,"DUPLICATE_KEY","Map keys must be unique");const _=di(m??[],{indicator:"map-value-ind",next:d,offset:h.range[2],onError:i,parentIndent:n.indent,startOnNewline:!p||"block-scalar"===p.type});if(o=_.end,_.found){c&&("block-map"!==d?.type||_.hasNewline||i(o,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&g.start<_.found.offset-1024&&i(h.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const u=d?e(r,d,_,i):t(r,o,m,null,_,i);r.schema.compat&&ci(n.indent,d,i),o=u.range[2];const l=new Jr(h,u);r.options.keepSourceTokens&&(l.srcToken=s),a.items.push(l)}else{c&&i(h.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),_.comment&&(h.comment?h.comment+="\n"+_.comment:h.comment=_.comment);const e=new Jr(h);r.options.keepSourceTokens&&(e.srcToken=s),a.items.push(e)}}return u&&u0){const e=_i(g,c,r.options.strict,i);e.comment&&(u.comment?u.comment+="\n"+e.comment:u.comment=e.comment),u.range=[n.offset,c,e.offset]}else u.range=[n.offset,c,c];return u}(e,t,r,n,s),o=a.constructor;return"!"===i||i===o.tagName?(a.tag=o.tagName,a):(i&&(a.tag=i),a)}function Ri(e){let t,r;try{t=new RegExp("(.*?)(?