@mongodb-js/compass-web 1.0.2 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/112.cc6e81f79429e73c45e2.mjs +1 -0
  2. package/dist/260.22d04797e908a8464d8f.mjs +2 -0
  3. package/dist/302.21e186c638bb98594c8f.mjs +1 -0
  4. package/dist/318.e28eef3a6f052df2dd22.mjs +2 -0
  5. package/dist/{127.3d74d7292010279682c5.mjs → 641.18c979ce0458e2237d9c.mjs} +16 -16
  6. package/dist/65.0f0eb2e998535a138203.mjs +2 -0
  7. package/dist/{560.e85e11aa098b341006f3.mjs → 748.a00d5f64d2d9c20c710e.mjs} +3 -3
  8. package/dist/{560.e85e11aa098b341006f3.mjs.LICENSE.txt → 748.a00d5f64d2d9c20c710e.mjs.LICENSE.txt} +29 -8
  9. package/dist/872.ef5d7ce50c99edff7074.mjs +2 -0
  10. package/dist/872.ef5d7ce50c99edff7074.mjs.LICENSE.txt +20 -0
  11. package/dist/assets-manifest.json +10 -10
  12. package/dist/compass-web.mjs +3 -3
  13. package/dist/index-0b9a48a6.ccf0681421db4308ee5e.mjs +29 -0
  14. package/dist/index-bde52cb3.b853042540744e5a5322.mjs +1 -0
  15. package/dist/tsdoc-metadata.json +1 -1
  16. package/package.json +49 -47
  17. package/dist/106.e50960c29b57a8b92ec5.mjs +0 -2
  18. package/dist/106.e50960c29b57a8b92ec5.mjs.LICENSE.txt +0 -12
  19. package/dist/14.4041757b6d1c01a732c6.mjs +0 -2
  20. package/dist/260.52fdf61d69ac2a2921dc.mjs +0 -2
  21. package/dist/302.34205d8fa79ef45d79b5.mjs +0 -1
  22. package/dist/318.da796d13247ed6c3c28b.mjs +0 -2
  23. package/dist/717.32457884d95d961bc576.mjs +0 -1
  24. package/dist/index-0b9a48a6.8808d00d1b8145c52728.mjs +0 -29
  25. package/dist/index-bde52cb3.6f51548cb3f25ef57945.mjs +0 -1
  26. /package/dist/{260.52fdf61d69ac2a2921dc.mjs.LICENSE.txt → 260.22d04797e908a8464d8f.mjs.LICENSE.txt} +0 -0
  27. /package/dist/{318.da796d13247ed6c3c28b.mjs.LICENSE.txt → 318.e28eef3a6f052df2dd22.mjs.LICENSE.txt} +0 -0
  28. /package/dist/{127.3d74d7292010279682c5.mjs.LICENSE.txt → 641.18c979ce0458e2237d9c.mjs.LICENSE.txt} +0 -0
  29. /package/dist/{14.4041757b6d1c01a732c6.mjs.LICENSE.txt → 65.0f0eb2e998535a138203.mjs.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 260.22d04797e908a8464d8f.mjs.LICENSE.txt */
2
+ export const __webpack_esm_id__=260;export const __webpack_esm_ids__=[260];export const __webpack_esm_modules__={149:(t,e,n)=>{var r=n(86115),i=n(51192),s=n(66177),o="__core-js_shared__",a=t.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.49.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})},621:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.generatorInfosMap=void 0;var r=n(97527),i=n(2934);const s=e.generatorInfosMap=new Map;let o=0;for(const t of Object.keys(r).sort())t.startsWith("_")||s.set(t,[r[t],o++,void 0]);for(const t of Object.keys(i))s.set(t,[i[t],o++,void 0])},966:(t,e,n)=>{var r=n(1811),i=Math.min;t.exports=function(t){var e=r(t);return e>0?i(e,9007199254740991):0}},1256:(t,e,n)=>{var r=n(23486),i=n(9106),s=n(45632),o=n(27293),a=TypeError;r({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=s(this),n=arguments.length<2,r=n?void 0:arguments[1];if(i(t),o(e,(function(i){n?(n=!1,r=i):r=t(r,i,i,e)})),n)throw new a("Reduce of empty set with no initial value");return r}})},1440:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){const n=Object.keys(e);for(const r of n)if(t[r]!==e[r])return!1;return!0}},1483:(t,e,n)=>{var r=n(14852),i=n(80421),s=n(93709),o=n(21804),a=n(43469),l=n(55953),c=n(22521),u=n(49589),h=Object.getOwnPropertyDescriptor;e.f=r?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return o(!i(s.f,t,e),t[e])}},1545:(t,e,n)=>{var r=n(79567);t.exports="NODE"===r},1811:(t,e,n)=>{var r=n(73421);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},1825:(t,e,n)=>{var r=n(81847),i=n(13250),s=n(3527).Buffer,o=n(3416),a=n(82402),l=n(23492),c=n(5076);function u(t,e,n){a.call(this),this._cache=new p,this._cipher=new l.AES(e),this._prev=s.from(n),this._mode=t,this._autopadding=!0}n(46324)(u,a),u.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get();)n=this._mode.encrypt(this,e),r.push(n);return s.concat(r)};var h=s.alloc(16,16);function p(){this.cache=s.allocUnsafe(0)}function d(t,e,n){var a=r[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=s.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof n&&(n=s.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===a.type?new o(a.module,e,n):"auth"===a.type?new i(a.module,e,n):new u(a.module,e,n)}u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},p.prototype.add=function(t){this.cache=s.concat([this.cache,t])},p.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},p.prototype.flush=function(){for(var t=16-this.cache.length,e=s.allocUnsafe(t),n=-1;++n<t;)e.writeUInt8(t,n);return s.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var n=r[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=c(e,!1,n.key,n.iv);return d(t,i.key,i.iv)}},2073:(t,e,n)=>{var r=n(83115),i=n(55317),s=r("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||o[s]===t)}},2269:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},2776:(t,e,n)=>{var r=n(14852),i=n(24377),s=n(21804);t.exports=function(t,e,n){r?i.f(t,e,s(0,n)):t[e]=n}},2934:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DecimalLiteral=function(t){const e=this.getPossibleRaw(t);this.format.minified||void 0===e?this.word(t.value+"m"):this.word(e)},e.Noop=function(){},e.RecordExpression=function(t){const e=t.properties;let n,r;if("bar"===this.format.recordAndTupleSyntaxType)n="{|",r="|}";else{if("hash"!==this.format.recordAndTupleSyntaxType&&null!=this.format.recordAndTupleSyntaxType)throw new Error(`The "recordAndTupleSyntaxType" generator option must be "bar" or "hash" (${JSON.stringify(this.format.recordAndTupleSyntaxType)} received).`);n="#{",r="}"}this.token(n),e.length&&(this.space(),this.printList(e,this.shouldPrintTrailingComma(r),!0,!0),this.space()),this.token(r)},e.TSExpressionWithTypeArguments=function(t){this.print(t.expression),this.print(t.typeParameters)},e.TupleExpression=function(t){const e=t.elements,n=e.length;let r,i;if("bar"===this.format.recordAndTupleSyntaxType)r="[|",i="|]";else{if("hash"!==this.format.recordAndTupleSyntaxType)throw new Error(`${this.format.recordAndTupleSyntaxType} is not a valid recordAndTuple syntax type`);r="#[",i="]"}this.token(r);for(let t=0;t<e.length;t++){const r=e[t];r&&(t>0&&this.space(),this.print(r),(t<n-1||this.shouldPrintTrailingComma(i))&&this.token(",",!1,t))}this.token(i)}},2973:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.default)(t)};var r=n(19415)},3142:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(71856),a=n(88087),l=o.Map,c=o.set;r({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=new l;return a(e,(function(t,i){n(t,i,e)&&c(r,i,t)})),r}})},3416:(t,e,n)=>{var r=n(23492),i=n(3527).Buffer,s=n(82402);function o(t,e,n,o){s.call(this),this._cipher=new r.AES(e),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=t}n(46324)(o,s),o.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},o.prototype._final=function(){this._cipher.scrub()},t.exports=o},3851:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.isVariableDeclaration)(t,{kind:"var"})&&!t[i]};var r=n(66360),i=Symbol.for("var used to be block scoped")},3877:(t,e,n)=>{var r=n(37400),i=n(24215),s=n(49421),o=n(5550),a=n(41413),l=n(2776),c=function(t){var e=1===t,n=2===t,c=3===t,u=4===t,h=6===t,p=7===t,d=5===t||h;return function(f,m,y){for(var g,v,b=s(f),T=i(b),x=o(T),S=r(m,y),w=0,E=0,A=e?a(f,x):n||p?a(f,0):void 0;x>w;w++)if((d||w in T)&&(v=S(g=T[w],w,b),t))if(e)l(A,w,v);else if(v)switch(t){case 3:return!0;case 5:return g;case 6:return w;case 2:l(A,E++,g)}else switch(t){case 4:return!1;case 7:l(A,E++,g)}return h?-1:c||u?u:A}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},4228:(t,e,n)=>{var r=n(59767),i=n(2269),s=/#|\.prototype\./,o=function(t,e){var n=l[a(t)];return n===u||n!==c&&(i(e)?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(s,".").toLowerCase()},l=o.data={},c=o.NATIVE="N",u=o.POLYFILL="P";t.exports=o},4477:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(66360);e.default=function(t){if((0,r.isExpressionStatement)(t)&&(t=t.expression),(0,r.isExpression)(t))return t;if((0,r.isClass)(t)?(t.type="ClassExpression",t.abstract=!1):(0,r.isFunction)(t)&&(t.type="FunctionExpression"),!(0,r.isExpression)(t))throw new Error(`cannot turn ${t.type} to an expression`);return t}},4478:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(!n||!t)return t;const r=`${e}Comments`;return t[r]?"leading"===e?t[r]=n.concat(t[r]):t[r].push(...n):t[r]=n,t}},4716:t=>{t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},5550:(t,e,n)=>{var r=n(966);t.exports=function(t){return r(t.length)}},5590:(t,e,n)=>{var r=n(46324),i=n(96662),s=n(725),o=n(67432),a=n(82402);function l(t){a.call(this,"digest"),this._hash=t}r(l,a),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new s:new l(o(t))}},6695:(t,e,n)=>{var r=n(45632),i=n(38378).has,s=n(86058),o=n(35525),a=n(52307),l=n(11867);t.exports=function(t){var e=r(this),n=o(t);if(s(e)<n.size)return!1;var c=n.getIterator();return!1!==a(c,(function(t){if(!i(e,t))return l(c.iterator,"normal",!1)}))}},6708:(t,e,n)=>{var r=n(15088).process;Object.defineProperty(e,"__esModule",{value:!0}),e.allExpandedTypes=e.VISITOR_KEYS=e.NODE_UNION_SHAPES__PRIVATE=e.NODE_PARENT_VALIDATIONS=e.NODE_FIELDS=e.FLIPPED_ALIAS_KEYS=e.DEPRECATED_KEYS=e.BUILDER_KEYS=e.ALIAS_KEYS=void 0,e.arrayOf=y,e.arrayOfType=g,e.assertEach=v,e.assertNodeOrValueType=function(...t){function e(e,n,r){const o=f(r);for(const a of t)if(o===a||(0,i.default)(a,r))return void(0,s.validateChild)(e,n,r);throw new TypeError(`Property ${n} of ${e.type} expected node to be of a type ${JSON.stringify(t)} but instead got ${JSON.stringify(null==r?void 0:r.type)}`)}return e.oneOfNodeOrValueTypes=t,e},e.assertNodeType=T,e.assertOneOf=function(...t){function e(e,n,r){if(!t.includes(r))throw new TypeError(`Property ${n} expected value to be one of ${JSON.stringify(t)} but got ${JSON.stringify(r)}`)}return e.oneOf=t,e},e.assertOptionalChainStart=function(){return function(t){var e;let n=t;for(;t;){const{type:t}=n;if("OptionalCallExpression"!==t){if("OptionalMemberExpression"!==t)break;if(n.optional)return;n=n.object}else{if(n.optional)return;n=n.callee}}throw new TypeError(`Non-optional ${t.type} must chain from an optional OptionalMemberExpression or OptionalCallExpression. Found chain from ${null==(e=n)?void 0:e.type}`)}},e.assertShape=function(t){const e=Object.keys(t);function n(n,r,i){const o=[];for(const r of e)try{(0,s.validateField)(n,r,i[r],t[r])}catch(t){if(t instanceof TypeError){o.push(t.message);continue}throw t}if(o.length)throw new TypeError(`Property ${r} of ${n.type} expected to have the following:\n${o.join("\n")}`)}return n.shapeOf=t,n},e.assertValueType=x,e.chain=S,e.default=P,e.defineAliasedType=function(...t){return(e,n={})=>{let r=n.aliases;var i;r||(n.inherits&&(r=null==(i=A[n.inherits].aliases)?void 0:i.slice()),null!=r||(r=[]),n.aliases=r);const s=t.filter((t=>!r.includes(t)));r.unshift(...s),P(e,n)}},e.validate=m,e.validateArrayOfType=function(...t){return m(g(...t))},e.validateOptional=function(t){return{validate:t,optional:!0}},e.validateOptionalType=function(...t){return{validate:T(...t),optional:!0}},e.validateType=function(...t){return m(T(...t))};var i=n(93308),s=n(36142);const o=e.VISITOR_KEYS={},a=e.ALIAS_KEYS={},l=e.FLIPPED_ALIAS_KEYS={},c=e.NODE_FIELDS={},u=e.BUILDER_KEYS={},h=e.DEPRECATED_KEYS={},p=e.NODE_PARENT_VALIDATIONS={},d=e.NODE_UNION_SHAPES__PRIVATE={};function f(t){return Array.isArray(t)?"array":null===t?"null":typeof t}function m(t){return{validate:t}}function y(t){return S(x("array"),v(t))}function g(...t){return y(T(...t))}function v(t){const e=r.env.BABEL_TYPES_8_BREAKING?s.validateChild:()=>{};function n(n,r,i){if(!Array.isArray(i))return;let s=0;const o={toString:()=>`${r}[${s}]`};for(;s<i.length;s++){const r=i[s];t(n,o,r),e(n,o,r)}}return n.each=t,n}const b=e.allExpandedTypes=[];function T(...t){const e=new Set;function n(n,r,o){const a=null==o?void 0:o.type;if(null!=a){if(e.has(a))return void(0,s.validateChild)(n,r,o);if("Placeholder"===a)for(const e of t)if((0,i.default)(e,o))return void(0,s.validateChild)(n,r,o)}throw new TypeError(`Property ${r} of ${n.type} expected node to be of a type ${JSON.stringify(t)} but instead got ${JSON.stringify(a)}`)}return b.push({types:t,set:e}),n.oneOfNodeTypes=t,n}function x(t){function e(e,n,r){if(f(r)!==t)throw new TypeError(`Property ${n} expected type of ${t} but got ${f(r)}`)}return e.type=t,e}function S(...t){function e(...e){for(const n of t)n(...e)}if(e.chainOf=t,t.length>=2&&"type"in t[0]&&"array"===t[0].type&&!("each"in t[1]))throw new Error('An assertValueType("array") validator can only be followed by an assertEach(...) validator.');return e}const w=new Set(["aliases","builder","deprecatedAlias","fields","inherits","visitor","validate","unionShape"]),E=new Set(["default","optional","deprecated","validate"]),A={};function P(t,e={}){const n=e.inherits&&A[e.inherits]||{};let r=e.fields;if(!r&&(r={},n.fields)){const t=Object.getOwnPropertyNames(n.fields);for(const e of t){const t=n.fields[e],i=t.default;if(Array.isArray(i)?i.length>0:i&&"object"==typeof i)throw new Error("field defaults can only be primitives or empty arrays currently");r[e]={default:Array.isArray(i)?[]:i,optional:t.optional,deprecated:t.deprecated,validate:t.validate}}}const i=e.visitor||n.visitor||[],s=e.aliases||n.aliases||[],m=e.builder||n.builder||e.visitor||[];for(const n of Object.keys(e))if(!w.has(n))throw new Error(`Unknown type option "${n}" on ${t}`);e.deprecatedAlias&&(h[e.deprecatedAlias]=t);for(const t of i.concat(m))r[t]=r[t]||{};for(const e of Object.keys(r)){const n=r[e];void 0===n.default||m.includes(e)||(n.optional=!0),void 0===n.default?n.default=null:n.validate||null==n.default||(n.validate=x(f(n.default)));for(const r of Object.keys(n))if(!E.has(r))throw new Error(`Unknown field key "${r}" on ${t}.${e}`)}o[t]=e.visitor=i,u[t]=e.builder=m,c[t]=e.fields=r,a[t]=e.aliases=s,s.forEach((e=>{l[e]=l[e]||[],l[e].push(t)})),e.validate&&(p[t]=e.validate),e.unionShape&&(d[t]=e.unionShape),A[t]=e}},7259:(t,e,n)=>{function r(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(n=r(t[e]))&&(i&&(i+=" "),i+=n);else for(e in t)t[e]&&(i&&(i+=" "),i+=e);return i}function i(){for(var t,e,n=0,i="";n<arguments.length;)(t=arguments[n++])&&(e=r(t))&&(i&&(i+=" "),i+=e);return i}n.d(e,{A:()=>i})},7313:(t,e,n)=>{var r=n(38199).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=u,this.end=h,e=3;break;default:return this.write=p,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,n=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function u(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function p(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.I=s,s.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},s.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},s.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=o(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=o(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=o(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},7642:function(t,e,n){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function s(t,e,n){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=s:e.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(34110).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+t)}function l(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function c(t,e,n,i){for(var s=0,o=0,a=Math.min(t.length,n),l=e;l<a;l++){var c=t.charCodeAt(l)-48;s*=i,o=c>=49?c-49+10:c>=17?c-17+10:c,r(c>=0&&o<i,"Invalid character"),s+=o}return s}function u(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(s.isBN=function(t){return t instanceof s||null!==t&&"object"==typeof t&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,e){return t.cmp(e)>0?t:e},s.min=function(t,e){return t.cmp(e)<0?t:e},s.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},s.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},s.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=t.length-1,s=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this._strip()},s.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=l(t,e,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=l(t,e,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this._strip()},s.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var s=t.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,u=n;u<a;u+=r)l=c(t,u,u+r,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var h=1;for(l=c(t,u,t.length,e),u=0;u<o;u++)h*=e;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},s.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},s.prototype._move=function(t){u(t,this)},s.prototype.clone=function(){var t=new s(null);return this.copy(t),t},s.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],s=0|e.words[0],o=i*s,a=67108863&o,l=o/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var u=l>>>26,h=67108863&l,p=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=p;d++){var f=c-d|0;u+=(o=(i=0|t.words[f])*(s=0|e.words[d])+h)/67108864|0,h=67108863&o}n.words[c]=0|h,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}s.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);s=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,o--),n=0!==s||o!==this.length-1?p[6-l.length]+l+n:l+n}for(0!==s&&(n=s.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=d[t],u=f[t];n="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modrn(u).toString(t);n=(h=h.idivn(u)).isZero()?m+n:p[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},s.prototype.toJSON=function(){return this.toString(16,2)},o&&(s.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),s.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},s.prototype.toArrayLike=function(t,e,n){this._strip();var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0");var o=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,s);return this["_toArrayLike"+("le"===e?"LE":"BE")](o,i),o},s.prototype._toArrayLikeLE=function(t,e){for(var n=0,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;t[n++]=255&o,n<t.length&&(t[n++]=o>>8&255),n<t.length&&(t[n++]=o>>16&255),6===s?(n<t.length&&(t[n++]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n<t.length)for(t[n++]=r;n<t.length;)t[n++]=0},s.prototype._toArrayLikeBE=function(t,e){for(var n=t.length-1,r=0,i=0,s=0;i<this.length;i++){var o=this.words[i]<<s|r;t[n--]=255&o,n>=0&&(t[n--]=o>>8&255),n>=0&&(t[n--]=o>>16&255),6===s?(n>=0&&(t[n--]=o>>24&255),r=0,s=0):(r=o>>>24,s+=2)}if(n>=0)for(t[n--]=r;n>=0;)t[n--]=0},Math.clz32?s.prototype._countBits=function(t){return 32-Math.clz32(t)}:s.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},s.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 8191&e||(n+=13,e>>>=13),127&e||(n+=7,e>>>=7),15&e||(n+=4,e>>>=4),3&e||(n+=2,e>>>=2),1&e||n++,n},s.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},s.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},s.prototype.ior=function(t){return r(!(this.negative|t.negative)),this.iuor(t)},s.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this._strip()},s.prototype.iand=function(t){return r(!(this.negative|t.negative)),this.iuand(t)},s.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this._strip()},s.prototype.ixor=function(t){return r(!(this.negative|t.negative)),this.iuxor(t)},s.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this._strip()},s.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,s=0;s<r.length;s++)e=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&e,i=e>>>26;for(;0!==i&&s<n.length;s++)e=(0|n.words[s])+i,this.words[s]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var s=0,o=0;o<r.length;o++)s=(e=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&e;for(;0!==s&&o<n.length;o++)s=(e=(0|n.words[o])+s)>>26,this.words[o]=67108863&e;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,n){var r,i,s,o=t.words,a=e.words,l=n.words,c=0,u=0|o[0],h=8191&u,p=u>>>13,d=0|o[1],f=8191&d,m=d>>>13,y=0|o[2],g=8191&y,v=y>>>13,b=0|o[3],T=8191&b,x=b>>>13,S=0|o[4],w=8191&S,E=S>>>13,A=0|o[5],P=8191&A,M=A>>>13,C=0|o[6],k=8191&C,I=C>>>13,O=0|o[7],N=8191&O,_=O>>>13,D=0|o[8],L=8191&D,B=D>>>13,R=0|o[9],F=8191&R,j=R>>>13,U=0|a[0],V=8191&U,z=U>>>13,q=0|a[1],$=8191&q,H=q>>>13,K=0|a[2],Y=8191&K,W=K>>>13,J=0|a[3],X=8191&J,G=J>>>13,Z=0|a[4],Q=8191&Z,tt=Z>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],st=8191&it,ot=it>>>13,at=0|a[7],lt=8191&at,ct=at>>>13,ut=0|a[8],ht=8191&ut,pt=ut>>>13,dt=0|a[9],ft=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(c+(r=Math.imul(h,V))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(p,V)|0))<<13)|0;c=((s=Math.imul(p,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(f,V),i=(i=Math.imul(f,z))+Math.imul(m,V)|0,s=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(p,$)|0))<<13)|0;c=((s=s+Math.imul(p,H)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,V),i=(i=Math.imul(g,z))+Math.imul(v,V)|0,s=Math.imul(v,z),r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(p,Y)|0))<<13)|0;c=((s=s+Math.imul(p,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(T,V),i=(i=Math.imul(T,z))+Math.imul(x,V)|0,s=Math.imul(x,z),r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(v,$)|0,s=s+Math.imul(v,H)|0,r=r+Math.imul(f,Y)|0,i=(i=i+Math.imul(f,W)|0)+Math.imul(m,Y)|0,s=s+Math.imul(m,W)|0;var bt=(c+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(p,X)|0))<<13)|0;c=((s=s+Math.imul(p,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,V),i=(i=Math.imul(w,z))+Math.imul(E,V)|0,s=Math.imul(E,z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(x,$)|0,s=s+Math.imul(x,H)|0,r=r+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(v,Y)|0,s=s+Math.imul(v,W)|0,r=r+Math.imul(f,X)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,G)|0;var Tt=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(p,Q)|0))<<13)|0;c=((s=s+Math.imul(p,tt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(P,V),i=(i=Math.imul(P,z))+Math.imul(M,V)|0,s=Math.imul(M,z),r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(E,$)|0,s=s+Math.imul(E,H)|0,r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(g,X)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(v,X)|0,s=s+Math.imul(v,G)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,tt)|0;var xt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(p,nt)|0))<<13)|0;c=((s=s+Math.imul(p,rt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(k,V),i=(i=Math.imul(k,z))+Math.imul(I,V)|0,s=Math.imul(I,z),r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,H)|0,r=r+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,Y)|0,s=s+Math.imul(E,W)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,G)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,s=s+Math.imul(v,tt)|0,r=r+Math.imul(f,nt)|0,i=(i=i+Math.imul(f,rt)|0)+Math.imul(m,nt)|0,s=s+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(h,st)|0)|0)+((8191&(i=(i=i+Math.imul(h,ot)|0)+Math.imul(p,st)|0))<<13)|0;c=((s=s+Math.imul(p,ot)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,V),i=(i=Math.imul(N,z))+Math.imul(_,V)|0,s=Math.imul(_,z),r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(I,$)|0,s=s+Math.imul(I,H)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(M,Y)|0,s=s+Math.imul(M,W)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(E,X)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(v,nt)|0,s=s+Math.imul(v,rt)|0,r=r+Math.imul(f,st)|0,i=(i=i+Math.imul(f,ot)|0)+Math.imul(m,st)|0,s=s+Math.imul(m,ot)|0;var wt=(c+(r=r+Math.imul(h,lt)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(p,lt)|0))<<13)|0;c=((s=s+Math.imul(p,ct)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,z))+Math.imul(B,V)|0,s=Math.imul(B,z),r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(_,$)|0,s=s+Math.imul(_,H)|0,r=r+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(I,Y)|0,s=s+Math.imul(I,W)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(x,nt)|0,s=s+Math.imul(x,rt)|0,r=r+Math.imul(g,st)|0,i=(i=i+Math.imul(g,ot)|0)+Math.imul(v,st)|0,s=s+Math.imul(v,ot)|0,r=r+Math.imul(f,lt)|0,i=(i=i+Math.imul(f,ct)|0)+Math.imul(m,lt)|0,s=s+Math.imul(m,ct)|0;var Et=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,pt)|0)+Math.imul(p,ht)|0))<<13)|0;c=((s=s+Math.imul(p,pt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(F,V),i=(i=Math.imul(F,z))+Math.imul(j,V)|0,s=Math.imul(j,z),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(B,$)|0,s=s+Math.imul(B,H)|0,r=r+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(_,Y)|0,s=s+Math.imul(_,W)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,G)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(E,nt)|0,s=s+Math.imul(E,rt)|0,r=r+Math.imul(T,st)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(x,st)|0,s=s+Math.imul(x,ot)|0,r=r+Math.imul(g,lt)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(v,lt)|0,s=s+Math.imul(v,ct)|0,r=r+Math.imul(f,ht)|0,i=(i=i+Math.imul(f,pt)|0)+Math.imul(m,ht)|0,s=s+Math.imul(m,pt)|0;var At=(c+(r=r+Math.imul(h,ft)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(p,ft)|0))<<13)|0;c=((s=s+Math.imul(p,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(F,$),i=(i=Math.imul(F,H))+Math.imul(j,$)|0,s=Math.imul(j,H),r=r+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,Y)|0,s=s+Math.imul(B,W)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,G)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,tt)|0,r=r+Math.imul(P,nt)|0,i=(i=i+Math.imul(P,rt)|0)+Math.imul(M,nt)|0,s=s+Math.imul(M,rt)|0,r=r+Math.imul(w,st)|0,i=(i=i+Math.imul(w,ot)|0)+Math.imul(E,st)|0,s=s+Math.imul(E,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(x,lt)|0,s=s+Math.imul(x,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,pt)|0)+Math.imul(v,ht)|0,s=s+Math.imul(v,pt)|0;var Pt=(c+(r=r+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;c=((s=s+Math.imul(m,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,W))+Math.imul(j,Y)|0,s=Math.imul(j,W),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,X)|0,s=s+Math.imul(B,G)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(I,nt)|0,s=s+Math.imul(I,rt)|0,r=r+Math.imul(P,st)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,ot)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(E,lt)|0,s=s+Math.imul(E,ct)|0,r=r+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,pt)|0)+Math.imul(x,ht)|0,s=s+Math.imul(x,pt)|0;var Mt=(c+(r=r+Math.imul(g,ft)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;c=((s=s+Math.imul(v,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(F,X),i=(i=Math.imul(F,G))+Math.imul(j,X)|0,s=Math.imul(j,G),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(_,nt)|0,s=s+Math.imul(_,rt)|0,r=r+Math.imul(k,st)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(I,st)|0,s=s+Math.imul(I,ot)|0,r=r+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(M,lt)|0,s=s+Math.imul(M,ct)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,pt)|0)+Math.imul(E,ht)|0,s=s+Math.imul(E,pt)|0;var Ct=(c+(r=r+Math.imul(T,ft)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(x,ft)|0))<<13)|0;c=((s=s+Math.imul(x,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(j,Q)|0,s=Math.imul(j,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(B,nt)|0,s=s+Math.imul(B,rt)|0,r=r+Math.imul(N,st)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(_,st)|0,s=s+Math.imul(_,ot)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(I,lt)|0,s=s+Math.imul(I,ct)|0,r=r+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,pt)|0)+Math.imul(M,ht)|0,s=s+Math.imul(M,pt)|0;var kt=(c+(r=r+Math.imul(w,ft)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(E,ft)|0))<<13)|0;c=((s=s+Math.imul(E,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(F,nt),i=(i=Math.imul(F,rt))+Math.imul(j,nt)|0,s=Math.imul(j,rt),r=r+Math.imul(L,st)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(B,st)|0,s=s+Math.imul(B,ot)|0,r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(_,lt)|0,s=s+Math.imul(_,ct)|0,r=r+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,pt)|0)+Math.imul(I,ht)|0,s=s+Math.imul(I,pt)|0;var It=(c+(r=r+Math.imul(P,ft)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(M,ft)|0))<<13)|0;c=((s=s+Math.imul(M,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(F,st),i=(i=Math.imul(F,ot))+Math.imul(j,st)|0,s=Math.imul(j,ot),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(B,lt)|0,s=s+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,pt)|0)+Math.imul(_,ht)|0,s=s+Math.imul(_,pt)|0;var Ot=(c+(r=r+Math.imul(k,ft)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(I,ft)|0))<<13)|0;c=((s=s+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(F,lt),i=(i=Math.imul(F,ct))+Math.imul(j,lt)|0,s=Math.imul(j,ct),r=r+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,pt)|0)+Math.imul(B,ht)|0,s=s+Math.imul(B,pt)|0;var Nt=(c+(r=r+Math.imul(N,ft)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(_,ft)|0))<<13)|0;c=((s=s+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(F,ht),i=(i=Math.imul(F,pt))+Math.imul(j,ht)|0,s=Math.imul(j,pt);var _t=(c+(r=r+Math.imul(L,ft)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(B,ft)|0))<<13)|0;c=((s=s+Math.imul(B,mt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Dt=(c+(r=Math.imul(F,ft))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(j,ft)|0))<<13)|0;return c=((s=Math.imul(j,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,l[0]=yt,l[1]=gt,l[2]=vt,l[3]=bt,l[4]=Tt,l[5]=xt,l[6]=St,l[7]=wt,l[8]=Et,l[9]=At,l[10]=Pt,l[11]=Mt,l[12]=Ct,l[13]=kt,l[14]=It,l[15]=Ot,l[16]=Nt,l[17]=_t,l[18]=Dt,0!==c&&(l[19]=c,n.length++),n};function g(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,l=Math.min(s,e.length-1),c=Math.max(0,s-t.length+1);c<=l;c++){var u=s-c,h=(0|t.words[u])*(0|e.words[c]),p=67108863&h;a=67108863&(p=p+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(p>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n._strip()}function v(t,e,n){return g(t,e,n)}function b(t,e){this.x=t,this.y=e}Math.imul||(y=m),s.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):n<63?m(this,t,e):n<1024?g(this,t,e):v(this,t,e)},b.prototype.makeRBT=function(t){for(var e=new Array(t),n=s.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},b.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},b.prototype.permute=function(t,e,n,r,i,s){for(var o=0;o<s;o++)r[o]=e[t[o]],i[o]=n[t[o]]},b.prototype.transform=function(t,e,n,r,i,s){this.permute(s,t,e,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var h=l,p=c,d=0;d<o;d++){var f=n[u+d],m=r[u+d],y=n[u+d+o],g=r[u+d+o],v=h*y-p*g;g=h*g+p*y,y=v,n[u+d]=f+y,r[u+d]=m+g,n[u+d+o]=f-y,r[u+d+o]=m-g,d!==a&&(v=l*h-c*p,p=l*p+c*h,h=v)}},b.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},b.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},b.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},b.prototype.convert13b=function(t,e,n,i){for(var s=0,o=0;o<e;o++)s+=0|t[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*e;o<i;++o)n[o]=0;r(0===s),r(!(-8192&s))},b.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},b.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),h=new Array(r),p=n.words;p.length=r,this.convert13b(t.words,t.length,o,r),this.convert13b(e.words,e.length,c,r),this.transform(o,s,a,l,r,i),this.transform(c,s,u,h,r,i);for(var d=0;d<r;d++){var f=a[d]*u[d]-l[d]*h[d];l[d]=a[d]*h[d]+l[d]*u[d],a[d]=f}return this.conjugate(a,l,r),this.transform(a,l,p,s,r,i),this.conjugate(p,s,r),this.normalize13b(p,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n._strip()},s.prototype.mul=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},s.prototype.mulf=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),v(this,t,e)},s.prototype.imul=function(t){return this.clone().mulTo(t,this)},s.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var n=0,i=0;i<this.length;i++){var s=(0|this.words[i])*t,o=(67108863&s)+(67108863&n);n>>=26,n+=s/67108864|0,n+=o>>>26,this.words[i]=67108863&o}return 0!==n&&(this.words[i]=n,this.length++),e?this.ineg():this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=t.words[r]>>>i&1}return e}(t);if(0===e.length)return new s(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e<this.length;e++){var a=this.words[e]&s,l=(0|this.words[e])-a<<n;this.words[e]=l|o,o=a>>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},s.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},s.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),a=67108863^67108863>>>s<<s,l=n;if(i-=o,i=Math.max(0,i),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-s|h>>>s,u=h&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},s.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},s.prototype.maskn=function(t){return this.clone().imaskn(t)},s.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},s.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},s.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},s.prototype.addn=function(t){return this.clone().iaddn(t)},s.prototype.subn=function(t){return this.clone().isubn(t)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(t,e,n){var i,s,o=t.length+n;this._expand(o);var a=0;for(i=0;i<t.length;i++){s=(0|this.words[i+n])+a;var l=(0|t.words[i])*e;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this._strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this._strip()},s.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!=(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==e){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var p=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(p=Math.min(p/o|0,67108863),r._ishlnsubmul(i,p,h);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=p)}return a&&a._strip(),r._strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:a.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new s(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,o,a},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},s.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=(1<<26)%t,i=0,s=this.length-1;s>=0;s--)i=(n*i+(0|this.words[s]))%t;return e?-i:i},s.prototype.modn=function(t){return this.modrn(t)},s.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var s=(0|this.words[i])+67108864*n;this.words[i]=s/t|0,n=s%t}return this._strip(),e?this.ineg():this},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),h=e.clone();!e.isZero();){for(var p=0,d=1;!(e.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;!(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(h)),a.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),o.isub(l)):(n.isub(e),a.isub(i),l.isub(o))}return{a,b:l,gcd:n.iushln(c)}},s.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new s(1),a=new s(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;!(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,p=1;!(n.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(a)):(n.isub(e),a.isub(o))}return(i=0===e.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(t),i},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var s=e;e=n,n=s}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return!(1&this.words[0])},s.prototype.isOdd=function(){return!(1&~this.words[0])},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},s.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},s.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},s.prototype.gtn=function(t){return 1===this.cmpn(t)},s.prototype.gt=function(t){return 1===this.cmp(t)},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return-1===this.cmpn(t)},s.prototype.lt=function(t){return-1===this.cmp(t)},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return 0===this.cmpn(t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.red=function(t){return new P(t)},s.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var T={k256:null,p224:null,p192:null,p25519:null};function x(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function P(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function M(t){P.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}x.prototype._tmp=function(){var t=new s(null);return t.words=new Array(Math.ceil(this.n/13)),t},x.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(t,e){t.iushrn(this.n,0,e)},x.prototype.imulK=function(t){return t.imul(this.k)},i(S,x),S.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];for(e.words[e.length++]=s&n,i=10;i<t.length;i++){var o=0|t.words[i];t.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,t.words[i-10]=s,0===s&&t.length>10?t.length-=10:t.length-=9},S.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,x),i(E,x),i(A,x),A.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},s._prime=function(t){if(T[t])return T[t];var e;if("k256"===t)e=new S;else if("p224"===t)e=new w;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return T[t]=e,e},P.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},P.prototype._verify2=function(t,e){r(!(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},P.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},P.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},P.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},P.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},P.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},P.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},P.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},P.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},P.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},P.prototype.isqr=function(t){return this.imul(t,t.clone())},P.prototype.sqr=function(t){return this.mul(t,t)},P.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new s(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),p=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),f=o;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();r(y<f);var g=this.pow(h,new s(1).iushln(f-y-1));p=p.redMul(g),h=g.redSqr(),d=d.redMul(h),f=y}return p},P.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},P.prototype.pow=function(t,e){if(e.isZero())return new s(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],o=0,a=0,l=e.bitLength()%26;for(0===l&&(l=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var h=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4==++a||0===r&&0===u)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}l=26}return i},P.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},P.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},s.mont=function(t){return new M(t)},i(M,P),M.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},M.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},M.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},M.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new s(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},7890:(t,e,n)=>{var r=n(5550);t.exports=function(t,e,n){for(var i=0,s=arguments.length>2?n:r(e),o=new t(s);s>i;)o[i]=e[i++];return o}},8290:(t,e,n)=>{var r=n(83843),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=h;var s=Object.create(n(22956));s.inherits=n(46324);var o=n(50272),a=n(97344);s.inherits(h,o);for(var l=i(a.prototype),c=0;c<l.length;c++){var u=l[c];h.prototype[u]||(h.prototype[u]=a.prototype[u])}function h(t){if(!(this instanceof h))return new h(t);o.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",p)}function p(){this.allowHalfOpen||this._writableState.ended||r.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},8422:(t,e,n)=>{var r=n(80421),i=n(33088),s=n(23878),o=n(22521),a=n(83115),l=n(32001).IteratorPrototype,c=a("dispose");o(l,c)||i(l,c,(function(){var t=s(this,"return");t&&r(t,this)}))},8520:t=>{t.exports=Function.prototype.apply},8732:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(97898),i=n(61572);e.default=class{constructor(t,e){var n;this._map=void 0,this._rawMappings=void 0,this._sourceFileName=void 0,this._lastGenLine=0,this._lastSourceLine=0,this._lastSourceColumn=0,this._inputMap=null;const s=this._map=new r.GenMapping({sourceRoot:t.sourceRoot});if(this._sourceFileName=null==(n=t.sourceFileName)?void 0:n.replace(/\\/g,"/"),this._rawMappings=void 0,t.inputSourceMap){this._inputMap=new i.TraceMap(t.inputSourceMap);const e=this._inputMap.resolvedSources;if(e.length)for(let t=0;t<e.length;t++){var o;(0,r.setSourceContent)(s,e[t],null==(o=this._inputMap.sourcesContent)?void 0:o[t])}}if("string"!=typeof e||t.inputSourceMap){if("object"==typeof e)for(const t of Object.keys(e))(0,r.setSourceContent)(s,t.replace(/\\/g,"/"),e[t])}else(0,r.setSourceContent)(s,this._sourceFileName,e)}get(){return(0,r.toEncodedMap)(this._map)}getDecoded(){return(0,r.toDecodedMap)(this._map)}getRawMappings(){return this._rawMappings||(this._rawMappings=(0,r.allMappings)(this._map))}mark(t,e,n,s,o,a){var l;let c;if(this._rawMappings=void 0,null!=e)if(this._inputMap){if(c=(0,i.originalPositionFor)(this._inputMap,{line:e,column:n}),c.name&&(o||null!=s&&c.column===n))s=c.name;else if(o){const t=(0,i.originalPositionFor)(this._inputMap,o);t.name&&(s=t.name)}}else c={name:null,source:(null==a?void 0:a.replace(/\\/g,"/"))||this._sourceFileName,line:e,column:n};(0,r.maybeAddMapping)(this._map,{name:s,generated:t,source:null==(l=c)?void 0:l.source,original:c})}}},9106:(t,e,n)=>{var r=n(2269),i=n(60047),s=TypeError;t.exports=function(t){if(r(t))return t;throw new s(i(t)+" is not a function")}},9283:(t,e,n)=>{n.d(e,{$K:()=>Pi,DK:()=>Hr,Eg:()=>Zr,Lz:()=>ir,NZ:()=>lt,OP:()=>Tt,S7:()=>si,Ux:()=>Gr,VH:()=>Er,Wu:()=>Ii,Z9:()=>ie,cU:()=>hi,c_:()=>te,dz:()=>Ir,ld:()=>ei,qf:()=>Dr,vX:()=>Rr,w4:()=>pr,wJ:()=>oi,xO:()=>ot});var r=n(38273),i=n(15473),s=n(27390);function o(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function a(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function l(t,e){if(!e.anchorNode)return!1;try{return a(t,e.anchorNode)}catch(t){return!1}}function c(t){return 3==t.nodeType?S(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function u(t,e,n,r){return!!n&&(d(t,e,n,r,-1)||d(t,e,n,r,1))}function h(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function p(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function d(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:f(t))){if("DIV"==t.nodeName)return!1;let n=t.parentNode;if(!n||1!=n.nodeType)return!1;e=h(t)+(i<0?0:1),t=n}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(i<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=i<0?f(t):0}}}function f(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function m(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function y(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function g(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}class v{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:n}=t;this.set(e,Math.min(t.anchorOffset,e?f(e):0),n,Math.min(t.focusOffset,n?f(n):0))}set(t,e,n,r){this.anchorNode=t,this.anchorOffset=e,this.focusNode=n,this.focusOffset=r}}let b,T=null;function x(t){if(t.setActive)return t.setActive();if(T)return t.focus(T);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(null==T?{get preventScroll(){return T={preventScroll:!0},!0}}:void 0),!T){T=!1;for(let t=0;t<e.length;){let n=e[t++],r=e[t++],i=e[t++];n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}}}function S(t,e,n=e){let r=b||(b=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function w(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function E(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function A(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function P(t,e){for(let n=t,r=e;;){if(3==n.nodeType&&r>0)return{node:n,offset:r};if(1==n.nodeType&&r>0){if("false"==n.contentEditable)return null;n=n.childNodes[r-1],r=f(n)}else{if(!n.parentNode||p(n))return null;r=h(n),n=n.parentNode}}}function M(t,e){for(let n=t,r=e;;){if(3==n.nodeType&&r<n.nodeValue.length)return{node:n,offset:r};if(1==n.nodeType&&r<n.childNodes.length){if("false"==n.contentEditable)return null;n=n.childNodes[r],r=0}else{if(!n.parentNode||p(n))return null;r=h(n)+1,n=n.parentNode}}}class C{constructor(t,e,n=!0){this.node=t,this.offset=e,this.precise=n}static before(t,e){return new C(t.parentNode,h(t),e)}static after(t,e){return new C(t.parentNode,h(t)+1,e)}}const k=[];class I{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let n of this.children){if(n==t)return e;e+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}sync(t,e){if(2&this.flags){let n,r=this.dom,i=null;for(let s of this.children){if(7&s.flags){if(!s.dom&&(n=i?i.nextSibling:r.firstChild)){let t=I.get(n);(!t||!t.parent&&t.canReuseDOM(s))&&s.reuseDOM(n)}s.sync(t,e),s.flags&=-8}if(n=i?i.nextSibling:r.firstChild,e&&!e.written&&e.node==r&&n!=s.dom&&(e.written=!0),s.dom.parentNode==r)for(;n&&n!=s.dom;)n=O(n);else r.insertBefore(s.dom,n);i=s.dom}for(n=i?i.nextSibling:r.firstChild,n&&e&&e.node==r&&(e.written=!0);n;)n=O(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(t,e),n.flags&=-8)}reuseDOM(t){}localPosFromDOM(t,e){let n;if(t==this.dom)n=this.dom.childNodes[e];else{let r=0==f(t)?0:0==e?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;0==r&&e.firstChild!=e.lastChild&&(r=t==e.firstChild?-1:1),t=e}n=r<0?t:t.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!I.get(n);)n=n.nextSibling;if(!n)return this.length;for(let t=0,e=0;;t++){let r=this.children[t];if(r.dom==n)return e;e+=r.length+r.breakAfter}}domBoundsAround(t,e,n=0){let r=-1,i=-1,s=-1,o=-1;for(let a=0,l=n,c=n;a<this.children.length;a++){let n=this.children[a],u=l+n.length;if(l<t&&u>e)return n.domBoundsAround(t,e,l);if(u>=t&&-1==r&&(r=a,i=l),l>e&&n.dom.parentNode==this.dom){s=a,o=c;break}c=u,l=u+n.breakAfter}return{from:i,to:o<0?n+this.length:o,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:s<this.children.length&&s>=0?this.children[s].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,n=k){this.markDirty();for(let r=t;r<e;r++){let t=this.children[r];t.parent==this&&n.indexOf(t)<0&&t.destroy()}n.length<250?this.children.splice(t,e-t,...n):this.children=[].concat(this.children.slice(0,t),n,this.children.slice(e));for(let t=0;t<n.length;t++)n[t].setParent(this)}ignoreMutation(t){return!1}ignoreEvent(t){return!1}childCursor(t=this.length){return new N(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+("Text"==t?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(t,e,n,r,i,s){return!1}become(t){return!1}canReuseDOM(t){return t.constructor==this.constructor&&!(8&(this.flags|t.flags))}getSide(){return 0}destroy(){for(let t of this.children)t.parent==this&&t.destroy();this.parent=null}}function O(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}I.prototype.breakAfter=0;class N{constructor(t,e,n){this.children=t,this.pos=e,this.i=n,this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function _(t,e,n,r,i,s,o,a,l){let{children:c}=t,u=c.length?c[e]:null,h=s.length?s[s.length-1]:null,p=h?h.breakAfter:o;if(!(e==r&&u&&!o&&!p&&s.length<2&&u.merge(n,i,s.length?h:null,0==n,a,l))){if(r<c.length){let t=c[r];t&&(i<t.length||t.breakAfter&&(null==h?void 0:h.breakAfter))?(e==r&&(t=t.split(i),i=0),!p&&h&&t.merge(0,i,h,!0,0,l)?s[s.length-1]=t:((i||t.children.length&&!t.children[0].length)&&t.merge(0,i,null,!1,0,l),s.push(t))):(null==t?void 0:t.breakAfter)&&(h?h.breakAfter=1:o=1),r++}for(u&&(u.breakAfter=o,n>0&&(!o&&s.length&&u.merge(n,u.length,s[0],!1,a,0)?u.breakAfter=s.shift().breakAfter:(n<u.length||u.children.length&&0==u.children[u.children.length-1].length)&&u.merge(n,u.length,null,!1,a,0),e++));e<r&&s.length;)if(c[r-1].become(s[s.length-1]))r--,s.pop(),l=s.length?0:a;else{if(!c[e].become(s[0]))break;e++,s.shift(),a=s.length?0:l}!s.length&&e&&r<c.length&&!c[e-1].breakAfter&&c[r].merge(0,0,c[e-1],!1,a,l)&&e--,(e<r||s.length)&&t.replaceChildren(e,r,s)}}function D(t,e,n,r,i,s){let o=t.childCursor(),{i:a,off:l}=o.findPos(n,1),{i:c,off:u}=o.findPos(e,-1),h=e-n;for(let t of r)h+=t.length;t.length+=h,_(t,c,u,a,l,r,0,i,s)}let L="undefined"!=typeof navigator?navigator:{userAgent:"",vendor:"",platform:""},B="undefined"!=typeof document?document:{documentElement:{style:{}}};const R=/Edge\/(\d+)/.exec(L.userAgent),F=/MSIE \d/.test(L.userAgent),j=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(L.userAgent),U=!!(F||j||R),V=!U&&/gecko\/(\d+)/i.test(L.userAgent),z=!U&&/Chrome\/(\d+)/.exec(L.userAgent),q="webkitFontSmoothing"in B.documentElement.style,$=!U&&/Apple Computer/.test(L.vendor),H=$&&(/Mobile\/\w+/.test(L.userAgent)||L.maxTouchPoints>2);var K={mac:H||/Mac/.test(L.platform),windows:/Win/.test(L.platform),linux:/Linux|X11/.test(L.platform),ie:U,ie_version:F?B.documentMode||6:j?+j[1]:R?+R[1]:0,gecko:V,gecko_version:V?+(/Firefox\/(\d+)/.exec(L.userAgent)||[0,0])[1]:0,chrome:!!z,chrome_version:z?+z[1]:0,ios:H,android:/Android\b/.test(L.userAgent),webkit:q,safari:$,webkit_version:q?+(/\bAppleWebKit\/(\d+)/.exec(L.userAgent)||[0,0])[1]:0,tabSize:null!=B.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class Y extends I{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,n){return!(8&this.flags||n&&(!(n instanceof Y)||this.length-(e-t)+n.length>256||8&n.flags)||(this.text=this.text.slice(0,t)+(n?n.text:"")+this.text.slice(e),this.markDirty(),0))}split(t){let e=new Y(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new C(this.dom,t)}domBoundsAround(t,e,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;0==e&&n<0||e==r&&n>=0?K.chrome||K.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):n<0?i--:s<r&&s++;let a=S(t,i,s).getClientRects();if(!a.length)return null;let l=a[(o?o<0:n>=0)?0:a.length-1];return K.safari&&!o&&0==l.width&&(l=Array.prototype.find.call(a,(t=>t.width))||l),o?m(l,o<0):l||null}(this.dom,t,e)}}class W extends I{constructor(t,e=[],n=0){super(),this.mark=t,this.children=e,this.length=n;for(let t of e)t.setParent(this)}setAttrs(t){if(E(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,n,r,i,s){return!(n&&(!(n instanceof W&&n.mark.eq(this.mark))||t&&i<=0||e<this.length&&s<=0)||(D(this,t,e,n?n.children.slice():[],i-1,s-1),this.markDirty(),0))}split(t){let e=[],n=0,r=-1,i=0;for(let s of this.children){let o=n+s.length;o>t&&e.push(n<t?s.split(t-n):s),r<0&&n>=t&&(r=i),n=o,i++}let s=this.length-t;return this.length=t,r>-1&&(this.children.length=r,this.markDirty()),new W(this.mark,e,s)}domAtPos(t){return G(this,t)}coordsAt(t,e){return Q(this,t,e)}}class J extends I{static create(t,e,n){return new J(t,e,n)}constructor(t,e,n){super(),this.widget=t,this.length=e,this.side=n,this.prevWidget=null}split(t){let e=J.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,n,r,i,s){return!(n&&(!(n instanceof J&&this.widget.compare(n.widget))||t>0&&i<=0||e<this.length&&s<=0)||(this.length=t+(n?n.length:0)+(this.length-e),0))}become(t){return t instanceof J&&t.side==this.side&&this.widget.constructor==t.widget.constructor&&(this.widget.compare(t.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(0==this.length)return r.EY.empty;let t=this;for(;t.parent;)t=t.parent;let{view:e}=t,n=e&&e.state.doc,i=this.posAtStart;return n?n.slice(i,i+this.length):r.EY.empty}domAtPos(t){return(this.length?0==t:this.side>0)?C.before(this.dom):C.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let n=this.widget.coordsAt(this.dom,t,e);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let s=this.side?this.side<0:t>0;for(let e=s?r.length-1:0;i=r[e],!(t>0?0==e:e==r.length-1||i.top<i.bottom);e+=s?-1:1);return m(i,!s)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class X extends I{constructor(t){super(),this.side=t}get length(){return 0}merge(){return!1}become(t){return t instanceof X&&t.side==this.side}split(){return new X(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return this.side>0?C.before(this.dom):C.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return r.EY.empty}get isHidden(){return!0}}function G(t,e){let n=t.dom,{children:r}=t,i=0;for(let t=0;i<r.length;i++){let s=r[i],o=t+s.length;if(!(o==t&&s.getSide()<=0)){if(e>t&&e<o&&s.dom.parentNode==n)return s.domAtPos(e-t);if(e<=t)break;t=o}}for(let t=i;t>0;t--){let e=r[t-1];if(e.dom.parentNode==n)return e.domAtPos(e.length)}for(let t=i;t<r.length;t++){let e=r[t];if(e.dom.parentNode==n)return e.domAtPos(0)}return new C(n,0)}function Z(t,e,n){let r,{children:i}=t;n>0&&e instanceof W&&i.length&&(r=i[i.length-1])instanceof W&&r.mark.eq(e.mark)?Z(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function Q(t,e,n){let r=null,i=-1,s=null,o=-1;!function t(e,a){for(let l=0,c=0;l<e.children.length&&c<=a;l++){let u=e.children[l],h=c+u.length;h>=a&&(u.children.length?t(u,a-c):(!s||s.isHidden&&(n>0||tt(s,u)))&&(h>a||c==h&&u.getSide()>0)?(s=u,o=a-c):(c<a||c==h&&u.getSide()<0&&!u.isHidden)&&(r=u,i=a-c)),c=h}}(t,e);let a=(n<0?r:s)||r||s;return a?a.coordsAt(Math.max(0,a==r?i:o),n):function(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=c(e);return n[n.length-1]||null}(t)}function tt(t,e){let n=t.coordsAt(0,1),r=e.coordsAt(0,1);return n&&r&&r.top<n.bottom}function et(t,e){for(let n in t)"class"==n&&e.class?e.class+=" "+t.class:"style"==n&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}Y.prototype.children=J.prototype.children=X.prototype.children=k;const nt=Object.create(null);function rt(t,e,n){if(t==e)return!0;t||(t=nt),e||(e=nt);let r=Object.keys(t),i=Object.keys(e);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let s of r)if(s!=n&&(-1==i.indexOf(s)||t[s]!==e[s]))return!1;return!0}function it(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,"style"==i?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,"style"==i?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function st(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class ot{eq(t){return!1}updateDOM(t,e){return!1}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(t){return!0}coordsAt(t,e,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(t){}}var at=function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t}(at||(at={}));class lt extends r.FB{constructor(t,e,n,r){super(),this.startSide=t,this.endSide=e,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(t){return new ct(t)}static widget(t){let e=Math.max(-1e4,Math.min(1e4,t.side||0)),n=!!t.block;return e+=n&&!t.inlineOrder?e>0?3e8:-4e8:e>0?1e8:-1e8,new ht(t,e,e,n,t.widget||null,!1)}static replace(t){let e,n,r=!!t.block;if(t.isBlockGap)e=-5e8,n=4e8;else{let{start:i,end:s}=pt(t,r);e=(i?r?-3e8:-1:5e8)-1,n=1+(s?r?2e8:1:-6e8)}return new ht(t,e,n,r,t.widget||null,!0)}static line(t){return new ut(t)}static set(t,e=!1){return r.om.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}lt.none=r.om.empty;class ct extends lt{constructor(t){let{start:e,end:n}=pt(t);super(e?-1:5e8,n?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,n;return this==t||t instanceof ct&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(n=t.attrs)||void 0===n?void 0:n.class))&&rt(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}ct.prototype.point=!1;class ut extends lt{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof ut&&this.spec.class==t.spec.class&&rt(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}ut.prototype.mapMode=r.iR.TrackBefore,ut.prototype.point=!0;class ht extends lt{constructor(t,e,n,i,s,o){super(e,n,s,t),this.block=i,this.isReplace=o,this.mapMode=i?e<=0?r.iR.TrackBefore:r.iR.TrackAfter:r.iR.TrackDel}get type(){return this.startSide!=this.endSide?at.WidgetRange:this.startSide<=0?at.WidgetBefore:at.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof ht&&((e=this.widget)==(n=t.widget)||!!(e&&n&&e.compare(n)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,n}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function pt(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return null==n&&(n=t.inclusive),null==r&&(r=t.inclusive),{start:null!=n?n:e,end:null!=r?r:e}}function dt(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}ht.prototype.point=!0;class ft extends I{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,n,r,i,s){if(n){if(!(n instanceof ft))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),D(this,t,e,n?n.children.slice():[],i,s),!0}split(t){let e=new ft;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i:n,off:r}=this.childPos(t);r&&(e.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let t=n;t<this.children.length;t++)e.append(this.children[t],0);for(;n>0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){rt(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Z(this,t,e)}addLineDeco(t){let e=t.spec.attributes,n=t.spec.class;e&&(this.attrs=et(e,this.attrs||{})),n&&(this.attrs=et({class:n},this.attrs||{}))}domAtPos(t){return G(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var n;this.dom?4&this.flags&&(E(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(it(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let r=this.dom.lastChild;for(;r&&I.get(r)instanceof W;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=I.get(r))||void 0===n?void 0:n.isEditable)||K.ios&&this.children.some((t=>t instanceof Y))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let n of this.children){if(!(n instanceof Y)||/[^ -~]/.test(n.text))return null;let r=c(n.dom);if(1!=r.length)return null;e+=r[0].width,t=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let n=Q(this,t,e);if(!this.children.length&&n&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=n.bottom-n.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight<e){let r=(e-t.textHeight)/2;return{top:n.top+r,bottom:n.bottom-r,left:n.left,right:n.left}}}return n}become(t){return t instanceof ft&&0==this.children.length&&0==t.children.length&&rt(this.attrs,t.attrs)&&this.breakAfter==t.breakAfter}covers(){return!0}static find(t,e){for(let n=0,r=0;n<t.children.length;n++){let i=t.children[n],s=r+i.length;if(s>=e){if(i instanceof ft)return i;if(s>e)break}r=s+i.breakAfter}return null}}class mt extends I{constructor(t,e,n){super(),this.widget=t,this.length=e,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(t,e,n,r,i,s){return!(n&&(!(n instanceof mt&&this.widget.compare(n.widget))||t>0&&i<=0||e<this.length&&s<=0)||(this.length=t+(n?n.length:0)+(this.length-e),0))}domAtPos(t){return 0==t?C.before(this.dom):C.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let n=new mt(this.widget,e,this.deco);return n.breakAfter=this.breakAfter,n}get children(){return k}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):r.EY.empty}domBoundsAround(){return null}become(t){return t instanceof mt&&t.widget.constructor==this.widget.constructor&&(t.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=t.widget,this.length=t.length,this.deco=t.deco,this.breakAfter=t.breakAfter,!0)}ignoreMutation(){return!0}ignoreEvent(t){return this.widget.ignoreEvent(t)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(t,e){return this.widget.coordsAt(this.dom,t,e)||(this.widget instanceof yt?null:m(this.dom.getBoundingClientRect(),this.length?0==t:e<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(t){let{startSide:e,endSide:n}=this.deco;return e!=n&&(t<0?e<0:n>0)}}class yt extends ot{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class gt{constructor(t,e,n,r){this.doc=t,this.pos=e,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof mt&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ft),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(vt(new X(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof mt||this.getLine()}buildText(t,e,n){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let r=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-n)),this.getLine().append(vt(new Y(this.text.slice(this.textOff,this.textOff+r)),e),n),this.atCursorPos=!0,this.textOff+=r,t-=r,n=0}}span(t,e,n,r){this.buildText(e-t,n,r),this.pos=e,this.openStart<0&&(this.openStart=r)}point(t,e,n,r,i,s){if(this.disallowBlockEffectsFor[s]&&n instanceof ht){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=e-t;if(n instanceof ht)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new mt(n.widget||bt.block,o,n));else{let s=J.create(n.widget||bt.inline,o,o?0:n.startSide),a=this.atCursorPos&&!s.isEditable&&i<=r.length&&(t<e||n.startSide>0),l=!s.isEditable&&(t<e||i>r.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||s.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(vt(new X(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(vt(s,r),i),this.atCursorPos=l,this.pendingBuffer=l?t<e||i>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);o&&(this.textOff+o<=this.text.length?this.textOff+=o:(this.skip+=o-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=i)}static build(t,e,n,i,s){let o=new gt(t,e,n,s);return o.openEnd=r.om.spans(i,e,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function vt(t,e){for(let n of e)t=new W(n,[t],t.length);return t}class bt extends ot{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}bt.inline=new bt("span"),bt.block=new bt("div");var Tt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(Tt||(Tt={}));const xt=Tt.LTR,St=Tt.RTL;function wt(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const Et=wt("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),At=wt("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Pt=Object.create(null),Mt=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);Pt[e]=n,Pt[n]=-e}function Ct(t){return t<=247?Et[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?At[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const kt=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class It{get dir(){return this.level%2?St:xt}constructor(t,e,n){this.from=t,this.to=e,this.level=n}side(t,e){return this.dir==e==t?this.to:this.from}forward(t,e){return t==(this.dir==e)}static find(t,e,n,r){let i=-1;for(let s=0;s<t.length;s++){let o=t[s];if(o.from<=e&&o.to>=e){if(o.level==n)return s;(i<0||(0!=r?r<0?o.from<e:o.to>e:t[i].level>o.level))&&(i=s)}}if(i<0)throw new RangeError("Index out of range");return i}}function Ot(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!Ot(r.inner,i.inner))return!1}return!0}const Nt=[];function _t(t,e,n,r,i,s,o){let a=r%2?2:1;if(r%2==i%2)for(let l=e,c=0;l<n;){let e=!0,u=!1;if(c==s.length||l<s[c].from){let t=Nt[l];t!=a&&(e=!1,u=16==t)}let h=e||1!=a?null:[],p=e?r:r+1,d=l;t:for(;;)if(c<s.length&&d==s[c].from){if(u)break t;let f=s[c];if(!e)for(let t=f.to,e=c+1;;){if(t==n)break t;if(!(e<s.length&&s[e].from==t)){if(Nt[t]==a)break t;break}t=s[e++].to}c++,h?h.push(f):(f.from>l&&o.push(new It(l,f.from,p)),Dt(t,f.direction==xt!=!(p%2)?r+1:r,i,f.inner,f.from,f.to,o),l=f.to),d=f.to}else{if(d==n||(e?Nt[d]!=a:Nt[d]==a))break;d++}h?_t(t,l,d,r+1,i,h,o):l<d&&o.push(new It(l,d,p)),l=d}else for(let l=n,c=s.length;l>e;){let n=!0,u=!1;if(!c||l>s[c-1].to){let t=Nt[l-1];t!=a&&(n=!1,u=16==t)}let h=n||1!=a?null:[],p=n?r:r+1,d=l;t:for(;;)if(c&&d==s[c-1].to){if(u)break t;let f=s[--c];if(!n)for(let t=f.from,n=c;;){if(t==e)break t;if(!n||s[n-1].to!=t){if(Nt[t-1]==a)break t;break}t=s[--n].from}h?h.push(f):(f.to<l&&o.push(new It(f.to,l,p)),Dt(t,f.direction==xt!=!(p%2)?r+1:r,i,f.inner,f.from,f.to,o),l=f.from),d=f.from}else{if(d==e||(n?Nt[d-1]!=a:Nt[d-1]==a))break;d--}h?_t(t,d,l,r+1,i,h,o):d<l&&o.push(new It(d,l,p)),l=d}}function Dt(t,e,n,r,i,s,o){let a=e%2?2:1;!function(t,e,n,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,a=s<r.length?r[s].from:n,l=s?256:i;for(let e=o,n=l,r=l;e<a;e++){let i=Ct(t.charCodeAt(e));512==i?i=n:8==i&&4==r&&(i=16),Nt[e]=4==i?2:i,7&i&&(r=i),n=i}for(let t=o,e=l,r=l;t<a;t++){let i=Nt[t];if(128==i)t<a-1&&e==Nt[t+1]&&24&e?i=Nt[t]=e:Nt[t]=256;else if(64==i){let i=t+1;for(;i<a&&64==Nt[i];)i++;let s=t&&8==e||i<n&&8==Nt[i]?1==r?1:8:256;for(let e=t;e<i;e++)Nt[e]=s;t=i-1}else 8==i&&1==r&&(Nt[t]=1);e=i,7&i&&(r=i)}}}(t,i,s,r,a),function(t,e,n,r,i){let s=1==i?2:1;for(let o=0,a=0,l=0;o<=r.length;o++){let c=o?r[o-1].to:e,u=o<r.length?r[o].from:n;for(let e,n,r,o=c;o<u;o++)if(n=Pt[e=t.charCodeAt(o)])if(n<0){for(let t=a-3;t>=0;t-=3)if(Mt[t+1]==-n){let e=Mt[t+2],n=2&e?i:4&e?1&e?s:i:0;n&&(Nt[o]=Nt[Mt[t]]=n),a=t;break}}else{if(189==Mt.length)break;Mt[a++]=o,Mt[a++]=e,Mt[a++]=l}else if(2==(r=Nt[o])||1==r){let t=r==i;l=t?0:1;for(let e=a-3;e>=0;e-=3){let n=Mt[e+2];if(2&n)break;if(t)Mt[e+2]|=2;else{if(4&n)break;Mt[e+2]|=4}}}}}(t,i,s,r,a),function(t,e,n,r){for(let i=0,s=r;i<=n.length;i++){let o=i?n[i-1].to:t,a=i<n.length?n[i].from:e;for(let l=o;l<a;){let o=Nt[l];if(256==o){let o=l+1;for(;;)if(o==a){if(i==n.length)break;o=n[i++].to,a=i<n.length?n[i].from:e}else{if(256!=Nt[o])break;o++}let c=1==s,u=c==(1==(o<e?Nt[o]:r))?c?1:2:r;for(let e=o,r=i,s=r?n[r-1].to:t;e>l;)e==s&&(e=n[--r].from,s=r?n[r-1].to:t),Nt[--e]=u;l=o}else s=o,l++}}}(i,s,r,a),_t(t,i,s,e,n,r,o)}function Lt(t){return[new It(0,t,0)]}let Bt="";function Rt(t,e,n,i,s){var o;let a=i.head-t.from,l=It.find(e,a,null!==(o=i.bidiLevel)&&void 0!==o?o:-1,i.assoc),c=e[l],u=c.side(s,n);if(a==u){let t=l+=s?1:-1;if(t<0||t>=e.length)return null;c=e[l=t],a=c.side(!s,n),u=c.side(s,n)}let h=(0,r.zK)(t.text,a,c.forward(s,n));(h<c.from||h>c.to)&&(h=u),Bt=t.text.slice(Math.min(a,h),Math.max(a,h));let p=l==(s?e.length-1:0)?null:e[l+(s?1:-1)];return p&&h==u&&p.level+(s?0:1)<c.level?r.OF.cursor(p.side(!s,n)+t.from,p.forward(s,n)?1:-1,p.level):r.OF.cursor(h+t.from,c.forward(s,n)?-1:1,c.level)}function Ft(t,e,n){for(let r=e;r<n;r++){let e=Ct(t.charCodeAt(r));if(1==e)return xt;if(2==e||4==e)return St}return xt}const jt=r.sj.define(),Ut=r.sj.define(),Vt=r.sj.define(),zt=r.sj.define(),qt=r.sj.define(),$t=r.sj.define(),Ht=r.sj.define(),Kt=r.sj.define(),Yt=r.sj.define(),Wt=r.sj.define({combine:t=>t.some((t=>t))}),Jt=r.sj.define({combine:t=>t.some((t=>t))}),Xt=r.sj.define();class Gt{constructor(t,e="nearest",n="nearest",r=5,i=5,s=!1){this.range=t,this.y=e,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=s}map(t){return t.empty?this:new Gt(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Gt(r.OF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Zt=r.Pe.define({map:(t,e)=>t.map(e)}),Qt=r.Pe.define();function te(t,e,n){let r=t.facet(zt);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const ee=r.sj.define({combine:t=>!t.length||t[0]});let ne=0;const re=r.sj.define({combine:t=>t.filter(((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0}))});class ie{constructor(t,e,n,r,i){this.id=t,this.create=e,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=i(this),this.extension=this.baseExtensions.concat(re.of({plugin:this,arg:void 0}))}of(t){return this.baseExtensions.concat(re.of({plugin:this,arg:t}))}static define(t,e){const{eventHandlers:n,eventObservers:r,provide:i,decorations:s}=e||{};return new ie(ne++,t,n,r,(t=>{let e=[];return s&&e.push(le.of((e=>{let n=e.plugin(t);return n?s(n):lt.none}))),i&&e.push(i(t)),e}))}static fromClass(t,e){return ie.define(((e,n)=>new t(e,n)),e)}}class se{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(te(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(t,this.spec.arg)}catch(e){te(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){te(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const oe=r.sj.define(),ae=r.sj.define(),le=r.sj.define(),ce=r.sj.define(),ue=r.sj.define(),he=r.sj.define();function pe(t,e){let n=t.state.facet(he);if(!n.length)return n;let i=n.map((e=>e instanceof Function?e(t):e)),s=[];return r.om.spans(i,e.from,e.to,{point(){},span(t,n,r,i){let o=t-e.from,a=n-e.from,l=s;for(let t=r.length-1;t>=0;t--,i--){let n,s=r[t].spec.bidiIsolate;if(null==s&&(s=Ft(e.text,o,a)),i>0&&l.length&&(n=l[l.length-1]).to==o&&n.direction==s)n.to=a,l=n.inner;else{let t={from:o,to:a,direction:s,inner:[]};l.push(t),l=t.inner}}}}),s}const de=r.sj.define();function fe(t){let e=0,n=0,r=0,i=0;for(let s of t.state.facet(de)){let o=s(t);o&&(null!=o.left&&(e=Math.max(e,o.left)),null!=o.right&&(n=Math.max(n,o.right)),null!=o.top&&(r=Math.max(r,o.top)),null!=o.bottom&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const me=r.sj.define();class ye{constructor(t,e,n,r){this.fromA=t,this.toA=e,this.fromB=n,this.toB=r}join(t){return new ye(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,n=this;for(;e>0;e--){let r=t[e-1];if(!(r.fromA>n.toA)){if(r.toA<n.fromA)break;n=n.join(r),t.splice(e-1,1)}}return t.splice(e,0,n),t}static extendWithRanges(t,e){if(0==e.length)return t;let n=[];for(let r=0,i=0,s=0,o=0;;r++){let a=r==t.length?null:t[r],l=s-o,c=a?a.fromB:1e9;for(;i<e.length&&e[i]<c;){let t=e[i],r=e[i+1],s=Math.max(o,t),a=Math.min(c,r);if(s<=a&&new ye(s+l,a+l,s,a).addToSet(n),r>c)break;i+=2}if(!a)return n;new ye(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),s=a.toA,o=a.toB}}}class ge{constructor(t,e,n){this.view=t,this.state=e,this.transactions=n,this.flags=0,this.startState=t.state,this.changes=r.VR.empty(this.startState.doc.length);for(let t of n)this.changes=this.changes.compose(t.changes);let i=[];this.changes.iterChangedRanges(((t,e,n,r)=>i.push(new ye(t,e,n,r)))),this.changedRanges=i}static create(t,e,n){return new ge(t,e,n)}get viewportChanged(){return(4&this.flags)>0}get viewportMoved(){return(8&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(18&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class ve extends I{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=lt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new ft],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ye(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let n=t.changedRanges;this.minWidth>0&&n.length&&(n.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?i=this.domChanged.newSel.head:function(t,e){let n=!1;return e&&t.iterChangedRanges(((t,r)=>{t<e.to&&r>e.from&&(n=!0)})),n}(t.changes,this.hasComposition)||t.selectionSet||(i=t.state.selection.main.head));let s=i>-1?function(t,e,n){let r=be(t,n);if(!r)return null;let{node:i,from:s,to:o}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(t.state.doc.sliceString(r.from,r.to)!=a)return null;let l=e.invertedDesc,c=new ye(l.mapPos(s),l.mapPos(o),s,o),u=[];for(let e=i.parentNode;;e=e.parentNode){let n=I.get(e);if(n instanceof W)u.push({node:e,deco:n.mark});else{if(n instanceof ft||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:c,text:i,marks:u,line:e};if(e==t.contentDOM)return null;u.push({node:e,deco:new ct({inclusive:!0,attributes:st(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:r}=this.hasComposition;n=new ye(e,r,t.changes.mapPos(e,-1),t.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(K.ie||K.chrome)&&!s&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let o=function(t,e,n){let i=new Te;return r.om.compare(t,e,n,i),i.changes}(this.decorations,this.updateDeco(),t.changes);return n=ye.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,t.startState.doc.length,s),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,n);let{observer:r}=this.view;r.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=K.chrome||K.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||r.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let t of this.children)t instanceof mt&&t.widget instanceof yt&&i.push(t.dom);r.updateGaps(i)}updateChildren(t,e,n){let r=n?n.range.addToSet(t.slice()):t,i=this.childCursor(e);for(let t=r.length-1;;t--){let e=t>=0?r[t]:null;if(!e)break;let s,o,a,l,{fromA:c,toA:u,fromB:h,toB:p}=e;if(n&&n.range.fromB<p&&n.range.toB>h){let t=gt.build(this.view.state.doc,h,n.range.fromB,this.decorations,this.dynamicDecorationMap),e=gt.build(this.view.state.doc,n.range.toB,p,this.decorations,this.dynamicDecorationMap);o=t.breakAtStart,a=t.openStart,l=e.openEnd;let r=this.compositionView(n);e.breakAtStart?r.breakAfter=1:e.content.length&&r.merge(r.length,r.length,e.content[0],!1,e.openStart,0)&&(r.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&r.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),s=t.content.concat(r).concat(e.content)}else({content:s,breakAtStart:o,openStart:a,openEnd:l}=gt.build(this.view.state.doc,h,p,this.decorations,this.dynamicDecorationMap));let{i:d,off:f}=i.findPos(u,1),{i:m,off:y}=i.findPos(c,-1);_(this,m,y,d,f,s,o,a,l)}n&&this.fixCompositionDOM(n)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(Qt)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new Y(t.text.nodeValue);e.flags|=8;for(let{deco:n}of t.marks)e=new W(n,[e],e.length);let n=new ft;return n.append(e,0),n}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let n=I.get(t);n&&n!=e&&(n.dom=null),e.setDOM(t)},n=this.childPos(t.range.fromB,1),r=this.children[n.i];e(t.line,r);for(let i=t.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],e(i>=0?t.marks[i].node:t.text,r)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&!(this.view.state.facet(ee)||this.dom.tabIndex>-1)&&l(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||e||i))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(a.anchor)),h=a.empty?c:this.moveToLine(this.domAtPos(a.head));if(K.gecko&&a.empty&&!this.hasComposition&&1==(p=c).node.nodeType&&p.node.firstChild&&(0==p.offset||"false"==p.node.childNodes[p.offset-1].contentEditable)&&(p.offset==p.node.childNodes.length||"false"==p.node.childNodes[p.offset].contentEditable)){let t=document.createTextNode("");this.view.observer.ignore((()=>c.node.insertBefore(t,c.node.childNodes[c.offset]||null))),c=h=new C(t,0),s=!0}var p;let d=this.view.observer.selectionRange;!s&&d.focusNode&&(u(c.node,c.offset,d.anchorNode,d.anchorOffset)&&u(h.node,h.offset,d.focusNode,d.focusOffset)||this.suppressWidgetCursorChange(d,a))||(this.view.observer.ignore((()=>{K.android&&K.chrome&&this.dom.contains(d.focusNode)&&function(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(d.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=o(this.view.root);if(t)if(a.empty){if(K.gecko){let t=(e=c.node,r=c.offset,1!=e.nodeType?0:(r&&"false"==e.childNodes[r-1].contentEditable?1:0)|(r<e.childNodes.length&&"false"==e.childNodes[r].contentEditable?2:0));if(t&&3!=t){let e=(1==t?P:M)(c.node,c.offset);e&&(c=new C(e.node,e.offset))}}t.collapse(c.node,c.offset),null!=a.bidiLevel&&void 0!==t.caretBidiLevel&&(t.caretBidiLevel=a.bidiLevel)}else if(t.extend){t.collapse(c.node,c.offset);try{t.extend(h.node,h.offset)}catch(t){}}else{let e=document.createRange();a.anchor>a.head&&([c,h]=[h,c]),e.setEnd(h.node,h.offset),e.setStart(c.node,c.offset),t.removeAllRanges(),t.addRange(e)}var e,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())})),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new C(d.anchorNode,d.anchorOffset),this.impreciseHead=h.precise?null:new C(d.focusNode,d.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&u(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,n=o(t.root),{anchorNode:r,anchorOffset:i}=t.observer.selectionRange;if(!(n&&e.empty&&e.assoc&&n.modify))return;let s=ft.find(this,e.head);if(!s)return;let a=s.posAtStart;if(e.head==a||e.head==a+s.length)return;let l=this.coordsAt(e.head,-1),c=this.coordsAt(e.head,1);if(!l||!c||l.bottom>c.top)return;let u=this.domAtPos(e.head+e.assoc);n.collapse(u.node,u.offset),n.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let h=t.observer.selectionRange;t.docView.posFromDOM(h.anchorNode,h.anchorOffset)!=e.from&&n.collapse(r,i)}moveToLine(t){let e,n=this.dom;if(t.node!=n)return t;for(let r=t.offset;!e&&r<n.childNodes.length;r++){let t=I.get(n.childNodes[r]);t instanceof ft&&(e=t.domAtPos(0))}for(let r=t.offset-1;!e&&r>=0;r--){let t=I.get(n.childNodes[r]);t instanceof ft&&(e=t.domAtPos(t.length))}return e?new C(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=I.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let n=this.nearest(t);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(t,e)+n.posAtStart}domAtPos(t){let{i:e,off:n}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(n<t.length||t instanceof ft)break;e++,n=0}return this.children[e].domAtPos(n)}coordsAt(t,e){let n=null,r=0;for(let i=this.length,s=this.children.length-1;s>=0;s--){let o=this.children[s],a=i-o.breakAfter,l=a-o.length;if(a<t)break;if(l<=t&&(l<t||o.covers(-1))&&(a>t||o.covers(1))&&(!n||o instanceof ft&&!(n instanceof ft&&e>=0)))n=o,r=l;else if(n&&l==t&&a==t&&o instanceof mt&&Math.abs(e)<2){if(o.deco.startSide<0)break;s&&(n=null)}i=l}return n?n.coordsAt(t-r,e):null}coordsForChar(t){let{i:e,off:n}=this.childPos(t,1),i=this.children[e];if(!(i instanceof ft))return null;for(;i.children.length;){let{i:t,off:e}=i.childPos(n,1);for(;;t++){if(t==i.children.length)return null;if((i=i.children[t]).length)break}n=e}if(!(i instanceof Y))return null;let s=(0,r.zK)(i.text,n);if(s==n)return null;let o=S(i.dom,n,s).getClientRects();for(let t=0;t<o.length;t++){let e=o[t];if(t==o.length-1||e.top<e.bottom&&e.left<e.right)return e}return null}measureVisibleLineHeights(t){let e=[],{from:n,to:r}=t,i=this.view.contentDOM.clientWidth,s=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,o=-1,a=this.view.textDirection==Tt.LTR;for(let t=0,l=0;l<this.children.length;l++){let u=this.children[l],h=t+u.length;if(h>r)break;if(t>=n){let n=u.dom.getBoundingClientRect();if(e.push(n.height),s){let e=u.dom.lastChild,r=e?c(e):[];if(r.length){let e=r[r.length-1],s=a?e.right-n.left:n.right-e.left;s>o&&(o=s,this.minWidth=i,this.minWidthFrom=t,this.minWidthTo=h)}}}t=h+u.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?Tt.RTL:Tt.LTR}measureTextSize(){for(let t of this.children)if(t instanceof ft){let e=t.measureTextSize();if(e)return e}let t,e,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(r);let i=c(r.firstChild)[0];t=r.getBoundingClientRect().height,e=i?i.width/27:7,n=i?i.height:t,r.remove()})),{lineHeight:t,charWidth:e,textHeight:n}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new N(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let n=0,r=0;;r++){let i=r==e.viewports.length?null:e.viewports[r],s=i?i.from-1:this.length;if(s>n){let r=(e.lineBlockAt(s).bottom-e.lineBlockAt(n).top)/this.view.scaleY;t.push(lt.replace({widget:new yt(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,s))}if(!i)break;n=i.to+1}return lt.set(t)}updateDeco(){let t=1,e=this.view.state.facet(le).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),n=!1,i=this.view.state.facet(ce).map(((t,e)=>{let r="function"==typeof t;return r&&(n=!0),r?t(this.view):t}));for(i.length&&(this.dynamicDecorationMap[t++]=n,e.push(r.om.join(i))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];t<this.decorations.length;)this.dynamicDecorationMap[t++]=!1;return this.decorations}scrollIntoView(t){if(t.isSnapshot){let e=this.view.viewState.lineBlockAt(t.range.head);return this.view.scrollDOM.scrollTop=e.top-t.yMargin,void(this.view.scrollDOM.scrollLeft=t.xMargin)}for(let e of this.view.state.facet(Xt))try{if(e(this.view,t.range,t))return!0}catch(t){te(this.view.state,t,"scroll handler")}let e,{range:n}=t,r=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1);if(!r)return;!n.empty&&(e=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,e.left),top:Math.min(r.top,e.top),right:Math.max(r.right,e.right),bottom:Math.max(r.bottom,e.bottom)});let i=fe(this.view),s={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:o,offsetHeight:a}=this.view.scrollDOM;!function(t,e,n,r,i,s,o,a){let l=t.ownerDocument,c=l.defaultView||window;for(let u=t,h=!1;u&&!h;)if(1==u.nodeType){let t,p=u==l.body,d=1,f=1;if(p)t=y(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(h=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let e=u.getBoundingClientRect();({scaleX:d,scaleY:f}=g(u,e)),t={left:e.left,right:e.left+u.clientWidth*d,top:e.top,bottom:e.top+u.clientHeight*f}}let m=0,v=0;if("nearest"==i)e.top<t.top?(v=e.top-(t.top+o),n>0&&e.bottom>t.bottom+v&&(v=e.bottom-t.bottom+o)):e.bottom>t.bottom&&(v=e.bottom-t.bottom+o,n<0&&e.top-v<t.top&&(v=e.top-(t.top+o)));else{let r=e.bottom-e.top,s=t.bottom-t.top;v=("center"==i&&r<=s?e.top+r/2-s/2:"start"==i||"center"==i&&n<0?e.top-o:e.bottom-s+o)-t.top}if("nearest"==r?e.left<t.left?(m=e.left-(t.left+s),n>0&&e.right>t.right+m&&(m=e.right-t.right+s)):e.right>t.right&&(m=e.right-t.right+s,n<0&&e.left<t.left+m&&(m=e.left-(t.left+s))):m=("center"==r?e.left+(e.right-e.left)/2-(t.right-t.left)/2:"start"==r==a?e.left-s:e.right-(t.right-t.left)+s)-t.left,m||v)if(p)c.scrollBy(m,v);else{let t=0,n=0;if(v){let t=u.scrollTop;u.scrollTop+=v/f,n=(u.scrollTop-t)*f}if(m){let e=u.scrollLeft;u.scrollLeft+=m/d,t=(u.scrollLeft-e)*d}e={left:e.left-t,top:e.top-n,right:e.right-t,bottom:e.bottom-n},t&&Math.abs(t-m)<1&&(r="nearest"),n&&Math.abs(n-v)<1&&(i="nearest")}if(p)break;(e.top<t.top||e.bottom>t.bottom||e.left<t.left||e.right>t.right)&&(e={left:Math.max(e.left,t.left),right:Math.min(e.right,t.right),top:Math.max(e.top,t.top),bottom:Math.min(e.bottom,t.bottom)}),u=u.assignedSlot||u.parentNode}else{if(11!=u.nodeType)break;u=u.host}}(this.view.scrollDOM,s,n.head<n.anchor?-1:1,t.x,t.y,Math.max(Math.min(t.xMargin,o),-o),Math.max(Math.min(t.yMargin,a),-a),this.view.textDirection==Tt.LTR)}}function be(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=P(n.focusNode,n.focusOffset),i=M(n.focusNode,n.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let e=I.get(i.node);if(!e||e instanceof Y&&e.text!=i.node.nodeValue)s=i;else if(t.docView.lastCompositionAfterCursor){let t=I.get(r.node);!t||t instanceof Y&&t.text!=r.node.nodeValue||(s=i)}}if(t.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}let Te=class{constructor(){this.changes=[]}compareRange(t,e){dt(t,e,this.changes)}comparePoint(t,e){dt(t,e,this.changes)}boundChange(t){dt(t,t,this.changes)}};function xe(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Se(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function we(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Ee(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function Ae(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Pe(t,e,n){let r,i,s,o,a,l,u,h,p=!1;for(let d=t.firstChild;d;d=d.nextSibling){let t=c(d);for(let c=0;c<t.length;c++){let f=t[c];i&&we(i,f)&&(f=Ee(Ae(f,i.bottom),i.top));let m=xe(e,f),y=Se(n,f);if(0==m&&0==y)return 3==d.nodeType?Me(d,e,n):Pe(d,e,n);(!r||o>y||o==y&&s>m)&&(r=d,i=f,s=m,o=y,p=!m||(e<f.left?c>0:c<t.length-1)),0==m?n>f.bottom&&(!u||u.bottom<f.bottom)?(a=d,u=f):n<f.top&&(!h||h.top>f.top)&&(l=d,h=f):u&&we(u,f)?u=Ae(u,f.bottom):h&&we(h,f)&&(h=Ee(h,f.top))}}if(u&&u.bottom>=n?(r=a,i=u):h&&h.top<=n&&(r=l,i=h),!r)return{node:t,offset:0};let d=Math.max(i.left,Math.min(i.right,e));return 3==r.nodeType?Me(r,d,n):p&&"false"!=r.contentEditable?Pe(r,d,n):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0)}}function Me(t,e,n){let r=t.nodeValue.length,i=-1,s=1e9,o=0;for(let a=0;a<r;a++){let r=S(t,a,a+1).getClientRects();for(let l=0;l<r.length;l++){let c=r[l];if(c.top==c.bottom)continue;o||(o=e-c.left);let u=(c.top>n?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&u<s){let n=e>=(c.left+c.right)/2,r=n;if((K.chrome||K.gecko)&&S(t,a).getBoundingClientRect().left==c.right&&(r=!n),u<=0)return{node:t,offset:a+(r?1:0)};i=a+(r?1:0),s=u}}}return{node:t,offset:i>-1?i:o>0?t.nodeValue.length:0}}function Ce(t,e,n,r=-1){var i,s;let o,a=t.contentDOM.getBoundingClientRect(),l=a.top+t.viewState.paddingTop,{docHeight:c}=t.viewState,{x:u,y:h}=e,p=h-l;if(p<0)return 0;if(p>c)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,i=!1;o=t.elementAtHeight(p),o.type!=at.Text;)for(;p=r>0?o.bottom+e:o.top-e,!(p>=0&&p<=c);){if(i)return n?null:0;i=!0,r=-r}h=l+p;let d=o.from;if(d<t.viewport.from)return 0==t.viewport.from?0:n?null:ke(t,a,o,u,h);if(d>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:ke(t,a,o,u,h);let m=t.dom.ownerDocument,y=t.root.elementFromPoint?t.root:m,g=y.elementFromPoint(u,h);g&&!t.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=y.elementFromPoint(u,h),g&&!t.contentDOM.contains(g)&&(g=null));let v,b=-1;if(g&&0!=(null===(i=t.docView.nearest(g))||void 0===i?void 0:i.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(u,h);t&&({offsetNode:v,offset:b}=t)}else if(m.caretRangeFromPoint){let e=m.caretRangeFromPoint(u,h);e&&(({startContainer:v,startOffset:b}=e),(!t.contentDOM.contains(v)||K.safari&&function(t,e,n){let r,i=t;if(3!=t.nodeType||e!=(r=t.nodeValue.length))return!1;for(;;){let t=i.nextSibling;if(t){if("BR"==t.nodeName)break;return!1}{let t=i.parentNode;if(!t||"DIV"==t.nodeName)break;i=t}}return S(t,r-1,r).getBoundingClientRect().right>n}(v,b,u)||K.chrome&&function(t,e,n){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}return n-(1==t.nodeType?t.getBoundingClientRect():S(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect()).left>5}(v,b,u))&&(v=void 0))}v&&(b=Math.min(f(v),b))}if(!v||!t.docView.dom.contains(v)){let e=ft.find(t.docView,d);if(!e)return p>o.top+o.height/2?o.to:o.from;({node:v,offset:b}=Pe(e.dom,u,h))}let T=t.docView.nearest(v);if(!T)return null;if(T.isWidget&&1==(null===(s=T.dom)||void 0===s?void 0:s.nodeType)){let t=T.dom.getBoundingClientRect();return e.y<t.top||e.y<=t.bottom&&e.x<=(t.left+t.right)/2?T.posAtStart:T.posAtEnd}return T.localPosFromDOM(v,b)+T.posAtStart}function ke(t,e,n,i,s){let o=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;o+=Math.floor((s-n.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+(0,r.kn)(a,o,t.state.tabSize)}function Ie(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let t;for(let i of r.type){if(i.from>e)break;if(!(i.to<e)){if(i.from<e&&i.to>e)return i;t&&(i.type!=at.Text||t.type==i.type&&!(n<0?i.from<e:i.to>e))||(t=i)}}return t||r}return r}function Oe(t,e,n,r){let i=t.state.doc.lineAt(e.head),s=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let a=e,l=null;;){let e=Rt(i,s,o,a,n),c=Bt;if(!e){if(i.number==(n?t.state.doc.lines:1))return a;c="\n",i=t.state.doc.line(i.number+(n?1:-1)),s=t.bidiSpans(i),e=t.visualLineSide(i,!n)}if(l){if(!l(c))return a}else{if(!r)return e;l=r(c)}a=e}}function Ne(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,((t,i,s)=>{if(e>t&&e<i){let s=r||n||(e-t<i-e?-1:1);e=s<0?t:i,r=s}}));if(!r)return e}}function _e(t,e,n){let i=Ne(t.state.facet(ue).map((e=>e(t))),n.from,e.head>n.from?-1:1);return i==n.from?n:r.OF.cursor(i,i<n.from?1:-1)}const De="￿";class Le{constructor(t,e){this.points=t,this.text="",this.lineSeparator=e.facet(r.$t.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=De}readRange(t,e){if(!t)return this;let n=t.parentNode;for(let r=t;;){this.findPointBefore(n,r);let t=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==e)break;let s=I.get(r),o=I.get(i);(s&&o?s.breakAfter:(s?s.breakAfter:p(r))||p(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>t)&&this.lineBreak(),r=i}return this.findPointBefore(n,e),this}readTextNode(t){let e=t.nodeValue;for(let n of this.points)n.node==t&&(n.pos=this.text.length+Math.min(n.offset,e.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,s=-1,o=1;if(this.lineSeparator?(s=e.indexOf(this.lineSeparator,n),o=this.lineSeparator.length):(i=r.exec(e))&&(s=i.index,o=i[0].length),this.append(e.slice(n,s<0?e.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=o-1);n=s+o}}readNode(t){if(t.cmIgnore)return;let e=I.get(t),n=e&&e.overrideDOMText;if(null!=n){this.findPointInside(t,n.length);for(let t=n.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let n of this.points)n.node==t&&t.childNodes[n.offset]==e&&(n.pos=this.text.length)}findPointInside(t,e){for(let n of this.points)(3==t.nodeType?n.node==t:t.contains(n.node))&&(n.pos=this.text.length+(Be(t,n.node,n.offset)?e:0))}}function Be(t,e,n){for(;;){if(!e||n<f(e))return!1;if(e==t)return!0;n=h(e)+1,e=e.parentNode}}class Re{constructor(t,e){this.node=t,this.offset=e,this.pos=-1}}class Fe{constructor(t,e,n,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=e>-1;let{impreciseHead:s,impreciseAnchor:o}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,n,0))){let e=s||o?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new Re(n,r)),i==n&&s==r||e.push(new Re(i,s))),e}(t),n=new Le(e,t.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(t,e){if(0==t.length)return null;let n=t[0].pos,i=2==t.length?t[1].pos:n;return n>-1&&i>-1?r.OF.single(n+e,i+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,n=s&&s.node==e.focusNode&&s.offset==e.focusOffset||!a(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),i=o&&o.node==e.anchorNode&&o.offset==e.anchorOffset||!a(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),l=t.viewport;if((K.ios||K.chrome)&&t.state.selection.main.empty&&n!=i&&(l.from>0||l.to<t.state.doc.length)){let e=Math.min(n,i),r=Math.max(n,i),s=l.from-e,o=l.to-r;0!=s&&1!=s&&0!=e||0!=o&&-1!=o&&r!=t.state.doc.length||(n=0,i=t.state.doc.length)}this.newSel=r.OF.single(i,n)}}}function je(t,e){let n,{newSel:i}=e,s=t.state.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:i,to:a}=e.bounds,l=s.from,c=null;(8===o||K.android&&e.text.length<a-i)&&(l=s.to,c="end");let u=function(t,e,n,r){let i=Math.min(t.length,e.length),s=0;for(;s<i&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&t.length==e.length)return null;let o=t.length,a=e.length;for(;o>0&&a>0&&t.charCodeAt(o-1)==e.charCodeAt(a-1);)o--,a--;return"end"==r&&(n-=o+Math.max(0,s-Math.min(o,a))-s),o<s&&t.length<e.length?(s-=n<=s&&n>=o?s-n:0,a=s+(a-o),o=s):a<s&&(s-=n<=s&&n>=a?s-n:0,o=s+(o-a),a=s),{from:s,toA:o,toB:a}}(t.state.doc.sliceString(i,a,De),e.text,l-i,c);u&&(K.chrome&&13==o&&u.toB==u.from+2&&e.text.slice(u.from,u.toB)==De+De&&u.toB--,n={from:i+u.from,to:i+u.toA,insert:r.EY.of(e.text.slice(u.from,u.toB).split(De))})}else i&&(!t.hasFocus&&t.state.facet(ee)||i.main.eq(s))&&(i=null);if(!n&&!i)return!1;if(!n&&e.typeOver&&!s.empty&&i&&i.main.empty?n={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,s.to)}:(K.mac||K.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(i&&2==n.insert.length&&(i=r.OF.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:r.EY.of([n.insert.toString().replace("."," ")])}):n&&n.from>=s.from&&n.to<=s.to&&(n.from!=s.from||n.to!=s.to)&&s.to-s.from-(n.to-n.from)<=4?n={from:s.from,to:s.to,insert:t.state.doc.slice(s.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,s.to))}:K.chrome&&n&&n.from==n.to&&n.from==s.head&&"\n "==n.insert.toString()&&t.lineWrapping&&(i&&(i=r.OF.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:r.EY.of([" "])}),n)return Ue(t,n,i,o);if(i&&!i.main.eq(s)){let e=!1,n="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),n=t.inputState.lastSelectionOrigin),t.dispatch({selection:i,scrollIntoView:e,userEvent:n}),!0}return!1}function Ue(t,e,n,i=-1){if(K.ios&&t.inputState.flushIOSKey(e))return!0;let s=t.state.selection.main;if(K.android&&(e.to==s.to&&(e.from==s.from||e.from==s.from-1&&" "==t.state.sliceDoc(e.from,s.from))&&1==e.insert.length&&2==e.insert.lines&&w(t.contentDOM,"Enter",13)||(e.from==s.from-1&&e.to==s.to&&0==e.insert.length||8==i&&e.insert.length<e.to-e.from&&e.to>s.head)&&w(t.contentDOM,"Backspace",8)||e.from==s.from&&e.to==s.to+1&&0==e.insert.length&&w(t.contentDOM,"Delete",46)))return!0;let o,a=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let l=()=>o||(o=function(t,e,n){let i,s=t.state,o=s.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let n=o.from<e.from?s.sliceDoc(o.from,e.from):"",r=o.to>e.to?s.sliceDoc(e.to,o.to):"";i=s.replaceSelection(t.state.toText(n+e.insert.sliceString(0,void 0,t.state.lineBreak)+r))}else{let a=s.changes(e),l=n&&n.main.to<=a.newLength?n.main:void 0;if(s.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let c,u=t.state.sliceDoc(e.from,e.to),h=n&&be(t,n.main.head);if(h){let t=e.insert.length-(e.to-e.from);c={from:h.from,to:h.to-t}}else c=t.state.doc.lineAt(o.head);let p=o.to-e.to,d=o.to-o.from;i=s.changeByRange((n=>{if(n.from==o.from&&n.to==o.to)return{changes:a,range:l||n.map(a)};let i=n.to-p,h=i-u.length;if(n.to-n.from!=d||t.state.sliceDoc(h,i)!=u||n.to>=c.from&&n.from<=c.to)return{range:n};let f=s.changes({from:h,to:i,insert:e.insert}),m=n.to-o.to;return{changes:f,range:l?r.OF.range(Math.max(0,l.anchor+m),Math.max(0,l.head+m)):n.map(f)}}))}else i={changes:a,selection:l&&s.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),s.update(i,{userEvent:a,scrollIntoView:!0})}(t,e,n));return t.state.facet($t).some((n=>n(t,e.from,e.to,a,l)))||t.dispatch(l()),!0}class Ve{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,K.safari&&t.contentDOM.addEventListener("input",(()=>null)),K.gecko&&function(t){mn.has(t)||(mn.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n,r=e.target;r!=t.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=I.get(r))&&n.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||(0!=this.view.updateState?Promise.resolve().then((()=>this.runHandlers(t.type,t))):this.runHandlers(t.type,t)))}runHandlers(t,e){let n=this.handlers[t];if(n){for(let t of n.observers)t(this.view,e);for(let t of n.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=qe(t),n=this.handlers,r=this.view.contentDOM;for(let t in e)if("scroll"!=t){let i=!e[t].handlers.length,s=n[t];s&&i!=!s.handlers.length&&(r.removeEventListener(t,this.handleEvent),s=null),s||r.addEventListener(t,this.handleEvent,{passive:i})}for(let t in n)"scroll"==t||e[t]||r.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&Ke.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),K.android&&K.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!K.ios||t.synthetic||t.altKey||t.metaKey||!((e=$e.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||He.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&!("Enter"==e.key&&t&&t.from<t.to&&/^\S+$/.test(t.insert.toString()))&&(this.pendingIOSKey=void 0,w(this.view.contentDOM,e.key,e.keyCode,e instanceof KeyboardEvent?e:void 0))}ignoreDuringComposition(t){return!!/^key/.test(t.type)&&(this.composing>0||!!(K.safari&&!K.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function ze(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(t){te(n.state,t)}}}function qe(t){let e=Object.create(null);function n(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec,r=t&&t.plugin.domEventHandlers,i=t&&t.plugin.domEventObservers;if(r)for(let t in r){let i=r[t];i&&n(t).handlers.push(ze(e.value,i))}if(i)for(let t in i){let r=i[t];r&&n(t).observers.push(ze(e.value,r))}}for(let t in Je)n(t).handlers.push(Je[t]);for(let t in Xe)n(t).observers.push(Xe[t]);return e}const $e=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],He="dthko",Ke=[16,17,18,20,91,92,224,225];function Ye(t){return.7*Math.max(0,t)+8}class We{constructor(t,e,n,i){this.view=t,this.startEvent=e,this.style=n,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,n,r=t.ownerDocument;for(let i=t.parentNode;i&&!(i==r.body||e&&n);)if(1==i.nodeType)!n&&i.scrollHeight>i.clientHeight&&(n=i),!e&&i.scrollWidth>i.clientWidth&&(e=i),i=i.assignedSlot||i.parentNode;else{if(11!=i.nodeType)break;i=i.host}return{x:e,y:n}}(t.contentDOM),this.atoms=t.state.facet(ue).map((e=>e(t)));let s=t.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(r.$t.allowMultipleSelections)&&function(t,e){let n=t.state.facet(jt);return n.length?n[0](e):K.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=o(t.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let t=0;t<i.length;t++){let n=i[t];if(n.left<=e.clientX&&n.right>=e.clientX&&n.top<=e.clientY&&n.bottom>=e.clientY)return!0}return!1}(t,e)||1!=cn(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,n=t,Math.max(Math.abs(e.clientX-n.clientX),Math.abs(e.clientY-n.clientY))<10))return;var e,n;this.select(this.lastEvent=t);let r=0,i=0,s=0,o=0,a=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:s,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=fe(this.view);t.clientX-c.left<=s+6?r=-Ye(s-t.clientX):t.clientX+c.right>=a-6&&(r=Ye(t.clientX-a)),t.clientY-c.top<=o+6?i=-Ye(o-t.clientY):t.clientY+c.bottom>=l-6&&(i=Ye(t.clientY-l)),this.setScrollSpeed(r,i)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let n=0;n<t.ranges.length;n++){let i=t.ranges[n],s=null;if(i.empty){let t=Ne(this.atoms,i.from,0);t!=i.from&&(s=r.OF.cursor(t,-1))}else{let t=Ne(this.atoms,i.from,-1),e=Ne(this.atoms,i.to,1);t==i.from&&e==i.to||(s=r.OF.range(i.from==i.anchor?t:e,i.from==i.head?t:e))}s&&(e||(e=t.ranges.slice()),e[n]=s)}return e?r.OF.create(e,t.mainIndex):t}select(t){let{view:e}=this,n=this.skipAtoms(this.style.get(t,this.extend,this.multiple));!this.mustSelect&&n.eq(e.state.selection,!1===this.dragging)||this.view.dispatch({selection:n,userEvent:"select.pointer"}),this.mustSelect=!1}update(t){t.transactions.some((t=>t.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const Je=Object.create(null),Xe=Object.create(null),Ge=K.ie&&K.ie_version<15||K.ios&&K.webkit_version<604;function Ze(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function Qe(t,e){e=Ze(t.state,Kt,e);let n,{state:i}=t,s=1,o=i.toText(e),a=o.lines==i.selection.ranges.length;if(null!=hn&&i.selection.ranges.every((t=>t.empty))&&hn==o.toString()){let t=-1;n=i.changeByRange((n=>{let l=i.doc.lineAt(n.from);if(l.from==t)return{range:n};t=l.from;let c=i.toText((a?o.line(s++).text:e)+i.lineBreak);return{changes:{from:l.from,insert:c},range:r.OF.cursor(n.from+c.length)}}))}else n=a?i.changeByRange((t=>{let e=o.line(s++);return{changes:{from:t.from,to:t.to,insert:e.text},range:r.OF.cursor(t.from+e.length)}})):i.replaceSelection(o);t.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function tn(t,e,n,i){if(1==i)return r.OF.cursor(e,n);if(2==i)return function(t,e,n=1){let i=t.charCategorizer(e),s=t.doc.lineAt(e),o=e-s.from;if(0==s.length)return r.OF.cursor(e);0==o?n=1:o==s.length&&(n=-1);let a=o,l=o;n<0?a=(0,r.zK)(s.text,o,!1):l=(0,r.zK)(s.text,o);let c=i(s.text.slice(a,l));for(;a>0;){let t=(0,r.zK)(s.text,a,!1);if(i(s.text.slice(t,a))!=c)break;a=t}for(;l<s.length;){let t=(0,r.zK)(s.text,l);if(i(s.text.slice(l,t))!=c)break;l=t}return r.OF.range(a+s.from,l+s.from)}(t.state,e,n);{let n=ft.find(t.docView,e),i=t.state.doc.lineAt(n?n.posAtEnd:e),s=n?n.posAtStart:i.from,o=n?n.posAtEnd:i.to;return o<t.state.doc.length&&o==i.to&&o++,r.OF.range(s,o)}}Xe.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Je.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Xe.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Xe.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Je.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(Vt))if(n=r(t,e),n)break;if(n||0!=e.button||(n=function(t,e){let n=rn(t,e),i=cn(e),s=t.state.selection;return{update(t){t.docChanged&&(n.pos=t.changes.mapPos(n.pos),s=s.map(t.changes))},get(e,o,a){let l,c=rn(t,e),u=tn(t,c.pos,c.bias,i);if(n.pos!=c.pos&&!o){let e=tn(t,n.pos,n.bias,i),s=Math.min(e.from,u.from),o=Math.max(e.to,u.to);u=s<u.from?r.OF.range(s,o):r.OF.range(o,s)}return o?s.replaceRange(s.main.extend(u.from,u.to)):a&&1==i&&s.ranges.length>1&&(l=function(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:s}=t.ranges[n];if(i<=e&&s>=e)return r.OF.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}(s,c.pos))?l:a?s.addRange(u):r.OF.create([u])}}}(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new We(t,e,n,r)),r&&t.observer.ignore((()=>{x(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let i=t.inputState.mouseSelection;if(i)return i.start(e),!1===i.dragging}return!1};let en=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function nn(t,e,n,r){let i=ft.find(t.docView,e);if(!i)return 1;let s=e-i.posAtStart;if(0==s)return 1;if(s==i.length)return-1;let o=i.coordsAt(s,-1);if(o&&en(n,r,o))return-1;let a=i.coordsAt(s,1);return a&&en(n,r,a)?1:o&&o.bottom>=r?-1:1}function rn(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:nn(t,n,e.clientX,e.clientY)}}const sn=K.ie&&K.ie_version<=11;let on=null,an=0,ln=0;function cn(t){if(!sn)return t.detail;let e=on,n=ln;return on=t,ln=Date.now(),an=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(an+1)%3:1}function un(t,e,n,r){if(!(n=Ze(t.state,Kt,n)))return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=r&&s&&function(t,e){let n=t.state.facet(Ut);return n.length?n[0](e):K.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:s.from,to:s.to}:null,a={from:i,insert:n},l=t.state.changes(o?[o,a]:a);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Je.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let t=i.posAtStart,e=t+i.length;(t>=n.to||e<=n.from)&&(n=r.OF.range(t,e))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Ze(t.state,Yt,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Je.dragend=t=>(t.inputState.draggedContent=null,!1),Je.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,s=()=>{++i==n.length&&un(t,e,r.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t<n.length;t++){let e=new FileReader;e.onerror=s,e.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(r[t]=e.result),s()},e.readAsText(n[t])}return!0}{let n=e.dataTransfer.getData("Text");if(n)return un(t,e,n,!0),!0}return!1},Je.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=Ge?null:e.clipboardData;return n?(Qe(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout((()=>{t.focus(),n.remove(),Qe(t,n.value)}),50)}(t),!1)};let hn=null;Je.copy=Je.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=function(t){let e=[],n=[],r=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let i=-1;for(let{from:r}of t.selection.ranges){let s=t.doc.lineAt(r);s.number>i&&(e.push(s.text),n.push({from:s.from,to:Math.min(t.doc.length,s.to+1)})),i=s.number}r=!0}return{text:Ze(t,Yt,e.join(t.lineBreak)),ranges:n,linewise:r}}(t.state);if(!n&&!i)return!1;hn=i?n:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=Ge?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(function(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout((()=>{r.remove(),t.focus()}),50)}(t,n),!1)};const pn=r.YH.define();function dn(t,e){let n=[];for(let r of t.facet(Ht)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:pn.of(!0)}):null}function fn(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=dn(t.state,e);n?t.dispatch(n):t.update([])}}),10)}Xe.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),fn(t)},Xe.blur=t=>{t.observer.clearSelectionRange(),fn(t)},Xe.compositionstart=Xe.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Xe.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,K.chrome&&K.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},Xe.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Je.beforeinput=(t,e)=>{var n,r;if("insertReplacementText"==e.inputType&&t.observer.editContext){let r=null===(n=e.dataTransfer)||void 0===n?void 0:n.getData("text/plain"),i=e.getTargetRanges();if(r&&i.length){let e=i[0],n=t.posAtDOM(e.startContainer,e.startOffset),s=t.posAtDOM(e.endContainer,e.endOffset);return Ue(t,{from:n,to:s,insert:t.state.toText(r)},null),!0}}let i;if(K.chrome&&K.android&&(i=$e.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(i.key,i.keyCode),"Backspace"==i.key||"Delete"==i.key)){let e=(null===(r=window.visualViewport)||void 0===r?void 0:r.height)||0;setTimeout((()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return K.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),K.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>Xe.compositionend(t,e)),20),!1};const mn=new Set,yn=["pre-wrap","normal","pre-line","break-spaces"];let gn=!1;function vn(){gn=!1}class bn{constructor(t){this.lineWrapping=t,this.doc=r.EY.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let n=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((e-t-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(t){return this.lineWrapping?(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return yn.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let n=0;n<t.length;n++){let r=t[n];r<0?n++:this.heightSamples[Math.floor(10*r)]||(e=!0,this.heightSamples[Math.floor(10*r)]=!0)}return e}refresh(t,e,n,r,i,s){let o=yn.indexOf(t)>-1,a=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=e,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let t=0;t<s.length;t++){let e=s[t];e<0?t++:this.heightSamples[Math.floor(10*e)]=!0}}return a}}class Tn{constructor(t,e){this.from=t,this.heights=e,this.index=0}get more(){return this.index<this.heights.length}}class xn{constructor(t,e,n,r,i){this.from=t,this.length=e,this.top=n,this.height=r,this._content=i}get type(){return"number"==typeof this._content?at.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof ht?this._content.widget:null}get widgetLineBreaks(){return"number"==typeof this._content?this._content:0}join(t){let e=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(t._content)?t._content:[t]);return new xn(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var Sn=function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t}(Sn||(Sn={}));const wn=.001;class En{constructor(t,e,n=2){this.length=t,this.height=e,this.flags=n}get outdated(){return(2&this.flags)>0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>wn&&(gn=!0),this.height=t)}replace(t,e,n){return En.of(n)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,n,r){let i=this,s=n.doc;for(let o=r.length-1;o>=0;o--){let{fromA:a,toA:l,fromB:c,toB:u}=r[o],h=i.lineAt(a,Sn.ByPosNoHeight,n.setDoc(e),0,0),p=h.to>=l?h:i.lineAt(l,Sn.ByPosNoHeight,n,0,0);for(u+=p.to-l,l=p.to;o>0&&h.from<=r[o-1].toA;)a=r[o-1].fromA,c=r[o-1].fromB,o--,a<h.from&&(h=i.lineAt(a,Sn.ByPosNoHeight,n,0,0));c+=h.from-a,a=h.from;let d=On.build(n.setDoc(s),t,c,u);i=An(i,i.replace(a,l,d))}return i.updateHeight(n,0)}static empty(){return new Mn(0,0)}static of(t){if(1==t.length)return t[0];let e=0,n=t.length,r=0,i=0;for(;;)if(e==n)if(r>2*i){let i=t[e-1];i.break?t.splice(--e,1,i.left,null,i.right):t.splice(--e,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let e=t[n];e.break?t.splice(n,1,e.left,null,e.right):t.splice(n,1,e.left,e.right),n+=2+e.break,i-=e.size}}else if(r<i){let n=t[e++];n&&(r+=n.size)}else{let e=t[--n];e&&(i+=e.size)}let s=0;return null==t[e-1]?(s=1,e--):null==t[e]&&(s=1,n++),new kn(En.of(t.slice(0,e)),s,En.of(t.slice(n)))}}function An(t,e){return t==e?t:(t.constructor!=e.constructor&&(gn=!0),e)}En.prototype.size=1;class Pn extends En{constructor(t,e,n){super(t,e),this.deco=n}blockAt(t,e,n,r){return new xn(r,this.length,n,this.height,this.deco||0)}lineAt(t,e,n,r,i){return this.blockAt(0,n,r,i)}forEachLine(t,e,n,r,i,s){t<=i+this.length&&e>=i&&s(this.blockAt(0,n,r,i))}updateHeight(t,e=0,n=!1,r){return r&&r.from<=e&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Mn extends Pn{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,n,r){return new xn(r,this.length,n,this.height,this.breaks)}replace(t,e,n){let r=n[0];return 1==n.length&&(r instanceof Mn||r instanceof Cn&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof Cn?r=new Mn(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):En.of(n)}updateHeight(t,e=0,n=!1,r){return r&&r.from<=e&&r.more?this.setHeight(r.heights[r.index++]):(n||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Cn extends En{constructor(t){super(t,0)}heightMetrics(t,e){let n,r=t.doc.lineAt(e).number,i=t.doc.lineAt(e+this.length).number,s=i-r+1,o=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*s);n=e/s,this.length>s+1&&(o=(this.height-e)/(this.length-s-1))}else n=this.height/s;return{firstLine:r,lastLine:i,perLine:n,perChar:o}}blockAt(t,e,n,r){let{firstLine:i,lastLine:s,perLine:o,perChar:a}=this.heightMetrics(e,r);if(e.lineWrapping){let i=r+(t<e.lineHeight?0:Math.round(Math.max(0,Math.min(1,(t-n)/this.height))*this.length)),s=e.doc.lineAt(i),l=o+s.length*a,c=Math.max(n,t-l/2);return new xn(s.from,s.length,c,l,0)}{let r=Math.max(0,Math.min(s-i,Math.floor((t-n)/o))),{from:a,length:l}=e.doc.line(i+r);return new xn(a,l,n+o*r,o,0)}}lineAt(t,e,n,r,i){if(e==Sn.ByHeight)return this.blockAt(t,n,r,i);if(e==Sn.ByPosNoHeight){let{from:e,to:r}=n.doc.lineAt(t);return new xn(e,r-e,0,0,0)}let{firstLine:s,perLine:o,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(t),c=o+l.length*a,u=l.number-s,h=r+o*u+a*(l.from-i-u);return new xn(l.from,l.length,Math.max(r,Math.min(h,r+this.height-c)),c,0)}forEachLine(t,e,n,r,i,s){t=Math.max(t,i),e=Math.min(e,i+this.length);let{firstLine:o,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=t,u=r;c<=e;){let e=n.doc.lineAt(c);if(c==t){let n=e.number-o;u+=a*n+l*(t-i-n)}let r=a+l*e.length;s(new xn(e.from,e.length,u,r,0)),u+=r,c=e.to+1}}replace(t,e,n){let r=this.length-e;if(r>0){let t=n[n.length-1];t instanceof Cn?n[n.length-1]=new Cn(t.length+r):n.push(null,new Cn(r-1))}if(t>0){let e=n[0];e instanceof Cn?n[0]=new Cn(t+e.length):n.unshift(new Cn(t-1),null)}return En.of(n)}decomposeLeft(t,e){e.push(new Cn(t-1),null)}decomposeRight(t,e){e.push(null,new Cn(this.length-t-1))}updateHeight(t,e=0,n=!1,r){let i=e+this.length;if(r&&r.from<=e+this.length&&r.more){let n=[],s=Math.max(e,r.from),o=-1;for(r.from>e&&n.push(new Cn(r.from-e-1).updateHeight(t,e));s<=i&&r.more;){let e=t.doc.lineAt(s).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==o?o=i:Math.abs(i-o)>=wn&&(o=-2);let a=new Mn(e,i);a.outdated=!1,n.push(a),s+=e+1}s<=i&&n.push(null,new Cn(i-s).updateHeight(t,s));let a=En.of(n);return(o<0||Math.abs(a.height-this.height)>=wn||Math.abs(o-this.heightMetrics(t,e).perLine)>=wn)&&(gn=!0),An(this,a)}return(n||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class kn extends En{constructor(t,e,n){super(t.length+e+n.length,t.height+n.height,e|(t.outdated||n.outdated?2:0)),this.left=t,this.right=n,this.size=t.size+n.size}get break(){return 1&this.flags}blockAt(t,e,n,r){let i=n+this.left.height;return t<i?this.left.blockAt(t,e,n,r):this.right.blockAt(t,e,i,r+this.left.length+this.break)}lineAt(t,e,n,r,i){let s=r+this.left.height,o=i+this.left.length+this.break,a=e==Sn.ByHeight?t<s:t<o,l=a?this.left.lineAt(t,e,n,r,i):this.right.lineAt(t,e,n,s,o);if(this.break||(a?l.to<o:l.from>o))return l;let c=e==Sn.ByPosNoHeight?Sn.ByPosNoHeight:Sn.ByPos;return a?l.join(this.right.lineAt(o,c,n,s,o)):this.left.lineAt(o,c,n,r,i).join(l)}forEachLine(t,e,n,r,i,s){let o=r+this.left.height,a=i+this.left.length+this.break;if(this.break)t<a&&this.left.forEachLine(t,e,n,r,i,s),e>=a&&this.right.forEachLine(t,e,n,o,a,s);else{let l=this.lineAt(a,Sn.ByPos,n,r,i);t<l.from&&this.left.forEachLine(t,l.from-1,n,r,i,s),l.to>=t&&l.from<=e&&s(l),e>l.to&&this.right.forEachLine(l.to+1,e,n,o,a,s)}}replace(t,e,n){let r=this.left.length+this.break;if(e<r)return this.balanced(this.left.replace(t,e,n),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-r,e-r,n));let i=[];t>0&&this.decomposeLeft(t,i);let s=i.length;for(let t of n)i.push(t);if(t>0&&In(i,s-1),e<this.length){let t=i.length;this.decomposeRight(e,i),In(i,t)}return En.of(i)}decomposeLeft(t,e){let n=this.left.length;if(t<=n)return this.left.decomposeLeft(t,e);e.push(this.left),this.break&&(n++,t>=n&&e.push(null)),t>n&&this.right.decomposeLeft(t-n,e)}decomposeRight(t,e){let n=this.left.length,r=n+this.break;if(t>=r)return this.right.decomposeRight(t-r,e);t<n&&this.left.decomposeRight(t,e),this.break&&t<r&&e.push(null),e.push(this.right)}balanced(t,e){return t.size>2*e.size||e.size>2*t.size?En.of(this.break?[t,null,e]:[t,e]):(this.left=An(this.left,t),this.right=An(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,n=!1,r){let{left:i,right:s}=this,o=e+i.length+this.break,a=null;return r&&r.from<=e+i.length&&r.more?a=i=i.updateHeight(t,e,n,r):i.updateHeight(t,e,n),r&&r.from<=o+s.length&&r.more?a=s=s.updateHeight(t,o,n,r):s.updateHeight(t,o,n),a?this.balanced(i,s):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function In(t,e){let n,r;null==t[e]&&(n=t[e-1])instanceof Cn&&(r=t[e+1])instanceof Cn&&t.splice(e-1,3,new Cn(n.length+1+r.length))}class On{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof Mn?n.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Mn(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,n){if(t<e||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,i=n.widget?n.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let s=e-t;n.block?this.addBlock(new Pn(s,r,n)):(s||i||r>=5)&&this.addLineDeco(r,i,s)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTo<t&&((this.writtenTo<t-1||null==this.nodes[this.nodes.length-1])&&this.nodes.push(this.blankContent(this.writtenTo,t-1)),this.nodes.push(null)),this.pos>t&&this.nodes.push(new Mn(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let n=new Cn(e-t);return this.oracle.doc.lineAt(t).to==e&&(n.flags|=4),n}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Mn)return t;let e=new Mn(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,t),r.breaks+=e,this.writtenTo=this.pos=this.pos+n}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Mn||this.isCovered?(this.writtenTo<this.pos||null==e)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos)):this.nodes.push(new Mn(0,-1));let n=t;for(let t of this.nodes)t instanceof Mn&&t.updateHeight(this.oracle,n),n+=t?t.length:1;return this.nodes}static build(t,e,n,i){let s=new On(n,t);return r.om.spans(e,n,i,s,0),s.finish(n)}}class Nn{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,n,r){(t<e||n&&n.heightRelevant||r&&r.heightRelevant)&&dt(t,e,this.changes,5)}}function _n(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,s=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(i.innerHeight,n.bottom);for(let e=t.parentNode;e&&e!=r.body;)if(1==e.nodeType){let n=e,r=window.getComputedStyle(n);if((n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();s=Math.max(s,r.left),o=Math.min(o,r.right),a=Math.max(a,r.top),l=Math.min(e==t.parentNode?i.innerHeight:l,r.bottom)}e="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:s-n.left,right:Math.max(s,o)-n.left,top:a-(n.top+e),bottom:Math.max(a,l)-(n.top+e)}}function Dn(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class Ln{constructor(t,e,n,r){this.from=t,this.to=e,this.size=n,this.displaySize=r}static same(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.size!=i.size)return!1}return!0}draw(t,e){return lt.replace({widget:new Bn(this.displaySize*(e?t.scaleY:t.scaleX),e)}).range(this.from,this.to)}}class Bn extends ot{constructor(t,e){super(),this.size=t,this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");return this.vertical?t.style.height=this.size+"px":(t.style.width=this.size+"px",t.style.height="2px",t.style.display="inline-block"),t}get estimatedHeight(){return this.vertical?this.size:-1}}class Rn{constructor(t){this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=Vn,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Tt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let e=t.facet(ae).some((t=>"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new bn(e),this.stateDeco=t.facet(le).filter((t=>"function"!=typeof t)),this.heightMap=En.empty().applyChanges(this.stateDeco,r.EY.empty,this.heightOracle.setDoc(t.doc),[new ye(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=lt.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let n=0;n<=1;n++){let r=n?e.head:e.anchor;if(!t.some((({from:t,to:e})=>r>=t&&r<=e))){let{from:e,to:n}=this.lineBlockAt(r);t.push(new Fn(e,n))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?Vn:new zn(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(qn(t,this.scaler))}))}update(t,e=null){this.state=t.state;let n=this.stateDeco;this.stateDeco=this.state.facet(le).filter((t=>"function"!=typeof t));let i=t.changedRanges,s=ye.extendWithRanges(i,function(t,e,n){let i=new Nn;return r.om.compare(t,e,n,i,0),i.changes}(n,this.stateDeco,t?t.changes:r.VR.empty(this.state.doc.length))),o=this.heightMap.height,a=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);vn(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||gn)&&(t.flags|=2),a?(this.scrollAnchorPos=t.changes.mapPos(a.from,-1),this.scrollAnchorHeight=a.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let l=s.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.head<l.from||e.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,e));let c=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,t.flags|=this.updateForViewport(),(c||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(t.changes),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Jt)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,n=window.getComputedStyle(e),i=this.heightOracle,s=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?Tt.RTL:Tt.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),a=e.getBoundingClientRect(),l=o||this.mustMeasureContent||this.contentDOMHeight!=a.height;this.contentDOMHeight=a.height,this.mustMeasureContent=!1;let c=0,u=0;if(a.width&&a.height){let{scaleX:t,scaleY:n}=g(e,a);(t>.005&&Math.abs(this.scaleX-t)>.005||n>.005&&Math.abs(this.scaleY-n)>.005)&&(this.scaleX=t,this.scaleY=n,c|=16,o=l=!0)}let h=(parseInt(n.paddingTop)||0)*this.scaleY,p=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==h&&this.paddingBottom==p||(this.paddingTop=h,this.paddingBottom=p,c|=18),this.editorWidth!=t.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=t.scrollDOM.clientWidth,c|=16);let d=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=d&&(this.scrollAnchorHeight=-1,this.scrollTop=d),this.scrolledToBottom=A(t.scrollDOM);let f=(this.printing?Dn:_n)(e,this.paddingTop),m=f.top-this.pixelViewport.top,y=f.bottom-this.pixelViewport.bottom;this.pixelViewport=f;let v=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(v!=this.inView&&(this.inView=v,v&&(l=!0)),!this.inView&&!this.scrollTarget&&!function(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}(t.dom))return 0;let b=a.width;if(this.contentDOMWidth==b&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=a.width,this.editorHeight=t.scrollDOM.clientHeight,c|=16),l){let e=t.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(e)&&(o=!0),o||i.lineWrapping&&Math.abs(b-this.contentDOMWidth)>i.charWidth){let{lineHeight:n,charWidth:r,textHeight:a}=t.docView.measureTextSize();o=n>0&&i.refresh(s,n,r,a,b/r,e),o&&(t.docView.minWidth=0,c|=16)}m>0&&y>0?u=Math.max(m,y):m<0&&y<0&&(u=Math.min(m,y)),vn();for(let n of this.viewports){let s=n.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(n);this.heightMap=(o?En.empty().applyChanges(this.stateDeco,r.EY.empty,this.heightOracle,[new ye(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new Tn(n.from,s))}gn&&(c|=2)}let T=!this.viewportIsAppropriate(this.viewport,u)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return T&&(2&c&&(c|=this.updateScaler()),this.viewport=this.getViewport(u,this.scrollTarget),c|=this.updateForViewport()),(2&c||T)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,t)),c|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),c}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let n=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:s,visibleBottom:o}=this,a=new Fn(r.lineAt(s-1e3*n,Sn.ByHeight,i,0,0).from,r.lineAt(o+1e3*(1-n),Sn.ByHeight,i,0,0).to);if(e){let{head:t}=e.range;if(t<a.from||t>a.to){let n,s=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),o=r.lineAt(t,Sn.ByPos,i,0,0);n="center"==e.y?(o.top+o.bottom)/2-s/2:"start"==e.y||"nearest"==e.y&&t<a.from?o.top:o.bottom-s,a=new Fn(r.lineAt(n-500,Sn.ByHeight,i,0,0).from,r.lineAt(n+s+500,Sn.ByHeight,i,0,0).to)}}return a}mapViewport(t,e){let n=e.mapPos(t.from,-1),r=e.mapPos(t.to,1);return new Fn(this.heightMap.lineAt(n,Sn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Sn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:t,to:e},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(t,Sn.ByPos,this.heightOracle,0,0),{bottom:i}=this.heightMap.lineAt(e,Sn.ByPos,this.heightOracle,0,0),{visibleTop:s,visibleBottom:o}=this;return(0==t||r<=s-Math.max(10,Math.min(-n,250)))&&(e==this.state.doc.length||i>=o+Math.max(10,Math.min(n,250)))&&r>s-2e3&&i<o+2e3}mapLineGaps(t,e){if(!t.length||e.empty)return t;let n=[];for(let r of t)e.touchesRange(r.from,r.to)||n.push(new Ln(e.mapPos(r.from),e.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(t,e){let n=this.heightOracle.lineWrapping,i=n?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Tt.LTR&&!n)return[];let a=[],l=(i,o,c,u)=>{if(o-i<s)return;let h=this.state.selection.main,p=[h.from];h.empty||p.push(h.to);for(let t of p)if(t>i&&t<o)return l(i,t-10,c,u),void l(t+10,o,c,u);let d=function(t,e){for(let n of t)if(e(n))return n}(t,(t=>t.from>=c.from&&t.to<=c.to&&Math.abs(t.from-i)<s&&Math.abs(t.to-o)<s&&!p.some((e=>t.from<e&&t.to>e))));if(!d){if(o<c.to&&e&&n&&e.visibleRanges.some((t=>t.from<=o&&t.to>=o))){let t=e.moveToLineBoundary(r.OF.cursor(o),!1,!0).head;t>i&&(o=t)}let t=this.gapSize(c,i,o,u);d=new Ln(i,o,t,n||t<2e6?t:2e6)}a.push(d)},c=e=>{if(e.length<o||e.type!=at.Text)return;let s=function(t,e,n){let i=[],s=t,o=0;return r.om.spans(n,t,e,{span(){},point(t,e){t>s&&(i.push({from:s,to:t}),o+=t-s),s=e}},20),s<e&&(i.push({from:s,to:e}),o+=e-s),{total:o,ranges:i}}(e.from,e.to,this.stateDeco);if(s.total<o)return;let a,c,u=this.scrollTarget?this.scrollTarget.range.head:null;if(n){let t,n,r=i/this.heightOracle.lineLength*this.heightOracle.lineHeight;if(null!=u){let i=Un(s,u),o=((this.visibleBottom-this.visibleTop)/2+r)/e.height;t=i-o,n=i+o}else t=(this.visibleTop-e.top-r)/e.height,n=(this.visibleBottom-e.top+r)/e.height;a=jn(s,t),c=jn(s,n)}else{let n=s.total*this.heightOracle.charWidth,r=i*this.heightOracle.charWidth,o=0;if(n>2e6)for(let n of t)n.from>=e.from&&n.from<e.to&&n.size!=n.displaySize&&n.from*this.heightOracle.charWidth+o<this.pixelViewport.left&&(o=n.size-n.displaySize);let l,h,p=this.pixelViewport.left+o,d=this.pixelViewport.right+o;if(null!=u){let t=Un(s,u),e=((d-p)/2+r)/n;l=t-e,h=t+e}else l=(p-r)/n,h=(d+r)/n;a=jn(s,l),c=jn(s,h)}a>e.from&&l(e.from,a,e,s),c<e.to&&l(c,e.to,e,s)};for(let t of this.viewportLines)Array.isArray(t.type)?t.type.forEach(c):c(t);return a}gapSize(t,e,n,r){let i=Un(r,n)-Un(r,e);return this.heightOracle.lineWrapping?t.height*i:r.total*this.heightOracle.charWidth*i}updateLineGaps(t){Ln.same(t,this.lineGaps)||(this.lineGaps=t,this.lineGapDeco=lt.set(t.map((t=>t.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(t){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];r.om.spans(e,this.viewport.from,this.viewport.to,{span(t,e){n.push({from:t,to:e})},point(){}},20);let i=0;if(n.length!=this.visibleRanges.length)i=12;else for(let e=0;e<n.length&&!(8&i);e++){let r=this.visibleRanges[e],s=n[e];r.from==s.from&&r.to==s.to||(i|=4,t&&t.mapPos(r.from,-1)==s.from&&t.mapPos(r.to,1)==s.to||(i|=8))}return this.visibleRanges=n,i}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||qn(this.heightMap.lineAt(t,Sn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||qn(this.heightMap.lineAt(this.scaler.fromDOM(t),Sn.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return qn(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fn{constructor(t,e){this.from=t,this.to=e}}function jn({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let t=0;;t++){let{from:n,to:i}=e[t],s=i-n;if(r<=s)return n+r;r-=s}}function Un(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}const Vn={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class zn{constructor(t,e,n){let r=0,i=0,s=0;this.viewports=n.map((({from:n,to:i})=>{let s=e.lineAt(n,Sn.ByPos,t,0,0).top,o=e.lineAt(i,Sn.ByPos,t,0,0).bottom;return r+=o-s,{from:n,to:i,top:s,bottom:o,domTop:0,domBottom:0}})),this.scale=(7e6-r)/(e.height-r);for(let t of this.viewports)t.domTop=s+(t.top-i)*this.scale,s=t.domBottom=t.domTop+(t.bottom-t.top),i=t.bottom}toDOM(t){for(let e=0,n=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.top)return r+(t-n)*this.scale;if(t<=i.bottom)return i.domTop+(t-i.top);n=i.bottom,r=i.domBottom}}fromDOM(t){for(let e=0,n=0,r=0;;e++){let i=e<this.viewports.length?this.viewports[e]:null;if(!i||t<i.domTop)return n+(t-r)/this.scale;if(t<=i.domBottom)return i.top+(t-i.domTop);n=i.bottom,r=i.domBottom}}eq(t){return t instanceof zn&&this.scale==t.scale&&this.viewports.length==t.viewports.length&&this.viewports.every(((e,n)=>e.from==t.viewports[n].from&&e.to==t.viewports[n].to))}}function qn(t,e){if(1==e.scale)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new xn(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map((t=>qn(t,e))):t._content)}const $n=r.sj.define({combine:t=>t.join(" ")}),Hn=r.sj.define({combine:t=>t.indexOf(!0)>-1}),Kn=i.G.newName(),Yn=i.G.newName(),Wn=i.G.newName(),Jn={"&light":"."+Yn,"&dark":"."+Wn};function Xn(t,e,n){return new i.G(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!n||!n[e])throw new RangeError(`Unsupported selector: ${e}`);return n[e]})):t+" "+e})}const Gn=Xn("."+Kn,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Jn),Zn={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Qn=K.ie&&K.ie_version<=11;class tr{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new v,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);(K.ie&&K.ie_version<=11||K.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!K.android||!1===t.constructor.EDIT_CONTEXT||K.chrome&&K.chrome_version<126||(this.editContext=new rr(t),t.state.facet(ee)&&(t.contentDOM.editContext=this.editContext.editContext)),Qn&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()})),this.resizeScroll.observe(t.scrollDOM)),this.addWindowListeners(this.win=t.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver((t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,n)=>e!=t[n])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(ee)?n.root.activeElement!=this.dom:!l(this.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(t)?e||(this.selectionChanged=!1):(K.ie&&K.ie_version<=11||K.android&&K.chrome)&&!n.state.selection.main.empty&&r.focusNode&&u(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=o(t.root);if(!e)return!1;let n=K.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let n=e.getComposedRanges(t.root)[0];if(n)return nr(t,n)}let n=null;function r(t){t.preventDefault(),t.stopImmediatePropagation(),n=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?nr(t,n):null}(this.view,e)||e;if(!n||this.selectionRange.eq(n))return!1;let r=l(this.dom,n);return r&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&function(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,f(n));;)if(r){if(1!=n.nodeType)return!1;let t=n.childNodes[r-1];"false"==t.contentEditable?r--:(n=t,r=f(n))}else{if(n==t)return!0;r=h(n),n=n.parentNode}}(this.dom,n)?(this.view.inputState.lastFocusTime=0,t.docView.updateSelection(),!1):(this.selectionRange.setRange(n),r&&(this.selectionChanged=!0),!0)}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let n=this.dom;n;)if(1==n.nodeType)!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==n?t++:e||(e=this.scrollTargets.slice(0,t)),e&&e.push(n),n=n.assignedSlot||n.parentNode;else{if(11!=n.nodeType)break;n=n.host}if(t<this.scrollTargets.length&&!e&&(e=this.scrollTargets.slice(0,t)),e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{return this.stop(),t()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Zn),Qn&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Qn&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(t,e){var n;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;t&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&w(this.dom,t.key,t.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!(null===(n=this.delayedAndroidKey)||void 0===n?void 0:n.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,n=-1,r=!1;for(let i of t){let t=this.readMutation(i);t&&(t.typeOver&&(r=!0),-1==e?({from:e,to:n}=t):(e=Math.min(t.from,e),n=Math.max(t.to,n)))}return{from:e,to:n,typeOver:r}}readChange(){let{from:t,to:e,typeOver:n}=this.processRecords(),r=this.selectionChanged&&l(this.dom,this.selectionRange);if(t<0&&!r)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new Fe(this.view,t,e,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let n=this.view.state,r=je(this.view,e);return this.view.state==n&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let n=er(e,t.previousSibling||t.target.previousSibling,-1),r=er(e,t.nextSibling||t.target.nextSibling,1);return{from:n?e.posAfter(n):e.posAtStart,to:r?e.posBefore(r):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(ee)!=t.state.facet(ee)&&(t.view.contentDOM.editContext=t.state.facet(ee)?this.editContext.editContext:null))}destroy(){var t,e,n;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function er(t,e,n){for(;e;){let r=I.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function nr(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return u(o.node,o.offset,i,s)&&([n,r,i,s]=[i,s,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:s}}class rr{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let n=t.state.selection.main,{anchor:i,head:s}=n,o=this.toEditorPos(e.updateRangeStart),a=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:o,drifted:!1});let l={from:o,to:a,insert:r.EY.of(e.text.split("\n"))};if(l.from==this.from&&i<this.from?l.from=i:l.to==this.to&&i>this.to&&(l.to=i),l.from!=l.to||l.insert.length){if((K.mac||K.android)&&l.from==s-1&&/^\. ?$/.test(e.text)&&"off"==t.contentDOM.getAttribute("autocorrect")&&(l={from:o,to:a,insert:r.EY.of([e.text.replace("."," ")])}),this.pendingContextChange=l,!t.state.readOnly){let n=this.to-this.from+(l.to-l.from+l.insert.length);Ue(t,l,r.OF.single(this.toEditorPos(e.selectionStart,n),this.toEditorPos(e.selectionEnd,n)))}this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state))}else{let i=r.OF.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd));i.main.eq(n)||t.dispatch({selection:i,userEvent:"select"})}},this.handlers.characterboundsupdate=n=>{let r=[],i=null;for(let e=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);e<s;e++){let n=t.coordsForChar(e);i=n&&new DOMRect(n.left,n.top,n.right-n.left,n.bottom-n.top)||i||new DOMRect,r.push(i)}e.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=e=>{let n=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,r=t.underlineThickness;if("None"!=e&&"None"!=r){let i=this.toEditorPos(t.rangeStart),s=this.toEditorPos(t.rangeEnd);if(i<s){let t=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==r?1:2}px`;n.push(lt.mark({attributes:{style:t}}).range(i,s))}}}t.dispatch({effects:Qt.of(lt.set(n))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=o(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,n=!1,r=this.pendingContextChange;return t.changes.iterChanges(((i,s,o,a,l)=>{if(n)return;let c=l.length-(s-i);if(r&&s>=r.to){if(r.from==i&&r.to==s&&r.insert.eq(l))return r=this.pendingContextChange=null,e+=c,void(this.to+=c);r=null,this.revertPending(t.state)}if(i+=e,(s+=e)<=this.from)this.from+=c,this.to+=c;else if(i<this.to){if(i<this.from||s>this.to||this.to-this.from+l.length>3e4)return void(n=!0);this.editContext.updateText(this.toContextPos(i),this.toContextPos(s),l.toString()),this.to+=c}e+=c})),r&&!n&&this.revertPending(t.state),!n}update(t){let e=this.pendingContextChange,n=t.startState.selection.main;this.composing&&(this.composing.drifted||!t.changes.touchesRange(n.from,n.to)&&t.transactions.some((t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),r=this.toContextPos(e.head);this.editContext.selectionStart==n&&this.editContext.selectionEnd==r||this.editContext.updateSelection(n,r)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to<t.doc.length&&this.to-e<500||this.to-this.from>3e4)}toEditorPos(t,e=this.to-this.from){t=Math.min(t,e);let n=this.composing;return n&&n.drifted?n.editorBase+(t-n.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class ir{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:n}=t;this.dispatchTransactions=t.dispatchTransactions||n&&(t=>t.forEach((t=>n(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Rn(t.state||r.$t.create(t)),t.scrollTo&&t.scrollTo.is(Zt)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(re).map((t=>new se(t)));for(let t of this.plugins)t.update(this);this.observer=new tr(this),this.inputState=new Ve(this),this.inputState.ensureHandlers(this.plugins),this.docView=new ve(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof r.ZX?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,n=!1,i=!1,s=this.state;for(let e of t){if(e.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=e.state}if(this.destroyed)return void(this.viewState.state=s);let o=this.hasFocus,a=0,l=null;t.some((t=>t.annotation(pn)))?(this.inputState.notifiedFocused=o,a=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,l=dn(s,o),l||(a=1));let c=this.observer.delayedAndroidKey,u=null;if(c?(this.observer.clearDelayedAndroidKey(),u=this.observer.readChange(),(u&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(u=null)):this.observer.clear(),s.facet(r.$t.phrases)!=this.state.facet(r.$t.phrases))return this.setState(s);e=ge.create(this,s,t),e.flags|=a;let h=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(h&&(h=h.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;h=new Gt(t.empty?t:r.OF.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Zt)&&(h=t.value.clip(this.state))}this.viewState.update(e,h),this.bidiCache=ar.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),n=this.docView.update(e),this.state.facet(me)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(n,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet($n)!=e.state.facet($n)&&(this.viewState.mustMeasureContent=!0),(n||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(qt))try{t(e)}catch(t){te(this.state,t,"update listener")}(l||u)&&Promise.resolve().then((()=>{l&&this.state==l.startState&&this.dispatch(l),u&&!je(this,u)&&c.force&&w(this.contentDOM,c.key,c.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Rn(t),this.plugins=t.facet(re).map((t=>new se(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new ve(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(re),n=t.state.facet(re);if(e!=n){let r=[];for(let i of n){let n=e.indexOf(i);if(n<0)r.push(new se(i));else{let e=this.plugins[n];e.mustUpdate=t,r.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t<this.plugins.length;t++)this.plugins[t].update(this);e!=n&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let t of this.plugins){let e=t.value;if(e&&e.docViewUpdate)try{e.docViewUpdate(this)}catch(t){te(this.state,t,"doc view update listener")}}}measure(t=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:s}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(s=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(s<0)if(A(n))i=-1,s=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(r);i=t.from,s=t.top}this.updateState=1;let o=this.viewState.measure(this);if(!o&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&o||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map((t=>{try{return t.read(this)}catch(t){return te(this.state,t),or}})),c=ge.create(this,this.state,[]),u=!1;c.flags|=o,e?e.flags|=o:e=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c),u&&this.docViewUpdate());for(let t=0;t<a.length;t++)if(l[t]!=or)try{let e=a[t];e.write&&e.write(l[t],this)}catch(t){te(this.state,t)}if(u&&this.docView.updateSelection(!0),!c.viewportChanged&&0==this.measureRequests.length){if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,s=-1;continue}{let t=(i<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(i).top)-s;if(t>1||t<-1){r+=t,n.scrollTop=r/this.scaleY,s=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(qt))t(e)}get themeClasses(){return Kn+" "+(this.state.facet(Hn)?Wn:Yn)+" "+this.state.facet($n)}updateAttrs(){let t=lr(this,oe,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ee)?"true":"false",class:"cm-content",style:`${K.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),lr(this,ae,e);let n=this.observer.ignore((()=>{let n=it(this.contentDOM,this.contentAttrs,e),r=it(this.dom,this.editorAttrs,t);return n||r}));return this.editorAttrs=t,this.contentAttrs=e,n}showAnnouncements(t){let e=!0;for(let n of t)for(let t of n.effects)t.is(ir.announce)&&(e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value)}mountStyles(){this.styleModules=this.state.facet(me);let t=this.state.facet(ir.cspNonce);i.G.mount(this.root,this.styleModules.concat(Gn).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;e<this.measureRequests.length;e++)if(this.measureRequests[e].key===t.key)return void(this.measureRequests[e]=t);this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);return(void 0===e||e&&e.plugin!=t)&&this.pluginMap.set(t,e=this.plugins.find((e=>e.plugin==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,n){return _e(this,t,Oe(this,t,e,n))}moveByGroup(t,e){return _e(this,t,Oe(this,t,e,(e=>function(t,e,n){let i=t.state.charCategorizer(e),s=i(n);return t=>{let e=i(t);return s==r.Je.Space&&(s=e),s==e}}(this,t.head,e))))}visualLineSide(t,e){let n=this.bidiSpans(t),i=this.textDirectionAt(t.from),s=n[e?n.length-1:0];return r.OF.cursor(s.side(e,i)+t.from,s.forward(!e,i)?1:-1)}moveToLineBoundary(t,e,n=!0){return function(t,e,n,i){let s=Ie(t,e.head,e.assoc||-1),o=i&&s.type==at.Text&&(t.lineWrapping||s.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>s.from?e.head-1:e.head):null;if(o){let e=t.dom.getBoundingClientRect(),i=t.textDirectionAt(s.from),a=t.posAtCoords({x:n==(i==Tt.LTR)?e.right-1:e.left+1,y:(o.top+o.bottom)/2});if(null!=a)return r.OF.cursor(a,n?-1:1)}return r.OF.cursor(n?s.to:s.from,n?-1:1)}(this,t,e,n)}moveVertically(t,e,n){return _e(this,t,function(t,e,n,i){let s=e.head,o=n?1:-1;if(s==(n?t.state.doc.length:0))return r.OF.cursor(s,e.assoc);let a,l=e.goalColumn,c=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(s,e.assoc||-1),h=t.documentTop;if(u)null==l&&(l=u.left-c.left),a=o<0?u.top:u.bottom;else{let e=t.viewState.lineBlockAt(s);null==l&&(l=Math.min(c.right-c.left,t.defaultCharacterWidth*(s-e.from))),a=(o<0?e.top:e.bottom)+h}let p=c.left+l,d=null!=i?i:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let n=a+(d+e)*o,i=Ce(t,{x:p,y:n},!1,o);if(n<c.top||n>c.bottom||(o<0?i<s:i>s)){let e=t.docView.coordsForChar(i),s=!e||n<e.top?-1:1;return r.OF.cursor(i,s,void 0,l)}}}(this,t,e,n))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=!0){return this.readMeasured(),Ce(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let n=this.docView.coordsAt(t,e);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(t),i=this.bidiSpans(r);return m(n,i[It.find(i,t-r.from,-1,e)].dir==Tt.LTR==e>0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(Wt)||t<this.viewport.from||t>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>sr)return Lt(t.length);let e,n=this.textDirectionAt(t.from);for(let r of this.bidiCache)if(r.from==t.from&&r.dir==n&&(r.fresh||Ot(r.isolates,e=pe(this,t))))return r.order;e||(e=pe(this,t));let r=function(t,e,n){if(!t)return[new It(0,0,e==St?1:0)];if(e==xt&&!n.length&&!kt.test(t))return Lt(t.length);if(n.length)for(;t.length>Nt.length;)Nt[Nt.length]=256;let r=[],i=e==xt?0:1;return Dt(t,i,i,n,0,t.length,r),r}(t.text,n,e);return this.bidiCache.push(new ar(t.from,t.to,n,e,!0,r)),r}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||K.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{x(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Zt.of(new Gt("number"==typeof t?r.OF.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,n=this.viewState.scrollAnchorAt(t);return Zt.of(new Gt(r.OF.cursor(n.from),"start","start",n.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return ie.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return ie.define((()=>({})),{eventObservers:t})}static theme(t,e){let n=i.G.newName(),r=[$n.of(n),me.of(Xn(`.${n}`,t))];return e&&e.dark&&r.push(Hn.of(!0)),r}static baseTheme(t){return r.Nb.lowest(me.of(Xn("."+Kn,t,Jn)))}static findFromDOM(t){var e;let n=t.querySelector(".cm-content"),r=n&&I.get(n)||I.get(t);return(null===(e=null==r?void 0:r.rootView)||void 0===e?void 0:e.view)||null}}ir.styleModule=me,ir.inputHandler=$t,ir.clipboardInputFilter=Kt,ir.clipboardOutputFilter=Yt,ir.scrollHandler=Xt,ir.focusChangeEffect=Ht,ir.perLineTextDirection=Wt,ir.exceptionSink=zt,ir.updateListener=qt,ir.editable=ee,ir.mouseSelectionStyle=Vt,ir.dragMovesSelection=Ut,ir.clickAddsSelectionRange=jt,ir.decorations=le,ir.outerDecorations=ce,ir.atomicRanges=ue,ir.bidiIsolatedRanges=he,ir.scrollMargins=de,ir.darkTheme=Hn,ir.cspNonce=r.sj.define({combine:t=>t.length?t[0]:""}),ir.contentAttributes=ae,ir.editorAttributes=oe,ir.lineWrapping=ir.contentAttributes.of({class:"cm-lineWrapping"}),ir.announce=r.Pe.define();const sr=4096,or={};class ar{constructor(t,e,n,r,i,s){this.from=t,this.to=e,this.dir=n,this.isolates=r,this.fresh=i,this.order=s}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let n=[],r=t.length?t[t.length-1].dir:Tt.LTR;for(let i=Math.max(0,t.length-10);i<t.length;i++){let s=t[i];s.dir!=r||e.touchesRange(s.from,s.to)||n.push(new ar(e.mapPos(s.from,1),e.mapPos(s.to,-1),s.dir,s.isolates,!1,s.order))}return n}}function lr(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let e=r[i],s="function"==typeof e?e(t):e;s&&et(s,n)}return n}const cr=K.mac?"mac":K.windows?"win":K.linux?"linux":"key";function ur(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==n&&e.shiftKey&&(t="Shift-"+t),t}const hr=r.Nb.default(ir.domEventHandlers({keydown:(t,e)=>function(t,e,n,i){yr=e;let o=(0,s.xT)(e),a=(0,r.vS)(o,0),l=(0,r.Fh)(a)==o.length&&" "!=o,c="",u=!1,h=!1,p=!1;fr&&fr.view==n&&fr.scope==i&&(c=fr.prefix+" ",Ke.indexOf(e.keyCode)<0&&(h=!0,fr=null));let d,f,m=new Set,y=t=>{if(t){for(let e of t.run)if(!m.has(e)&&(m.add(e),e(n)))return t.stopPropagation&&(p=!0),!0;t.preventDefault&&(t.stopPropagation&&(p=!0),h=!0)}return!1},g=t[i];return g&&(y(g[c+ur(o,e,!l)])?u=!0:l&&(e.altKey||e.metaKey||e.ctrlKey)&&!(K.windows&&e.ctrlKey&&e.altKey)&&(d=s.E3[e.keyCode])&&d!=o?(y(g[c+ur(d,e,!0)])||e.shiftKey&&(f=s.BN[e.keyCode])!=o&&f!=d&&y(g[c+ur(f,e,!1)]))&&(u=!0):l&&e.shiftKey&&y(g[c+ur(o,e,!0)])&&(u=!0),!u&&y(g._any)&&(u=!0)),h&&(u=!0),u&&p&&e.stopPropagation(),yr=null,u}(function(t){let e=t.facet(pr),n=dr.get(e);return n||dr.set(e,n=function(t,e=cr){let n=Object.create(null),r=Object.create(null),i=(t,e)=>{let n=r[t];if(null==n)r[t]=e;else if(n!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},s=(t,r,s,o,a)=>{var l,c;let u=n[t]||(n[t]=Object.create(null)),h=r.split(/ (?!$)/).map((t=>function(t,e){const n=t.split(/-(?!$)/);let r,i,s,o,a=n[n.length-1];"Space"==a&&(a=" ");for(let t=0;t<n.length-1;++t){const a=n[t];if(/^(cmd|meta|m)$/i.test(a))o=!0;else if(/^a(lt)?$/i.test(a))r=!0;else if(/^(c|ctrl|control)$/i.test(a))i=!0;else if(/^s(hift)?$/i.test(a))s=!0;else{if(!/^mod$/i.test(a))throw new Error("Unrecognized modifier name: "+a);"mac"==e?o=!0:i=!0}}return r&&(a="Alt-"+a),i&&(a="Ctrl-"+a),o&&(a="Meta-"+a),s&&(a="Shift-"+a),a}(t,e)));for(let e=1;e<h.length;e++){let n=h.slice(0,e).join(" ");i(n,!0),u[n]||(u[n]={preventDefault:!0,stopPropagation:!1,run:[e=>{let r=fr={view:e,prefix:n,scope:t};return setTimeout((()=>{fr==r&&(fr=null)}),mr),!0}]})}let p=h.join(" ");i(p,!1);let d=u[p]||(u[p]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});s&&d.run.push(s),o&&(d.preventDefault=!0),a&&(d.stopPropagation=!0)};for(let r of t){let t=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let e of t){let t=n[e]||(n[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:i}=r;for(let e in t)t[e].run.push((t=>i(t,yr)))}let i=r[e]||r.key;if(i)for(let e of t)s(e,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&s(e,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(e.reduce(((t,e)=>t.concat(e)),[]))),n}(e.state),t,e,"editor")})),pr=r.sj.define({enables:hr}),dr=new WeakMap;let fr=null;const mr=4e3;let yr=null;class gr{constructor(t,e,n,r,i){this.className=t,this.left=e,this.top=n,this.width=r,this.height=i}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,n){if(n.empty){let r=t.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=vr(t);return[new gr(e,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),s=t.textDirection==Tt.LTR,o=t.contentDOM,a=o.getBoundingClientRect(),l=vr(t),c=o.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),h=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),p=a.right-(u?parseInt(u.paddingRight):0),d=Ie(t,r,1),f=Ie(t,i,-1),m=d.type==at.Text?d:null,y=f.type==at.Text?f:null;if(m&&(t.lineWrapping||d.widgetLineBreaks)&&(m=br(t,r,1,m)),y&&(t.lineWrapping||f.widgetLineBreaks)&&(y=br(t,i,-1,y)),m&&y&&m.from==y.from&&m.to==y.to)return v(b(n.from,n.to,m));{let e=m?b(n.from,null,m):T(d,!1),r=y?b(null,n.to,y):T(f,!0),i=[];return(m||d).to<(y||f).from-(m&&y?1:0)||d.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2<r.top?i.push(g(h,e.bottom,p,r.top)):e.bottom<r.top&&t.elementAtHeight((e.bottom+r.top)/2).type==at.Text&&(e.bottom=r.top=(e.bottom+r.top)/2),v(e).concat(i).concat(v(r))}function g(t,n,r,i){return new gr(e,t-l.left,n-l.top,r-t,i-n)}function v({top:t,bottom:e,horizontal:n}){let r=[];for(let i=0;i<n.length;i+=2)r.push(g(n[i],t,n[i+1],e));return r}function b(e,n,r){let i=1e9,o=-1e9,a=[];function l(e,n,l,c,u){let d=t.coordsAtPos(e,e==r.to?-2:2),f=t.coordsAtPos(l,l==r.from?2:-2);d&&f&&(i=Math.min(d.top,f.top,i),o=Math.max(d.bottom,f.bottom,o),u==Tt.LTR?a.push(s&&n?h:d.left,s&&c?p:f.right):a.push(!s&&c?h:f.left,!s&&n?p:d.right))}let c=null!=e?e:r.from,u=null!=n?n:r.to;for(let r of t.visibleRanges)if(r.to>c&&r.from<u)for(let i=Math.max(r.from,c),s=Math.min(r.to,u);;){let r=t.state.doc.lineAt(i);for(let o of t.bidiSpans(r)){let t=o.from+r.from,a=o.to+r.from;if(t>=s)break;a>i&&l(Math.max(t,i),null==e&&t<=c,Math.min(a,s),null==n&&a>=u,o.dir)}if(i=r.to+1,i>=s)break}return 0==a.length&&l(c,null==e,u,null==n,t.textDirection),{top:i,bottom:o,horizontal:a}}function T(t,e){let n=a.top+(e?t.top:t.bottom);return{top:n,bottom:n,horizontal:[]}}}(t,e,n)}}function vr(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Tt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function br(t,e,n,r){let i=t.coordsAtPos(e,2*n);if(!i)return r;let s=t.dom.getBoundingClientRect(),o=(i.top+i.bottom)/2,a=t.posAtCoords({x:s.left+1,y:o}),l=t.posAtCoords({x:s.right-1,y:o});return null==a||null==l?r:{from:Math.max(r.from,Math.min(a,l)),to:Math.min(r.to,Math.max(a,l))}}class Tr{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(xr)!=t.state.facet(xr)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,n=t.facet(xr);for(;e<n.length&&n[e]!=this.layer;)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:t,scaleY:e}=this.view;t==this.scaleX&&e==this.scaleY||(this.scaleX=t,this.scaleY=e,this.dom.style.transform=`scale(${1/t}, ${1/e})`)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>{return n=t,r=this.drawn[e],!(n.constructor==r.constructor&&n.eq(r));var n,r}))){let e=this.dom.firstChild,n=0;for(let r of t)r.update&&e&&r.constructor&&this.drawn[n].constructor&&r.update(e,this.drawn[n])?(e=e.nextSibling,n++):this.dom.insertBefore(r.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const xr=r.sj.define();function Sr(t){return[ie.define((e=>new Tr(e,t))),xr.of(t)]}const wr=r.sj.define({combine:t=>(0,r.QR)(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Er(t={}){return[wr.of(t),Pr,Cr,kr,Jt.of(!0)]}function Ar(t){return t.startState.facet(wr)!=t.state.facet(wr)}const Pr=Sr({above:!0,markers(t){let{state:e}=t,n=e.facet(wr),i=[];for(let s of e.selection.ranges){let o=s==e.selection.main;if(s.empty||n.drawRangeCursor){let e=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=s.empty?s:r.OF.cursor(s.head,s.head>s.anchor?-1:1);for(let r of gr.forRange(t,e,n))i.push(r)}}return i},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let n=Ar(t);return n&&Mr(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){Mr(e.state,t)},class:"cm-cursorLayer"});function Mr(t,e){e.style.animationDuration=t.facet(wr).cursorBlinkRate+"ms"}const Cr=Sr({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:gr.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||Ar(t),class:"cm-selectionLayer"}),kr=r.Nb.highest(ir.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}}));function Ir(){return Nr}const Or=lt.line({class:"cm-activeLine"}),Nr=ie.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(Or.range(i.from)),e=i.from)}return lt.set(n)}},{decorations:t=>t.decorations});class _r extends ot{constructor(t){super(),this.content=t}toDOM(t){let e=document.createElement("span");return e.className="cm-placeholder",e.style.pointerEvents="none",e.appendChild("string"==typeof this.content?document.createTextNode(this.content):"function"==typeof this.content?this.content(t):this.content.cloneNode(!0)),e.setAttribute("aria-hidden","true"),e}coordsAt(t){let e=t.firstChild?c(t.firstChild):[];if(!e.length)return null;let n=window.getComputedStyle(t.parentNode),r=m(e[0],"rtl"!=n.direction),i=parseInt(n.lineHeight);return r.bottom-r.top>1.5*i?{left:r.left,right:r.right,top:r.top,bottom:r.top+i}:r}ignoreEvent(){return!1}}function Dr(t){let e=ie.fromClass(class{constructor(e){this.view=e,this.placeholder=t?lt.set([lt.widget({widget:new _r(t),side:1}).range(0)]):lt.none}get decorations(){return this.view.state.doc.length?lt.none:this.placeholder}},{decorations:t=>t.decorations});return"string"==typeof t?[e,ir.contentAttributes.of({"aria-placeholder":t})]:e}const Lr="-10000px";class Br{constructor(t,e,n,r){this.facet=e,this.createTooltipView=n,this.removeTooltipView=r,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let i=null;this.tooltipViews=this.tooltips.map((t=>i=n(t,i)))}update(t,e){var n;let r=t.state.facet(this.facet),i=r.filter((t=>t));if(r===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let s=[],o=e?[]:null;for(let n=0;n<i.length;n++){let r=i[n],a=-1;if(r){for(let t=0;t<this.tooltips.length;t++){let e=this.tooltips[t];e&&e.create==r.create&&(a=t)}if(a<0)s[n]=this.createTooltipView(r,n?s[n-1]:null),o&&(o[n]=!!r.above);else{let r=s[n]=this.tooltipViews[a];o&&(o[n]=e[a]),r.update&&r.update(t)}}}for(let t of this.tooltipViews)s.indexOf(t)<0&&(this.removeTooltipView(t),null===(n=t.destroy)||void 0===n||n.call(t));return e&&(o.forEach(((t,n)=>e[n]=t)),e.length=o.length),this.input=r,this.tooltips=i,this.tooltipViews=s,!0}}function Rr(t={}){return jr.of(t)}function Fr(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const jr=r.sj.define({combine:t=>{var e,n,r;return{position:K.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(n=t.find((t=>t.parent)))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=t.find((t=>t.tooltipSpace)))||void 0===r?void 0:r.tooltipSpace)||Fr}}}),Ur=new WeakMap,Vr=ie.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(jr);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Br(t,Hr,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(jr);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",n.dom.appendChild(t)}return n.dom.style.position=this.position,n.dom.style.top=Lr,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(n=this.intersectionObserver)||void 0===n||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if(K.gecko)n=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==Lr&&"0px"==t.style.left){let e=t.getBoundingClientRect();n=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(n||"absolute"==this.position)if(this.parent){let n=this.parent.getBoundingClientRect();n.width&&n.height&&(t=n.width/this.parent.offsetWidth,e=n.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),i=fe(this.view);return{visible:{left:r.left+i.left,top:r.top+i.top,right:r.right-i.right,bottom:r.bottom-i.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((t,e)=>{let n=this.manager.tooltipViews[e];return n.getCoords?n.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(jr).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:n,space:r,scaleX:i,scaleY:s}=t,o=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,h=t.pos[a],p=t.size[a];if(!h||!1!==l.clip&&(h.bottom<=Math.max(n.top,r.top)||h.top>=Math.min(n.bottom,r.bottom)||h.right<Math.max(n.left,r.left)-.1||h.left>Math.min(n.right,r.right)+.1)){u.style.top=Lr;continue}let d=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,f=d?7:0,m=p.right-p.left,y=null!==(e=Ur.get(c))&&void 0!==e?e:p.bottom-p.top,g=c.offset||$r,v=this.view.textDirection==Tt.LTR,b=p.width>r.right-r.left?v?r.left:r.right-p.width:v?Math.max(r.left,Math.min(h.left-(d?14:0)+g.x,r.right-m)):Math.min(Math.max(r.left,h.left-m+(d?14:0)-g.x),r.right-m),T=this.above[a];!l.strictSide&&(T?h.top-y-f-g.y<r.top:h.bottom+y+f+g.y>r.bottom)&&T==r.bottom-h.bottom>h.top-r.top&&(T=this.above[a]=!T);let x=(T?h.top-r.top:r.bottom-h.bottom)-f;if(x<y&&!1!==c.resize){if(x<this.view.defaultLineHeight){u.style.top=Lr;continue}Ur.set(c,y),u.style.height=(y=x)/s+"px"}else u.style.height&&(u.style.height="");let S=T?h.top-y-f-g.y:h.bottom+f+g.y,w=b+m;if(!0!==c.overlap)for(let t of o)t.left<w&&t.right>b&&t.top<S+y&&t.bottom>S&&(S=T?t.top-y-2-f:t.bottom+f+2);if("absolute"==this.position?(u.style.top=(S-t.parent.top)/s+"px",zr(u,(b-t.parent.left)/i)):(u.style.top=S/s+"px",zr(u,b/i)),d){let t=h.left+(v?g.x:-g.x)-(b+14-7);d.style.left=t/i+"px"}!0!==c.overlap&&o.push({left:b,top:S,right:w,bottom:S+y}),u.classList.toggle("cm-tooltip-above",T),u.classList.toggle("cm-tooltip-below",!T),c.positioned&&c.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Lr}},{eventObservers:{scroll(){this.maybeMeasure()}}});function zr(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const qr=ir.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),$r={x:0,y:0},Hr=r.sj.define({enables:[Vr,qr]}),Kr=r.sj.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class Yr{static create(t){return new Yr(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Br(t,Kr,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let n=t.create(this.view);return n.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(n.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&n.mount&&n.mount(this.view),n}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let n of this.manager.tooltipViews){let r=n[t];if(void 0!==r)if(void 0===e)e=r;else if(e!==r)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Wr=Hr.compute([Kr],(t=>{let e=t.facet(Kr);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:Yr.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Jr{constructor(t,e,n,r,i){this.view=t,this.source=e,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;t<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:t,lastMove:e}=this,n=t.docView.nearest(e.target);if(!n)return;let r,i=1;if(n instanceof J)r=n.posAtStart;else{if(r=t.posAtCoords(e),null==r)return;let n=t.coordsAtPos(r);if(!n||e.y<n.top||e.y>n.bottom||e.x<n.left-t.defaultCharacterWidth||e.x>n.right+t.defaultCharacterWidth)return;let s=t.bidiSpans(t.state.doc.lineAt(r)).find((t=>t.from<=r&&t.to>=r)),o=s&&s.dir==Tt.RTL?-1:1;i=e.x<n.left?-o:o}let s=this.source(t,r,i);if(null==s?void 0:s.then){let e=this.pending={pos:r};s.then((n=>{this.pending==e&&(this.pending=null,!n||Array.isArray(n)&&!n.length||t.dispatch({effects:this.setHover.of(Array.isArray(n)?n:[n])}))}),(e=>te(t.state,e,"hover tooltip")))}else!s||Array.isArray(s)&&!s.length||t.dispatch({effects:this.setHover.of(Array.isArray(s)?s:[s])})}get tooltip(){let t=this.view.plugin(Vr),e=t?t.manager.tooltips.findIndex((t=>t.create==Yr.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,n;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:i}=this;if(r.length&&i&&!function(t,e){let n,{left:r,right:i,top:s,bottom:o}=t.getBoundingClientRect();if(n=t.querySelector(".cm-tooltip-arrow")){let t=n.getBoundingClientRect();s=Math.min(t.top,s),o=Math.max(t.bottom,o)}return e.clientX>=r-Xr&&e.clientX<=i+Xr&&e.clientY>=s-Xr&&e.clientY<=o+Xr}(i.dom,t)||this.pending){let{pos:i}=r[0]||this.pending,s=null!==(n=null===(e=r[0])||void 0===e?void 0:e.end)&&void 0!==n?n:i;(i==s?this.view.posAtCoords(this.lastMove)==i:function(t,e,n,r,i){let s=t.scrollDOM.getBoundingClientRect(),o=t.documentTop+t.documentPadding.top+t.contentHeight;if(s.left>r||s.right<r||s.top>i||Math.min(s.bottom,o)<i)return!1;let a=t.posAtCoords({x:r,y:i},!1);return a>=e&&a<=n}(this.view,i,s,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=n=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(n.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Xr=4;function Gr(t,e={}){let n=r.Pe.define(),i=r.sU.define({create:()=>[],update(t,i){if(t.length&&(e.hideOnChange&&(i.docChanged||i.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(i,t)))),i.docChanged)){let e=[];for(let n of t){let t=i.changes.mapPos(n.pos,-1,r.iR.TrackDel);if(null!=t){let r=Object.assign(Object.create(null),n);r.pos=t,null!=r.end&&(r.end=i.changes.mapPos(r.end)),e.push(r)}}t=e}for(let e of i.effects)e.is(n)&&(t=e.value),e.is(Qr)&&(t=[]);return t},provide:t=>Kr.from(t)});return{active:i,extension:[i,ie.define((r=>new Jr(r,t,i,n,e.hoverTime||300))),Wr]}}function Zr(t,e){let n=t.plugin(Vr);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const Qr=r.Pe.define(),ti=r.sj.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function ei(t,e){let n=t.plugin(ni),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const ni=ie.fromClass(class{constructor(t){this.input=t.state.facet(si),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(ti);this.top=new ri(t,!0,e.topContainer),this.bottom=new ri(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(ti);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ri(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ri(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(si);if(n!=this.input){let e=n.filter((t=>t)),r=[],i=[],s=[],o=[];for(let n of e){let e,a=this.specs.indexOf(n);a<0?(e=n(t.view),o.push(e)):(e=this.panels[a],e.update&&e.update(t)),r.push(e),(e.top?i:s).push(e)}this.specs=e,this.panels=r,this.top.sync(i),this.bottom.sync(s);for(let t of o)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ir.scrollMargins.of((e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}}))});class ri{constructor(t,e,n){this.view=t,this.top=e,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=ii(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=ii(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function ii(t){let e=t.nextSibling;return t.remove(),e}const si=r.sj.define({enables:ni});class oi extends r.FB{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}oi.prototype.elementClass="",oi.prototype.toDOM=void 0,oi.prototype.mapMode=r.iR.TrackBefore,oi.prototype.startSide=oi.prototype.endSide=-1,oi.prototype.point=!0;const ai=r.sj.define(),li=r.sj.define(),ci={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>r.om.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},ui=r.sj.define();function hi(t){return[di(),ui.of({...ci,...t})]}const pi=r.sj.define({combine:t=>t.some((t=>t))});function di(t){let e=[fi];return t&&!1===t.fixed&&e.push(pi.of(!0)),e}const fi=ie.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(ui).map((e=>new vi(t,e))),this.fixed=!t.state.facet(pi);for(let t of this.gutters)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}if(t.geometryChanged){let t=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=t,this.domAfter&&(this.domAfter.style.minHeight=t)}this.view.state.facet(pi)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=r.om.iter(this.view.state.facet(ai),this.view.viewport.from),i=[],s=this.gutters.map((t=>new gi(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(t.type)){let e=!0;for(let r of t.type)if(r.type==at.Text&&e){yi(n,i,r.from);for(let t of s)t.line(this.view,r,i);e=!1}else if(r.widget)for(let t of s)t.widget(this.view,r)}else if(t.type==at.Text){yi(n,i,t.from);for(let e of s)e.line(this.view,t,i)}else if(t.widget)for(let e of s)e.widget(this.view,t);for(let t of s)t.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(ui),n=t.state.facet(ui),i=t.docChanged||t.heightChanged||t.viewportChanged||!r.om.eq(t.startState.facet(ai),t.state.facet(ai),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let e of this.gutters)e.update(t)&&(i=!0);else{i=!0;let r=[];for(let i of n){let n=e.indexOf(i);n<0?r.push(new vi(this.view,i)):(this.gutters[n].update(t),r.push(this.gutters[n]))}for(let t of this.gutters)t.dom.remove(),r.indexOf(t)<0&&t.destroy();for(let t of r)"after"==t.config.side?this.getDOMAfter().appendChild(t.dom):this.dom.appendChild(t.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ir.scrollMargins.of((e=>{let n=e.plugin(t);if(!n||0==n.gutters.length||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Tt.LTR?{left:r,right:i}:{right:r,left:i}}))});function mi(t){return Array.isArray(t)?t:[t]}function yi(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class gi{constructor(t,e,n){this.gutter=t,this.height=n,this.i=0,this.cursor=r.om.iter(t.markers,e.from)}addElement(t,e,n){let{gutter:r}=this,i=(e.top-this.height)/t.scaleY,s=e.height/t.scaleY;if(this.i==r.elements.length){let e=new bi(t,s,i,n);r.elements.push(e),r.dom.appendChild(e.dom)}else r.elements[this.i].update(t,s,i,n);this.height=e.bottom,this.i++}line(t,e,n){let r=[];yi(this.cursor,r,e.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(t,e,r);i&&r.unshift(i);let s=this.gutter;(0!=r.length||s.config.renderEmptyElements)&&this.addElement(t,e,r)}widget(t,e){let n=this.gutter.config.widgetMarker(t,e.widget,e),r=n?[n]:null;for(let n of t.state.facet(li)){let i=n(t,e.widget,e);i&&(r||(r=[])).push(i)}r&&this.addElement(t,e,r)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class vi{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in e.domEventHandlers)this.dom.addEventListener(n,(r=>{let i,s=r.target;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let t=s.getBoundingClientRect();i=(t.top+t.bottom)/2}else i=r.clientY;let o=t.lineBlockAtHeight(i-t.documentTop);e.domEventHandlers[n](t,o,r)&&r.preventDefault()}));this.markers=mi(e.markers(t)),e.initialSpacer&&(this.spacer=new bi(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=mi(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let n=t.view.viewport;return!r.om.eq(this.markers,e,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class bi{constructor(t,e,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,n,r)}update(t,e,n,r){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}(this.markers,r)||this.setMarkers(t,r)}setMarkers(t,e){let n="cm-gutterElement",r=this.dom.firstChild;for(let i=0,s=0;;){let o=s,a=i<e.length?e[i++]:null,l=!1;if(a){let t=a.elementClass;t&&(n+=" "+t);for(let t=s;t<this.markers.length;t++)if(this.markers[t].compare(a)){o=t,l=!0;break}}else o=this.markers.length;for(;s<o;){let t=this.markers[s++];if(t.toDOM){t.destroy(r);let e=r.nextSibling;r.remove(),r=e}}if(!a)break;a.toDOM&&(l?r=r.nextSibling:this.dom.insertBefore(a.toDOM(t),r)),l&&s++}this.dom.className=n,this.markers=e}destroy(){this.setMarkers(null,[])}}const Ti=r.sj.define(),xi=r.sj.define(),Si=r.sj.define({combine:t=>(0,r.QR)(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let n=Object.assign({},t);for(let t in e){let r=n[t],i=e[t];n[t]=r?(t,e,n)=>r(t,e,n)||i(t,e,n):i}return n}})});class wi extends oi{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Ei(t,e){return t.state.facet(Si).formatNumber(e,t.state)}const Ai=ui.compute([Si],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(Ti),lineMarker:(t,e,n)=>n.some((t=>t.toDOM))?null:new wi(Ei(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,n)=>{for(let r of t.state.facet(xi)){let i=r(t,e,n);if(i)return i}return null},lineMarkerChange:t=>t.startState.facet(Si)!=t.state.facet(Si),initialSpacer:t=>new wi(Ei(t,Mi(t.state.doc.lines))),updateSpacer(t,e){let n=Ei(e.view,Mi(e.view.state.doc.lines));return n==t.number?t:new wi(n)},domEventHandlers:t.facet(Si).domEventHandlers,side:"before"})));function Pi(t={}){return[Si.of(t),di(),Ai]}function Mi(t){let e=9;for(;e<t;)e=10*e+9;return e}const Ci=new class extends oi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},ki=ai.compute(["selection"],(t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(Ci.range(i)))}return r.om.of(e)}));function Ii(){return ki}},9573:(t,e,n)=>{var r=n(9106),i=n(64813),s=n(5550),o=n(49421),a=n(2776),l=n(71856),c=n(88087),u=l.Map,h=l.has,p=l.set;t.exports=function(t){var e,n,l,d=o(this),f=s(d),m=[],y=new u,g=i(t)?function(t){return t}:r(t);for(e=0;e<f;e++)l=g(n=d[e]),h(y,l)||p(y,l,n);return e=0,c(y,(function(t){a(m,e++,t)})),m}},9656:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(45632),o=n(38378),a=n(27293),l=o.Set,c=o.add;r({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=new l;return a(e,(function(t){n(t,t,e)&&c(r,t)})),r}})},9671:(t,e,n)=>{var r=n(22743),i=n(22521),s=n(65895),o=n(24377).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||o(e,t,{value:s.f(t)})}},9754:t=>{t.exports=Function.prototype.call},9824:(t,e,n)=>{var r=n(26792);t.exports=Array.isArray||function(t){return"Array"===r(t)}},10638:(t,e,n)=>{var r=n(64813),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},10647:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(49625);const i=Symbol(),s=Symbol();function o(t,e,n){if(!t)return!1;const a=r.VISITOR_KEYS[t.type];if(!a)return!1;const l=e(t,n=n||{});if(void 0!==l)switch(l){case i:return!1;case s:return!0}for(const r of a){const i=t[r];if(i)if(Array.isArray(i)){for(const t of i)if(o(t,e,n))return!0}else if(o(i,e,n))return!0}return!1}o.skip=i,o.stop=s},10838:(t,e,n)=>{var r=n(23486),i=n(71747),s=n(52069).add;r({target:"WeakSet",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,n=arguments.length;e<n;e++)s(t,arguments[e]);return t}})},10906:(t,e,n)=>{n.d(e,{Ay:()=>U,EI:()=>O,KB:()=>_,Lv:()=>gt,Oh:()=>D,Q0:()=>h,R3:()=>Z,SG:()=>Dt,WD:()=>H,Xt:()=>k,Yy:()=>M,_I:()=>at,_Y:()=>z,_v:()=>N,b_:()=>Y,bj:()=>f,cr:()=>bt,f7:()=>lt,jU:()=>Ft,k7:()=>g,mv:()=>m,mz:()=>q,nd:()=>y,p9:()=>u,tp:()=>I,wg:()=>X,y9:()=>wt,yd:()=>W});var r,i=n(38325),s=n(38273),o=n(9283),a=n(74208),l=n(15473);const c=new i.uY;function u(t){return s.sj.define({combine:t?e=>e.concat(t):void 0})}const h=new i.uY;class p{constructor(t,e,n=[],r=""){this.data=t,this.name=r,s.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(s.$t.prototype,"tree",{get(){return m(this)}}),this.parser=e,this.extension=[P.of(this),s.$t.languageData.of(((t,e,n)=>{let r=d(t,e,n),i=r.type.prop(c);if(!i)return[];let s=t.facet(i),o=r.type.prop(h);if(o){let i=r.resolve(e-r.from,n);for(let e of o)if(e.test(i,t)){let n=t.facet(e.facet);return"replace"==e.type?n:n.concat(s)}}return s}))].concat(n)}isActiveAt(t,e,n=-1){return d(t,e,n).type.prop(c)==this.data}findRegions(t){let e=t.facet(P);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let n=[],r=(t,e)=>{if(t.prop(c)==this.data)return void n.push({from:e,to:e+t.length});let s=t.prop(i.uY.mounted);if(s){if(s.tree.prop(c)==this.data){if(s.overlay)for(let t of s.overlay)n.push({from:t.from+e,to:t.to+e});else n.push({from:e,to:e+t.length});return}if(s.overlay){let t=n.length;if(r(s.tree,s.overlay[0].from+e),n.length>t)return}}for(let n=0;n<t.children.length;n++){let s=t.children[n];s instanceof i.PH&&r(s,t.positions[n]+e)}};return r(m(t),0),n}get allowsNesting(){return!0}}function d(t,e,n){let r=t.facet(P),s=m(t).topNode;if(!r||r.allowsNesting)for(let t=s;t;t=t.enter(e,n,i.Qj.ExcludeBuffers))t.type.isTop&&(s=t);return s}p.setState=s.Pe.define();class f extends p{constructor(t,e,n){super(t,e,[],n),this.parser=e}static define(t){let e=u(t.languageData);return new f(e,t.parser.configure({props:[c.add((t=>t.isTop?e:void 0))]}),t.name)}configure(t,e){return new f(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function m(t){let e=t.field(p.state,!1);return e?e.tree:i.PH.empty}function y(t,e=t.doc.length){var n;return(null===(n=t.field(p.state,!1))||void 0===n?void 0:n.context.isDone(e))||!1}function g(t,e=t.viewport.to,n=100){let r=function(t,e,n=50){var r;let i=null===(r=t.field(p.state,!1))||void 0===r?void 0:r.context;if(!i)return null;let s=i.viewport;i.updateViewport({from:0,to:e});let o=i.isDone(e)||i.work(n,e)?i.tree:null;return i.updateViewport(s),o}(t.state,e,n);return r!=m(t.state)&&t.dispatch({}),!!r}class v{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let n=this.cursorPos-this.string.length;return t<n||e>=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-n,e-n)}}let b=null;class T{constructor(t,e,n=[],r,i,s,o,a){this.parser=t,this.state=e,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=s,this.skipped=o,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(t,e,n){return new T(t,e,[],i.PH.empty,0,n,[],null)}startParse(){return this.parser.startParse(new v(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=i.PH.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var n;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e<this.state.doc.length&&this.parse.stopAt(e);;){let r=this.parse.advance();if(r){if(this.fragments=this.withoutTempSkipped(i.rr.addTree(r,this.fragments,null!=this.parse.stoppedAt)),this.treeLen=null!==(n=this.parse.stoppedAt)&&void 0!==n?n:this.state.doc.length,this.tree=r,this.parse=null,!(this.treeLen<(null!=e?e:this.state.doc.length)))return!0;this.parse=this.startParse()}if(t())return!1}}))}takeTree(){let t,e;this.parse&&(t=this.parse.parsedPos)>=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(i.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=b;b=this;try{return t()}finally{b=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=x(t,e.from,e.to);return t}changes(t,e){let{fragments:n,tree:r,treeLen:s,viewport:o,skipped:a}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,n,r,i)=>e.push({fromA:t,toA:n,fromB:r,toB:i}))),n=i.rr.applyChanges(n,e),r=i.PH.empty,s=0,o={from:t.mapPos(o.from,-1),to:t.mapPos(o.to,1)},this.skipped.length){a=[];for(let e of this.skipped){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);n<r&&a.push({from:n,to:r})}}}return new T(this.parser,e,n,r,s,o,a,this.scheduleOn)}updateViewport(t){if(this.viewport.from==t.from&&this.viewport.to==t.to)return!1;this.viewport=t;let e=this.skipped.length;for(let e=0;e<this.skipped.length;e++){let{from:n,to:r}=this.skipped[e];n<t.to&&r>t.from&&(this.fragments=x(this.fragments,n,r),this.skipped.splice(e--,1))}return!(this.skipped.length>=e||(this.reset(),0))}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends i.iX{createParse(e,n,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let e=b;if(e){for(let t of r)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=o,new i.PH(i.Z6.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return b}}function x(t,e,n){return i.rr.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class S{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),n=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,n)||e.takeTree(),new S(e)}static init(t){let e=Math.min(3e3,t.doc.length),n=T.create(t.facet(P).parser,t,{from:0,to:e});return n.work(20,e)||n.takeTree(),new S(n)}}p.state=s.sU.define({create:S.init,update(t,e){for(let t of e.effects)if(t.is(p.setState))return t.value;return e.startState.facet(P)!=e.state.facet(P)?S.init(e.state):t.apply(e)}});let w=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(w=t=>{let e=-1,n=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const E="undefined"!=typeof navigator&&(null===(r=navigator.scheduling)||void 0===r?void 0:r.isInputPending)?()=>navigator.scheduling.isInputPending():null,A=o.Z9.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(p.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(p.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=w(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEnd<e&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=e+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:n,viewport:{to:r}}=this.view,i=n.field(p.state);if(i.tree==i.context.tree&&i.context.isDone(r+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!E?Math.max(25,t.timeRemaining()-5):1e9),o=i.context.treeLen<r&&n.doc.length>r+1e3,a=i.context.work((()=>E&&E()||Date.now()>s),r+(o?0:1e5));this.chunkBudget-=Date.now()-e,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:p.setState.of(new S(i.context))})),this.chunkBudget>0&&(!a||o)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>(0,o.c_)(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),P=s.sj.define({combine:t=>t.length?t[0]:null,enables:t=>[p.state,A,o.Lz.contentAttributes.compute([t],(e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}}))]});class M{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const C=s.sj.define(),k=s.sj.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function I(t){let e=t.facet(k);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function O(t,e){let n="",r=t.tabSize,i=t.facet(k)[0];if("\t"==i){for(;e>=r;)n+="\t",e-=r;i=" "}for(let t=0;t<e;t++)n+=i;return n}function N(t,e){t instanceof s.$t&&(t=new _(t));for(let n of t.state.facet(C)){let r=n(t,e);if(void 0!==r)return r}let n=m(t.state);return n.length>=e?function(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let t=[];for(let e=i;e&&!(e.from<r.node.from||e.to>r.node.to||e.from==r.node.from&&e.type==r.node.type);e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)r={node:t[e],next:r}}return L(r,t,n)}(t,n,e):null}class _{constructor(t,e={}){this.state=t,this.options=e,this.unit=I(t)}lineAt(t,e=1){let n=this.state.doc.lineAt(t),{simulateBreak:r,simulateDoubleBreak:i}=this.options;return null!=r&&r>=n.from&&r<=n.to?i&&r==t?{text:"",from:t}:(e<0?r<t:r<=t)?{text:n.text.slice(r-n.from),from:r}:{text:n.text.slice(0,r-n.from),from:n.from}:n}textAfterPos(t,e=1){if(this.options.simulateDoubleBreak&&t==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(t,e);return n.slice(t-r,Math.min(n.length,t+100-r))}column(t,e=1){let{text:n,from:r}=this.lineAt(t,e),i=this.countColumn(n,t-r),s=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return s>-1&&(i+=s-this.countColumn(n,n.search(/\S|$/))),i}countColumn(t,e=t.length){return(0,s.y$)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:n,from:r}=this.lineAt(t,e),i=this.options.overrideIndentation;if(i){let t=i(r);if(t>-1)return t}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const D=new i.uY;function L(t,e,n){for(let r=t;r;r=r.next){let t=B(r.node);if(t)return t(F.create(e,n,r))}return 0}function B(t){let e=t.type.prop(D);if(e)return e;let n,r=t.firstChild;if(r&&(n=r.type.prop(i.uY.closedBy))){let e=t.lastChild,r=e&&n.indexOf(e.name)>-1;return t=>V(t,!0,1,void 0,r&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?R:null}function R(){return 0}class F extends _{constructor(t,e,n){super(t.state,t.options),this.base=t,this.pos=e,this.context=n}get node(){return this.context.node}static create(t,e,n){return new F(t,e,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let n=t.resolve(e.from);for(;n.parent&&n.parent.from==n.from;)n=n.parent;if(j(n,t))break;e=this.state.doc.lineAt(n.from)}return this.lineIndent(e.from)}continue(){return L(this.context.next,this.base,this.pos)}}function j(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function U({closing:t,align:e=!0,units:n=1}){return r=>V(r,e,n,t)}function V(t,e,n,r,i){let s=t.textAfter,o=s.match(/^\s*/)[0].length,a=r&&s.slice(o,o+r.length)==r||i==t.pos+o,l=e?function(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=null==i||i<=s.from?s.to:Math.min(s.to,i);for(let t=n.to;;){let i=e.childAfter(t);if(!i||i==r)return null;if(!i.type.isSkipped){if(i.from>=o)return null;let t=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+t}}t=i.to}}(t):null;return l?a?t.column(l.from):t.column(l.to):t.baseIndent+(a?0:t.unit*n)}const z=t=>t.baseIndent;function q({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const $=200;function H(){return s.$t.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+$)return t;let s=n.sliceString(i.from,r);if(!e.some((t=>t.test(s))))return t;let{state:o}=t,a=-1,l=[];for(let{head:t}of o.selection.ranges){let e=o.doc.lineAt(t);if(e.from==a)continue;a=e.from;let n=N(o,e.from);if(null==n)continue;let r=/^\s*/.exec(e.text)[0],i=O(o,n);r!=i&&l.push({from:e.from,to:e.from+r.length,insert:i})}return l.length?[t,{changes:l,sequential:!0}]:t}))}const K=s.sj.define(),Y=new i.uY;function W(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function J(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function X(t,e,n){for(let r of t.facet(K)){let i=r(t,e,n);if(i)return i}return function(t,e,n){let r=m(t);if(r.length<n)return null;let i=null;for(let s=r.resolveStack(n,1);s;s=s.next){let o=s.node;if(o.to<=n||o.from>n)continue;if(i&&o.from<e)break;let a=o.type.prop(Y);if(a&&(o.to<r.length-50||r.length==t.doc.length||!J(o))){let r=a(o,t);r&&r.from<=n&&r.from>=e&&r.to>n&&(i=r)}}return i}(t,e,n)}function G(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const Z=s.Pe.define({map:G}),Q=s.Pe.define({map:G});function tt(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some((t=>t.from<=n&&t.to>=n))||e.push(t.lineBlockAt(n));return e}const et=s.sU.define({create:()=>o.NZ.none,update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges(((e,n)=>t=nt(t,e,n))),t=t.map(e.changes);for(let n of e.effects)if(n.is(Z)&&!it(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(ut),i=r?o.NZ.replace({widget:new ft(r(e.state,n.value))}):dt;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Q)&&(t=t.update({filter:(t,e)=>n.value.from!=t||n.value.to!=e,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=nt(t,e.selection.main.head)),t},provide:t=>o.Lz.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,((t,e)=>{n.push(t,e)})),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if("number"!=typeof r||"number"!=typeof i)throw new RangeError("Invalid JSON for fold state");e.push(dt.range(r,i))}return o.NZ.set(e,!0)}});function nt(t,e,n=e){let r=!1;return t.between(e,n,((t,i)=>{t<n&&i>e&&(r=!0)})),r?t.update({filterFrom:e,filterTo:n,filter:(t,r)=>t>=n||r<=e}):t}function rt(t,e,n){var r;let i=null;return null===(r=t.field(et,!1))||void 0===r||r.between(e,n,((t,e)=>{(!i||i.from>t)&&(i={from:t,to:e})})),i}function it(t,e,n){let r=!1;return t.between(e,e,((t,i)=>{t==e&&i==n&&(r=!0)})),r}function st(t,e){return t.field(et,!1)?e:e.concat(s.Pe.appendConfig.of(ht()))}function ot(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return o.Lz.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const at=t=>{let e=t.state.field(et,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,((t,e)=>{n.push(Q.of({from:t,to:e}))})),t.dispatch({effects:n}),!0},lt=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:t=>{for(let e of tt(t)){let n=X(t.state,e.from,e.to);if(n)return t.dispatch({effects:st(t.state,[Z.of(n),ot(t,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:t=>{if(!t.state.field(et,!1))return!1;let e=[];for(let n of tt(t)){let r=rt(t.state,n.from,n.to);r&&e.push(Q.of(r),ot(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0}},{key:"Ctrl-Alt-[",run:t=>{let{state:e}=t,n=[];for(let r=0;r<e.doc.length;){let i=t.lineBlockAt(r),s=X(e,i.from,i.to);s&&n.push(Z.of(s)),r=(s?t.lineBlockAt(s.to):i).to+1}return n.length&&t.dispatch({effects:st(t.state,n)}),!!n.length}},{key:"Ctrl-Alt-]",run:at}],ct={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},ut=s.sj.define({combine:t=>(0,s.QR)(t,ct)});function ht(t){let e=[et,vt];return t&&e.push(ut.of(t)),e}function pt(t,e){let{state:n}=t,r=n.facet(ut),i=e=>{let n=t.lineBlockAt(t.posAtDOM(e.target)),r=rt(t.state,n.from,n.to);r&&t.dispatch({effects:Q.of(r)}),e.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const dt=o.NZ.replace({widget:new class extends o.xO{toDOM(t){return pt(t,null)}}});class ft extends o.xO{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return pt(t,this.value)}}const mt={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class yt extends o.wJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function gt(t={}){let e={...mt,...t},n=new yt(e,!0),r=new yt(e,!1),i=o.Z9.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(P)!=t.state.facet(P)||t.startState.field(et,!1)!=t.state.field(et,!1)||m(t.startState)!=m(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new s.vB;for(let i of t.viewportLineBlocks){let s=rt(t.state,i.from,i.to)?r:X(t.state,i.from,i.to)?n:null;s&&e.add(i.from,i.from,s)}return e.finish()}}),{domEventHandlers:a}=e;return[i,(0,o.cU)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(i))||void 0===e?void 0:e.markers)||s.om.empty},initialSpacer:()=>new yt(e,!1),domEventHandlers:{...a,click:(t,e,n)=>{if(a.click&&a.click(t,e,n))return!0;let r=rt(t.state,e.from,e.to);if(r)return t.dispatch({effects:Q.of(r)}),!0;let i=X(t.state,e.from,e.to);return!!i&&(t.dispatch({effects:Z.of(i)}),!0)}}}),ht()]}const vt=o.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class bt{constructor(t,e){let n;function r(t){let e=l.G.newName();return(n||(n=Object.create(null)))["."+e]=t,e}this.specs=t;const i="string"==typeof e.all?e.all:e.all?r(e.all):void 0,s=e.scope;this.scope=s instanceof p?t=>t.prop(c)==s.data:s?t=>t==s:void 0,this.style=(0,a.az)(t.map((t=>({tag:t.tag,class:t.class||r(Object.assign({},t,{tag:null}))}))),{all:i}).style,this.module=n?new l.G(n):null,this.themeType=e.themeType}static define(t,e){return new bt(t,e||{})}}const Tt=s.sj.define(),xt=s.sj.define({combine:t=>t.length?[t[0]]:null});function St(t){let e=t.facet(Tt);return e.length?e:t.facet(xt)}function wt(t,e){let n,r=[At];return t instanceof bt&&(t.module&&r.push(o.Lz.styleModule.of(t.module)),n=t.themeType),(null==e?void 0:e.fallback)?r.push(xt.of(t)):n?r.push(Tt.computeN([o.Lz.darkTheme],(e=>e.facet(o.Lz.darkTheme)==("dark"==n)?[t]:[]))):r.push(Tt.of(t)),r}class Et{constructor(t){this.markCache=Object.create(null),this.tree=m(t.state),this.decorations=this.buildDeco(t,St(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=m(t.state),n=St(t.state),r=n!=St(t.startState),{viewport:i}=t.view,s=t.changes.mapPos(this.decoratedTo,1);e.length<i.to&&!r&&e.type==this.tree.type&&s>=i.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=s):(e!=this.tree||t.viewportChanged||r)&&(this.tree=e,this.decorations=this.buildDeco(t.view,n),this.decoratedTo=i.to)}buildDeco(t,e){if(!e||!this.tree.length)return o.NZ.none;let n=new s.vB;for(let{from:r,to:i}of t.visibleRanges)(0,a.DM)(this.tree,e,((t,e,r)=>{n.add(t,e,this.markCache[r]||(this.markCache[r]=o.NZ.mark({class:r})))}),r,i);return n.finish()}}const At=s.Nb.high(o.Z9.fromClass(Et,{decorations:t=>t.decorations})),Pt=(a._A.meta,a._A.link,a._A.heading,a._A.emphasis,a._A.strong,a._A.strikethrough,a._A.keyword,a._A.atom,a._A.bool,a._A.url,a._A.contentSeparator,a._A.labelName,a._A.literal,a._A.inserted,a._A.string,a._A.deleted,a._A.regexp,a._A.escape,a._A.string,a._A.variableName,a._A.variableName,a._A.typeName,a._A.namespace,a._A.className,a._A.variableName,a._A.macroName,a._A.propertyName,a._A.comment,a._A.invalid,o.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}})),Mt=1e4,Ct="()[]{}",kt=s.sj.define({combine:t=>(0,s.QR)(t,{afterCursor:!0,brackets:Ct,maxScanDistance:Mt,renderMatch:Nt})}),It=o.NZ.mark({class:"cm-matchingBracket"}),Ot=o.NZ.mark({class:"cm-nonmatchingBracket"});function Nt(t){let e=[],n=t.matched?It:Ot;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const _t=[s.sU.define({create:()=>o.NZ.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(kt);for(let t of e.state.selection.ranges){if(!t.empty)continue;let i=Ft(e.state,t.head,-1,r)||t.head>0&&Ft(e.state,t.head-1,1,r)||r.afterCursor&&(Ft(e.state,t.head,1,r)||t.head<e.state.doc.length&&Ft(e.state,t.head+1,-1,r));i&&(n=n.concat(r.renderMatch(i,e.state)))}return o.NZ.set(n,!0)},provide:t=>o.Lz.decorations.from(t)}),Pt];function Dt(t={}){return[kt.of(t),_t]}const Lt=new i.uY;function Bt(t,e,n){let r=t.prop(e<0?i.uY.openedBy:i.uY.closedBy);if(r)return r;if(1==t.name.length){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function Rt(t){let e=t.type.prop(Lt);return e?e(t.node):t}function Ft(t,e,n,r={}){let i=r.maxScanDistance||Mt,s=r.brackets||Ct,o=m(t),a=o.resolveInner(e,n);for(let t=a;t;t=t.parent){let r=Bt(t.type,n,s);if(r&&t.from<t.to){let i=Rt(t);if(i&&(n>0?e>=i.from&&e<i.to:e>i.from&&e<=i.to))return jt(0,0,n,t,i,r,s)}}return function(t,e,n,r,i,s,o){let a=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),l=o.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?e-1:e,to:n>0?e+1:e},u=t.doc.iterRange(e,n>0?t.doc.length:0),h=0;for(let t=0;!u.next().done&&t<=s;){let s=u.value;n<0&&(t+=s.length);let a=e+t*n;for(let t=n>0?0:s.length-1,e=n>0?s.length:-1;t!=e;t+=n){let e=o.indexOf(s[t]);if(!(e<0||r.resolveInner(a+t,1).type!=i))if(e%2==0==n>0)h++;else{if(1==h)return{start:c,end:{from:a+t,to:a+t+1},matched:e>>1==l>>1};h--}}n>0&&(t+=s.length)}return u.done?{start:c,matched:!1}:null}(t,e,n,o,a.type,i,s)}function jt(t,e,n,r,i,s,o){let a=r.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&s.indexOf(u.type.name)>-1&&u.from<u.to){let t=Rt(u);return{start:l,end:t?{from:t.from,to:t.to}:void 0,matched:!0}}if(Bt(u.type,n,o))c++;else if(Bt(u.type,-n,o)){if(0==c){let t=Rt(u);return{start:l,end:t&&t.from<t.to?{from:t.from,to:t.to}:void 0,matched:!1}}c--}}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}const Ut=Object.create(null),Vt=[i.Z6.none],zt=[],qt=Object.create(null),$t=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])$t[t]=Kt(Ut,e);function Ht(t,e){zt.indexOf(t)>-1||(zt.push(t),console.warn(e))}function Kt(t,e){let n=[];for(let r of e.split(" ")){let e=[];for(let n of r.split(".")){let r=t[n]||a._A[n];r?"function"==typeof r?e.length?e=e.map(r):Ht(n,`Modifier ${n} used at start of tag`):e.length?Ht(n,`Tag ${n} used as modifier`):e=Array.isArray(r)?r:[r]:Ht(n,`Unknown highlighting tag ${n}`)}for(let t of e)n.push(t)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),s=r+" "+n.map((t=>t.id)),o=qt[s];if(o)return o.id;let l=qt[s]=i.Z6.define({id:Vt.length,name:r,props:[(0,a.pn)({[r]:n})]});return Vt.push(l),l.id}o.OP.RTL,o.OP.LTR},11483:t=>{t.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},11867:(t,e,n)=>{var r=n(80421),i=n(95167),s=n(23878);t.exports=function(t,e,n){var o,a;i(t);try{if(!(o=s(t,"return"))){if("throw"===e)throw n;return n}o=r(o,t)}catch(t){a=!0,o=t}if("throw"===e)throw n;if(a)throw o;return i(o),n}},11879:(t,e,n)=>{var r=n(80421),i=n(9106),s=n(95167),o=n(25178),a=n(31597),l=n(52479),c=n(2776),u=n(16007),h=n(22159),p=n(58412),d=function(t){var e=0===t,n=1===t,d=2===t,f=3===t;return function(t,m,y){s(t);var g=void 0!==m;!g&&e||i(m);var v=h(t),b=l("Promise"),T=v.iterator,x=v.next,S=0;return new b((function(t,i){var l=function(t){p(T,i,t,i)},h=function(){try{try{a(S)}catch(t){return l(t)}b.resolve(s(r(x,T))).then((function(r){try{if(s(r).done)e?(u(y,S),t(y)):t(!f&&(d||void 0));else{var a=r.value;try{if(g){var v=S++,x=m(a,v),w=function(r){if(n)h();else if(d)r?h():p(T,t,!1,i);else if(e)try{c(y,v,r),h()}catch(t){l(t)}else r?p(T,t,f||a,i):h()};o(x)?b.resolve(x).then(w,l):w(x)}else c(y,S++,a),h()}catch(t){l(t)}}}catch(t){i(t)}}),i)}catch(t){i(t)}};h()}))}};t.exports={toArray:d(0),forEach:d(1),every:d(2),some:d(3),find:d(4)}},12006:(t,e,n)=>{var r=n(34110),i=r.Buffer;function s(t,e){for(var n in t)e[n]=t[n]}function o(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=o),s(i,o),o.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},o.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},12093:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(25364);function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(0,r.A)(i.key),i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}},12237:(t,e,n)=>{t.exports=n(4716)},12887:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(71856),a=n(88087),l=o.Map,c=o.set;r({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=new l;return a(e,(function(t,i){c(r,i,n(t,i,e))})),r}})},13185:(t,e,n)=>{var r=n(26600);t.exports=r({}.isPrototypeOf)},13196:(t,e,n)=>{var r=n(31733),i=n(73397),s=n(9754),o=n(27134);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new i("a function is required");return o(r,s,t)}},13250:(t,e,n)=>{var r=n(23492),i=n(3527).Buffer,s=n(82402),o=n(46324),a=n(74454),l=n(14669),c=n(67892);function u(t,e,n,o){s.call(this);var l=i.alloc(4,0);this._cipher=new r.AES(e);var u=this._cipher.encryptBlock(l);this._ghash=new a(u),n=function(t,e,n){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var r=new a(n),s=e.length,o=s%16;r.update(e),o&&(o=16-o,r.update(i.alloc(o,0))),r.update(i.alloc(8,0));var l=8*s,u=i.alloc(8);u.writeUIntBE(l,0,8),r.update(u),t._finID=r.state;var h=i.from(t._finID);return c(h),h}(this,n,u),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}o(u,s),u.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var n=0;t.length!==e.length&&n++;for(var r=Math.min(t.length,e.length),i=0;i<r;++i)n+=t[i]^e[i];return n}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},u.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=u},13353:(t,e,n)=>{var r=n(34110).Buffer;const i=(()=>{const t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return e=>t.call(e)})();function s(t){return"Uint8Array"===i(t)}function o(t){return"object"==typeof t&&null!=t&&Symbol.toStringTag in t&&("ArrayBuffer"===t[Symbol.toStringTag]||"SharedArrayBuffer"===t[Symbol.toStringTag])}function a(t){return t instanceof RegExp||"[object RegExp]"===Object.prototype.toString.call(t)}function l(t){return"object"==typeof t&&null!=t&&Symbol.toStringTag in t&&"Map"===t[Symbol.toStringTag]}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function u(t,e){return JSON.stringify(t,((t,e)=>"bigint"==typeof e?{$numberLong:`${e}`}:l(e)?Object.fromEntries(e):e))}const h=7,p=Symbol.for("@@mdb.bson.version"),d=2147483647,f=-2147483648,m=Math.pow(2,63)-1,y=-Math.pow(2,63),g=Math.pow(2,53),v=-Math.pow(2,53),b=1,T=2,x=3,S=4,w=5,E=6,A=7,P=8,M=9,C=10,k=11,I=12,O=13,N=14,_=15,D=16,L=17,B=18,R=19,F=255,j=127,U=0,V=4,z=Object.freeze({double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:-1,maxKey:127});class q extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(t,e){super(t,e)}static isBSONError(t){return null!=t&&"object"==typeof t&&"bsonError"in t&&!0===t.bsonError&&"name"in t&&"message"in t&&"stack"in t}}class $ extends q{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${h}.x.x`)}}class H extends q{get name(){return"BSONRuntimeError"}constructor(t){super(t)}}class K extends q{get name(){return"BSONOffsetError"}offset;constructor(t,e,n){super(`${t}. offset: ${e}`,n),this.offset=e}}let Y,W;function J(t,e,n,r){if(r){Y??=new TextDecoder("utf8",{fatal:!0});try{return Y.decode(t.subarray(e,n))}catch(t){throw new q("Invalid UTF-8 string in BSON document",{cause:t})}}return W??=new TextDecoder("utf8",{fatal:!1}),W.decode(t.subarray(e,n))}function X(t,e,n){if(0===t.length)return"";const r=n-e;if(0===r)return"";if(r>20)return null;if(1===r&&t[e]<128)return String.fromCharCode(t[e]);if(2===r&&t[e]<128&&t[e+1]<128)return String.fromCharCode(t[e])+String.fromCharCode(t[e+1]);if(3===r&&t[e]<128&&t[e+1]<128&&t[e+2]<128)return String.fromCharCode(t[e])+String.fromCharCode(t[e+1])+String.fromCharCode(t[e+2]);const i=[];for(let r=e;r<n;r++){const e=t[r];if(e>127)return null;i.push(e)}return String.fromCharCode(...i)}function G(t){return tt.fromNumberArray(Array.from({length:t},(()=>Math.floor(256*Math.random()))))}function Z(t){return crypto.getRandomValues(tt.allocate(t))}const Q=(()=>{const{crypto:t}=globalThis;return null!=t&&"function"==typeof t.getRandomValues?Z:G})(),tt={isUint8Array:s,toLocalBufferType(t){if(r.isBuffer(t))return t;if(ArrayBuffer.isView(t))return r.from(t.buffer,t.byteOffset,t.byteLength);const e=t?.[Symbol.toStringTag]??Object.prototype.toString.call(t);if("ArrayBuffer"===e||"SharedArrayBuffer"===e||"[object ArrayBuffer]"===e||"[object SharedArrayBuffer]"===e)return r.from(t);throw new q("Cannot create Buffer from the passed potentialBuffer.")},allocate:t=>r.alloc(t),allocateUnsafe:t=>r.allocUnsafe(t),compare:(t,e)=>tt.toLocalBufferType(t).compare(e),concat:t=>r.concat(t),copy:(t,e,n,r,i)=>tt.toLocalBufferType(t).copy(e,n??0,r??0,i??t.length),equals:(t,e)=>tt.toLocalBufferType(t).equals(e),fromNumberArray:t=>r.from(t),fromBase64:t=>r.from(t,"base64"),fromUTF8:t=>r.from(t,"utf8"),toBase64:t=>tt.toLocalBufferType(t).toString("base64"),fromISO88591:t=>r.from(t,"binary"),toISO88591:t=>tt.toLocalBufferType(t).toString("binary"),fromHex:t=>r.from(t,"hex"),toHex:t=>tt.toLocalBufferType(t).toString("hex"),toUTF8(t,e,n,r){const i=n-e<=20?X(t,e,n):null;if(null!=i)return i;const s=tt.toLocalBufferType(t).toString("utf8",e,n);if(r)for(let r=0;r<s.length;r++)if(65533===s.charCodeAt(r)){J(t,e,n,!0);break}return s},utf8ByteLength:t=>r.byteLength(t,"utf8"),encodeUTF8Into(t,e,n){const r=function(t,e,n){if(0===e.length)return 0;if(e.length>25)return null;if(t.length-n<e.length)return null;for(let r=0,i=n;r<e.length;r++,i++){const n=e.charCodeAt(r);if(n>127)return null;t[i]=n}return e.length}(t,e,n);return null!=r?r:tt.toLocalBufferType(t).write(e,n,void 0,"utf8")},randomBytes:Q,swap32:t=>tt.toLocalBufferType(t).swap32()};function et(t){if(t<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${t}`);return it.fromNumberArray(Array.from({length:t},(()=>Math.floor(256*Math.random()))))}const nt=(()=>{const{crypto:t}=globalThis;if(null!=t&&"function"==typeof t.getRandomValues)return e=>t.getRandomValues(it.allocate(e));if(function(){const{navigator:t}=globalThis;return"object"==typeof t&&"ReactNative"===t.product}()){const{console:t}=globalThis;t?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return et})(),rt=/(\d|[a-f])/i,it={isUint8Array:s,toLocalBufferType(t){const e=t?.[Symbol.toStringTag]??Object.prototype.toString.call(t);if("Uint8Array"===e)return t;if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));if("ArrayBuffer"===e||"SharedArrayBuffer"===e||"[object ArrayBuffer]"===e||"[object SharedArrayBuffer]"===e)return new Uint8Array(t);throw new q("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(t){if("number"!=typeof t)throw new TypeError(`The "size" argument must be of type number. Received ${String(t)}`);return new Uint8Array(t)},allocateUnsafe:t=>it.allocate(t),compare(t,e){if(t===e)return 0;const n=Math.min(t.length,e.length);for(let r=0;r<n;r++){if(t[r]<e[r])return-1;if(t[r]>e[r])return 1}return t.length<e.length?-1:t.length>e.length?1:0},concat(t){if(0===t.length)return it.allocate(0);let e=0;for(const n of t)e+=n.length;const n=it.allocate(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n},copy(t,e,n,r,i){if(void 0!==i&&i<0)throw new RangeError(`The value of "sourceEnd" is out of range. It must be >= 0. Received ${i}`);if(i=i??t.length,void 0!==r&&(r<0||r>i))throw new RangeError(`The value of "sourceStart" is out of range. It must be >= 0 and <= ${i}. Received ${r}`);if(r=r??0,void 0!==n&&n<0)throw new RangeError(`The value of "targetStart" is out of range. It must be >= 0. Received ${n}`);n=n??0;const s=t.subarray(r,i),o=Math.min(s.length,e.length-n);return o<=0?0:(e.set(s.subarray(0,o),n),o)},equals(t,e){if(t.byteLength!==e.byteLength)return!1;for(let n=0;n<t.byteLength;n++)if(t[n]!==e[n])return!1;return!0},fromNumberArray:t=>Uint8Array.from(t),fromBase64:t=>Uint8Array.from(atob(t),(t=>t.charCodeAt(0))),fromUTF8:t=>(new TextEncoder).encode(t),toBase64:t=>btoa(it.toISO88591(t)),fromISO88591:t=>Uint8Array.from(t,(t=>255&t.charCodeAt(0))),toISO88591:t=>Array.from(Uint16Array.from(t),(t=>String.fromCharCode(t))).join(""),fromHex(t){const e=t.length%2==0?t:t.slice(0,t.length-1),n=[];for(let t=0;t<e.length;t+=2){const r=e[t],i=e[t+1];if(!rt.test(r))break;if(!rt.test(i))break;const s=Number.parseInt(`${r}${i}`,16);n.push(s)}return Uint8Array.from(n)},toHex:t=>Array.from(t,(t=>t.toString(16).padStart(2,"0"))).join(""),toUTF8(t,e,n,r){const i=n-e<=20?X(t,e,n):null;return null!=i?i:J(t,e,n,r)},utf8ByteLength:t=>(new TextEncoder).encode(t).byteLength,encodeUTF8Into(t,e,n){const r=(new TextEncoder).encode(e);return t.set(r,n),r.byteLength},randomBytes:nt,swap32(t){if(t.length%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t.length;e+=4){const n=t[e],r=t[e+1],i=t[e+2],s=t[e+3];t[e]=s,t[e+1]=i,t[e+2]=r,t[e+3]=n}return t}},st="function"==typeof r&&!0!==r.prototype?._isBuffer?tt:it,ot=Symbol.for("@@mdb.bson.type");class at{get[ot](){return this._bsontype}get[p](){return h}[Symbol.for("nodejs.util.inspect.custom")](t,e,n){return this.inspect(t,e,n)}}const lt=new Float64Array(1),ct=new Uint8Array(lt.buffer,0,8);lt[0]=-1;const ut=0===ct[7],ht={isBigEndian:ut,getNonnegativeInt32LE(t,e){if(t[e+3]>127)throw new RangeError(`Size cannot be negative at offset: ${e}`);return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24},getInt32LE:(t,e)=>t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24,getUint32LE:(t,e)=>t[e]+256*t[e+1]+65536*t[e+2]+16777216*t[e+3],getUint32BE:(t,e)=>t[e+3]+256*t[e+2]+65536*t[e+1]+16777216*t[e],getBigInt64LE:(t,e)=>(BigInt(t[e+4]+256*t[e+5]+65536*t[e+6]+(t[e+7]<<24))<<32n)+BigInt(t[e]+256*t[e+1]+65536*t[e+2]+16777216*t[e+3]),getFloat64LE:ut?(t,e)=>(ct[7]=t[e],ct[6]=t[e+1],ct[5]=t[e+2],ct[4]=t[e+3],ct[3]=t[e+4],ct[2]=t[e+5],ct[1]=t[e+6],ct[0]=t[e+7],lt[0]):(t,e)=>(ct[0]=t[e],ct[1]=t[e+1],ct[2]=t[e+2],ct[3]=t[e+3],ct[4]=t[e+4],ct[5]=t[e+5],ct[6]=t[e+6],ct[7]=t[e+7],lt[0]),setInt32BE:(t,e,n)=>(t[e+3]=n,n>>>=8,t[e+2]=n,n>>>=8,t[e+1]=n,n>>>=8,t[e]=n,4),setInt32LE:(t,e,n)=>(t[e]=n,n>>>=8,t[e+1]=n,n>>>=8,t[e+2]=n,n>>>=8,t[e+3]=n,4),setBigInt64LE(t,e,n){const r=0xffffffffn;let i=Number(n&r);t[e]=i,i>>=8,t[e+1]=i,i>>=8,t[e+2]=i,i>>=8,t[e+3]=i;let s=Number(n>>32n&r);return t[e+4]=s,s>>=8,t[e+5]=s,s>>=8,t[e+6]=s,s>>=8,t[e+7]=s,8},setFloat64LE:ut?(t,e,n)=>(lt[0]=n,t[e]=ct[7],t[e+1]=ct[6],t[e+2]=ct[5],t[e+3]=ct[4],t[e+4]=ct[3],t[e+5]=ct[2],t[e+6]=ct[1],t[e+7]=ct[0],8):(t,e,n)=>(lt[0]=n,t[e]=ct[0],t[e+1]=ct[1],t[e+2]=ct[2],t[e+3]=ct[3],t[e+4]=ct[4],t[e+5]=ct[5],t[e+6]=ct[6],t[e+7]=ct[7],8)};class pt extends at{get _bsontype(){return"Binary"}static BSON_BINARY_SUBTYPE_DEFAULT=0;static BUFFER_SIZE=256;static SUBTYPE_DEFAULT=0;static SUBTYPE_FUNCTION=1;static SUBTYPE_BYTE_ARRAY=2;static SUBTYPE_UUID_OLD=3;static SUBTYPE_UUID=4;static SUBTYPE_MD5=5;static SUBTYPE_ENCRYPTED=6;static SUBTYPE_COLUMN=7;static SUBTYPE_SENSITIVE=8;static SUBTYPE_VECTOR=9;static SUBTYPE_USER_DEFINED=128;static VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});buffer;sub_type;position;constructor(t,e){if(super(),null!=t&&"string"==typeof t&&!ArrayBuffer.isView(t)&&!o(t)&&!Array.isArray(t))throw new q("Binary can only be constructed from Uint8Array or number[]");this.sub_type=255&(e??pt.BSON_BINARY_SUBTYPE_DEFAULT),null==t?(this.buffer=st.allocate(pt.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(t)?st.fromNumberArray(t):st.toLocalBufferType(t),this.position=this.buffer.byteLength)}put(t){if("string"==typeof t&&1!==t.length)throw new q("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new q("only accepts single character Uint8Array or Array");let e;if(e="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0],e<0||e>255)throw new q("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=e;else{const t=st.allocate(pt.BUFFER_SIZE+this.buffer.length);t.set(this.buffer,0),this.buffer=t,this.buffer[this.position++]=e}}write(t,e){if(e="number"==typeof e?e:this.position,this.buffer.byteLength<e+t.length){const e=st.allocate(this.buffer.byteLength+t.length);e.set(this.buffer,0),this.buffer=e}if(ArrayBuffer.isView(t))this.buffer.set(st.toLocalBufferType(t),e),this.position=e+t.byteLength>this.position?e+t.length:this.position;else if("string"==typeof t)throw new q("input cannot be string")}read(t,e){const n=t+(e=e&&e>0?e:this.position);return this.buffer.subarray(t,n>this.position?this.position:n)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return st.toBase64(this.buffer.subarray(0,this.position))}toString(t){return"hex"===t?st.toHex(this.buffer.subarray(0,this.position)):"base64"===t?st.toBase64(this.buffer.subarray(0,this.position)):st.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(t){t=t||{},this.sub_type===pt.SUBTYPE_VECTOR&&dt(this);const e=st.toBase64(this.buffer),n=Number(this.sub_type).toString(16);return t.legacy?{$binary:e,$type:1===n.length?"0"+n:n}:{$binary:{base64:e,subType:1===n.length?"0"+n:n}}}toUUID(){if(this.sub_type===pt.SUBTYPE_UUID)return new yt(this.buffer.subarray(0,this.position));throw new q(`Binary sub_type "${this.sub_type}" (${typeof this.sub_type}) is not supported for converting to UUID. Only 0x${pt.SUBTYPE_UUID.toString(16).padStart(2,"0")} is currently supported.`)}static createFromHexString(t,e){return new pt(st.fromHex(t),e)}static createFromBase64(t,e){return new pt(st.fromBase64(t),e)}static fromExtendedJSON(t,e){let n,r;if(e=e||{},"$binary"in t?e.legacy&&"string"==typeof t.$binary&&"$type"in t?(r=t.$type?parseInt(t.$type,16):0,n=st.fromBase64(t.$binary)):"string"!=typeof t.$binary&&(r=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=st.fromBase64(t.$binary.base64)):"$uuid"in t&&(r=4,n=yt.bytesFromString(t.$uuid)),!n)throw new q(`Unexpected Binary Extended JSON format ${JSON.stringify(t)}`);return r===V?new yt(n):new pt(n,r)}inspect(t,e,n){return n??=u,`Binary.createFromBase64(${n(st.toBase64(this.buffer.subarray(0,this.position)),e)}, ${n(this.sub_type,e)})`}toInt8Array(){if(this.sub_type!==pt.SUBTYPE_VECTOR)throw new q("Binary sub_type is not Vector");if(this.buffer[0]!==pt.VECTOR_TYPE.Int8)throw new q("Binary datatype field is not Int8");return dt(this),new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==pt.SUBTYPE_VECTOR)throw new q("Binary sub_type is not Vector");if(this.buffer[0]!==pt.VECTOR_TYPE.Float32)throw new q("Binary datatype field is not Float32");dt(this);const t=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return ht.isBigEndian&&st.swap32(t),new Float32Array(t.buffer)}toPackedBits(){if(this.sub_type!==pt.SUBTYPE_VECTOR)throw new q("Binary sub_type is not Vector");if(this.buffer[0]!==pt.VECTOR_TYPE.PackedBit)throw new q("Binary datatype field is not packed bit");return dt(this),new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==pt.SUBTYPE_VECTOR)throw new q("Binary sub_type is not Vector");if(this.buffer[0]!==pt.VECTOR_TYPE.PackedBit)throw new q("Binary datatype field is not packed bit");dt(this);const t=8*(this.length()-2)-this.buffer[1],e=new Int8Array(t);for(let t=0;t<e.length;t++){const n=t/8|0,r=this.buffer[n+2]>>7-t%8&1;e[t]=r}return e}static fromInt8Array(t){const e=st.allocate(t.byteLength+2);e[0]=pt.VECTOR_TYPE.Int8,e[1]=0;const n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.set(n,2);const r=new this(e,this.SUBTYPE_VECTOR);return dt(r),r}static fromFloat32Array(t){const e=st.allocate(t.byteLength+2);e[0]=pt.VECTOR_TYPE.Float32,e[1]=0;const n=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.set(n,2),ht.isBigEndian&&st.swap32(new Uint8Array(e.buffer,2));const r=new this(e,this.SUBTYPE_VECTOR);return dt(r),r}static fromPackedBits(t,e=0){const n=st.allocate(t.byteLength+2);n[0]=pt.VECTOR_TYPE.PackedBit,n[1]=e,n.set(t,2);const r=new this(n,this.SUBTYPE_VECTOR);return dt(r),r}static fromBits(t){const e=t.length+7>>>3,n=new Uint8Array(e+2);n[0]=pt.VECTOR_TYPE.PackedBit;const r=t.length%8;n[1]=0===r?0:8-r;for(let e=0;e<t.length;e++){const r=e>>>3,i=t[e];if(0!==i&&1!==i)throw new q(`Invalid bit value at ${e}: must be 0 or 1, found ${t[e]}`);if(0===i)continue;const s=7-e%8;n[r+2]|=i<<s}return new this(n,pt.SUBTYPE_VECTOR)}}function dt(t){if(t.sub_type!==pt.SUBTYPE_VECTOR)return;const e=t.position,n=t.buffer[0],r=t.buffer[1];if((n===pt.VECTOR_TYPE.Float32||n===pt.VECTOR_TYPE.Int8)&&0!==r)throw new q("Invalid Vector: padding must be zero for int8 and float32 vectors");if(n===pt.VECTOR_TYPE.Float32&&0!==e&&e-2!=0&&(e-2)%4!=0)throw new q("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");if(n===pt.VECTOR_TYPE.PackedBit&&0!==r&&2===e)throw new q("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(n===pt.VECTOR_TYPE.PackedBit&&r>7)throw new q(`Invalid Vector: padding must be a value between 0 and 7. found: ${r}`)}const ft=/^[0-9A-F]{32}$/i,mt=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class yt extends pt{constructor(t){let e;if(null==t)e=yt.generate();else if(t instanceof yt)e=st.toLocalBufferType(new Uint8Array(t.buffer));else if(ArrayBuffer.isView(t)&&16===t.byteLength)e=st.toLocalBufferType(t);else{if("string"!=typeof t)throw new q("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");e=yt.bytesFromString(t)}super(e,V)}get id(){return this.buffer}set id(t){this.buffer=t}toHexString(t=!0){return t?[st.toHex(this.buffer.subarray(0,4)),st.toHex(this.buffer.subarray(4,6)),st.toHex(this.buffer.subarray(6,8)),st.toHex(this.buffer.subarray(8,10)),st.toHex(this.buffer.subarray(10,16))].join("-"):st.toHex(this.buffer)}toString(t){return"hex"===t?st.toHex(this.id):"base64"===t?st.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(t){if(!t)return!1;if(t instanceof yt)return st.equals(t.id,this.id);try{return st.equals(new yt(t).id,this.id)}catch{return!1}}toBinary(){return new pt(this.id,pt.SUBTYPE_UUID)}static generate(){const t=st.randomBytes(16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}static isValid(t){return!!t&&("string"==typeof t?yt.isValidUUIDString(t):s(t)?16===t.byteLength:"Binary"===t._bsontype&&t.sub_type===this.SUBTYPE_UUID&&16===t.buffer.byteLength)}static createFromHexString(t){const e=yt.bytesFromString(t);return new yt(e)}static createFromBase64(t){return new yt(st.fromBase64(t))}static bytesFromString(t){if(!yt.isValidUUIDString(t))throw new q("UUID string representation must be 32 hex digits or canonical hyphenated representation");return st.fromHex(t.replace(/-/g,""))}static isValidUUIDString(t){return ft.test(t)||mt.test(t)}inspect(t,e,n){return n??=u,`new UUID(${n(this.toHexString(),e)})`}}class gt extends at{get _bsontype(){return"Code"}code;scope;constructor(t,e){super(),this.code=t.toString(),this.scope=e??null}toJSON(){return null!=this.scope?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(t){return new gt(t.$code,t.$scope)}inspect(t,e,n){n??=u;let r=n(this.code,e);const i=r.includes("\n");return null!=this.scope&&(r+=`,${i?"\n":" "}${n(this.scope,e)}`),`new Code(${i?"\n":""}${r}${i&&null===this.scope?"\n":""})`}}function vt(t){return null!=t&&"object"==typeof t&&"$id"in t&&null!=t.$id&&"$ref"in t&&"string"==typeof t.$ref&&(!("$db"in t)||"$db"in t&&"string"==typeof t.$db)}class bt extends at{get _bsontype(){return"DBRef"}collection;oid;db;fields;constructor(t,e,n,r){super();const i=t.split(".");2===i.length&&(n=i.shift(),t=i.shift()),this.collection=t,this.oid=e,this.db=n,this.fields=r||{}}get namespace(){return this.collection}set namespace(t){this.collection=t}toJSON(){const t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(t.$db=this.db),t}toExtendedJSON(t){t=t||{};let e={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(e.$db=this.db),e=Object.assign(e,this.fields)),e}static fromExtendedJSON(t){const e=Object.assign({},t);return delete e.$ref,delete e.$id,delete e.$db,new bt(t.$ref,t.$id,t.$db,e)}inspect(t,e,n){n??=u;const r=[n(this.namespace,e),n(this.oid,e),...this.db?[n(this.db,e)]:[],...Object.keys(this.fields).length>0?[n(this.fields,e)]:[]];return r[1]=n===u?`new ObjectId(${r[1]})`:r[1],`new DBRef(${r.join(", ")})`}}function Tt(t){if(""===t)return t;let e=0;const n="-"===t[e],r="+"===t[e];(r||n)&&(e+=1);let i=!1;for(;e<t.length&&"0"===t[e];++e)i=!0;return i?`${n?"-":""}${t.length===e?"0":t.slice(e)}`:r?t.slice(1):t}let xt;try{xt=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}const St=4294967296,wt=0x10000000000000000,Et=wt/2,At={},Pt={},Mt=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class Ct extends at{get _bsontype(){return"Long"}get __isLong__(){return!0}high;low;unsigned;constructor(t=0,e,n){super();const r="boolean"==typeof e?e:Boolean(n),i="number"==typeof e?e:0,s="string"==typeof t?Ct.fromString(t,r):"bigint"==typeof t?Ct.fromBigInt(t,r):{low:0|t,high:0|i,unsigned:r};this.low=s.low,this.high=s.high,this.unsigned=s.unsigned}static TWO_PWR_24=Ct.fromInt(16777216);static MAX_UNSIGNED_VALUE=Ct.fromBits(-1,-1,!0);static ZERO=Ct.fromInt(0);static UZERO=Ct.fromInt(0,!0);static ONE=Ct.fromInt(1);static UONE=Ct.fromInt(1,!0);static NEG_ONE=Ct.fromInt(-1);static MAX_VALUE=Ct.fromBits(-1,2147483647,!1);static MIN_VALUE=Ct.fromBits(0,-2147483648,!1);static fromBits(t,e,n){return new Ct(t,e,n)}static fromInt(t,e){let n,r,i;return e?(i=0<=(t>>>=0)&&t<256)&&(r=Pt[t],r)?r:(n=Ct.fromBits(t,(0|t)<0?-1:0,!0),i&&(Pt[t]=n),n):(i=-128<=(t|=0)&&t<128)&&(r=At[t],r)?r:(n=Ct.fromBits(t,t<0?-1:0,!1),i&&(At[t]=n),n)}static fromNumber(t,e){if(isNaN(t))return e?Ct.UZERO:Ct.ZERO;if(e){if(t<0)return Ct.UZERO;if(t>=wt)return Ct.MAX_UNSIGNED_VALUE}else{if(t<=-Et)return Ct.MIN_VALUE;if(t+1>=Et)return Ct.MAX_VALUE}return t<0?Ct.fromNumber(-t,e).neg():Ct.fromBits(t%St|0,t/St|0,e)}static fromBigInt(t,e){const n=0xffffffffn;return new Ct(Number(t&n),Number(t>>32n&n),e)}static _fromString(t,e,n){if(0===t.length)throw new q("empty string");if(n<2||36<n)throw new q("radix");let r;if((r=t.indexOf("-"))>0)throw new q("interior hyphen");if(0===r)return Ct._fromString(t.substring(1),e,n).neg();const i=Ct.fromNumber(Math.pow(n,8));let s=Ct.ZERO;for(let e=0;e<t.length;e+=8){const r=Math.min(8,t.length-e),o=parseInt(t.substring(e,e+r),n);if(r<8){const t=Ct.fromNumber(Math.pow(n,r));s=s.mul(t).add(Ct.fromNumber(o))}else s=s.mul(i),s=s.add(Ct.fromNumber(o))}return s.unsigned=e,s}static fromStringStrict(t,e,n){let r=!1;if("number"==typeof e?(n=e,e=!1):r=!!e,n??=10,t.trim()!==t)throw new q(`Input: '${t}' contains leading and/or trailing whitespace`);if(!function(t,e){const n="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,e=e??10);return!new RegExp(`[^-+${n}]`,"i").test(t)&&t}(t,n))throw new q(`Input: '${t}' contains invalid characters for radix: ${n}`);const i=Tt(t),s=Ct._fromString(i,r,n);if(s.toString(n).toLowerCase()!==i.toLowerCase())throw new q(`Input: ${t} is not representable as ${s.unsigned?"an unsigned":"a signed"} 64-bit Long ${null!=n?`with radix: ${n}`:""}`);return s}static fromString(t,e,n){let r=!1;return"number"==typeof e?(n=e,e=!1):r=!!e,n??=10,"NaN"===t&&n<24||("Infinity"===t||"+Infinity"===t||"-Infinity"===t)&&n<35?Ct.ZERO:Ct._fromString(t,r,n)}static fromBytes(t,e,n){return n?Ct.fromBytesLE(t,e):Ct.fromBytesBE(t,e)}static fromBytesLE(t,e){return new Ct(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)}static fromBytesBE(t,e){return new Ct(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}static isLong(t){return null!=t&&"object"==typeof t&&"__isLong__"in t&&!0===t.__isLong__}static fromValue(t,e){return"number"==typeof t?Ct.fromNumber(t,e):"string"==typeof t?Ct.fromString(t,e):Ct.fromBits(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}add(t){Ct.isLong(t)||(t=Ct.fromValue(t));const e=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,s=t.high>>>16,o=65535&t.high,a=t.low>>>16;let l=0,c=0,u=0,h=0;return h+=i+(65535&t.low),u+=h>>>16,h&=65535,u+=r+a,c+=u>>>16,u&=65535,c+=n+o,l+=c>>>16,c&=65535,l+=e+s,l&=65535,Ct.fromBits(u<<16|h,l<<16|c,this.unsigned)}and(t){return Ct.isLong(t)||(t=Ct.fromValue(t)),Ct.fromBits(this.low&t.low,this.high&t.high,this.unsigned)}compare(t){if(Ct.isLong(t)||(t=Ct.fromValue(t)),this.eq(t))return 0;const e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1}comp(t){return this.compare(t)}divide(t){if(Ct.isLong(t)||(t=Ct.fromValue(t)),t.isZero())throw new q("division by zero");if(xt){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;const e=(this.unsigned?xt.div_u:xt.div_s)(this.low,this.high,t.low,t.high);return Ct.fromBits(e,xt.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Ct.UZERO:Ct.ZERO;let e,n,r;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Ct.UZERO;if(t.gt(this.shru(1)))return Ct.UONE;r=Ct.UZERO}else{if(this.eq(Ct.MIN_VALUE))return t.eq(Ct.ONE)||t.eq(Ct.NEG_ONE)?Ct.MIN_VALUE:t.eq(Ct.MIN_VALUE)?Ct.ONE:(e=this.shr(1).div(t).shl(1),e.eq(Ct.ZERO)?t.isNegative()?Ct.ONE:Ct.NEG_ONE:(n=this.sub(t.mul(e)),r=e.add(n.div(t)),r));if(t.eq(Ct.MIN_VALUE))return this.unsigned?Ct.UZERO:Ct.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();r=Ct.ZERO}for(n=this;n.gte(t);){e=Math.max(1,Math.floor(n.toNumber()/t.toNumber()));const i=Math.ceil(Math.log(e)/Math.LN2),s=i<=48?1:Math.pow(2,i-48);let o=Ct.fromNumber(e),a=o.mul(t);for(;a.isNegative()||a.gt(n);)e-=s,o=Ct.fromNumber(e,this.unsigned),a=o.mul(t);o.isZero()&&(o=Ct.ONE),r=r.add(o),n=n.sub(a)}return r}div(t){return this.divide(t)}equals(t){return Ct.isLong(t)||(t=Ct.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low}eq(t){return this.equals(t)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(Ct.MIN_VALUE)?64:this.neg().getNumBitsAbs();const t=0!==this.high?this.high:this.low;let e;for(e=31;e>0&&!(t&1<<e);e--);return 0!==this.high?e+33:e+1}greaterThan(t){return this.comp(t)>0}gt(t){return this.greaterThan(t)}greaterThanOrEqual(t){return this.comp(t)>=0}gte(t){return this.greaterThanOrEqual(t)}ge(t){return this.greaterThanOrEqual(t)}isEven(){return!(1&this.low)}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return!(1&~this.low)}isPositive(){return this.unsigned||this.high>=0}isZero(){return 0===this.high&&0===this.low}lessThan(t){return this.comp(t)<0}lt(t){return this.lessThan(t)}lessThanOrEqual(t){return this.comp(t)<=0}lte(t){return this.lessThanOrEqual(t)}modulo(t){if(Ct.isLong(t)||(t=Ct.fromValue(t)),xt){const e=(this.unsigned?xt.rem_u:xt.rem_s)(this.low,this.high,t.low,t.high);return Ct.fromBits(e,xt.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))}mod(t){return this.modulo(t)}rem(t){return this.modulo(t)}multiply(t){if(this.isZero())return Ct.ZERO;if(Ct.isLong(t)||(t=Ct.fromValue(t)),xt){const e=xt.mul(this.low,this.high,t.low,t.high);return Ct.fromBits(e,xt.get_high(),this.unsigned)}if(t.isZero())return Ct.ZERO;if(this.eq(Ct.MIN_VALUE))return t.isOdd()?Ct.MIN_VALUE:Ct.ZERO;if(t.eq(Ct.MIN_VALUE))return this.isOdd()?Ct.MIN_VALUE:Ct.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(Ct.TWO_PWR_24)&&t.lt(Ct.TWO_PWR_24))return Ct.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);const e=this.high>>>16,n=65535&this.high,r=this.low>>>16,i=65535&this.low,s=t.high>>>16,o=65535&t.high,a=t.low>>>16,l=65535&t.low;let c=0,u=0,h=0,p=0;return p+=i*l,h+=p>>>16,p&=65535,h+=r*l,u+=h>>>16,h&=65535,h+=i*a,u+=h>>>16,h&=65535,u+=n*l,c+=u>>>16,u&=65535,u+=r*a,c+=u>>>16,u&=65535,u+=i*o,c+=u>>>16,u&=65535,c+=e*l+n*a+r*o+i*s,c&=65535,Ct.fromBits(h<<16|p,c<<16|u,this.unsigned)}mul(t){return this.multiply(t)}negate(){return!this.unsigned&&this.eq(Ct.MIN_VALUE)?Ct.MIN_VALUE:this.not().add(Ct.ONE)}neg(){return this.negate()}not(){return Ct.fromBits(~this.low,~this.high,this.unsigned)}notEquals(t){return!this.equals(t)}neq(t){return this.notEquals(t)}ne(t){return this.notEquals(t)}or(t){return Ct.isLong(t)||(t=Ct.fromValue(t)),Ct.fromBits(this.low|t.low,this.high|t.high,this.unsigned)}shiftLeft(t){return Ct.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Ct.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):Ct.fromBits(0,this.low<<t-32,this.unsigned)}shl(t){return this.shiftLeft(t)}shiftRight(t){return Ct.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?Ct.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):Ct.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)}shr(t){return this.shiftRight(t)}shiftRightUnsigned(t){if(Ct.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;{const e=this.high;if(t<32){const n=this.low;return Ct.fromBits(n>>>t|e<<32-t,e>>>t,this.unsigned)}return 32===t?Ct.fromBits(e,0,this.unsigned):Ct.fromBits(e>>>t-32,0,this.unsigned)}}shr_u(t){return this.shiftRightUnsigned(t)}shru(t){return this.shiftRightUnsigned(t)}subtract(t){return Ct.isLong(t)||(t=Ct.fromValue(t)),this.add(t.neg())}sub(t){return this.subtract(t)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*St+(this.low>>>0):this.high*St+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(t){return t?this.toBytesLE():this.toBytesBE()}toBytesLE(){const t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]}toBytesBE(){const t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]}toSigned(){return this.unsigned?Ct.fromBits(this.low,this.high,!1):this}toString(t){if((t=t||10)<2||36<t)throw new q("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(Ct.MIN_VALUE)){const e=Ct.fromNumber(t),n=this.div(e),r=n.mul(e).sub(this);return n.toString(t)+r.toInt().toString(t)}return"-"+this.neg().toString(t)}const e=Ct.fromNumber(Math.pow(t,6),this.unsigned);let n=this,r="";for(;;){const i=n.div(e);let s=(n.sub(i.mul(e)).toInt()>>>0).toString(t);if(n=i,n.isZero())return s+r;for(;s.length<6;)s="0"+s;r=""+s+r}}toUnsigned(){return this.unsigned?this:Ct.fromBits(this.low,this.high,!0)}xor(t){return Ct.isLong(t)||(t=Ct.fromValue(t)),Ct.fromBits(this.low^t.low,this.high^t.high,this.unsigned)}eqz(){return this.isZero()}le(t){return this.lessThanOrEqual(t)}toExtendedJSON(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(t,e){const{useBigInt64:n=!1,relaxed:r=!0}={...e};if(t.$numberLong.length>20)throw new q("$numberLong string is too long");if(!Mt.test(t.$numberLong))throw new q(`$numberLong string "${t.$numberLong}" is in an invalid format`);if(n){const e=BigInt(t.$numberLong);return BigInt.asIntN(64,e)}const i=Ct.fromString(t.$numberLong);return r?i.toNumber():i}inspect(t,e,n){return n??=u,`new Long(${n(this.toString(),e)}${this.unsigned?`, ${n(this.unsigned,e)}`:""})`}}const kt=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,It=/^(\+|-)?(Infinity|inf)$/i,Ot=/^(\+|-)?NaN$/i,Nt=6111,_t=-6176,Dt=st.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),Lt=st.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),Bt=st.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),Rt=/^([-+])?(\d+)?$/;function Ft(t){return!isNaN(parseInt(t,10))}function jt(t){const e=Ct.fromNumber(1e9);let n=Ct.fromNumber(0);if(!(t.parts[0]||t.parts[1]||t.parts[2]||t.parts[3]))return{quotient:t,rem:n};for(let r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new Ct(t.parts[r],0)),t.parts[r]=n.div(e).low,n=n.modulo(e);return{quotient:t,rem:n}}function Ut(t,e){throw new q(`"${t}" is not a valid Decimal128 string - ${e}`)}class Vt extends at{get _bsontype(){return"Decimal128"}bytes;constructor(t){if(super(),"string"==typeof t)this.bytes=Vt.fromString(t).bytes;else{if(!(t instanceof Uint8Array||s(t)))throw new q("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new q("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}static fromString(t){return Vt._fromString(t,{allowRounding:!1})}static fromStringWithRounding(t){return Vt._fromString(t,{allowRounding:!0})}static _fromString(t,e){let n=!1,r=!1,i=!1,s=!1,o=0,a=0,l=0,c=0,u=0;const h=[0];let p=0,d=0,f=0,m=0,y=new Ct(0,0),g=new Ct(0,0),v=0,b=0;if(t.length>=7e3)throw new q(t+" not a valid Decimal128 string");const T=t.match(kt),x=t.match(It),S=t.match(Ot);if(!T&&!x&&!S||0===t.length)throw new q(t+" not a valid Decimal128 string");if(T){const e=T[2],n=T[4],r=T[5],i=T[6];n&&void 0===i&&Ut(t,"missing exponent power"),n&&void 0===e&&Ut(t,"missing exponent base"),void 0===n&&(r||i)&&Ut(t,"missing e before exponent")}if("+"!==t[b]&&"-"!==t[b]||(r=!0,n="-"===t[b++]),!Ft(t[b])&&"."!==t[b]){if("i"===t[b]||"I"===t[b])return new Vt(n?Lt:Bt);if("N"===t[b])return new Vt(Dt)}for(;Ft(t[b])||"."===t[b];)"."!==t[b]?(p<34&&("0"!==t[b]||s)&&(s||(u=a),s=!0,h[d++]=parseInt(t[b],10),p+=1),s&&(l+=1),i&&(c+=1),a+=1,b+=1):(i&&Ut(t,"contains multiple periods"),i=!0,b+=1);if(i&&!a)throw new q(t+" not a valid Decimal128 string");if("e"===t[b]||"E"===t[b]){const e=t.substr(++b).match(Rt);if(!e||!e[2])return new Vt(Dt);m=parseInt(e[0],10),b+=e[0].length}if(t[b])return new Vt(Dt);if(p){if(f=p-1,o=l,1!==o)for(;"0"===t[u+o-1+Number(r)+Number(i)];)o-=1}else h[0]=0,l=1,p=1,o=0;for(m<=c&&c>m+16384?m=_t:m-=c;m>Nt;){if(f+=1,f>=34){if(0===o){m=Nt;break}Ut(t,"overflow")}m-=1}if(e.allowRounding){for(;m<_t||p<l;){if(0===f&&o<p){m=_t,o=0;break}if(p<l?l-=1:f-=1,m<Nt)m+=1;else{if(h.join("").match(/^0+$/)){m=Nt;break}Ut(t,"overflow")}}if(f+1<o){let e=a;i&&(u+=1,e+=1),r&&(u+=1,e+=1);const s=parseInt(t[u+f+1],10);let o=0;if(s>=5&&(o=1,5===s)){o=h[f]%2==1?1:0;for(let n=u+f+2;n<e;n++)if(parseInt(t[n],10)){o=1;break}}if(o){let t=f;for(;t>=0&&++h[t]>9;t--)if(h[t]=0,0===t){if(!(m<Nt))return new Vt(n?Lt:Bt);m+=1,h[t]=1}}}}else{for(;m<_t||p<l;){if(0===f){if(0===o){m=_t;break}Ut(t,"exponent underflow")}p<l?("0"!==t[l-1+Number(r)+Number(i)]&&0!==o&&Ut(t,"inexact rounding"),l-=1):(0!==h[f]&&Ut(t,"inexact rounding"),f-=1),m<Nt?m+=1:Ut(t,"overflow")}f+1<o&&(i&&(u+=1),r&&(u+=1),0!==parseInt(t[u+f+1],10)&&Ut(t,"inexact rounding"))}if(y=Ct.fromNumber(0),g=Ct.fromNumber(0),0===o)y=Ct.fromNumber(0),g=Ct.fromNumber(0);else if(f<17){let t=0;for(g=Ct.fromNumber(h[t++]),y=new Ct(0,0);t<=f;t++)g=g.multiply(Ct.fromNumber(10)),g=g.add(Ct.fromNumber(h[t]))}else{let t=0;for(y=Ct.fromNumber(h[t++]);t<=f-17;t++)y=y.multiply(Ct.fromNumber(10)),y=y.add(Ct.fromNumber(h[t]));for(g=Ct.fromNumber(h[t++]);t<=f;t++)g=g.multiply(Ct.fromNumber(10)),g=g.add(Ct.fromNumber(h[t]))}const w=function(t,e){if(!t&&!e)return{high:Ct.fromNumber(0),low:Ct.fromNumber(0)};const n=t.shiftRightUnsigned(32),r=new Ct(t.getLowBits(),0),i=e.shiftRightUnsigned(32),s=new Ct(e.getLowBits(),0);let o=n.multiply(i),a=n.multiply(s);const l=r.multiply(i);let c=r.multiply(s);return o=o.add(a.shiftRightUnsigned(32)),a=new Ct(a.getLowBits(),0).add(l).add(c.shiftRightUnsigned(32)),o=o.add(a.shiftRightUnsigned(32)),c=a.shiftLeft(32).add(new Ct(c.getLowBits(),0)),{high:o,low:c}}(y,Ct.fromString("100000000000000000"));w.low=w.low.add(g),function(t,e){const n=t.high>>>0,r=e.high>>>0;return n<r||n===r&&t.low>>>0<e.low>>>0}(w.low,g)&&(w.high=w.high.add(Ct.fromNumber(1))),v=m+6176;const E={low:Ct.fromNumber(0),high:Ct.fromNumber(0)};w.high.shiftRightUnsigned(49).and(Ct.fromNumber(1)).equals(Ct.fromNumber(1))?(E.high=E.high.or(Ct.fromNumber(3).shiftLeft(61)),E.high=E.high.or(Ct.fromNumber(v).and(Ct.fromNumber(16383).shiftLeft(47))),E.high=E.high.or(w.high.and(Ct.fromNumber(0x7fffffffffff)))):(E.high=E.high.or(Ct.fromNumber(16383&v).shiftLeft(49)),E.high=E.high.or(w.high.and(Ct.fromNumber(562949953421311)))),E.low=w.low,n&&(E.high=E.high.or(Ct.fromString("9223372036854775808")));const A=st.allocateUnsafe(16);return b=0,A[b++]=255&E.low.low,A[b++]=E.low.low>>8&255,A[b++]=E.low.low>>16&255,A[b++]=E.low.low>>24&255,A[b++]=255&E.low.high,A[b++]=E.low.high>>8&255,A[b++]=E.low.high>>16&255,A[b++]=E.low.high>>24&255,A[b++]=255&E.high.low,A[b++]=E.high.low>>8&255,A[b++]=E.high.low>>16&255,A[b++]=E.high.low>>24&255,A[b++]=255&E.high.high,A[b++]=E.high.high>>8&255,A[b++]=E.high.high>>16&255,A[b++]=E.high.high>>24&255,new Vt(A)}toString(){let t,e=0;const n=new Array(36);for(let t=0;t<n.length;t++)n[t]=0;let r,i,s,o=0,a=!1,l={parts:[0,0,0,0]};const c=[];o=0;const u=this.bytes,h=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24,p=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24,d=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24,f=u[o++]|u[o++]<<8|u[o++]<<16|u[o++]<<24;o=0,(new Ct(h,p),new Ct(d,f)).lessThan(Ct.ZERO)&&c.push("-");const m=f>>26&31;if(m>>3==3){if(30===m)return c.join("")+"Infinity";if(31===m)return"NaN";t=f>>15&16383,r=8+(f>>14&1)}else r=f>>14&7,t=f>>17&16383;const y=t-6176;if(l.parts[0]=(16383&f)+((15&r)<<14),l.parts[1]=d,l.parts[2]=p,l.parts[3]=h,0===l.parts[0]&&0===l.parts[1]&&0===l.parts[2]&&0===l.parts[3])a=!0;else for(s=3;s>=0;s--){let t=0;const e=jt(l);if(l=e.quotient,t=e.rem.low,t)for(i=8;i>=0;i--)n[9*s+i]=t%10,t=Math.floor(t/10)}if(a)e=1,n[o]=0;else for(e=36;!n[o];)e-=1,o+=1;const g=e-1+y;if(g>=34||g<=-7||y>0){if(e>34)return c.push("0"),y>0?c.push(`E+${y}`):y<0&&c.push(`E${y}`),c.join("");c.push(`${n[o++]}`),e-=1,e&&c.push(".");for(let t=0;t<e;t++)c.push(`${n[o++]}`);c.push("E"),g>0?c.push(`+${g}`):c.push(`${g}`)}else if(y>=0)for(let t=0;t<e;t++)c.push(`${n[o++]}`);else{let t=e+y;if(t>0)for(let e=0;e<t;e++)c.push(`${n[o++]}`);else c.push("0");for(c.push(".");t++<0;)c.push("0");for(let r=0;r<e-Math.max(t-1,0);r++)c.push(`${n[o++]}`)}return c.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(t){return Vt.fromString(t.$numberDecimal)}inspect(t,e,n){return n??=u,`new Decimal128(${n(this.toString(),e)})`}}class zt extends at{get _bsontype(){return"Double"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t}static fromString(t){const e=Number(t);if("NaN"===t)return new zt(NaN);if("Infinity"===t)return new zt(1/0);if("-Infinity"===t)return new zt(-1/0);if(!Number.isFinite(e))throw new q(`Input: ${t} is not representable as a Double`);if(t.trim()!==t)throw new q(`Input: '${t}' contains whitespace`);if(""===t)throw new q("Input is an empty string");if(/[^-0-9.+eE]/.test(t))throw new q(`Input: '${t}' is not in decimal or exponential notation`);return new zt(e)}valueOf(){return this.value}toJSON(){return this.value}toString(t){return this.value.toString(t)}toExtendedJSON(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(t,e){const n=parseFloat(t.$numberDouble);return e&&e.relaxed?n:new zt(n)}inspect(t,e,n){return n??=u,`new Double(${n(this.value,e)})`}}class qt extends at{get _bsontype(){return"Int32"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=0|+t}static fromString(t){const e=Tt(t),n=Number(t);if(d<n)throw new q(`Input: '${t}' is larger than the maximum value for Int32`);if(f>n)throw new q(`Input: '${t}' is smaller than the minimum value for Int32`);if(!Number.isSafeInteger(n))throw new q(`Input: '${t}' is not a safe integer`);if(n.toString()!==e)throw new q(`Input: '${t}' is not a valid Int32 string`);return new qt(n)}valueOf(){return this.value}toString(t){return this.value.toString(t)}toJSON(){return this.value}toExtendedJSON(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(t,e){return e&&e.relaxed?parseInt(t.$numberInt,10):new qt(t.$numberInt)}inspect(t,e,n){return n??=u,`new Int32(${n(this.value,e)})`}}class $t extends at{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new $t}inspect(){return"new MaxKey()"}}class Ht extends at{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new Ht}inspect(){return"new MinKey()"}}const Kt=new WeakMap,Yt=[];for(let t=0;t<256;t++)Yt.push(t.toString(16).padStart(2,"0"));const Wt=new Int8Array(103);for(let t=48;t<=57;t++)Wt[t]=t-48;for(let t=65;t<=70;t++)Wt[t]=t-55;for(let t=97;t<=102;t++)Wt[t]=t-87;class Jt extends at{get _bsontype(){return"ObjectId"}static index=0;static PROCESS_UNIQUE=null;static resetState=()=>{this.index=Math.floor(16777216*Math.random()),this.PROCESS_UNIQUE=null};static{this.resetState();const{startupSnapshot:t}=globalThis?.process?.getBuiltinModule?.("v8")??{};t?.isBuildingSnapshot?.()&&t?.addDeserializeCallback?.(this.resetState)}static cacheHexString;i0;i1;i2;i3;setFromBytes(t,e=0){this.i0=t[e]<<16|t[e+1]<<8|t[e+2],this.i1=t[e+3]<<16|t[e+4]<<8|t[e+5],this.i2=t[e+6]<<16|t[e+7]<<8|t[e+8],this.i3=t[e+9]<<16|t[e+10]<<8|t[e+11]}setFromHex(t){const e=Wt;this.i0=e[t.charCodeAt(0)]<<20|e[t.charCodeAt(1)]<<16|e[t.charCodeAt(2)]<<12|e[t.charCodeAt(3)]<<8|e[t.charCodeAt(4)]<<4|e[t.charCodeAt(5)],this.i1=e[t.charCodeAt(6)]<<20|e[t.charCodeAt(7)]<<16|e[t.charCodeAt(8)]<<12|e[t.charCodeAt(9)]<<8|e[t.charCodeAt(10)]<<4|e[t.charCodeAt(11)],this.i2=e[t.charCodeAt(12)]<<20|e[t.charCodeAt(13)]<<16|e[t.charCodeAt(14)]<<12|e[t.charCodeAt(15)]<<8|e[t.charCodeAt(16)]<<4|e[t.charCodeAt(17)],this.i3=e[t.charCodeAt(18)]<<20|e[t.charCodeAt(19)]<<16|e[t.charCodeAt(20)]<<12|e[t.charCodeAt(21)]<<8|e[t.charCodeAt(22)]<<4|e[t.charCodeAt(23)]}constructor(t,e){if(super(),"number"==typeof e)return void this.setFromBytes(t,e);let n;if("object"==typeof t&&t&&"id"in t){if(Jt.is(t)&&"number"==typeof t.i0&&"number"==typeof t.i1&&"number"==typeof t.i2&&"number"==typeof t.i3)return this.i0=t.i0,this.i1=t.i1,this.i2=t.i2,void(this.i3=t.i3);if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new q("Argument passed in must have an id that is of type string or Buffer");n="toHexString"in t&&"function"==typeof t.toHexString?st.fromHex(t.toHexString()):t.id}else n=t;if(null==n){const t=Math.floor(Date.now()/1e3),e=Jt.getInc(),n=Jt.PROCESS_UNIQUE??=st.randomBytes(5);this.i0=t>>>8&16777215,this.i1=(255&t)<<16|n[0]<<8|n[1],this.i2=n[2]<<16|n[3]<<8|n[4],this.i3=16777215&e}else if(ArrayBuffer.isView(n)&&12===n.byteLength)this.setFromBytes(n instanceof Uint8Array?n:st.toLocalBufferType(n));else{if("string"!=typeof n)throw new q("Argument passed in does not match the accepted types");if(!Jt.validateHexString(n))throw new q("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");this.setFromHex(n),Jt.cacheHexString&&Kt.set(this,n)}}get id(){const t=st.allocateUnsafe(12);return t[0]=this.i0>>>16&255,t[1]=this.i0>>>8&255,t[2]=255&this.i0,t[3]=this.i1>>>16&255,t[4]=this.i1>>>8&255,t[5]=255&this.i1,t[6]=this.i2>>>16&255,t[7]=this.i2>>>8&255,t[8]=255&this.i2,t[9]=this.i3>>>16&255,t[10]=this.i3>>>8&255,t[11]=255&this.i3,t}set id(t){const e=t instanceof Uint8Array?t:st.toLocalBufferType(t);this.setFromBytes(e),Jt.cacheHexString&&Kt.set(this,st.toHex(e))}static validateHexString(t){if(24!==t?.length)return!1;for(let e=0;e<24;e++){const n=t.charCodeAt(e);if(!(n>=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70))return!1}return!0}toHexString(){if(Jt.cacheHexString){const t=Kt.get(this);if(t)return t}const t=this.i0,e=this.i1,n=this.i2,r=this.i3,i=Yt[t>>>16&255]+Yt[t>>>8&255]+Yt[255&t]+Yt[e>>>16&255]+Yt[e>>>8&255]+Yt[255&e]+Yt[n>>>16&255]+Yt[n>>>8&255]+Yt[255&n]+Yt[r>>>16&255]+Yt[r>>>8&255]+Yt[255&r];return Jt.cacheHexString&&Kt.set(this,i),i}static getInc(){return Jt.index=(Jt.index+1)%16777216}static generate(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));const e=Jt.getInc(),n=st.allocateUnsafe(12);ht.setInt32BE(n,0,t);const r=this.PROCESS_UNIQUE??=st.randomBytes(5);return n[4]=r[0],n[5]=r[1],n[6]=r[2],n[7]=r[3],n[8]=r[4],n[11]=255&e,n[10]=e>>>8&255,n[9]=e>>>16&255,n}toString(t){return"base64"===t?st.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}static is(t){return null!=t&&"object"==typeof t&&"_bsontype"in t&&"ObjectId"===t._bsontype}equals(t){if(null==t)return!1;if(Jt.is(t)&&"number"==typeof t.i0&&"number"==typeof t.i1&&"number"==typeof t.i2&&"number"==typeof t.i3)return this.i3===t.i3&&this.i0===t.i0&&this.i1===t.i1&&this.i2===t.i2;if("string"==typeof t)return t.toLowerCase()===this.toHexString();if("object"==typeof t&&"function"==typeof t.toHexString){const e=t.toHexString(),n=this.toHexString();return"string"==typeof e&&e.toLowerCase()===n}return!1}getTimestamp(){const t=new Date,e=256*this.i0+(this.i1>>>16);return t.setTime(1e3*e),t}static createPk(){return new Jt}serializeInto(t,e){return t[e]=this.i0>>>16&255,t[e+1]=this.i0>>>8&255,t[e+2]=255&this.i0,t[e+3]=this.i1>>>16&255,t[e+4]=this.i1>>>8&255,t[e+5]=255&this.i1,t[e+6]=this.i2>>>16&255,t[e+7]=this.i2>>>8&255,t[e+8]=255&this.i2,t[e+9]=this.i3>>>16&255,t[e+10]=this.i3>>>8&255,t[e+11]=255&this.i3,12}static createFromTime(t){const e=st.allocate(12);for(let t=11;t>=4;t--)e[t]=0;return ht.setInt32BE(e,0,t),new Jt(e)}static createFromHexString(t){if(24!==t?.length)throw new q("hex string must be 24 characters");return new Jt(st.fromHex(t))}static createFromBase64(t){if(16!==t?.length)throw new q("base64 string must be 16 characters");return new Jt(st.fromBase64(t))}static isValid(t){if(null==t)return!1;if("string"==typeof t)return Jt.validateHexString(t);try{return new Jt(t),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(t){return new Jt(t.$oid)}isCached(){return Jt.cacheHexString&&Kt.has(this)}inspect(t,e,n){return n??=u,`new ObjectId(${n(this.toHexString(),e)})`}}function Xt(t,e,n=!1,r=!1,i=!1,s){switch("function"==typeof e?.toBSON&&(e=e.toBSON()),typeof e){case"string":return 1+st.utf8ByteLength(t)+1+4+st.utf8ByteLength(e)+1;case"number":return Math.floor(e)===e&&e>=v&&e<=g&&e>=f&&e<=d?st.utf8ByteLength(t)+1+5:st.utf8ByteLength(t)+1+9;case"undefined":return r||!i?st.utf8ByteLength(t)+1+1:0;case"boolean":return st.utf8ByteLength(t)+1+2;case"object":if(null!=e&&"string"==typeof e._bsontype&&e[p]!==h)throw new $;if(null==e||"MinKey"===e._bsontype||"MaxKey"===e._bsontype)return st.utf8ByteLength(t)+1+1;if("ObjectId"===e._bsontype)return st.utf8ByteLength(t)+1+13;if(e instanceof Date||c(e))return st.utf8ByteLength(t)+1+9;if(ArrayBuffer.isView(e)||e instanceof ArrayBuffer||o(e))return st.utf8ByteLength(t)+1+6+e.byteLength;if("Long"===e._bsontype||"Double"===e._bsontype||"Timestamp"===e._bsontype)return st.utf8ByteLength(t)+1+9;if("Decimal128"===e._bsontype)return st.utf8ByteLength(t)+1+17;if("Int32"===e._bsontype)return st.utf8ByteLength(t)+1+5;if("Code"===e._bsontype)return null!=e.scope&&Object.keys(e.scope).length>0?(s.push({obj:e.scope,ignoreUndefined:i}),st.utf8ByteLength(t)+1+1+4+4+st.utf8ByteLength(e.code.toString())+1):st.utf8ByteLength(t)+1+1+4+st.utf8ByteLength(e.code.toString())+1;if("Binary"===e._bsontype){const n=e;return n.sub_type===pt.SUBTYPE_BYTE_ARRAY?st.utf8ByteLength(t)+1+(n.position+1+4+1+4):st.utf8ByteLength(t)+1+(n.position+1+4+1)}if("BSONSymbol"===e._bsontype)return st.utf8ByteLength(t)+1+st.utf8ByteLength(e.value)+4+1+1;if("DBRef"===e._bsontype){const n=Object.assign({$ref:e.collection,$id:e.oid},e.fields);return null!=e.db&&(n.$db=e.db),s.push({obj:n,ignoreUndefined:!0}),st.utf8ByteLength(t)+1+1}return e instanceof RegExp||a(e)?st.utf8ByteLength(t)+1+1+st.utf8ByteLength(e.source)+1+(e.global?1:0)+(e.ignoreCase?1:0)+(e.multiline?1:0)+1:"BSONRegExp"===e._bsontype?st.utf8ByteLength(t)+1+1+st.utf8ByteLength(e.pattern)+1+st.utf8ByteLength(e.options)+1:(s.push({obj:e,ignoreUndefined:i}),st.utf8ByteLength(t)+1+1);case"function":return n?st.utf8ByteLength(t)+1+1+4+st.utf8ByteLength(e.toString())+1:0;case"bigint":return st.utf8ByteLength(t)+1+9;case"symbol":return 0;default:throw new q("Unrecognized JS type: "+typeof e)}}class Gt extends at{get _bsontype(){return"BSONRegExp"}pattern;options;constructor(t,e){if(super(),this.pattern=t,this.options=(e??"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new q(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(-1!==this.options.indexOf("\0"))throw new q(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let t=0;t<this.options.length;t++)if("i"!==this.options[t]&&"m"!==this.options[t]&&"x"!==this.options[t]&&"l"!==this.options[t]&&"s"!==this.options[t]&&"u"!==this.options[t])throw new q(`The regular expression option [${this.options[t]}] is not supported`)}static parseOptions(t){return t?t.split("").sort().join(""):""}toExtendedJSON(t){return(t=t||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(t){if("$regex"in t){if("string"==typeof t.$regex)return new Gt(t.$regex,Gt.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new Gt(t.$regularExpression.pattern,Gt.parseOptions(t.$regularExpression.options));throw new q(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t)}`)}inspect(t,e,n){const r=function(t){if(null!=t&&"object"==typeof t&&"stylize"in t&&"function"==typeof t.stylize)return t.stylize}(e)??(t=>t);return n??=u,`new BSONRegExp(${r(n(this.pattern),"regexp")}, ${r(n(this.options),"regexp")})`}}class Zt extends at{get _bsontype(){return"BSONSymbol"}value;constructor(t){super(),this.value=t}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(t){return new Zt(t.$symbol)}inspect(t,e,n){return n??=u,`new BSONSymbol(${n(this.value,e)})`}}const Qt=Ct;class te extends Qt{get _bsontype(){return"Timestamp"}get[ot](){return"Timestamp"}static MAX_VALUE=Ct.MAX_UNSIGNED_VALUE;get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(t){if(null==t)super(0,0,!0);else if("bigint"==typeof t)super(t,!0);else if(Ct.isLong(t))super(t.low,t.high,!0);else{if("object"!=typeof t||!("t"in t)||!("i"in t))throw new q("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }");{if("number"!=typeof t.t&&("object"!=typeof t.t||"Int32"!==t.t._bsontype))throw new q("Timestamp constructed from { t, i } must provide t as a number");if("number"!=typeof t.i&&("object"!=typeof t.i||"Int32"!==t.i._bsontype))throw new q("Timestamp constructed from { t, i } must provide i as a number");const e=Number(t.t),n=Number(t.i);if(e<0||Number.isNaN(e))throw new q("Timestamp constructed from { t, i } must provide a positive t");if(n<0||Number.isNaN(n))throw new q("Timestamp constructed from { t, i } must provide a positive i");if(e>4294967295)throw new q("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(n>4294967295)throw new q("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(n,e,!0)}}}toJSON(){return{$timestamp:this.toString()}}static fromInt(t){return new te(Ct.fromInt(t,!0))}static fromNumber(t){return new te(Ct.fromNumber(t,!0))}static fromBits(t,e){return new te({i:t,t:e})}static fromString(t,e){return new te(Ct.fromString(t,!0,e))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(t){const e=Ct.isLong(t.$timestamp.i)?t.$timestamp.i.getLowBitsUnsigned():t.$timestamp.i,n=Ct.isLong(t.$timestamp.t)?t.$timestamp.t.getLowBitsUnsigned():t.$timestamp.t;return new te({t:n,i:e})}inspect(t,e,n){return n??=u,`new Timestamp({ t: ${n(this.t,e)}, i: ${n(this.i,e)} })`}}const ee=Ct.fromNumber(g),ne=Ct.fromNumber(v);function re(t,e,n){const r=(e=null==e?{}:e)&&e.index?e.index:0,i=ht.getInt32LE(t,r);if(i<5)throw new q(`bson size must be >= 5, is ${i}`);if(e.allowObjectSmallerThanBufferSize&&t.length<i)throw new q(`buffer length ${t.length} must be >= bson size ${i}`);if(!e.allowObjectSmallerThanBufferSize&&t.length!==i)throw new q(`buffer length ${t.length} must === bson size ${i}`);if(i+r>t.byteLength)throw new q(`(bson size ${i} + options.index ${r} must be <= buffer length ${t.byteLength})`);if(0!==t[r+i-1])throw new q("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return function(t,e,n,r=!1){const i=null==(n={...n}).fieldsAsRaw?null:n.fieldsAsRaw,s=null!=n.raw&&n.raw,o="boolean"==typeof n.bsonRegExp&&n.bsonRegExp,a=n.promoteBuffers??!1,l=n.promoteLongs??!0,c=n.promoteValues??!0,u=n.useBigInt64??!1;if(u&&!c)throw new q("Must either request bigint or Long for int64 deserialization");if(u&&!l)throw new q("Must either request bigint or Long for int64 deserialization");let h,p,d=!0;const f=(null==n.validation?{utf8:!0}:n.validation).utf8;if("boolean"==typeof f)h=f;else{d=!1;const t=Object.keys(f).map((function(t){return f[t]}));if(0===t.length)throw new q("UTF-8 validation setting cannot be empty");if("boolean"!=typeof t[0])throw new q("Invalid UTF-8 validation option, must specify boolean values");if(h=t[0],!t.every((t=>t===h)))throw new q("Invalid UTF-8 validation option - keys must be all true or all false")}if(!d){p=new Set;for(const t of Object.keys(f))p.add(t)}const m=e;if(t.length<5)throw new q("corrupt bson message < 5 bytes long");const y=ht.getInt32LE(t,e);if(e+=4,y<5||y>t.length)throw new q("corrupt bson message");const g=r?[]:{};let v=0,U=!r&&null,z=null,$=g,H=r;for(;;){const n=t[e++];if(0===n){if(z){if(e===z.lastIndex){const t=z;z=t.prev,null===z?($=g,H=r):($=z.holdingDocument,H=z.isArray);let e=t.holdingDocument;switch(t.elementType){case x:t.isPossibleDBRef&&(e=oe(e));break;case S:break;case _:e=new gt(t.functionString,t.holdingDocument);break;default:throw new q("Unexpected element type in frame stack")}se($,t.propertyName,e);continue}if(z.elementType===S)throw new q("corrupted array bson");throw new q("Bad BSON Document: object not properly terminated")}break}let f=e;for(;0!==t[f]&&f<t.length;)f++;if(f>=t.byteLength)throw new q("Bad BSON Document: illegal CString");const m=H?null!==z?z.arrayIndex++:v++:st.toUTF8(t,e,f,!1);let y,K;y=null!==z?z.validationSetting:d||p?.has(m)?h:!h,null!==z?!1!==z.isPossibleDBRef&&"string"==typeof m&&"$"===m[0]&&(z.isPossibleDBRef=ie.test(m)):!1!==U&&"$"===m[0]&&(U=ie.test(m));let Y=!1;if(e=f+1,n===T){const n=ht.getInt32LE(t,e);if(e+=4,n<=0||n>t.length-e||0!==t[e+n-1])throw new q("bad string length in bson");K=st.toUTF8(t,e,e+n-1,y),e+=n}else if(n===A)K=new Jt(t,e),e+=12;else if(n===D&&!1===c)K=new qt(ht.getInt32LE(t,e)),e+=4;else if(n===D)K=ht.getInt32LE(t,e),e+=4;else if(n===b)K=ht.getFloat64LE(t,e),e+=8,!1===c&&(K=new zt(K));else if(n===M){const n=ht.getInt32LE(t,e),r=ht.getInt32LE(t,e+4);e+=8,K=new Date(new Ct(n,r).toNumber())}else if(n===P){if(0!==t[e]&&1!==t[e])throw new q("illegal boolean type value");K=1===t[e++]}else if(n===x){const n=ht.getInt32LE(t,e);if(n<5||n>t.length-e)throw new q("bad embedded document length in bson");if(s||z?.raw)K=t.subarray(e,e+n),e+=n;else{Y=!0;const t={holdingDocument:{},elementType:x,propertyName:m,functionString:null,lastIndex:e+n,isArray:!1,arrayIndex:0,raw:!1,isPossibleDBRef:null,validationSetting:y,prev:z};z=t,$=t.holdingDocument,H=!1,e+=4}}else if(n===S){const n=ht.getInt32LE(t,e);if(n<5||n>t.length-e)throw new q("bad embedded array length in bson");const r=e+n,s=!(!i||!i[m])||(z?.raw??!1);Y=!0;const o={holdingDocument:[],elementType:S,propertyName:m,functionString:null,lastIndex:r,isArray:!0,arrayIndex:0,raw:s,isPossibleDBRef:!1,validationSetting:y,prev:z};z=o,$=o.holdingDocument,H=!0,e+=4}else if(n===E)K=void 0;else if(n===C)K=null;else if(n===B)if(u)K=ht.getBigInt64LE(t,e),e+=8;else{const n=ht.getInt32LE(t,e),r=ht.getInt32LE(t,e+4);e+=8;const i=new Ct(n,r);K=l&&!0===c&&i.lessThanOrEqual(ee)&&i.greaterThanOrEqual(ne)?i.toNumber():i}else if(n===R){const n=st.allocateUnsafe(16);for(let r=0;r<16;r++)n[r]=t[e+r];e+=16,K=new Vt(n)}else if(n===w){let n=ht.getInt32LE(t,e);e+=4;const r=n,i=t[e++];if(n<0)throw new q("Negative binary type element size found");if(n>t.byteLength)throw new q("Binary type size larger than document size");if(i===pt.SUBTYPE_BYTE_ARRAY){if(n=ht.getInt32LE(t,e),e+=4,n<0)throw new q("Negative binary type element size found for subtype 0x02");if(n>r-4)throw new q("Binary type with subtype 0x02 contains too long binary size");if(n<r-4)throw new q("Binary type with subtype 0x02 contains too short binary size")}a&&c?K=st.toLocalBufferType(t.subarray(e,e+n)):(K=new pt(t.subarray(e,e+n),i),i===V&&yt.isValid(K)&&(K=K.toUUID())),e+=n}else if(n===k&&!1===o){for(f=e;0!==t[f]&&f<t.length;)f++;if(f>=t.length)throw new q("Bad BSON Document: illegal CString");const n=st.toUTF8(t,e,f,!1);for(f=e=f+1;0!==t[f]&&f<t.length;)f++;if(f>=t.length)throw new q("Bad BSON Document: illegal CString");const r=st.toUTF8(t,e,f,!1);e=f+1;const i=new Array(r.length);for(f=0;f<r.length;f++)switch(r[f]){case"m":i[f]="m";break;case"s":i[f]="g";break;case"i":i[f]="i"}K=new RegExp(n,i.join(""))}else if(n===k&&!0===o){for(f=e;0!==t[f]&&f<t.length;)f++;if(f>=t.length)throw new q("Bad BSON Document: illegal CString");const n=st.toUTF8(t,e,f,!1);for(f=e=f+1;0!==t[f]&&f<t.length;)f++;if(f>=t.length)throw new q("Bad BSON Document: illegal CString");const r=st.toUTF8(t,e,f,!1);e=f+1,K=new Gt(n,r)}else if(n===N){const n=ht.getInt32LE(t,e);if(e+=4,n<=0||n>t.length-e||0!==t[e+n-1])throw new q("bad string length in bson");const r=st.toUTF8(t,e,e+n-1,y);K=c?r:new Zt(r),e+=n}else if(n===L)K=new te({i:ht.getUint32LE(t,e),t:ht.getUint32LE(t,e+4)}),e+=8;else if(n===F)K=new Ht;else if(n===j)K=new $t;else if(n===O){const n=ht.getInt32LE(t,e);if(e+=4,n<=0||n>t.length-e||0!==t[e+n-1])throw new q("bad string length in bson");const r=st.toUTF8(t,e,e+n-1,y);K=new gt(r),e+=n}else if(n===_){const n=ht.getInt32LE(t,e);if(e+=4,n<13)throw new q("code_w_scope total size shorter minimum expected length");const r=ht.getInt32LE(t,e);if(e+=4,r<=0||r>t.length-e||0!==t[e+r-1])throw new q("bad string length in bson");const i=st.toUTF8(t,e,e+r-1,y),s=e+=r,o=ht.getInt32LE(t,e);if(o<5||o>t.length-e)throw new q("bad scope document size in code_w_scope");if(n<8+o+r)throw new q("code_w_scope total size is too short, truncating scope");if(n>8+o+r)throw new q("code_w_scope total size is too long, clips outer document");Y=!0;const a={holdingDocument:{},elementType:_,propertyName:m,functionString:i,lastIndex:s+o,isArray:!1,arrayIndex:0,raw:!1,isPossibleDBRef:null,validationSetting:y,prev:z};z=a,$=a.holdingDocument,H=!1,e+=4}else{if(n!==I)throw new q(`Detected unknown BSON type ${n.toString(16)} for fieldname "${m}"`);{const n=ht.getInt32LE(t,e);if(e+=4,n<=0||n>t.length-e||0!==t[e+n-1])throw new q("bad string length in bson");const r=st.toUTF8(t,e,e+n-1,y);e+=n;const i=st.allocateUnsafe(12);for(let n=0;n<12;n++)i[n]=t[e+n];const s=new Jt(i);e+=12,K=new bt(r,s)}}Y||se($,m,K)}if(null!==z)throw new q("corrupted bson, more objects expected based on the current document size");const K=g;if(y!==e-m){if(r)throw new q("corrupt array bson");throw new q("corrupt object bson")}return U?oe(K):K}(t,r,e,n)}const ie=/^\$ref$|^\$id$|^\$db$/;function se(t,e,n){"__proto__"===e?Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0}):t[e]=n}function oe(t){if(vt(t)){const{$ref:e,$id:n,$db:r,...i}=t;return new bt(e,n,r,i)}return t}const ae=/\x00/,le=new Set(["$db","$ref","$id","$clusterTime"]);function ce(t,e,n,r){t[r++]=T,t[(r=r+st.encodeUTF8Into(t,e,r)+1)-1]=0;const i=st.encodeUTF8Into(t,n,r+4);return ht.setInt32LE(t,r,i+1),r=r+4+i,t[r++]=0,r}function ue(t,e,n,r){const i=!Object.is(n,-0)&&Number.isSafeInteger(n)&&n<=d&&n>=f?D:b;return t[r++]=i,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r+(i===D?ht.setInt32LE(t,r,n):ht.setFloat64LE(t,r,n))}function he(t,e,n,r){return t[r++]=B,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r+ht.setBigInt64LE(t,r,n)}function pe(t,e,n,r){return t[r++]=C,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r}function de(t,e,n,r){return t[r++]=P,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,t[r++]=n?1:0,r}function fe(t,e,n,r){t[r++]=M,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;const i=Ct.fromNumber(n.getTime()),s=i.getLowBits(),o=i.getHighBits();return(r+=ht.setInt32LE(t,r,s))+ht.setInt32LE(t,r,o)}function me(t,e,n,r){if(t[r++]=k,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,n.source&&null!=n.source.match(ae))throw new q("value "+n.source+" must not contain null bytes");return r+=st.encodeUTF8Into(t,n.source,r),t[r++]=0,n.ignoreCase&&(t[r++]=105),n.global&&(t[r++]=115),n.multiline&&(t[r++]=109),t[r++]=0,r}function ye(t,e,n,r){if(t[r++]=k,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,null!=n.pattern.match(ae))throw new q("pattern "+n.pattern+" must not contain null bytes");r+=st.encodeUTF8Into(t,n.pattern,r),t[r++]=0;const i=n.options.split("").sort().join("");return r+=st.encodeUTF8Into(t,i,r),t[r++]=0,r}function ge(t,e,n,r){return null===n?t[r++]=C:"MinKey"===n[ot]?t[r++]=F:t[r++]=j,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r}function ve(t,e,n,r){return t[r++]=A,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r+n.serializeInto(t,r)}function be(t,e,n,r){t[r++]=w,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;const i=n.length;if(r+=ht.setInt32LE(t,r,i),t[r++]=U,i<=16)for(let e=0;e<i;e++)t[r+e]=n[e];else t.set(n,r);return r+i}function Te(t,e,n,r){t[r++]=R,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;for(let e=0;e<16;e++)t[r+e]=n.bytes[e];return r+16}function xe(t,e,n,r){t[r++]="Long"===n[ot]?B:L,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;const i=n.getLowBits(),s=n.getHighBits();return(r+=ht.setInt32LE(t,r,i))+ht.setInt32LE(t,r,s)}function Se(t,e,n,r){return n=n.valueOf(),t[r++]=D,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r+ht.setInt32LE(t,r,n)}function we(t,e,n,r){return t[r++]=b,r+=st.encodeUTF8Into(t,e,r),t[r++]=0,r+ht.setFloat64LE(t,r,n.value)}function Ee(t,e,n,r){t[r++]=O,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;const i=n.toString(),s=st.encodeUTF8Into(t,i,r+4)+1;return ht.setInt32LE(t,r,s),r=r+4+s-1,t[r++]=0,r}function Ae(t,e,n,r){t[r++]=w,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;const i=n.buffer;let s=n.position;if(n.sub_type===pt.SUBTYPE_BYTE_ARRAY&&(s+=4),r+=ht.setInt32LE(t,r,s),t[r++]=n.sub_type,n.sub_type===pt.SUBTYPE_BYTE_ARRAY&&(s-=4,r+=ht.setInt32LE(t,r,s)),n.sub_type===pt.SUBTYPE_VECTOR&&dt(n),s<=16)for(let e=0;e<s;e++)t[r+e]=i[e];else t.set(i,r);return r+n.position}function Pe(t,e,n,r){t[r++]=N,r+=st.encodeUTF8Into(t,e,r),t[r++]=0;const i=st.encodeUTF8Into(t,n.value,r+4)+1;return ht.setInt32LE(t,r,i),r=r+4+i-1,t[r++]=0,r}function Me(t,e,n,r,i,s){if(Array.isArray(t))return{sourceObject:t,isArray:!0,objectSizeIndex:e,codeSizeIndex:n,iterTarget:t,keys:null,keyIndex:0,mapIterator:null,prev:r,checkKeys:i,ignoreUndefined:s};if(t instanceof Map||l(t))return{sourceObject:t,isArray:!1,objectSizeIndex:e,codeSizeIndex:n,iterTarget:t,keys:null,keyIndex:0,mapIterator:t.entries(),prev:r,checkKeys:i,ignoreUndefined:s};let o=t;if("function"==typeof o?.toBSON&&(o=o.toBSON(),null!=o&&"object"!=typeof o))throw new q("toBSON function did not return an object");return{sourceObject:t,isArray:!1,objectSizeIndex:e,codeSizeIndex:n,iterTarget:o,keys:Object.keys(o),keyIndex:0,mapIterator:null,prev:r,checkKeys:i,ignoreUndefined:s}}function Ce(t,e,n,r,i,l,u){if(null==u){if(null==e)return t[0]=5,t[1]=0,t[2]=0,t[3]=0,t[4]=0,5;if(Array.isArray(e))throw new q("serialize does not support an array as the root input");if("object"!=typeof e)throw new q("serialize does not support non-object as the root input");if("_bsontype"in e&&"string"==typeof e._bsontype)throw new q("BSON types cannot be serialized as a document");if(c(e)||a(e)||s(e)||o(e))throw new q("date, regexp, typedarray, and arraybuffer cannot be BSON documents");u=new Set}u.add(e);let d=Me(e,r,null,null,n,l),f=r+4;for(;null!==d;){const e=d;let n,r;if(null!==e.mapIterator){const i=e.mapIterator.next();if(i.done){t[f++]=0,ht.setInt32LE(t,e.objectSizeIndex,f-e.objectSizeIndex),null!==e.codeSizeIndex&&ht.setInt32LE(t,e.codeSizeIndex,f-e.codeSizeIndex),u.delete(e.sourceObject),d=e.prev;continue}n=i.value[0],r=i.value[1]}else if(null!==e.keys){if(e.keyIndex>=e.keys.length){t[f++]=0,ht.setInt32LE(t,e.objectSizeIndex,f-e.objectSizeIndex),null!==e.codeSizeIndex&&ht.setInt32LE(t,e.codeSizeIndex,f-e.codeSizeIndex),u.delete(e.sourceObject),d=e.prev;continue}n=e.keys[e.keyIndex++],r=e.iterTarget[n]}else{const i=e.iterTarget;if(e.keyIndex>=i.length){t[f++]=0,ht.setInt32LE(t,e.objectSizeIndex,f-e.objectSizeIndex),null!==e.codeSizeIndex&&ht.setInt32LE(t,e.codeSizeIndex,f-e.codeSizeIndex),u.delete(e.sourceObject),d=e.prev;continue}const s=e.keyIndex++;n=String(s),r=i[s]}if("function"==typeof r?.toBSON&&(r=r.toBSON()),!(e.isArray||"string"!=typeof n||"$"===n[0]&&le.has(n))){if(ae.test(n))throw new q("key "+n+" must not contain null bytes");if(e.checkKeys){if("$"===n[0])throw new q("key "+n+" must not start with '$'");if(n.includes("."))throw new q("key "+n+" must not contain '.'")}}const o=typeof r;if(void 0===r)(e.isArray||!1===e.ignoreUndefined)&&(f=pe(t,n,0,f));else if(null===r)f=pe(t,n,0,f);else if("string"===o)f=ce(t,n,r,f);else if("number"===o)f=ue(t,n,r,f);else if("bigint"===o)f=he(t,n,r,f);else if("boolean"===o)f=de(t,n,r,f);else if("object"===o&&null==r._bsontype)if(r instanceof Date||c(r))f=fe(t,n,r,f);else if(r instanceof Uint8Array||s(r))f=be(t,n,r,f);else if(r instanceof RegExp||a(r))f=me(t,n,r,f);else{if(u.has(r))throw new q("Cannot convert circular structure to BSON");const i=Array.isArray(r);t[f++]=i?S:x,f+=st.encodeUTF8Into(t,n,f),t[f++]=0;const s=f;u.add(r),d=Me(r,s,null,e,e.checkKeys,e.ignoreUndefined),f+=4}else if("object"===o){if(r[p]!==h)throw new $;const i=r[ot];if("ObjectId"===i)f=ve(t,n,r,f);else if("Decimal128"===i)f=Te(t,n,r,f);else if("Long"===i||"Timestamp"===i)f=xe(t,n,r,f);else if("Double"===i)f=we(t,n,r,f);else if("Code"===i){const i=r;if(i.scope&&"object"==typeof i.scope){t[f++]=_,f+=st.encodeUTF8Into(t,n,f),t[f++]=0;const r=f;f+=4;const s=i.code,o=st.encodeUTF8Into(t,s,f+4)+1;ht.setInt32LE(t,f,o),t[f+4+o-1]=0,f=f+o+4;const a=i.scope;if(u.has(a))throw new q("Cannot convert circular structure to BSON");u.add(a),d=Me(a,f,r,e,e.checkKeys,e.ignoreUndefined),f+=4}else{t[f++]=O,f+=st.encodeUTF8Into(t,n,f),t[f++]=0;const e=i.code.toString(),r=st.encodeUTF8Into(t,e,f+4)+1;ht.setInt32LE(t,f,r),f=f+4+r-1,t[f++]=0}}else if("Binary"===i)f=Ae(t,n,r,f);else if("BSONSymbol"===i)f=Pe(t,n,r,f);else if("DBRef"===i){const i=r,s=Object.assign({$ref:i.collection,$id:i.oid},null!=i.db?{$db:i.db}:null,i.fields);t[f++]=x,f+=st.encodeUTF8Into(t,n,f),t[f++]=0,u.add(s),d=Me(s,f,null,e,!1,!0),f+=4}else if("BSONRegExp"===i)f=ye(t,n,r,f);else if("Int32"===i)f=Se(t,n,r,f);else if("MinKey"===i||"MaxKey"===i)f=ge(t,n,r,f);else if(void 0!==r._bsontype)throw new q(`Unrecognized or invalid _bsontype: ${String(r._bsontype)}`)}else"function"===o&&i&&(f=Ee(t,n,r,f))}return f}const ke={$oid:Jt,$binary:pt,$uuid:pt,$symbol:Zt,$numberInt:qt,$numberDecimal:Vt,$numberDouble:zt,$numberLong:Ct,$minKey:Ht,$maxKey:$t,$regex:Gt,$regularExpression:Gt,$timestamp:te};function Ie(t,e={}){if("number"==typeof t){const n=t<=d&&t>=f,r=t<=m&&t>=y;if(e.relaxed||e.legacy)return t;if(Number.isInteger(t)&&!Object.is(t,-0)){if(n)return new qt(t);if(r)return e.useBigInt64?BigInt(t):Ct.fromNumber(t)}return new zt(t)}if(null==t||"object"!=typeof t)return t;if(t.$undefined)return null;const n=Object.keys(t).filter((e=>e.startsWith("$")&&null!=t[e]));for(let r=0;r<n.length;r++){const i=ke[n[r]];if(i)return i.fromExtendedJSON(t,e)}if(null!=t.$date){const n=t.$date,r=new Date;if(e.legacy)if("number"==typeof n)r.setTime(n);else if("string"==typeof n)r.setTime(Date.parse(n));else{if("bigint"!=typeof n)throw new H("Unrecognized type for EJSON date: "+typeof n);r.setTime(Number(n))}else if("string"==typeof n)r.setTime(Date.parse(n));else if(Ct.isLong(n))r.setTime(n.toNumber());else if("number"==typeof n&&e.relaxed)r.setTime(n);else{if("bigint"!=typeof n)throw new H("Unrecognized type for EJSON date: "+typeof n);r.setTime(Number(n))}return r}if(null!=t.$code){const e=Object.assign({},t);return t.$scope&&(e.$scope=Ie(t.$scope)),gt.fromExtendedJSON(t)}if(vt(t)||t.$dbPointer){const e=t.$ref?t:t.$dbPointer;if(e instanceof bt)return e;const n=Object.keys(e).filter((t=>t.startsWith("$")));let r=!0;if(n.forEach((t=>{-1===["$ref","$id","$db"].indexOf(t)&&(r=!1)})),r)return bt.fromExtendedJSON(e)}return t}function Oe(t){const e=t.toISOString();return 0!==t.getUTCMilliseconds()?e:e.slice(0,-5)+"Z"}function Ne(t,e){if(t instanceof Map||l(t)){const n=Object.create(null);for(const[e,r]of t){if("string"!=typeof e)throw new q("Can only serialize maps with string keys");n[e]=r}return Ne(n,e)}if(("object"==typeof t||"function"==typeof t)&&null!==t){const n=e.seenObjects.findIndex((e=>e.obj===t));if(-1!==n){const t=e.seenObjects.map((t=>t.propertyName)),r=t.slice(0,n).map((t=>`${t} -> `)).join(""),i=t[n],s=" -> "+t.slice(n+1,t.length-1).map((t=>`${t} -> `)).join(""),o=t[t.length-1],a=" ".repeat(r.length+i.length/2),l="-".repeat(s.length+(i.length+o.length)/2-1);throw new q(`Converting circular structure to EJSON:\n ${r}${i}${s}${o}\n ${a}\\${l}/`)}e.seenObjects[e.seenObjects.length-1].obj=t}if(Array.isArray(t))return function(t,e){return t.map(((t,n)=>{e.seenObjects.push({propertyName:`index ${n}`,obj:null});try{return Ne(t,e)}finally{e.seenObjects.pop()}}))}(t,e);if(void 0===t)return e.ignoreUndefined?void 0:null;if(t instanceof Date||c(t)){const n=t.getTime(),r=n>-1&&n<2534023008e5;return e.legacy?e.relaxed&&r?{$date:t.getTime()}:{$date:Oe(t)}:e.relaxed&&r?{$date:Oe(t)}:{$date:{$numberLong:t.getTime().toString()}}}if(!("number"!=typeof t||e.relaxed&&isFinite(t))){if(Number.isInteger(t)&&!Object.is(t,-0)){if(t>=f&&t<=d)return{$numberInt:t.toString()};if(t>=y&&t<=m)return{$numberLong:t.toString()}}return{$numberDouble:Object.is(t,-0)?"-0.0":t.toString()}}if("bigint"==typeof t)return e.relaxed?Number(BigInt.asIntN(64,t)):{$numberLong:BigInt.asIntN(64,t).toString()};if(t instanceof RegExp||a(t)){let n=t.flags;if(void 0===n){const e=t.toString().match(/[gimuy]*$/);e&&(n=e[0])}return new Gt(t.source,n).toExtendedJSON(e)}return null!=t&&"object"==typeof t?function(t,e){if(null==t||"object"!=typeof t)throw new q("not an object instance");const n=t._bsontype;if(void 0===n){const n={};for(const r of Object.keys(t)){e.seenObjects.push({propertyName:r,obj:null});try{const i=Ne(t[r],e);"__proto__"===r?Object.defineProperty(n,r,{value:i,writable:!0,enumerable:!0,configurable:!0}):n[r]=i}finally{e.seenObjects.pop()}}return n}if(null!=t&&"object"==typeof t&&"string"==typeof t._bsontype&&t[p]!==h)throw new $;if(function(t){return null!=t&&"object"==typeof t&&"_bsontype"in t&&"string"==typeof t._bsontype}(t)){let r=t;if("function"!=typeof r.toExtendedJSON){const e=_e[t._bsontype];if(!e)throw new q("Unrecognized or invalid _bsontype: "+t._bsontype);r=e(r)}return"Code"===n&&r.scope?r=new gt(r.code,Ne(r.scope,e)):"DBRef"===n&&r.oid&&(r=new bt(Ne(r.collection,e),Ne(r.oid,e),Ne(r.db,e),Ne(r.fields,e))),r.toExtendedJSON(e)}throw new q("_bsontype must be a string, but was: "+typeof n)}(t,e):t}const _e={Binary:t=>new pt(t.value(),t.sub_type),Code:t=>new gt(t.code,t.scope),DBRef:t=>new bt(t.collection||t.namespace,t.oid,t.db,t.fields),Decimal128:t=>new Vt(t.bytes),Double:t=>new zt(t.value),Int32:t=>new qt(t.value),Long:t=>Ct.fromBits(null!=t.low?t.low:t.low_,null!=t.low?t.high:t.high_,null!=t.low?t.unsigned:t.unsigned_),MaxKey:()=>new $t,MinKey:()=>new Ht,ObjectId:t=>new Jt(t),BSONRegExp:t=>new Gt(t.pattern,t.options),BSONSymbol:t=>new Zt(t.value),Timestamp:t=>te.fromBits(t.low,t.high)};function De(t,e){const n={useBigInt64:e?.useBigInt64??!1,relaxed:e?.relaxed??!0,legacy:e?.legacy??!1};return JSON.parse(t,((t,e)=>{if(-1!==t.indexOf("\0"))throw new q(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(t)}`);return Ie(e,n)}))}function Le(t,e,n,r){null!=n&&"object"==typeof n&&(r=n,n=void 0),null==e||"object"!=typeof e||Array.isArray(e)||(r=e,e=void 0);const i=Ne(t,Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,e,n)}const Be=Object.create(null);Be.parse=De,Be.stringify=Le,Be.serialize=function(t,e){return e=e||{},JSON.parse(Le(t,e))},Be.deserialize=function(t,e){return e=e||{},De(JSON.stringify(t),e)},Object.freeze(Be);function Re(t,e){try{return ht.getNonnegativeInt32LE(t,e)}catch(t){throw new K("BSON size cannot be negative",e,{cause:t})}}function Fe(t,e){let n=e;for(;0!==t[n];n++);if(n===t.length-1)throw new K("Null terminator not found",e);return n}const je=Object.create(null);je.parseToElements=function(t,e=0){if(e??=0,t.length<5)throw new K(`Input must be at least 5 bytes, got ${t.length} bytes`,e);const n=Re(t,e);if(n>t.length-e)throw new K(`Parsed documentSize (${n} bytes) does not match input length (${t.length} bytes)`,e);if(0!==t[e+n-1])throw new K("BSON documents must end in 0x00",e+n);const r=[];let i=e+4;for(;i<=n+e;){const s=t[i];if(i+=1,0===s){if(i-e!==n)throw new K("Invalid 0x00 type byte",i);break}const o=i,a=Fe(t,i)-o;let l;if(i+=a+1,1===s||18===s||9===s||17===s)l=8;else if(16===s)l=4;else if(7===s)l=12;else if(19===s)l=16;else if(8===s)l=1;else if(10===s||6===s||127===s||255===s)l=0;else if(11===s)l=Fe(t,Fe(t,i)+1)+1-i;else if(3===s||4===s||15===s)l=Re(t,i);else{if(2!==s&&5!==s&&12!==s&&13!==s&&14!==s)throw new K(`Invalid 0x${s.toString(16).padStart(2,"0")} type byte`,i);l=Re(t,i)+4,5===s&&(l+=1),12===s&&(l+=12)}if(l>n)throw new K("value reports length larger than document",i);r.push([s,o,a,i,l]),i+=l}return r},je.ByteUtils=st,je.NumberUtils=ht,Object.freeze(je);const Ue=17825792;let Ve=st.allocate(Ue);function ze(t){Ve.length<t&&(Ve=st.allocate(t))}function qe(t,e={}){const n="boolean"==typeof e.checkKeys&&e.checkKeys,r="boolean"==typeof e.serializeFunctions&&e.serializeFunctions,i="boolean"!=typeof e.ignoreUndefined||e.ignoreUndefined,s="number"==typeof e.minInternalBufferSize?e.minInternalBufferSize:Ue;Ve.length<s&&(Ve=st.allocate(s));const o=Ce(Ve,t,n,0,r,i,null),a=st.allocateUnsafe(o);return a.set(Ve.subarray(0,o),0),a}function $e(t,e,n={}){const r="boolean"==typeof n.checkKeys&&n.checkKeys,i="boolean"==typeof n.serializeFunctions&&n.serializeFunctions,s="boolean"!=typeof n.ignoreUndefined||n.ignoreUndefined,o="number"==typeof n.index?n.index:0,a=Ce(Ve,t,r,0,i,s,null);return e.set(Ve.subarray(0,a),o),o+a-1}function He(t,e={}){return re(st.toLocalBufferType(t),e)}function Ke(t,e={}){return function(t,e,n){const r=[{obj:t,ignoreUndefined:n??!1}];let i=0;for(;r.length>0;){const{obj:t,ignoreUndefined:n}=r.pop();i+=5;const s=Array.isArray(t),o=!s&&(t instanceof Map||l(t));let a=t;if(s||o||"function"!=typeof t?.toBSON||(a=t.toBSON()),s){const t=a;for(let s=0;s<t.length;s++)i+=Xt(s.toString(),t[s],e,!0,n,r)}else if(o)for(const[t,s]of a)i+=Xt(t,s,e,!1,n,r);else for(const t of Object.keys(a))i+=Xt(t,a[t],e,!1,n,r)}return i}(t,"boolean"==typeof(e=e||{}).serializeFunctions&&e.serializeFunctions,"boolean"!=typeof e.ignoreUndefined||e.ignoreUndefined)}function Ye(t,e,n,r,i,s){const o=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},s),a=st.toLocalBufferType(t);let l=e;for(let t=0;t<n;t++){const e=ht.getInt32LE(a,l);o.index=l,r[i+t]=re(a,o),l+=e}return l}var We=Object.freeze({__proto__:null,BSONError:q,BSONOffsetError:K,BSONRegExp:Gt,BSONRuntimeError:H,BSONSymbol:Zt,BSONType:z,BSONValue:at,BSONVersionError:$,Binary:pt,ByteUtils:st,Code:gt,DBRef:bt,Decimal128:Vt,Double:zt,EJSON:Be,Int32:qt,Long:Ct,MaxKey:$t,MinKey:Ht,NumberUtils:ht,ObjectId:Jt,Timestamp:te,UUID:yt,bsonType:ot,calculateObjectSize:Ke,deserialize:He,deserializeStream:Ye,onDemand:je,serialize:qe,serializeWithBufferAndIndex:$e,setInternalBufferSize:ze});e.BSON=We,e.BSONError=q,e.BSONOffsetError=K,e.BSONRegExp=Gt,e.BSONRuntimeError=H,e.BSONSymbol=Zt,e.BSONType=z,e.BSONValue=at,e.BSONVersionError=$,e.Binary=pt,e.ByteUtils=st,e.Code=gt,e.DBRef=bt,e.Decimal128=Vt,e.Double=zt,e.EJSON=Be,e.Int32=qt,e.Long=Ct,e.MaxKey=$t,e.MinKey=Ht,e.NumberUtils=ht,e.ObjectId=Jt,e.Timestamp=te,e.UUID=yt,e.bsonType=ot,e.calculateObjectSize=Ke,e.deserialize=He,e.deserializeStream=Ye,e.onDemand=je,e.serialize=qe,e.serializeWithBufferAndIndex=$e,e.setInternalBufferSize=ze},13679:(t,e,n)=>{var r=n(15088).process,i=n(6708);(0,i.default)("ArgumentPlaceholder",{}),(0,i.default)("BindExpression",{visitor:["object","callee"],aliases:["Expression"],fields:r.env.BABEL_TYPES_8_BREAKING?{object:{validate:(0,i.assertNodeType)("Expression")},callee:{validate:(0,i.assertNodeType)("Expression")}}:{object:{validate:Object.assign((()=>{}),{oneOfNodeTypes:["Expression"]})},callee:{validate:Object.assign((()=>{}),{oneOfNodeTypes:["Expression"]})}}}),(0,i.default)("Decorator",{visitor:["expression"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}}}),(0,i.default)("DoExpression",{visitor:["body"],builder:["body","async"],aliases:["Expression"],fields:{body:{validate:(0,i.assertNodeType)("BlockStatement")},async:{validate:(0,i.assertValueType)("boolean"),default:!1}}}),(0,i.default)("ExportDefaultSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,i.assertNodeType)("Identifier")}}}),(0,i.default)("RecordExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,i.validateArrayOfType)("ObjectProperty","SpreadElement")}}),(0,i.default)("TupleExpression",{fields:{elements:{validate:(0,i.arrayOfType)("Expression","SpreadElement"),default:[]}},visitor:["elements"],aliases:["Expression"]}),(0,i.default)("DecimalLiteral",{builder:["value"],fields:{value:{validate:(0,i.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),(0,i.default)("ModuleExpression",{visitor:["body"],fields:{body:{validate:(0,i.assertNodeType)("Program")}},aliases:["Expression"]}),(0,i.default)("TopicReference",{aliases:["Expression"]}),(0,i.default)("PipelineTopicExpression",{builder:["expression"],visitor:["expression"],fields:{expression:{validate:(0,i.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,i.default)("PipelineBareFunction",{builder:["callee"],visitor:["callee"],fields:{callee:{validate:(0,i.assertNodeType)("Expression")}},aliases:["Expression"]}),(0,i.default)("PipelinePrimaryTopicReference",{aliases:["Expression"]}),(0,i.default)("VoidPattern",{aliases:["Pattern","PatternLike","FunctionParameter"]})},14552:(t,e,n)=>{e.Ay=void 0;var r=n(8732),i=n(52260);e.Ay=function(t,e={},n){const s=function(t,e,n){var r;if(e.experimental_preserveFormat){if("string"!=typeof t)throw new Error("`experimental_preserveFormat` requires the original `code` to be passed to @babel/generator as a string");if(!e.retainLines)throw new Error("`experimental_preserveFormat` requires `retainLines` to be set to `true`");if(e.compact&&"auto"!==e.compact)throw new Error("`experimental_preserveFormat` is not compatible with the `compact` option");if(e.minified)throw new Error("`experimental_preserveFormat` is not compatible with the `minified` option");if(e.jsescOption)throw new Error("`experimental_preserveFormat` is not compatible with the `jsescOption` option");if(!Array.isArray(n.tokens))throw new Error("`experimental_preserveFormat` requires the AST to have attached the token of the input code. Make sure to enable the `tokens: true` parser option.")}const i={auxiliaryCommentBefore:e.auxiliaryCommentBefore,auxiliaryCommentAfter:e.auxiliaryCommentAfter,shouldPrintComment:e.shouldPrintComment,preserveFormat:e.experimental_preserveFormat,retainLines:e.retainLines,retainFunctionParens:e.retainFunctionParens,comments:null==e.comments||e.comments,compact:e.compact,minified:e.minified,concise:e.concise,indent:{adjustMultilineComment:!0,style:" "},jsescOption:Object.assign({quotes:"double",wrap:!0,minimal:!1},e.jsescOption),topicToken:e.topicToken};i.decoratorsBeforeExport=e.decoratorsBeforeExport,i.jsescOption.json=e.jsonCompatibleStrings,i.recordAndTupleSyntaxType=null!=(r=e.recordAndTupleSyntaxType)?r:"hash",i.importAttributesKeyword=e.importAttributesKeyword,i.minified?(i.compact=!0,i.shouldPrintComment=i.shouldPrintComment||(()=>i.comments)):i.shouldPrintComment=i.shouldPrintComment||(t=>i.comments||t.includes("@license")||t.includes("@preserve")),"auto"===i.compact&&(i.compact="string"==typeof t&&t.length>5e5,i.compact&&console.error(`[BABEL] Note: The code generator has deoptimised the styling of ${e.filename} as it exceeds the max of 500KB.`)),(i.compact||i.preserveFormat)&&(i.indent.adjustMultilineComment=!1);const{auxiliaryCommentBefore:s,auxiliaryCommentAfter:o,shouldPrintComment:a}=i;return s&&!a(s)&&(i.auxiliaryCommentBefore=void 0),o&&!a(o)&&(i.auxiliaryCommentAfter=void 0),i}(n,e,t),o=e.sourceMaps?new r.default(e,n):null;return new i.default(s,o,t.tokens,"string"==typeof n?n:null).generate(t)}},14669:(t,e,n)=>{var r=n(34110).Buffer;t.exports=function(t,e){for(var n=Math.min(t.length,e.length),i=new r(n),s=0;s<n;++s)i[s]=t[s]^e[s];return i}},14852:(t,e,n)=>{var r=n(59767);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},14868:(t,e,n)=>{var r=n(51192),i=n(59767),s=n(69959),o=n(79567),a=r.structuredClone;t.exports=!!a&&!i((function(){if("DENO"===o&&s>92||"NODE"===o&&s>94||"BROWSER"===o&&s>97)return!1;var t=new ArrayBuffer(8),e=a(t,{transfer:[t]});return 0!==t.byteLength||8!==e.byteLength}))},15166:(t,e,n)=>{var r=n(15088).process;Object.defineProperty(e,"__esModule",{value:!0}),e.patternLikeCommon=e.importAttributes=e.functionTypeAnnotationCommon=e.functionDeclarationCommon=e.functionCommon=e.classMethodOrPropertyUnionShapeCommon=e.classMethodOrPropertyCommon=e.classMethodOrDeclareMethodCommon=void 0;var i=n(93308),s=n(67583),o=n(32960),a=n(62349),l=n(19910),c=n(6708);const u=(t=!1)=>({unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,c.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:t?(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"):(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral")}}}]}});e.classMethodOrPropertyUnionShapeCommon=u;const h=(0,c.defineAliasedType)("Standardized");h("ArrayExpression",{fields:{elements:{validate:(0,c.arrayOf)((0,c.assertNodeOrValueType)("null","Expression","SpreadElement")),default:r.env.BABEL_TYPES_8_BREAKING?void 0:[]}},visitor:["elements"],aliases:["Expression"]}),h("AssignmentExpression",{fields:{operator:{validate:r.env.BABEL_TYPES_8_BREAKING?Object.assign(function(){const t=(0,c.assertOneOf)(...l.ASSIGNMENT_OPERATORS),e=(0,c.assertOneOf)("=");return function(n,r,s){((0,i.default)("Pattern",n.left)?e:t)(n,r,s)}}(),{oneOf:l.ASSIGNMENT_OPERATORS}):(0,c.assertValueType)("string")},left:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.assertNodeType)("Identifier","MemberExpression","OptionalMemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,c.assertNodeType)("LVal","OptionalMemberExpression")},right:{validate:(0,c.assertNodeType)("Expression")}},builder:["operator","left","right"],visitor:["left","right"],aliases:["Expression"]}),h("BinaryExpression",{builder:["operator","left","right"],fields:{operator:{validate:(0,c.assertOneOf)(...l.BINARY_OPERATORS)},left:{validate:function(){const t=(0,c.assertNodeType)("Expression"),e=(0,c.assertNodeType)("Expression","PrivateName");return Object.assign((function(n,r,i){("in"===n.operator?e:t)(n,r,i)}),{oneOfNodeTypes:["Expression","PrivateName"]})}()},right:{validate:(0,c.assertNodeType)("Expression")}},visitor:["left","right"],aliases:["Binary","Expression"]}),h("InterpreterDirective",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}}}),h("Directive",{visitor:["value"],fields:{value:{validate:(0,c.assertNodeType)("DirectiveLiteral")}}}),h("DirectiveLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}}}),h("BlockStatement",{builder:["body","directives"],visitor:["directives","body"],fields:{directives:{validate:(0,c.arrayOfType)("Directive"),default:[]},body:(0,c.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block","Statement"]}),h("BreakStatement",{visitor:["label"],fields:{label:{validate:(0,c.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),h("CallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,c.assertNodeType)("Expression","Super","V8IntrinsicIdentifier")},arguments:(0,c.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),typeArguments:{validate:(0,c.assertNodeType)("TypeParameterInstantiation"),optional:!0}},r.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,c.assertValueType)("boolean"),optional:!0},typeParameters:{validate:(0,c.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),h("CatchClause",{visitor:["param","body"],fields:{param:{validate:(0,c.assertNodeType)("Identifier","ArrayPattern","ObjectPattern"),optional:!0},body:{validate:(0,c.assertNodeType)("BlockStatement")}},aliases:["Scopable","BlockParent"]}),h("ConditionalExpression",{visitor:["test","consequent","alternate"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Expression")},alternate:{validate:(0,c.assertNodeType)("Expression")}},aliases:["Expression","Conditional"]}),h("ContinueStatement",{visitor:["label"],fields:{label:{validate:(0,c.assertNodeType)("Identifier"),optional:!0}},aliases:["Statement","Terminatorless","CompletionStatement"]}),h("DebuggerStatement",{aliases:["Statement"]}),h("DoWhileStatement",{builder:["test","body"],visitor:["body","test"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},body:{validate:(0,c.assertNodeType)("Statement")}},aliases:["Statement","BlockParent","Loop","While","Scopable"]}),h("EmptyStatement",{aliases:["Statement"]}),h("ExpressionStatement",{visitor:["expression"],fields:{expression:{validate:(0,c.assertNodeType)("Expression")}},aliases:["Statement","ExpressionWrapper"]}),h("File",{builder:["program","comments","tokens"],visitor:["program"],fields:{program:{validate:(0,c.assertNodeType)("Program")},comments:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.assertEach)((0,c.assertNodeType)("CommentBlock","CommentLine")):Object.assign((()=>{}),{each:{oneOfNodeTypes:["CommentBlock","CommentLine"]}}),optional:!0},tokens:{validate:(0,c.assertEach)(Object.assign((()=>{}),{type:"any"})),optional:!0}}}),h("ForInStatement",{visitor:["left","right","body"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.assertNodeType)("VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,c.assertNodeType)("VariableDeclaration","LVal")},right:{validate:(0,c.assertNodeType)("Expression")},body:{validate:(0,c.assertNodeType)("Statement")}}}),h("ForStatement",{visitor:["init","test","update","body"],aliases:["Scopable","Statement","For","BlockParent","Loop"],fields:{init:{validate:(0,c.assertNodeType)("VariableDeclaration","Expression"),optional:!0},test:{validate:(0,c.assertNodeType)("Expression"),optional:!0},update:{validate:(0,c.assertNodeType)("Expression"),optional:!0},body:{validate:(0,c.assertNodeType)("Statement")}}});const p=()=>({params:(0,c.validateArrayOfType)("FunctionParameter"),generator:{default:!1},async:{default:!1}});e.functionCommon=p;const d=()=>({returnType:{validate:(0,c.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,c.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0}});e.functionTypeAnnotationCommon=d;const f=()=>Object.assign({},p(),{declare:{validate:(0,c.assertValueType)("boolean"),optional:!0},id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0}});e.functionDeclarationCommon=f,h("FunctionDeclaration",{builder:["id","params","body","generator","async"],visitor:["id","typeParameters","params","predicate","returnType","body"],fields:Object.assign({},f(),d(),{body:{validate:(0,c.assertNodeType)("BlockStatement")},predicate:{validate:(0,c.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}}),aliases:["Scopable","Function","BlockParent","FunctionParent","Statement","Pureish","Declaration"],validate:r.env.BABEL_TYPES_8_BREAKING?function(){const t=(0,c.assertNodeType)("Identifier");return function(e,n,r){(0,i.default)("ExportDefaultDeclaration",e)||t(r,"id",r.id)}}():void 0}),h("FunctionExpression",{inherits:"FunctionDeclaration",aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},p(),d(),{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},body:{validate:(0,c.assertNodeType)("BlockStatement")},predicate:{validate:(0,c.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})});const m=()=>({typeAnnotation:{validate:(0,c.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},optional:{validate:(0,c.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0}});e.patternLikeCommon=m,h("Identifier",{builder:["name"],visitor:["typeAnnotation","decorators"],aliases:["Expression","FunctionParameter","PatternLike","LVal","TSEntityName"],fields:Object.assign({},m(),{name:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertValueType)("string"),Object.assign((function(t,e,n){if(!(0,s.default)(n,!1))throw new TypeError(`"${n}" is not a valid identifier name`)}),{type:"string"})):(0,c.assertValueType)("string")}}),validate:r.env.BABEL_TYPES_8_BREAKING?function(t,e,n){const r=/\.(\w+)$/.exec(e.toString());if(!r)return;const[,s]=r,a={computed:!1};if("property"===s){if((0,i.default)("MemberExpression",t,a))return;if((0,i.default)("OptionalMemberExpression",t,a))return}else if("key"===s){if((0,i.default)("Property",t,a))return;if((0,i.default)("Method",t,a))return}else if("exported"===s){if((0,i.default)("ExportSpecifier",t))return}else if("imported"===s){if((0,i.default)("ImportSpecifier",t,{imported:n}))return}else if("meta"===s&&(0,i.default)("MetaProperty",t,{meta:n}))return;if(((0,o.isKeyword)(n.name)||(0,o.isReservedWord)(n.name,!1))&&"this"!==n.name)throw new TypeError(`"${n.name}" is not a valid identifier`)}:void 0}),h("IfStatement",{visitor:["test","consequent","alternate"],aliases:["Statement","Conditional"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},consequent:{validate:(0,c.assertNodeType)("Statement")},alternate:{optional:!0,validate:(0,c.assertNodeType)("Statement")}}}),h("LabeledStatement",{visitor:["label","body"],aliases:["Statement"],fields:{label:{validate:(0,c.assertNodeType)("Identifier")},body:{validate:(0,c.assertNodeType)("Statement")}}}),h("StringLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),h("NumericLiteral",{builder:["value"],deprecatedAlias:"NumberLiteral",fields:{value:{validate:(0,c.chain)((0,c.assertValueType)("number"),Object.assign((function(t,e,n){(1/n<0||!Number.isFinite(n))&&new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${n}) instead.`)}),{type:"number"}))}},aliases:["Expression","Pureish","Literal","Immutable"]}),h("NullLiteral",{aliases:["Expression","Pureish","Literal","Immutable"]}),h("BooleanLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("boolean")}},aliases:["Expression","Pureish","Literal","Immutable"]}),h("RegExpLiteral",{builder:["pattern","flags"],deprecatedAlias:"RegexLiteral",aliases:["Expression","Pureish","Literal"],fields:{pattern:{validate:(0,c.assertValueType)("string")},flags:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertValueType)("string"),Object.assign((function(t,e,n){const r=/[^dgimsuvy]/.exec(n);if(r)throw new TypeError(`"${r[0]}" is not a valid RegExp flag`)}),{type:"string"})):(0,c.assertValueType)("string"),default:""}}}),h("LogicalExpression",{builder:["operator","left","right"],visitor:["left","right"],aliases:["Binary","Expression"],fields:{operator:{validate:(0,c.assertOneOf)(...l.LOGICAL_OPERATORS)},left:{validate:(0,c.assertNodeType)("Expression")},right:{validate:(0,c.assertNodeType)("Expression")}}}),h("MemberExpression",{builder:["object","property","computed",...r.env.BABEL_TYPES_8_BREAKING?[]:["optional"]],visitor:["object","property"],aliases:["Expression","LVal","PatternLike"],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{property:{validate:(0,c.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{property:{validate:(0,c.assertNodeType)("Identifier","PrivateName")}}}]},fields:Object.assign({object:{validate:(0,c.assertNodeType)("Expression","Super")},property:{validate:function(){const t=(0,c.assertNodeType)("Identifier","PrivateName"),e=(0,c.assertNodeType)("Expression"),n=function(n,r,i){(n.computed?e:t)(n,r,i)};return n.oneOfNodeTypes=["Expression","Identifier","PrivateName"],n}()},computed:{default:!1}},r.env.BABEL_TYPES_8_BREAKING?{}:{optional:{validate:(0,c.assertValueType)("boolean"),optional:!0}})}),h("NewExpression",{inherits:"CallExpression"}),h("Program",{visitor:["directives","body"],builder:["body","directives","sourceType","interpreter"],fields:{sourceType:{validate:(0,c.assertOneOf)("script","module"),default:"script"},interpreter:{validate:(0,c.assertNodeType)("InterpreterDirective"),default:null,optional:!0},directives:{validate:(0,c.arrayOfType)("Directive"),default:[]},body:(0,c.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","Block"]}),h("ObjectExpression",{visitor:["properties"],aliases:["Expression"],fields:{properties:(0,c.validateArrayOfType)("ObjectMethod","ObjectProperty","SpreadElement")}}),h("ObjectMethod",Object.assign({builder:["kind","key","params","body","computed","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},u(),{fields:Object.assign({},p(),d(),{kind:Object.assign({validate:(0,c.assertOneOf)("method","get","set")},r.env.BABEL_TYPES_8_BREAKING?{}:{default:"method"}),computed:{default:!1},key:{validate:function(){const t=(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=(0,c.assertNodeType)("Expression"),n=function(n,r,i){(n.computed?e:t)(n,r,i)};return n.oneOfNodeTypes=["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral"],n}()},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0},body:{validate:(0,c.assertNodeType)("BlockStatement")}}),aliases:["UserWhitespacable","Function","Scopable","BlockParent","FunctionParent","Method","ObjectMember"]})),h("ObjectProperty",{builder:["key","value","computed","shorthand",...r.env.BABEL_TYPES_8_BREAKING?[]:["decorators"]],unionShape:{discriminator:"computed",shapes:[{name:"computed",value:[!0],properties:{key:{validate:(0,c.assertNodeType)("Expression")}}},{name:"nonComputed",value:[!1],properties:{key:{validate:(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName")}}}]},fields:{computed:{default:!1},key:{validate:function(){const t=(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"),e=(0,c.assertNodeType)("Expression");return Object.assign((function(n,r,i){(n.computed?e:t)(n,r,i)}),{oneOfNodeTypes:["Expression","Identifier","StringLiteral","NumericLiteral","BigIntLiteral","DecimalLiteral","PrivateName"]})}()},value:{validate:(0,c.assertNodeType)("Expression","PatternLike")},shorthand:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertValueType)("boolean"),Object.assign((function(t,e,n){if(n){if(t.computed)throw new TypeError("Property shorthand of ObjectProperty cannot be true if computed is true");if(!(0,i.default)("Identifier",t.key))throw new TypeError("Property shorthand of ObjectProperty cannot be true if key is not an Identifier")}}),{type:"boolean"})):(0,c.assertValueType)("boolean"),default:!1},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0}},visitor:["decorators","key","value"],aliases:["UserWhitespacable","Property","ObjectMember"],validate:r.env.BABEL_TYPES_8_BREAKING?function(){const t=(0,c.assertNodeType)("Identifier","Pattern","TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"),e=(0,c.assertNodeType)("Expression");return function(n,r,s){((0,i.default)("ObjectPattern",n)?t:e)(s,"value",s.value)}}():void 0}),h("RestElement",{visitor:["argument","typeAnnotation"],builder:["argument"],aliases:["FunctionParameter","PatternLike","LVal"],deprecatedAlias:"RestProperty",fields:Object.assign({},m(),{argument:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"):(0,c.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression","RestElement","AssignmentPattern")}}),validate:r.env.BABEL_TYPES_8_BREAKING?function(t,e){const n=/(\w+)\[(\d+)\]/.exec(e.toString());if(!n)throw new Error("Internal Babel error: malformed key.");const[,r,i]=n;if(t[r].length>+i+1)throw new TypeError(`RestElement must be last element of ${r}`)}:void 0}),h("ReturnStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,c.assertNodeType)("Expression"),optional:!0}}}),h("SequenceExpression",{visitor:["expressions"],fields:{expressions:(0,c.validateArrayOfType)("Expression")},aliases:["Expression"]}),h("ParenthesizedExpression",{visitor:["expression"],aliases:["Expression","ExpressionWrapper"],fields:{expression:{validate:(0,c.assertNodeType)("Expression")}}}),h("SwitchCase",{visitor:["test","consequent"],fields:{test:{validate:(0,c.assertNodeType)("Expression"),optional:!0},consequent:(0,c.validateArrayOfType)("Statement")}}),h("SwitchStatement",{visitor:["discriminant","cases"],aliases:["Statement","BlockParent","Scopable"],fields:{discriminant:{validate:(0,c.assertNodeType)("Expression")},cases:(0,c.validateArrayOfType)("SwitchCase")}}),h("ThisExpression",{aliases:["Expression"]}),h("ThrowStatement",{visitor:["argument"],aliases:["Statement","Terminatorless","CompletionStatement"],fields:{argument:{validate:(0,c.assertNodeType)("Expression")}}}),h("TryStatement",{visitor:["block","handler","finalizer"],aliases:["Statement"],fields:{block:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertNodeType)("BlockStatement"),Object.assign((function(t){if(!t.handler&&!t.finalizer)throw new TypeError("TryStatement expects either a handler or finalizer, or both")}),{oneOfNodeTypes:["BlockStatement"]})):(0,c.assertNodeType)("BlockStatement")},handler:{optional:!0,validate:(0,c.assertNodeType)("CatchClause")},finalizer:{optional:!0,validate:(0,c.assertNodeType)("BlockStatement")}}}),h("UnaryExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!0},argument:{validate:(0,c.assertNodeType)("Expression")},operator:{validate:(0,c.assertOneOf)(...l.UNARY_OPERATORS)}},visitor:["argument"],aliases:["UnaryLike","Expression"]}),h("UpdateExpression",{builder:["operator","argument","prefix"],fields:{prefix:{default:!1},argument:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.assertNodeType)("Identifier","MemberExpression"):(0,c.assertNodeType)("Expression")},operator:{validate:(0,c.assertOneOf)(...l.UPDATE_OPERATORS)}},visitor:["argument"],aliases:["Expression"]}),h("VariableDeclaration",{builder:["kind","declarations"],visitor:["declarations"],aliases:["Statement","Declaration"],fields:{declare:{validate:(0,c.assertValueType)("boolean"),optional:!0},kind:{validate:(0,c.assertOneOf)("var","let","const","using","await using")},declarations:(0,c.validateArrayOfType)("VariableDeclarator")},validate:r.env.BABEL_TYPES_8_BREAKING?(()=>{const t=(0,c.assertNodeType)("Identifier","Placeholder"),e=(0,c.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","Placeholder"),n=(0,c.assertNodeType)("Identifier","VoidPattern","Placeholder");return function(r,s,o){const{kind:a,declarations:l}=o,c=(0,i.default)("ForXStatement",r,{left:o});if(c&&1!==l.length)throw new TypeError(`Exactly one VariableDeclarator is required in the VariableDeclaration of a ${r.type}`);for(const r of l)"const"===a||"let"===a||"var"===a?c||r.init?e(r,"id",r.id):t(r,"id",r.id):n(r,"id",r.id)}})():void 0}),h("VariableDeclarator",{visitor:["id","init"],fields:{id:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.assertNodeType)("Identifier","ArrayPattern","ObjectPattern","VoidPattern"):(0,c.assertNodeType)("LVal","VoidPattern")},definite:{optional:!0,validate:(0,c.assertValueType)("boolean")},init:{optional:!0,validate:(0,c.assertNodeType)("Expression")}}}),h("WhileStatement",{visitor:["test","body"],aliases:["Statement","BlockParent","Loop","While","Scopable"],fields:{test:{validate:(0,c.assertNodeType)("Expression")},body:{validate:(0,c.assertNodeType)("Statement")}}}),h("WithStatement",{visitor:["object","body"],aliases:["Statement"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},body:{validate:(0,c.assertNodeType)("Statement")}}}),h("AssignmentPattern",{visitor:["left","right","decorators"],builder:["left","right"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},m(),{left:{validate:(0,c.assertNodeType)("Identifier","ObjectPattern","ArrayPattern","MemberExpression","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression")},right:{validate:(0,c.assertNodeType)("Expression")},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0}})}),h("ArrayPattern",{visitor:["elements","typeAnnotation"],builder:["elements"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},m(),{elements:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeOrValueType)("null","PatternLike")))}})}),h("ArrowFunctionExpression",{builder:["params","body","async"],visitor:["typeParameters","params","predicate","returnType","body"],aliases:["Scopable","Function","BlockParent","FunctionParent","Expression","Pureish"],fields:Object.assign({},p(),d(),{expression:{validate:(0,c.assertValueType)("boolean")},body:{validate:(0,c.assertNodeType)("BlockStatement","Expression")},predicate:{validate:(0,c.assertNodeType)("DeclaredPredicate","InferredPredicate"),optional:!0}})}),h("ClassBody",{visitor:["body"],fields:{body:(0,c.validateArrayOfType)("ClassMethod","ClassPrivateMethod","ClassProperty","ClassPrivateProperty","ClassAccessorProperty","TSDeclareMethod","TSIndexSignature","StaticBlock")}}),h("ClassExpression",{builder:["id","superClass","body","decorators"],visitor:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body"],aliases:["Scopable","Class","Expression"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,c.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,c.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,c.assertNodeType)("Expression")},superTypeParameters:{validate:(0,c.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,c.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,c.assertNodeType)("InterfaceExtends"),optional:!0}}}),h("ClassDeclaration",{inherits:"ClassExpression",aliases:["Scopable","Class","Statement","Declaration"],fields:{id:{validate:(0,c.assertNodeType)("Identifier"),optional:!0},typeParameters:{validate:(0,c.assertNodeType)("TypeParameterDeclaration","TSTypeParameterDeclaration","Noop"),optional:!0},body:{validate:(0,c.assertNodeType)("ClassBody")},superClass:{optional:!0,validate:(0,c.assertNodeType)("Expression")},superTypeParameters:{validate:(0,c.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0},implements:{validate:(0,c.arrayOfType)("TSExpressionWithTypeArguments","ClassImplements"),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0},mixins:{validate:(0,c.assertNodeType)("InterfaceExtends"),optional:!0},declare:{validate:(0,c.assertValueType)("boolean"),optional:!0},abstract:{validate:(0,c.assertValueType)("boolean"),optional:!0}},validate:r.env.BABEL_TYPES_8_BREAKING?function(){const t=(0,c.assertNodeType)("Identifier");return function(e,n,r){(0,i.default)("ExportDefaultDeclaration",e)||t(r,"id",r.id)}}():void 0});const y=e.importAttributes={attributes:{optional:!0,validate:(0,c.arrayOfType)("ImportAttribute")}};y.assertions={deprecated:!0,optional:!0,validate:(0,c.arrayOfType)("ImportAttribute")},h("ExportAllDeclaration",{builder:["source","attributes"],visitor:["source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({source:{validate:(0,c.assertNodeType)("StringLiteral")},exportKind:(0,c.validateOptional)((0,c.assertOneOf)("type","value"))},y)}),h("ExportDefaultDeclaration",{visitor:["declaration"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:{declaration:(0,c.validateType)("TSDeclareFunction","FunctionDeclaration","ClassDeclaration","Expression"),exportKind:(0,c.validateOptional)((0,c.assertOneOf)("value"))}}),h("ExportNamedDeclaration",{builder:["declaration","specifiers","source","attributes"],visitor:["declaration","specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration","ExportDeclaration"],fields:Object.assign({declaration:{optional:!0,validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertNodeType)("Declaration"),Object.assign((function(t,e,n){if(n&&t.specifiers.length)throw new TypeError("Only declaration or specifiers is allowed on ExportNamedDeclaration");if(n&&t.source)throw new TypeError("Cannot export a declaration from a source")}),{oneOfNodeTypes:["Declaration"]})):(0,c.assertNodeType)("Declaration")}},y,{specifiers:{default:[],validate:(0,c.arrayOf)(function(){const t=(0,c.assertNodeType)("ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"),e=(0,c.assertNodeType)("ExportSpecifier");return r.env.BABEL_TYPES_8_BREAKING?Object.assign((function(n,r,i){(n.source?t:e)(n,r,i)}),{oneOfNodeTypes:["ExportSpecifier","ExportDefaultSpecifier","ExportNamespaceSpecifier"]}):t}())},source:{validate:(0,c.assertNodeType)("StringLiteral"),optional:!0},exportKind:(0,c.validateOptional)((0,c.assertOneOf)("type","value"))})}),h("ExportSpecifier",{visitor:["local","exported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,c.assertNodeType)("Identifier")},exported:{validate:(0,c.assertNodeType)("Identifier","StringLiteral")},exportKind:{validate:(0,c.assertOneOf)("type","value"),optional:!0}}}),h("ForOfStatement",{visitor:["left","right","body"],builder:["left","right","body","await"],aliases:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],fields:{left:{validate:function(){if(!r.env.BABEL_TYPES_8_BREAKING)return(0,c.assertNodeType)("VariableDeclaration","LVal");const t=(0,c.assertNodeType)("VariableDeclaration"),e=(0,c.assertNodeType)("Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression");return Object.assign((function(n,r,s){(0,i.default)("VariableDeclaration",s)?t(n,r,s):e(n,r,s)}),{oneOfNodeTypes:["VariableDeclaration","Identifier","MemberExpression","ArrayPattern","ObjectPattern","TSAsExpression","TSSatisfiesExpression","TSTypeAssertion","TSNonNullExpression"]})}()},right:{validate:(0,c.assertNodeType)("Expression")},body:{validate:(0,c.assertNodeType)("Statement")},await:{default:!1}}}),h("ImportDeclaration",{builder:["specifiers","source","attributes"],visitor:["specifiers","source","attributes","assertions"],aliases:["Statement","Declaration","ImportOrExportDeclaration"],fields:Object.assign({},y,{module:{optional:!0,validate:(0,c.assertValueType)("boolean")},phase:{default:null,validate:(0,c.assertOneOf)("source","defer")},specifiers:(0,c.validateArrayOfType)("ImportSpecifier","ImportDefaultSpecifier","ImportNamespaceSpecifier"),source:{validate:(0,c.assertNodeType)("StringLiteral")},importKind:{validate:(0,c.assertOneOf)("type","typeof","value"),optional:!0}})}),h("ImportDefaultSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,c.assertNodeType)("Identifier")}}}),h("ImportNamespaceSpecifier",{visitor:["local"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,c.assertNodeType)("Identifier")}}}),h("ImportSpecifier",{visitor:["imported","local"],builder:["local","imported"],aliases:["ModuleSpecifier"],fields:{local:{validate:(0,c.assertNodeType)("Identifier")},imported:{validate:(0,c.assertNodeType)("Identifier","StringLiteral")},importKind:{validate:(0,c.assertOneOf)("type","typeof","value"),optional:!0}}}),h("ImportExpression",{visitor:["source","options"],aliases:["Expression"],fields:{phase:{default:null,validate:(0,c.assertOneOf)("source","defer")},source:{validate:(0,c.assertNodeType)("Expression")},options:{validate:(0,c.assertNodeType)("Expression"),optional:!0}}}),h("MetaProperty",{visitor:["meta","property"],aliases:["Expression"],fields:{meta:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertNodeType)("Identifier"),Object.assign((function(t,e,n){let r;switch(n.name){case"function":r="sent";break;case"new":r="target";break;case"import":r="meta"}if(!(0,i.default)("Identifier",t.property,{name:r}))throw new TypeError("Unrecognised MetaProperty")}),{oneOfNodeTypes:["Identifier"]})):(0,c.assertNodeType)("Identifier")},property:{validate:(0,c.assertNodeType)("Identifier")}}});const g=()=>({abstract:{validate:(0,c.assertValueType)("boolean"),optional:!0},accessibility:{validate:(0,c.assertOneOf)("public","private","protected"),optional:!0},static:{default:!1},override:{default:!1},computed:{default:!1},optional:{validate:(0,c.assertValueType)("boolean"),optional:!0},key:{validate:(0,c.chain)(function(){const t=(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral"),e=(0,c.assertNodeType)("Expression");return function(n,r,i){(n.computed?e:t)(n,r,i)}}(),(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression"))}});e.classMethodOrPropertyCommon=g;const v=()=>Object.assign({},p(),g(),{params:(0,c.validateArrayOfType)("FunctionParameter","TSParameterProperty"),kind:{validate:(0,c.assertOneOf)("get","set","method","constructor"),default:"method"},access:{validate:(0,c.chain)((0,c.assertValueType)("string"),(0,c.assertOneOf)("public","private","protected")),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0}});e.classMethodOrDeclareMethodCommon=v,h("ClassMethod",Object.assign({aliases:["Function","Scopable","BlockParent","FunctionParent","Method"],builder:["kind","key","params","body","computed","static","generator","async"],visitor:["decorators","key","typeParameters","params","returnType","body"]},u(),{fields:Object.assign({},v(),d(),{body:{validate:(0,c.assertNodeType)("BlockStatement")}})})),h("ObjectPattern",{visitor:["decorators","properties","typeAnnotation"],builder:["properties"],aliases:["FunctionParameter","Pattern","PatternLike","LVal"],fields:Object.assign({},m(),{properties:(0,c.validateArrayOfType)("RestElement","ObjectProperty")})}),h("SpreadElement",{visitor:["argument"],aliases:["UnaryLike"],deprecatedAlias:"SpreadProperty",fields:{argument:{validate:(0,c.assertNodeType)("Expression")}}}),h("Super",{aliases:["Expression"]}),h("TaggedTemplateExpression",{visitor:["tag","typeParameters","quasi"],builder:["tag","quasi"],aliases:["Expression"],fields:{tag:{validate:(0,c.assertNodeType)("Expression")},quasi:{validate:(0,c.assertNodeType)("TemplateLiteral")},typeParameters:{validate:(0,c.assertNodeType)("TypeParameterInstantiation","TSTypeParameterInstantiation"),optional:!0}}}),h("TemplateElement",{builder:["value","tail"],fields:{value:{validate:(0,c.chain)((0,c.assertShape)({raw:{validate:(0,c.assertValueType)("string")},cooked:{validate:(0,c.assertValueType)("string"),optional:!0}}),(function(t){const e=t.value.raw;let n=!1;const r=()=>{throw new Error("Internal @babel/types error.")},{str:i,firstInvalidLoc:s}=(0,a.readStringContents)("template",e,0,0,0,{unterminated(){n=!0},strictNumericEscape:r,invalidEscapeSequence:r,numericSeparatorInEscapeSequence:r,unexpectedNumericSeparator:r,invalidDigit:r,invalidCodePoint:r});if(!n)throw new Error("Invalid raw");t.value.cooked=s?null:i}))},tail:{default:!1}}}),h("TemplateLiteral",{visitor:["quasis","expressions"],aliases:["Expression","Literal"],fields:{quasis:(0,c.validateArrayOfType)("TemplateElement"),expressions:{validate:(0,c.chain)((0,c.assertValueType)("array"),(0,c.assertEach)((0,c.assertNodeType)("Expression","TSType")),(function(t,e,n){if(t.quasis.length!==n.length+1)throw new TypeError(`Number of ${t.type} quasis should be exactly one more than the number of expressions.\nExpected ${n.length+1} quasis but got ${t.quasis.length}`)}))}}}),h("YieldExpression",{builder:["argument","delegate"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{delegate:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertValueType)("boolean"),Object.assign((function(t,e,n){if(n&&!t.argument)throw new TypeError("Property delegate of YieldExpression cannot be true if there is no argument")}),{type:"boolean"})):(0,c.assertValueType)("boolean"),default:!1},argument:{optional:!0,validate:(0,c.assertNodeType)("Expression")}}}),h("AwaitExpression",{builder:["argument"],visitor:["argument"],aliases:["Expression","Terminatorless"],fields:{argument:{validate:(0,c.assertNodeType)("Expression")}}}),h("Import",{aliases:["Expression"]}),h("BigIntLiteral",{builder:["value"],fields:{value:{validate:(0,c.assertValueType)("string")}},aliases:["Expression","Pureish","Literal","Immutable"]}),h("ExportNamespaceSpecifier",{visitor:["exported"],aliases:["ModuleSpecifier"],fields:{exported:{validate:(0,c.assertNodeType)("Identifier")}}}),h("OptionalMemberExpression",{builder:["object","property","computed","optional"],visitor:["object","property"],aliases:["Expression"],fields:{object:{validate:(0,c.assertNodeType)("Expression")},property:{validate:function(){const t=(0,c.assertNodeType)("Identifier"),e=(0,c.assertNodeType)("Expression");return Object.assign((function(n,r,i){(n.computed?e:t)(n,r,i)}),{oneOfNodeTypes:["Expression","Identifier"]})}()},computed:{default:!1},optional:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertValueType)("boolean"),(0,c.assertOptionalChainStart)()):(0,c.assertValueType)("boolean")}}}),h("OptionalCallExpression",{visitor:["callee","typeParameters","typeArguments","arguments"],builder:["callee","arguments","optional"],aliases:["Expression"],fields:Object.assign({callee:{validate:(0,c.assertNodeType)("Expression")},arguments:(0,c.validateArrayOfType)("Expression","SpreadElement","ArgumentPlaceholder"),optional:{validate:r.env.BABEL_TYPES_8_BREAKING?(0,c.chain)((0,c.assertValueType)("boolean"),(0,c.assertOptionalChainStart)()):(0,c.assertValueType)("boolean")},typeArguments:{validate:(0,c.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,c.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),h("ClassProperty",Object.assign({visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property"]},u(),{fields:Object.assign({},g(),{value:{validate:(0,c.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,c.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,c.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,c.assertValueType)("boolean"),optional:!0},declare:{validate:(0,c.assertValueType)("boolean"),optional:!0},variance:{validate:(0,c.assertNodeType)("Variance"),optional:!0}})})),h("ClassAccessorProperty",Object.assign({visitor:["decorators","key","typeAnnotation","value"],builder:["key","value","typeAnnotation","decorators","computed","static"],aliases:["Property","Accessor"]},u(!0),{fields:Object.assign({},g(),{key:{validate:(0,c.chain)(function(){const t=(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","PrivateName"),e=(0,c.assertNodeType)("Expression");return function(n,r,i){(n.computed?e:t)(n,r,i)}}(),(0,c.assertNodeType)("Identifier","StringLiteral","NumericLiteral","BigIntLiteral","Expression","PrivateName"))},value:{validate:(0,c.assertNodeType)("Expression"),optional:!0},definite:{validate:(0,c.assertValueType)("boolean"),optional:!0},typeAnnotation:{validate:(0,c.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0},readonly:{validate:(0,c.assertValueType)("boolean"),optional:!0},declare:{validate:(0,c.assertValueType)("boolean"),optional:!0},variance:{validate:(0,c.assertNodeType)("Variance"),optional:!0}})})),h("ClassPrivateProperty",{visitor:["decorators","variance","key","typeAnnotation","value"],builder:["key","value","decorators","static"],aliases:["Property","Private"],fields:{key:{validate:(0,c.assertNodeType)("PrivateName")},value:{validate:(0,c.assertNodeType)("Expression"),optional:!0},typeAnnotation:{validate:(0,c.assertNodeType)("TypeAnnotation","TSTypeAnnotation","Noop"),optional:!0},decorators:{validate:(0,c.arrayOfType)("Decorator"),optional:!0},static:{validate:(0,c.assertValueType)("boolean"),default:!1},readonly:{validate:(0,c.assertValueType)("boolean"),optional:!0},optional:{validate:(0,c.assertValueType)("boolean"),optional:!0},definite:{validate:(0,c.assertValueType)("boolean"),optional:!0},variance:{validate:(0,c.assertNodeType)("Variance"),optional:!0}}}),h("ClassPrivateMethod",{builder:["kind","key","params","body","static"],visitor:["decorators","key","typeParameters","params","returnType","body"],aliases:["Function","Scopable","BlockParent","FunctionParent","Method","Private"],fields:Object.assign({},v(),d(),{kind:{validate:(0,c.assertOneOf)("get","set","method"),default:"method"},key:{validate:(0,c.assertNodeType)("PrivateName")},body:{validate:(0,c.assertNodeType)("BlockStatement")}})}),h("PrivateName",{visitor:["id"],aliases:["Private"],fields:{id:{validate:(0,c.assertNodeType)("Identifier")}}}),h("StaticBlock",{visitor:["body"],fields:{body:(0,c.validateArrayOfType)("Statement")},aliases:["Scopable","BlockParent","FunctionParent"]}),h("ImportAttribute",{visitor:["key","value"],fields:{key:{validate:(0,c.assertNodeType)("Identifier","StringLiteral")},value:{validate:(0,c.assertNodeType)("StringLiteral")}}})},15256:(t,e,n)=>{var r=n(64983);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},16007:(t,e,n)=>{var r=n(14852),i=n(9824),s=TypeError,o=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(i(t)&&!o(t,"length").writable)throw new s("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},16718:(t,e,n)=>{var r=n(3527).Buffer;function i(t,e,n){for(var r,i,o=-1,a=0;++o<8;)r=e&1<<7-o?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^r))>>o%8,t._prev=s(t._prev,n?r:i);return a}function s(t,e){var n=t.length,i=-1,s=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++i<n;)s[i]=t[i]<<1|t[i+1]>>7;return s}e.encrypt=function(t,e,n){for(var s=e.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(t,e[a],n);return o}},17267:(t,e,n)=>{var r=n(59636),i=n(2269),s=n(26792),o=n(83115)("toStringTag"),a=Object,l="Arguments"===s(function(){return arguments}());t.exports=r?s:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),o))?n:l?s(e):"Object"===(r=s(e))&&i(e.callee)?"Arguments":r}},17777:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=i;var r=n(66360);function i(t,e,n,s){const o=[].concat(t),a=Object.create(null);for(;o.length;){const t=o.shift();if(!t)continue;if(s&&((0,r.isAssignmentExpression)(t)||(0,r.isUnaryExpression)(t)||(0,r.isUpdateExpression)(t)))continue;if((0,r.isIdentifier)(t)){e?(a[t.name]=a[t.name]||[]).push(t):a[t.name]=t;continue}if((0,r.isExportDeclaration)(t)&&!(0,r.isExportAllDeclaration)(t)){(0,r.isDeclaration)(t.declaration)&&o.push(t.declaration);continue}if(n){if((0,r.isFunctionDeclaration)(t)){o.push(t.id);continue}if((0,r.isFunctionExpression)(t))continue}const l=i.keys[t.type];if(l)for(let e=0;e<l.length;e++){const n=t[l[e]];n&&(Array.isArray(n)?o.push(...n):o.push(n))}}return a}i.keys={DeclareClass:["id"],DeclareFunction:["id"],DeclareModule:["id"],DeclareVariable:["id"],DeclareInterface:["id"],DeclareTypeAlias:["id"],DeclareOpaqueType:["id"],InterfaceDeclaration:["id"],TypeAlias:["id"],OpaqueType:["id"],CatchClause:["param"],LabeledStatement:["label"],UnaryExpression:["argument"],AssignmentExpression:["left"],ImportSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDefaultSpecifier:["local"],ImportDeclaration:["specifiers"],TSImportEqualsDeclaration:["id"],ExportSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportDefaultSpecifier:["exported"],FunctionDeclaration:["id","params"],FunctionExpression:["id","params"],ArrowFunctionExpression:["params"],ObjectMethod:["params"],ClassMethod:["params"],ClassPrivateMethod:["params"],ForInStatement:["left"],ForOfStatement:["left"],ClassDeclaration:["id"],ClassExpression:["id"],RestElement:["argument"],UpdateExpression:["argument"],ObjectProperty:["value"],AssignmentPattern:["left"],ArrayPattern:["elements"],ObjectPattern:["properties"],VariableDeclaration:["declarations"],VariableDeclarator:["id"]}},17829:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return!!(0,r.default)(t.type,"Immutable")||!!(0,i.isIdentifier)(t)&&"undefined"===t.name};var r=n(88420),i=n(66360)},17942:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return(!(0,r.isBlockStatement)(t)||!(0,r.isFunction)(e)&&!(0,r.isCatchClause)(e))&&(!(!(0,r.isPattern)(t)||!(0,r.isFunction)(e)&&!(0,r.isCatchClause)(e))||(0,r.isScopable)(t))};var r=n(66360)},18102:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(95167),o=n(22159),a=n(71725),l=n(34526),c=n(89491),u=n(28009),h=c((function(t){var e=this;return new t((function(n,r){var o=function(t){e.done=!0,r(t)},a=function(){try{t.resolve(s(i(e.next,e.iterator))).then((function(t){try{s(t).done?(e.done=!0,n(u(void 0,!0))):e.remaining?(e.remaining--,a()):n(u(t.value,!1))}catch(t){o(t)}}),o)}catch(t){o(t)}};a()}))}));r({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{drop:function(t){s(this);var e=l(a(+t));return new h(o(this),{remaining:e})}})},18782:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,r.default)("leadingComments",t,e)};var r=n(34349)},18832:(t,e,n)=>{var r=n(59767);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},19415:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e=!0,n=!1){return l(t,e,n,new Map)};var r=n(49625),i=n(66360);const{hasOwn:s}={hasOwn:Function.call.bind(Object.prototype.hasOwnProperty)};function o(t,e,n,r){return t&&"string"==typeof t.type?l(t,e,n,r):t}function a(t,e,n,r){return Array.isArray(t)?t.map((t=>o(t,e,n,r))):o(t,e,n,r)}function l(t,e=!0,n=!1,o){if(!t)return t;const{type:l}=t,u={type:t.type};if((0,i.isIdentifier)(t))u.name=t.name,s(t,"optional")&&"boolean"==typeof t.optional&&(u.optional=t.optional),s(t,"typeAnnotation")&&(u.typeAnnotation=e?a(t.typeAnnotation,!0,n,o):t.typeAnnotation),s(t,"decorators")&&(u.decorators=e?a(t.decorators,!0,n,o):t.decorators);else{if(!s(r.NODE_FIELDS,l))throw new Error(`Unknown node type: "${l}"`);for(const h of Object.keys(r.NODE_FIELDS[l]))s(t,h)&&(u[h]=e?(0,i.isFile)(t)&&"comments"===h?c(t.comments,e,n,o):a(t[h],!0,n,o):t[h])}return s(t,"loc")&&(u.loc=n?null:t.loc),s(t,"leadingComments")&&(u.leadingComments=c(t.leadingComments,e,n,o)),s(t,"innerComments")&&(u.innerComments=c(t.innerComments,e,n,o)),s(t,"trailingComments")&&(u.trailingComments=c(t.trailingComments,e,n,o)),s(t,"extra")&&(u.extra=Object.assign({},t.extra)),u}function c(t,e,n,r){return t&&e?t.map((t=>{const e=r.get(t);if(e)return e;const{type:i,value:s,loc:o}=t,a={type:i,value:s,loc:o};return n&&(a.loc=null),r.set(t,a),a})):t}},19683:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(64902);function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,(0,r.A)(t,e)}},19910:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.UPDATE_OPERATORS=e.UNARY_OPERATORS=e.STRING_UNARY_OPERATORS=e.STATEMENT_OR_BLOCK_KEYS=e.NUMBER_UNARY_OPERATORS=e.NUMBER_BINARY_OPERATORS=e.LOGICAL_OPERATORS=e.INHERIT_KEYS=e.FOR_INIT_KEYS=e.FLATTENABLE_KEYS=e.EQUALITY_BINARY_OPERATORS=e.COMPARISON_BINARY_OPERATORS=e.COMMENT_KEYS=e.BOOLEAN_UNARY_OPERATORS=e.BOOLEAN_NUMBER_BINARY_OPERATORS=e.BOOLEAN_BINARY_OPERATORS=e.BINARY_OPERATORS=e.ASSIGNMENT_OPERATORS=void 0,e.STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"],e.FLATTENABLE_KEYS=["body","expressions"],e.FOR_INIT_KEYS=["left","init"],e.COMMENT_KEYS=["leadingComments","trailingComments","innerComments"];const n=e.LOGICAL_OPERATORS=["||","&&","??"],r=(e.UPDATE_OPERATORS=["++","--"],e.BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="]),i=e.EQUALITY_BINARY_OPERATORS=["==","===","!=","!=="],s=e.COMPARISON_BINARY_OPERATORS=[...i,"in","instanceof"],o=e.BOOLEAN_BINARY_OPERATORS=[...s,...r],a=e.NUMBER_BINARY_OPERATORS=["-","/","%","*","**","&","|",">>",">>>","<<","^"],l=(e.BINARY_OPERATORS=["+",...a,...o,"|>"],e.ASSIGNMENT_OPERATORS=["=","+=",...a.map((t=>t+"=")),...n.map((t=>t+"="))],e.BOOLEAN_UNARY_OPERATORS=["delete","!"]),c=e.NUMBER_UNARY_OPERATORS=["+","-","~"],u=e.STRING_UNARY_OPERATORS=["typeof"];e.UNARY_OPERATORS=["void","throw",...l,...c,...u],e.INHERIT_KEYS={optional:["typeAnnotation","typeParameters","returnType"],force:["start","loc","end"]},e.BLOCK_SCOPED_SYMBOL=Symbol.for("var used to be block scoped"),e.NOT_LOCAL_BINDING=Symbol.for("should not be considered a local binding")},20054:(t,e,n)=>{var r=n(60209),i=TypeError;t.exports=function(t){var e=r(t,"number");if("number"==typeof e)throw new i("Can't convert number to bigint");return BigInt(e)}},20197:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){"function"==typeof e&&(e={enter:e});const{enter:r,exit:s}=e;i(t,r,s,n,[])};var r=n(49625);function i(t,e,n,s,o){const a=r.VISITOR_KEYS[t.type];if(a){e&&e(t,o,s);for(const r of a){const a=t[r];if(Array.isArray(a))for(let l=0;l<a.length;l++){const c=a[l];c&&(o.push({node:t,key:r,index:l}),i(c,e,n,s,o),o.pop())}else a&&(o.push({node:t,key:r}),i(a,e,n,s,o),o.pop())}n&&n(t,o,s)}}},20435:(t,e,n)=>{var r;function i(t){this.rand=t}if(t.exports=function(t){return r||(r=new i(null)),r.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;n<e.length;n++)e[n]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var s=n(97359);if("function"!=typeof s.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return s.randomBytes(t)}}catch(t){}},21261:(t,e,n)=>{var r=n(23486),i=n(45632),s=n(38378).add;r({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var t=i(this),e=0,n=arguments.length;e<n;e++)s(t,arguments[e]);return t}})},21758:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assertAccessor=function(t,e){s("Accessor",t,e)},e.assertAnyTypeAnnotation=function(t,e){s("AnyTypeAnnotation",t,e)},e.assertArgumentPlaceholder=function(t,e){s("ArgumentPlaceholder",t,e)},e.assertArrayExpression=function(t,e){s("ArrayExpression",t,e)},e.assertArrayPattern=function(t,e){s("ArrayPattern",t,e)},e.assertArrayTypeAnnotation=function(t,e){s("ArrayTypeAnnotation",t,e)},e.assertArrowFunctionExpression=function(t,e){s("ArrowFunctionExpression",t,e)},e.assertAssignmentExpression=function(t,e){s("AssignmentExpression",t,e)},e.assertAssignmentPattern=function(t,e){s("AssignmentPattern",t,e)},e.assertAwaitExpression=function(t,e){s("AwaitExpression",t,e)},e.assertBigIntLiteral=function(t,e){s("BigIntLiteral",t,e)},e.assertBinary=function(t,e){s("Binary",t,e)},e.assertBinaryExpression=function(t,e){s("BinaryExpression",t,e)},e.assertBindExpression=function(t,e){s("BindExpression",t,e)},e.assertBlock=function(t,e){s("Block",t,e)},e.assertBlockParent=function(t,e){s("BlockParent",t,e)},e.assertBlockStatement=function(t,e){s("BlockStatement",t,e)},e.assertBooleanLiteral=function(t,e){s("BooleanLiteral",t,e)},e.assertBooleanLiteralTypeAnnotation=function(t,e){s("BooleanLiteralTypeAnnotation",t,e)},e.assertBooleanTypeAnnotation=function(t,e){s("BooleanTypeAnnotation",t,e)},e.assertBreakStatement=function(t,e){s("BreakStatement",t,e)},e.assertCallExpression=function(t,e){s("CallExpression",t,e)},e.assertCatchClause=function(t,e){s("CatchClause",t,e)},e.assertClass=function(t,e){s("Class",t,e)},e.assertClassAccessorProperty=function(t,e){s("ClassAccessorProperty",t,e)},e.assertClassBody=function(t,e){s("ClassBody",t,e)},e.assertClassDeclaration=function(t,e){s("ClassDeclaration",t,e)},e.assertClassExpression=function(t,e){s("ClassExpression",t,e)},e.assertClassImplements=function(t,e){s("ClassImplements",t,e)},e.assertClassMethod=function(t,e){s("ClassMethod",t,e)},e.assertClassPrivateMethod=function(t,e){s("ClassPrivateMethod",t,e)},e.assertClassPrivateProperty=function(t,e){s("ClassPrivateProperty",t,e)},e.assertClassProperty=function(t,e){s("ClassProperty",t,e)},e.assertCompletionStatement=function(t,e){s("CompletionStatement",t,e)},e.assertConditional=function(t,e){s("Conditional",t,e)},e.assertConditionalExpression=function(t,e){s("ConditionalExpression",t,e)},e.assertContinueStatement=function(t,e){s("ContinueStatement",t,e)},e.assertDebuggerStatement=function(t,e){s("DebuggerStatement",t,e)},e.assertDecimalLiteral=function(t,e){s("DecimalLiteral",t,e)},e.assertDeclaration=function(t,e){s("Declaration",t,e)},e.assertDeclareClass=function(t,e){s("DeclareClass",t,e)},e.assertDeclareExportAllDeclaration=function(t,e){s("DeclareExportAllDeclaration",t,e)},e.assertDeclareExportDeclaration=function(t,e){s("DeclareExportDeclaration",t,e)},e.assertDeclareFunction=function(t,e){s("DeclareFunction",t,e)},e.assertDeclareInterface=function(t,e){s("DeclareInterface",t,e)},e.assertDeclareModule=function(t,e){s("DeclareModule",t,e)},e.assertDeclareModuleExports=function(t,e){s("DeclareModuleExports",t,e)},e.assertDeclareOpaqueType=function(t,e){s("DeclareOpaqueType",t,e)},e.assertDeclareTypeAlias=function(t,e){s("DeclareTypeAlias",t,e)},e.assertDeclareVariable=function(t,e){s("DeclareVariable",t,e)},e.assertDeclaredPredicate=function(t,e){s("DeclaredPredicate",t,e)},e.assertDecorator=function(t,e){s("Decorator",t,e)},e.assertDirective=function(t,e){s("Directive",t,e)},e.assertDirectiveLiteral=function(t,e){s("DirectiveLiteral",t,e)},e.assertDoExpression=function(t,e){s("DoExpression",t,e)},e.assertDoWhileStatement=function(t,e){s("DoWhileStatement",t,e)},e.assertEmptyStatement=function(t,e){s("EmptyStatement",t,e)},e.assertEmptyTypeAnnotation=function(t,e){s("EmptyTypeAnnotation",t,e)},e.assertEnumBody=function(t,e){s("EnumBody",t,e)},e.assertEnumBooleanBody=function(t,e){s("EnumBooleanBody",t,e)},e.assertEnumBooleanMember=function(t,e){s("EnumBooleanMember",t,e)},e.assertEnumDeclaration=function(t,e){s("EnumDeclaration",t,e)},e.assertEnumDefaultedMember=function(t,e){s("EnumDefaultedMember",t,e)},e.assertEnumMember=function(t,e){s("EnumMember",t,e)},e.assertEnumNumberBody=function(t,e){s("EnumNumberBody",t,e)},e.assertEnumNumberMember=function(t,e){s("EnumNumberMember",t,e)},e.assertEnumStringBody=function(t,e){s("EnumStringBody",t,e)},e.assertEnumStringMember=function(t,e){s("EnumStringMember",t,e)},e.assertEnumSymbolBody=function(t,e){s("EnumSymbolBody",t,e)},e.assertExistsTypeAnnotation=function(t,e){s("ExistsTypeAnnotation",t,e)},e.assertExportAllDeclaration=function(t,e){s("ExportAllDeclaration",t,e)},e.assertExportDeclaration=function(t,e){s("ExportDeclaration",t,e)},e.assertExportDefaultDeclaration=function(t,e){s("ExportDefaultDeclaration",t,e)},e.assertExportDefaultSpecifier=function(t,e){s("ExportDefaultSpecifier",t,e)},e.assertExportNamedDeclaration=function(t,e){s("ExportNamedDeclaration",t,e)},e.assertExportNamespaceSpecifier=function(t,e){s("ExportNamespaceSpecifier",t,e)},e.assertExportSpecifier=function(t,e){s("ExportSpecifier",t,e)},e.assertExpression=function(t,e){s("Expression",t,e)},e.assertExpressionStatement=function(t,e){s("ExpressionStatement",t,e)},e.assertExpressionWrapper=function(t,e){s("ExpressionWrapper",t,e)},e.assertFile=function(t,e){s("File",t,e)},e.assertFlow=function(t,e){s("Flow",t,e)},e.assertFlowBaseAnnotation=function(t,e){s("FlowBaseAnnotation",t,e)},e.assertFlowDeclaration=function(t,e){s("FlowDeclaration",t,e)},e.assertFlowPredicate=function(t,e){s("FlowPredicate",t,e)},e.assertFlowType=function(t,e){s("FlowType",t,e)},e.assertFor=function(t,e){s("For",t,e)},e.assertForInStatement=function(t,e){s("ForInStatement",t,e)},e.assertForOfStatement=function(t,e){s("ForOfStatement",t,e)},e.assertForStatement=function(t,e){s("ForStatement",t,e)},e.assertForXStatement=function(t,e){s("ForXStatement",t,e)},e.assertFunction=function(t,e){s("Function",t,e)},e.assertFunctionDeclaration=function(t,e){s("FunctionDeclaration",t,e)},e.assertFunctionExpression=function(t,e){s("FunctionExpression",t,e)},e.assertFunctionParameter=function(t,e){s("FunctionParameter",t,e)},e.assertFunctionParent=function(t,e){s("FunctionParent",t,e)},e.assertFunctionTypeAnnotation=function(t,e){s("FunctionTypeAnnotation",t,e)},e.assertFunctionTypeParam=function(t,e){s("FunctionTypeParam",t,e)},e.assertGenericTypeAnnotation=function(t,e){s("GenericTypeAnnotation",t,e)},e.assertIdentifier=function(t,e){s("Identifier",t,e)},e.assertIfStatement=function(t,e){s("IfStatement",t,e)},e.assertImmutable=function(t,e){s("Immutable",t,e)},e.assertImport=function(t,e){s("Import",t,e)},e.assertImportAttribute=function(t,e){s("ImportAttribute",t,e)},e.assertImportDeclaration=function(t,e){s("ImportDeclaration",t,e)},e.assertImportDefaultSpecifier=function(t,e){s("ImportDefaultSpecifier",t,e)},e.assertImportExpression=function(t,e){s("ImportExpression",t,e)},e.assertImportNamespaceSpecifier=function(t,e){s("ImportNamespaceSpecifier",t,e)},e.assertImportOrExportDeclaration=function(t,e){s("ImportOrExportDeclaration",t,e)},e.assertImportSpecifier=function(t,e){s("ImportSpecifier",t,e)},e.assertIndexedAccessType=function(t,e){s("IndexedAccessType",t,e)},e.assertInferredPredicate=function(t,e){s("InferredPredicate",t,e)},e.assertInterfaceDeclaration=function(t,e){s("InterfaceDeclaration",t,e)},e.assertInterfaceExtends=function(t,e){s("InterfaceExtends",t,e)},e.assertInterfaceTypeAnnotation=function(t,e){s("InterfaceTypeAnnotation",t,e)},e.assertInterpreterDirective=function(t,e){s("InterpreterDirective",t,e)},e.assertIntersectionTypeAnnotation=function(t,e){s("IntersectionTypeAnnotation",t,e)},e.assertJSX=function(t,e){s("JSX",t,e)},e.assertJSXAttribute=function(t,e){s("JSXAttribute",t,e)},e.assertJSXClosingElement=function(t,e){s("JSXClosingElement",t,e)},e.assertJSXClosingFragment=function(t,e){s("JSXClosingFragment",t,e)},e.assertJSXElement=function(t,e){s("JSXElement",t,e)},e.assertJSXEmptyExpression=function(t,e){s("JSXEmptyExpression",t,e)},e.assertJSXExpressionContainer=function(t,e){s("JSXExpressionContainer",t,e)},e.assertJSXFragment=function(t,e){s("JSXFragment",t,e)},e.assertJSXIdentifier=function(t,e){s("JSXIdentifier",t,e)},e.assertJSXMemberExpression=function(t,e){s("JSXMemberExpression",t,e)},e.assertJSXNamespacedName=function(t,e){s("JSXNamespacedName",t,e)},e.assertJSXOpeningElement=function(t,e){s("JSXOpeningElement",t,e)},e.assertJSXOpeningFragment=function(t,e){s("JSXOpeningFragment",t,e)},e.assertJSXSpreadAttribute=function(t,e){s("JSXSpreadAttribute",t,e)},e.assertJSXSpreadChild=function(t,e){s("JSXSpreadChild",t,e)},e.assertJSXText=function(t,e){s("JSXText",t,e)},e.assertLVal=function(t,e){s("LVal",t,e)},e.assertLabeledStatement=function(t,e){s("LabeledStatement",t,e)},e.assertLiteral=function(t,e){s("Literal",t,e)},e.assertLogicalExpression=function(t,e){s("LogicalExpression",t,e)},e.assertLoop=function(t,e){s("Loop",t,e)},e.assertMemberExpression=function(t,e){s("MemberExpression",t,e)},e.assertMetaProperty=function(t,e){s("MetaProperty",t,e)},e.assertMethod=function(t,e){s("Method",t,e)},e.assertMiscellaneous=function(t,e){s("Miscellaneous",t,e)},e.assertMixedTypeAnnotation=function(t,e){s("MixedTypeAnnotation",t,e)},e.assertModuleDeclaration=function(t,e){(0,i.default)("assertModuleDeclaration","assertImportOrExportDeclaration"),s("ModuleDeclaration",t,e)},e.assertModuleExpression=function(t,e){s("ModuleExpression",t,e)},e.assertModuleSpecifier=function(t,e){s("ModuleSpecifier",t,e)},e.assertNewExpression=function(t,e){s("NewExpression",t,e)},e.assertNoop=function(t,e){s("Noop",t,e)},e.assertNullLiteral=function(t,e){s("NullLiteral",t,e)},e.assertNullLiteralTypeAnnotation=function(t,e){s("NullLiteralTypeAnnotation",t,e)},e.assertNullableTypeAnnotation=function(t,e){s("NullableTypeAnnotation",t,e)},e.assertNumberLiteral=function(t,e){(0,i.default)("assertNumberLiteral","assertNumericLiteral"),s("NumberLiteral",t,e)},e.assertNumberLiteralTypeAnnotation=function(t,e){s("NumberLiteralTypeAnnotation",t,e)},e.assertNumberTypeAnnotation=function(t,e){s("NumberTypeAnnotation",t,e)},e.assertNumericLiteral=function(t,e){s("NumericLiteral",t,e)},e.assertObjectExpression=function(t,e){s("ObjectExpression",t,e)},e.assertObjectMember=function(t,e){s("ObjectMember",t,e)},e.assertObjectMethod=function(t,e){s("ObjectMethod",t,e)},e.assertObjectPattern=function(t,e){s("ObjectPattern",t,e)},e.assertObjectProperty=function(t,e){s("ObjectProperty",t,e)},e.assertObjectTypeAnnotation=function(t,e){s("ObjectTypeAnnotation",t,e)},e.assertObjectTypeCallProperty=function(t,e){s("ObjectTypeCallProperty",t,e)},e.assertObjectTypeIndexer=function(t,e){s("ObjectTypeIndexer",t,e)},e.assertObjectTypeInternalSlot=function(t,e){s("ObjectTypeInternalSlot",t,e)},e.assertObjectTypeProperty=function(t,e){s("ObjectTypeProperty",t,e)},e.assertObjectTypeSpreadProperty=function(t,e){s("ObjectTypeSpreadProperty",t,e)},e.assertOpaqueType=function(t,e){s("OpaqueType",t,e)},e.assertOptionalCallExpression=function(t,e){s("OptionalCallExpression",t,e)},e.assertOptionalIndexedAccessType=function(t,e){s("OptionalIndexedAccessType",t,e)},e.assertOptionalMemberExpression=function(t,e){s("OptionalMemberExpression",t,e)},e.assertParenthesizedExpression=function(t,e){s("ParenthesizedExpression",t,e)},e.assertPattern=function(t,e){s("Pattern",t,e)},e.assertPatternLike=function(t,e){s("PatternLike",t,e)},e.assertPipelineBareFunction=function(t,e){s("PipelineBareFunction",t,e)},e.assertPipelinePrimaryTopicReference=function(t,e){s("PipelinePrimaryTopicReference",t,e)},e.assertPipelineTopicExpression=function(t,e){s("PipelineTopicExpression",t,e)},e.assertPlaceholder=function(t,e){s("Placeholder",t,e)},e.assertPrivate=function(t,e){s("Private",t,e)},e.assertPrivateName=function(t,e){s("PrivateName",t,e)},e.assertProgram=function(t,e){s("Program",t,e)},e.assertProperty=function(t,e){s("Property",t,e)},e.assertPureish=function(t,e){s("Pureish",t,e)},e.assertQualifiedTypeIdentifier=function(t,e){s("QualifiedTypeIdentifier",t,e)},e.assertRecordExpression=function(t,e){s("RecordExpression",t,e)},e.assertRegExpLiteral=function(t,e){s("RegExpLiteral",t,e)},e.assertRegexLiteral=function(t,e){(0,i.default)("assertRegexLiteral","assertRegExpLiteral"),s("RegexLiteral",t,e)},e.assertRestElement=function(t,e){s("RestElement",t,e)},e.assertRestProperty=function(t,e){(0,i.default)("assertRestProperty","assertRestElement"),s("RestProperty",t,e)},e.assertReturnStatement=function(t,e){s("ReturnStatement",t,e)},e.assertScopable=function(t,e){s("Scopable",t,e)},e.assertSequenceExpression=function(t,e){s("SequenceExpression",t,e)},e.assertSpreadElement=function(t,e){s("SpreadElement",t,e)},e.assertSpreadProperty=function(t,e){(0,i.default)("assertSpreadProperty","assertSpreadElement"),s("SpreadProperty",t,e)},e.assertStandardized=function(t,e){s("Standardized",t,e)},e.assertStatement=function(t,e){s("Statement",t,e)},e.assertStaticBlock=function(t,e){s("StaticBlock",t,e)},e.assertStringLiteral=function(t,e){s("StringLiteral",t,e)},e.assertStringLiteralTypeAnnotation=function(t,e){s("StringLiteralTypeAnnotation",t,e)},e.assertStringTypeAnnotation=function(t,e){s("StringTypeAnnotation",t,e)},e.assertSuper=function(t,e){s("Super",t,e)},e.assertSwitchCase=function(t,e){s("SwitchCase",t,e)},e.assertSwitchStatement=function(t,e){s("SwitchStatement",t,e)},e.assertSymbolTypeAnnotation=function(t,e){s("SymbolTypeAnnotation",t,e)},e.assertTSAnyKeyword=function(t,e){s("TSAnyKeyword",t,e)},e.assertTSArrayType=function(t,e){s("TSArrayType",t,e)},e.assertTSAsExpression=function(t,e){s("TSAsExpression",t,e)},e.assertTSBaseType=function(t,e){s("TSBaseType",t,e)},e.assertTSBigIntKeyword=function(t,e){s("TSBigIntKeyword",t,e)},e.assertTSBooleanKeyword=function(t,e){s("TSBooleanKeyword",t,e)},e.assertTSCallSignatureDeclaration=function(t,e){s("TSCallSignatureDeclaration",t,e)},e.assertTSConditionalType=function(t,e){s("TSConditionalType",t,e)},e.assertTSConstructSignatureDeclaration=function(t,e){s("TSConstructSignatureDeclaration",t,e)},e.assertTSConstructorType=function(t,e){s("TSConstructorType",t,e)},e.assertTSDeclareFunction=function(t,e){s("TSDeclareFunction",t,e)},e.assertTSDeclareMethod=function(t,e){s("TSDeclareMethod",t,e)},e.assertTSEntityName=function(t,e){s("TSEntityName",t,e)},e.assertTSEnumBody=function(t,e){s("TSEnumBody",t,e)},e.assertTSEnumDeclaration=function(t,e){s("TSEnumDeclaration",t,e)},e.assertTSEnumMember=function(t,e){s("TSEnumMember",t,e)},e.assertTSExportAssignment=function(t,e){s("TSExportAssignment",t,e)},e.assertTSExpressionWithTypeArguments=function(t,e){s("TSExpressionWithTypeArguments",t,e)},e.assertTSExternalModuleReference=function(t,e){s("TSExternalModuleReference",t,e)},e.assertTSFunctionType=function(t,e){s("TSFunctionType",t,e)},e.assertTSImportEqualsDeclaration=function(t,e){s("TSImportEqualsDeclaration",t,e)},e.assertTSImportType=function(t,e){s("TSImportType",t,e)},e.assertTSIndexSignature=function(t,e){s("TSIndexSignature",t,e)},e.assertTSIndexedAccessType=function(t,e){s("TSIndexedAccessType",t,e)},e.assertTSInferType=function(t,e){s("TSInferType",t,e)},e.assertTSInstantiationExpression=function(t,e){s("TSInstantiationExpression",t,e)},e.assertTSInterfaceBody=function(t,e){s("TSInterfaceBody",t,e)},e.assertTSInterfaceDeclaration=function(t,e){s("TSInterfaceDeclaration",t,e)},e.assertTSIntersectionType=function(t,e){s("TSIntersectionType",t,e)},e.assertTSIntrinsicKeyword=function(t,e){s("TSIntrinsicKeyword",t,e)},e.assertTSLiteralType=function(t,e){s("TSLiteralType",t,e)},e.assertTSMappedType=function(t,e){s("TSMappedType",t,e)},e.assertTSMethodSignature=function(t,e){s("TSMethodSignature",t,e)},e.assertTSModuleBlock=function(t,e){s("TSModuleBlock",t,e)},e.assertTSModuleDeclaration=function(t,e){s("TSModuleDeclaration",t,e)},e.assertTSNamedTupleMember=function(t,e){s("TSNamedTupleMember",t,e)},e.assertTSNamespaceExportDeclaration=function(t,e){s("TSNamespaceExportDeclaration",t,e)},e.assertTSNeverKeyword=function(t,e){s("TSNeverKeyword",t,e)},e.assertTSNonNullExpression=function(t,e){s("TSNonNullExpression",t,e)},e.assertTSNullKeyword=function(t,e){s("TSNullKeyword",t,e)},e.assertTSNumberKeyword=function(t,e){s("TSNumberKeyword",t,e)},e.assertTSObjectKeyword=function(t,e){s("TSObjectKeyword",t,e)},e.assertTSOptionalType=function(t,e){s("TSOptionalType",t,e)},e.assertTSParameterProperty=function(t,e){s("TSParameterProperty",t,e)},e.assertTSParenthesizedType=function(t,e){s("TSParenthesizedType",t,e)},e.assertTSPropertySignature=function(t,e){s("TSPropertySignature",t,e)},e.assertTSQualifiedName=function(t,e){s("TSQualifiedName",t,e)},e.assertTSRestType=function(t,e){s("TSRestType",t,e)},e.assertTSSatisfiesExpression=function(t,e){s("TSSatisfiesExpression",t,e)},e.assertTSStringKeyword=function(t,e){s("TSStringKeyword",t,e)},e.assertTSSymbolKeyword=function(t,e){s("TSSymbolKeyword",t,e)},e.assertTSTemplateLiteralType=function(t,e){s("TSTemplateLiteralType",t,e)},e.assertTSThisType=function(t,e){s("TSThisType",t,e)},e.assertTSTupleType=function(t,e){s("TSTupleType",t,e)},e.assertTSType=function(t,e){s("TSType",t,e)},e.assertTSTypeAliasDeclaration=function(t,e){s("TSTypeAliasDeclaration",t,e)},e.assertTSTypeAnnotation=function(t,e){s("TSTypeAnnotation",t,e)},e.assertTSTypeAssertion=function(t,e){s("TSTypeAssertion",t,e)},e.assertTSTypeElement=function(t,e){s("TSTypeElement",t,e)},e.assertTSTypeLiteral=function(t,e){s("TSTypeLiteral",t,e)},e.assertTSTypeOperator=function(t,e){s("TSTypeOperator",t,e)},e.assertTSTypeParameter=function(t,e){s("TSTypeParameter",t,e)},e.assertTSTypeParameterDeclaration=function(t,e){s("TSTypeParameterDeclaration",t,e)},e.assertTSTypeParameterInstantiation=function(t,e){s("TSTypeParameterInstantiation",t,e)},e.assertTSTypePredicate=function(t,e){s("TSTypePredicate",t,e)},e.assertTSTypeQuery=function(t,e){s("TSTypeQuery",t,e)},e.assertTSTypeReference=function(t,e){s("TSTypeReference",t,e)},e.assertTSUndefinedKeyword=function(t,e){s("TSUndefinedKeyword",t,e)},e.assertTSUnionType=function(t,e){s("TSUnionType",t,e)},e.assertTSUnknownKeyword=function(t,e){s("TSUnknownKeyword",t,e)},e.assertTSVoidKeyword=function(t,e){s("TSVoidKeyword",t,e)},e.assertTaggedTemplateExpression=function(t,e){s("TaggedTemplateExpression",t,e)},e.assertTemplateElement=function(t,e){s("TemplateElement",t,e)},e.assertTemplateLiteral=function(t,e){s("TemplateLiteral",t,e)},e.assertTerminatorless=function(t,e){s("Terminatorless",t,e)},e.assertThisExpression=function(t,e){s("ThisExpression",t,e)},e.assertThisTypeAnnotation=function(t,e){s("ThisTypeAnnotation",t,e)},e.assertThrowStatement=function(t,e){s("ThrowStatement",t,e)},e.assertTopicReference=function(t,e){s("TopicReference",t,e)},e.assertTryStatement=function(t,e){s("TryStatement",t,e)},e.assertTupleExpression=function(t,e){s("TupleExpression",t,e)},e.assertTupleTypeAnnotation=function(t,e){s("TupleTypeAnnotation",t,e)},e.assertTypeAlias=function(t,e){s("TypeAlias",t,e)},e.assertTypeAnnotation=function(t,e){s("TypeAnnotation",t,e)},e.assertTypeCastExpression=function(t,e){s("TypeCastExpression",t,e)},e.assertTypeParameter=function(t,e){s("TypeParameter",t,e)},e.assertTypeParameterDeclaration=function(t,e){s("TypeParameterDeclaration",t,e)},e.assertTypeParameterInstantiation=function(t,e){s("TypeParameterInstantiation",t,e)},e.assertTypeScript=function(t,e){s("TypeScript",t,e)},e.assertTypeofTypeAnnotation=function(t,e){s("TypeofTypeAnnotation",t,e)},e.assertUnaryExpression=function(t,e){s("UnaryExpression",t,e)},e.assertUnaryLike=function(t,e){s("UnaryLike",t,e)},e.assertUnionTypeAnnotation=function(t,e){s("UnionTypeAnnotation",t,e)},e.assertUpdateExpression=function(t,e){s("UpdateExpression",t,e)},e.assertUserWhitespacable=function(t,e){s("UserWhitespacable",t,e)},e.assertV8IntrinsicIdentifier=function(t,e){s("V8IntrinsicIdentifier",t,e)},e.assertVariableDeclaration=function(t,e){s("VariableDeclaration",t,e)},e.assertVariableDeclarator=function(t,e){s("VariableDeclarator",t,e)},e.assertVariance=function(t,e){s("Variance",t,e)},e.assertVoidPattern=function(t,e){s("VoidPattern",t,e)},e.assertVoidTypeAnnotation=function(t,e){s("VoidTypeAnnotation",t,e)},e.assertWhile=function(t,e){s("While",t,e)},e.assertWhileStatement=function(t,e){s("WhileStatement",t,e)},e.assertWithStatement=function(t,e){s("WithStatement",t,e)},e.assertYieldExpression=function(t,e){s("YieldExpression",t,e)};var r=n(93308),i=n(56826);function s(t,e,n){if(!(0,r.default)(t,e,n))throw new Error(`Expected type "${t}" with option ${JSON.stringify(n)}, but instead got "${e.type}".`)}},21804:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},21955:(t,e,n)=>{var r=n(95167);t.exports=function(){var t=r(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},22159:t=>{t.exports=function(t){return{iterator:t,next:t.next,done:!1}}},22198:(t,e,n)=>{var r,i,s=n(51192),o=n(149),a=n(2269),l=n(76128),c=n(90475),u=n(33088),h=n(83115),p=n(86115),d="USE_FUNCTION_CONSTRUCTOR",f=h("asyncIterator"),m=s.AsyncIterator,y=o.AsyncIteratorPrototype;if(y)r=y;else if(a(m))r=m.prototype;else if(o[d]||s[d])try{i=c(c(c(Function("return async function*(){}()")()))),c(i)===Object.prototype&&(r=i)}catch(t){}r?p&&(r=l(r)):r={},a(r[f])||u(r,f,(function(){return this})),t.exports=r},22471:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=[].concat(t),n=Object.create(null);for(;e.length;){const t=e.pop();if(t)switch(t.type){case"ArrayPattern":e.push(...t.elements);break;case"AssignmentExpression":case"AssignmentPattern":case"ForInStatement":case"ForOfStatement":e.push(t.left);break;case"ObjectPattern":e.push(...t.properties);break;case"ObjectProperty":e.push(t.value);break;case"RestElement":case"UpdateExpression":e.push(t.argument);break;case"UnaryExpression":"delete"===t.operator&&e.push(t.argument);break;case"Identifier":n[t.name]=t}}return n}},22503:(t,e,n)=>{var r=n(17267),i=String;t.exports=function(t){if("Symbol"===r(t))throw new TypeError("Cannot convert a Symbol value to a string");return i(t)}},22510:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},22521:(t,e,n)=>{var r=n(26600),i=n(49421),s=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return s(i(t),e)}},22743:(t,e,n)=>{var r=n(51192);t.exports=r},22756:(t,e,n)=>{n.d(e,{$w:()=>$,Ar:()=>u,Bc:()=>It,Gw:()=>dt,N:()=>K,OO:()=>jt,UA:()=>lt,c7:()=>bt,d0:()=>c,et:()=>l,rB:()=>H,wm:()=>Et,yU:()=>Ft,zH:()=>m});var r=n(38273),i=n(9283),s=n(10906);class o{constructor(t,e,n,r){this.state=t,this.pos=e,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=(0,s.mv)(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),n=Math.max(e.from,this.pos-250),r=e.text.slice(n-e.from,this.pos-e.from),i=r.search(d(t,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,n){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),n&&n.onDocChange&&(this.abortOnDocChange=!0))}}function a(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function l(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[n,r]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let t=1;t<r.length;t++)n[r[t]]=!0}let r=a(e)+a(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}(e);return t=>{let i=t.matchBefore(r);return i||t.explicit?{from:i?i.from:t.pos,options:e,validFor:n}:null}}function c(t,e){return n=>{for(let r=(0,s.mv)(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return e(n);if(r.type.isTop)break}return null}}function u(t,e){return n=>{for(let e=(0,s.mv)(n.state).resolveInner(n.pos,-1);e;e=e.parent){if(t.indexOf(e.name)>-1)return null;if(e.type.isTop)break}return e(n)}}class h{constructor(t,e,n,r){this.completion=t,this.source=e,this.match=n,this.score=r}}function p(t){return t.selection.main.from}function d(t,e){var n;let{source:r}=t,i=e&&"^"!=r[0],s="$"!=r[r.length-1];return i||s?new RegExp(`${i?"^":""}(?:${r})${s?"$":""}`,null!==(n=t.flags)&&void 0!==n?n:t.ignoreCase?"i":""):t}const f=r.YH.define();function m(t,e,n,i){let{main:s}=t.selection,o=n-s.from,a=i-s.from;return Object.assign(Object.assign({},t.changeByRange((l=>{if(l!=s&&n!=i&&t.sliceDoc(l.from+o,l.from+a)!=t.sliceDoc(n,i))return{range:l};let c=t.toText(e);return{changes:{from:l.from+o,to:i==s.from?l.to:l.from+a,insert:c},range:r.OF.cursor(l.from+o+c.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}const y=new WeakMap;function g(t){if(!Array.isArray(t))return t;let e=y.get(t);return e||y.set(t,e=l(t)),e}const v=r.Pe.define(),b=r.Pe.define();class T{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e<t.length;){let n=(0,r.vS)(t,e),i=(0,r.Fh)(n);this.chars.push(n);let s=t.slice(e,e+i),o=s.toUpperCase();this.folded.push((0,r.vS)(o==s?s.toLowerCase():o,0)),e+=i}this.astral=t.length!=this.chars.length}ret(t,e){return this.score=t,this.matched=e,this}match(t){if(0==this.pattern.length)return this.ret(-100,[]);if(t.length<this.pattern.length)return null;let{chars:e,folded:n,any:i,precise:s,byWord:o}=this;if(1==e.length){let i=(0,r.vS)(t,0),s=(0,r.Fh)(i),o=s==t.length?0:-100;if(i==e[0]);else{if(i!=n[0])return null;o+=-200}return this.ret(o,[0,s])}let a=t.indexOf(this.pattern);if(0==a)return this.ret(t.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=e.length,c=0;if(a<0){for(let s=0,o=Math.min(t.length,200);s<o&&c<l;){let o=(0,r.vS)(t,s);o!=e[c]&&o!=n[c]||(i[c++]=s),s+=(0,r.Fh)(o)}if(c<l)return null}let u=0,h=0,p=!1,d=0,f=-1,m=-1,y=/[a-z]/.test(t),g=!0;for(let i=0,c=Math.min(t.length,200),v=0;i<c&&h<l;){let c=(0,r.vS)(t,i);a<0&&(u<l&&c==e[u]&&(s[u++]=i),d<l&&(c==e[d]||c==n[d]?(0==d&&(f=i),m=i+1,d++):d=0));let b,T=c<255?c>=48&&c<=57||c>=97&&c<=122?2:c>=65&&c<=90?1:0:(b=(0,r.MK)(c))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!i||1==T&&y||0==v&&0!=T)&&(e[h]==c||n[h]==c&&(p=!0)?o[h++]=i:o.length&&(g=!1)),v=T,i+=(0,r.Fh)(c)}return h==l&&0==o[0]&&g?this.result((p?-200:0)-100,o,t):d==l&&0==f?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):a>-1?this.ret(-700-t.length,[a,a+this.pattern.length]):d==l?this.ret(-900-t.length,[f,m]):h==l?this.result((p?-200:0)-100-700+(g?0:-1100),o,t):2==e.length?null:this.result((i[0]?-700:0)-200-1100,i,t)}result(t,e,n){let i=[],s=0;for(let t of e){let e=t+(this.astral?(0,r.Fh)((0,r.vS)(n,t)):1);s&&i[s-1]==t?i[s-1]=e:(i[s++]=t,i[s++]=e)}return this.ret(t-n.length,i)}}class x{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length<this.pattern.length)return null;let e=t.slice(0,this.pattern.length),n=e==this.pattern?0:e.toLowerCase()==this.folded?-200:null;return null==n?null:(this.matched=[0,e.length],this.score=n+(t.length==this.pattern.length?0:-100),this)}}const S=r.sj.define({combine:t=>(0,r.QR)(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:E,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>n=>w(t(n),e(n)),optionClass:(t,e)=>n=>w(t(n),e(n)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function w(t,e){return t?e?t+" "+e:t:e}function E(t,e,n,r,s,o){let a,l,c=t.textDirection==i.OP.RTL,u=c,h=!1,p="top",d=e.left-s.left,f=s.right-e.right,m=r.right-r.left,y=r.bottom-r.top;if(u&&d<Math.min(m,f)?u=!1:!u&&f<Math.min(m,d)&&(u=!0),m<=(u?d:f))a=Math.max(s.top,Math.min(n.top,s.bottom-y))-e.top,l=Math.min(400,u?d:f);else{h=!0,l=Math.min(400,(c?e.right:s.right-e.left)-30);let t=s.bottom-e.bottom;t>=y||t>e.top?a=n.bottom-e.top:(p="bottom",a=e.bottom-n.top)}return{style:`${p}: ${a/((e.bottom-e.top)/o.offsetHeight)}px; max-width: ${l/((e.right-e.left)/o.offsetWidth)}px`,class:"cm-completionInfo-"+(h?c?"left-narrow":"right-narrow":u?"left":"right")}}function A(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/n);return{from:t*n,to:(t+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class P{constructor(t,e,n){this.view=t,this.stateField=e,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let r=t.state.field(e),{options:i,selected:s}=r.open,o=t.state.facet(S);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,n,r){let i=document.createElement("span");i.className="cm-completionLabel";let s=t.displayLabel||t.label,o=0;for(let t=0;t<r.length;){let e=r[t++],n=r[t++];e>o&&i.appendChild(document.createTextNode(s.slice(o,e)));let a=i.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(s.slice(e,n))),a.className="cm-completionMatchedText",o=n}return o<s.length&&i.appendChild(document.createTextNode(s.slice(o))),i},position:50},{render(t){if(!t.detail)return null;let e=document.createElement("span");return e.className="cm-completionDetail",e.textContent=t.detail,e},position:80}),e.sort(((t,e)=>t.position-e.position)).map((t=>t.render))}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=A(i.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(n=>{let{options:r}=t.state.field(e).open;for(let e,i=n.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(e=/-(\d+)$/.exec(i.id))&&+e[1]<r.length)return this.applyCompletion(t,r[+e[1]]),void n.preventDefault()})),this.dom.addEventListener("focusout",(e=>{let n=t.state.field(this.stateField,!1);n&&n.tooltip&&t.state.facet(S).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:b.of(null)})})),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let n=t.state.field(this.stateField),r=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),n!=r){let{options:i,selected:s,disabled:o}=n.open;r.open&&r.open.options==i||(this.range=A(i.length,s,t.state.facet(S).maxRenderedOptions),this.showOptions(i,n.id)),this.updateSel(),o!=(null===(e=r.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!o)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected<this.range.from||e.selected>=this.range.to)&&(this.range=A(e.options.length,e.selected,this.view.state.facet(S).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:n}=e.options[e.selected],{info:r}=n;if(!r)return;let s="string"==typeof r?document.createTextNode(r):r(n);if(!s)return;"then"in s?s.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,n)})).catch((t=>(0,i.c_)(this.view.state,t,"completion info"))):this.addInfoPane(s,n)}}addInfoPane(t,e){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",null!=t.nodeType)n.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:r}=t;n.appendChild(e),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==t?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),e=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return e&&function(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.top<n.top?t.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=t.getBoundingClientRect(),i=this.space;if(!i){let t=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:t.clientWidth,bottom:t.clientHeight}}return r.top>Math.min(i.bottom,e.bottom)-10||r.bottom<Math.max(i.top,e.top)+10?null:this.view.state.facet(S).positionInfo(this.view,e,r,n,i,this.dom)}placeInfo(t){this.info&&(t?(t.style&&(this.info.style.cssText=t.style),this.info.className="cm-tooltip cm-completionInfo "+(t.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(t,e,n){const r=document.createElement("ul");r.id=e,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",(t=>{t.target==r&&t.preventDefault()}));let i=null;for(let s=n.from;s<n.to;s++){let{completion:o,match:a}=t[s],{section:l}=o;if(l){let t="string"==typeof l?l:l.name;t!=i&&(s>n.from||0==n.from)&&(i=t,"string"!=typeof l&&l.header?r.appendChild(l.header(l)):r.appendChild(document.createElement("completion-section")).textContent=t)}const c=r.appendChild(document.createElement("li"));c.id=e+"-"+s,c.setAttribute("role","option");let u=this.optionClass(o);u&&(c.className=u);for(let t of this.optionContent){let e=t(o,this.view.state,this.view,a);e&&c.appendChild(e)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to<t.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function M(t,e){return n=>new P(n,t,e)}function C(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class k{constructor(t,e,n,r,i,s){this.options=t,this.attrs=e,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=s}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new k(this.options,_(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,n,r,i,s){if(r&&!s&&t.some((t=>t.isPending)))return r.setDisabled();let o=function(t,e){let n=[],r=null,i=t=>{n.push(t);let{section:e}=t.completion;if(e){r||(r=[]);let t="string"==typeof e?e:e.name;r.some((e=>e.name==t))||r.push("string"==typeof e?{name:t}:e)}},s=e.facet(S);for(let r of t)if(r.hasResult()){let t=r.result.getMatch;if(!1===r.result.filter)for(let e of r.result.options)i(new h(e,r.source,t?t(e):[],1e9-n.length));else{let n,o=e.sliceDoc(r.from,r.to),a=s.filterStrict?new x(o):new T(o);for(let e of r.result.options)if(n=a.match(e.label)){let s=e.displayLabel?t?t(e,n.matched):[]:n.matched;i(new h(e,r.source,s,n.score+(e.boost||0)))}}}if(r){let t=Object.create(null),e=0,i=(t,e)=>{var n,r;return(null!==(n=t.rank)&&void 0!==n?n:1e9)-(null!==(r=e.rank)&&void 0!==r?r:1e9)||(t.name<e.name?-1:1)};for(let n of r.sort(i))e-=1e5,t[n.name]=e;for(let e of n){let{section:n}=e.completion;n&&(e.score+=t["string"==typeof n?n:n.name])}}let o=[],a=null,l=s.compareCompletions;for(let t of n.sort(((t,e)=>e.score-t.score||l(t.completion,e.completion)))){let e=t.completion;!a||a.label!=e.label||a.detail!=e.detail||null!=a.type&&null!=e.type&&a.type!=e.type||a.apply!=e.apply||a.boost!=e.boost?o.push(t):C(t.completion)>C(a)&&(o[o.length-1]=t),a=t.completion}return o}(t,e);if(!o.length)return r&&t.some((t=>t.isPending))?r.setDisabled():null;let a=e.facet(S).selectOnOpen?0:-1;if(r&&r.selected!=a&&-1!=r.selected){let t=r.options[r.selected].completion;for(let e=0;e<o.length;e++)if(o[e].completion==t){a=e;break}}return new k(o,_(n,a),{pos:t.reduce(((t,e)=>e.hasResult()?Math.min(t,e.from):t),1e8),create:z,above:i.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(t){return new k(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new k(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class I{constructor(t,e,n){this.active=t,this.id=e,this.open=n}static start(){return new I(D,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,n=e.facet(S),r=(n.override||e.languageDataAt("autocomplete",p(e)).map(g)).map((e=>(this.active.find((t=>t.source==e))||new B(e,this.active.some((t=>0!=t.state))?1:0)).update(t,n)));r.length==this.active.length&&r.every(((t,e)=>t==this.active[e]))&&(r=this.active);let i=this.open,s=t.effects.some((t=>t.is(F)));i&&t.docChanged&&(i=i.map(t.changes)),t.selection||r.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;r<e.length&&!e[r].hasResult();)r++;let i=n==t.length,s=r==e.length;if(i||s)return i==s;if(t[n++].result!=e[r++].result)return!1}}(r,this.active)||s?i=k.build(r,e,this.id,i,n,s):i&&i.disabled&&!r.some((t=>t.isPending))&&(i=null),!i&&r.every((t=>!t.isPending))&&r.some((t=>t.hasResult()))&&(r=r.map((t=>t.hasResult()?new B(t.source,0):t)));for(let e of t.effects)e.is(j)&&(i=i&&i.setSelected(e.value,this.id));return r==this.active&&i==this.open?this:new I(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?O:N}}const O={"aria-autocomplete":"list"},N={};function _(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const D=[];function L(t,e){if(t.isUserEvent("input.complete")){let n=t.annotation(f);if(n&&e.activateOnCompletion(n))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class B{constructor(t,e,n=!1){this.source=t,this.state=e,this.explicit=n}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let n=L(t,e),r=this;(8&n||16&n&&this.touches(t))&&(r=new B(r.source,0)),4&n&&0==r.state&&(r=new B(this.source,1)),r=r.updateFor(t,n);for(let e of t.effects)if(e.is(v))r=new B(r.source,1,e.value);else if(e.is(b))r=new B(r.source,0);else if(e.is(F))for(let t of e.value)t.source==r.source&&(r=t);return r}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(p(t.state))}}class R extends B{constructor(t,e,n,r,i,s){super(t,3,e),this.limit=n,this.result=r,this.from=i,this.to=s}hasResult(){return!0}updateFor(t,e){var n;if(!(3&e))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),s=t.changes.mapPos(this.to,1),a=p(t.state);if(a>s||!r||2&e&&(p(t.startState)==this.from||a<this.limit))return new B(this.source,4&e?1:0);let l=t.changes.mapPos(this.limit);return function(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return"function"==typeof t?t(i,n,r,e):d(t,!0).test(i)}(r.validFor,t.state,i,s)?new R(this.source,this.explicit,l,r,i,s):r.update&&(r=r.update(r,i,s,new o(t.state,a,!1)))?new R(this.source,this.explicit,l,r,r.from,null!==(n=r.to)&&void 0!==n?n:p(t.state)):new B(this.source,1,this.explicit)}map(t){return t.empty?this:(this.result.map?this.result.map(this.result,t):this.result)?new R(this.source,this.explicit,t.mapPos(this.limit),this.result,t.mapPos(this.from),t.mapPos(this.to,1)):new B(this.source,0)}touches(t){return t.changes.touchesRange(this.from,this.to)}}const F=r.Pe.define({map:(t,e)=>t.map((t=>t.map(e)))}),j=r.Pe.define(),U=r.sU.define({create:()=>I.start(),update:(t,e)=>t.update(e),provide:t=>[i.DK.from(t,(t=>t.tooltip)),i.Lz.contentAttributes.from(t,(t=>t.attrs))]});function V(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(U).active.find((t=>t.source==e.source));return r instanceof R&&("string"==typeof n?t.dispatch(Object.assign(Object.assign({},m(t.state,n,r.from,r.to)),{annotations:f.of(e.completion)})):n(t,e.completion,r.from,r.to),!0)}const z=M(U,V);function q(t,e="option"){return n=>{let r=n.state.field(U,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(S).interactionDelay)return!1;let s,o=1;"page"==e&&(s=(0,i.Eg)(n,r.open.tooltip))&&(o=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:a}=r.open.options,l=r.open.selected>-1?r.open.selected+o*(t?1:-1):t?0:a-1;return l<0?l="page"==e?0:a-1:l>=a&&(l="page"==e?a-1:0),n.dispatch({effects:j.of(l)}),!0}}const $=t=>{let e=t.state.field(U,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(S).interactionDelay)&&V(t,e.open.options[e.open.selected])},H=t=>!!t.state.field(U,!1)&&(t.dispatch({effects:v.of(!0)}),!0),K=t=>{let e=t.state.field(U,!1);return!(!e||!e.active.some((t=>0!=t.state))||(t.dispatch({effects:b.of(null)}),0))};class Y{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const W=i.Z9.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(U).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(U),n=t.state.facet(S);if(!t.selectionSet&&!t.docChanged&&t.startState.field(U)==e)return;let r=t.transactions.some((t=>{let e=L(t,n);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let e=0;e<this.running.length;e++){let n=this.running[e];if(r||n.context.abortOnDocChange&&t.docChanged||n.updates.length+t.transactions.length>50&&Date.now()-n.time>1e3){for(let t of n.context.abortListeners)try{t()}catch(t){(0,i.c_)(this.view.state,t)}n.context.abortListeners=null,this.running.splice(e--,1)}else n.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(v)))))&&(this.pendingStart=!0);let s=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>t.isPending&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),s):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(U);for(let t of e.active)t.isPending&&!this.running.some((e=>e.active.source==t.source))&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(S).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=p(e),r=new o(e,n,t.explicit,this.view),s=new Y(t,r);this.running.push(s),Promise.resolve(t.source(r)).then((t=>{s.context.aborted||(s.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:b.of(null)}),(0,i.c_)(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(S).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(S),r=this.view.state.field(U);for(let i=0;i<this.running.length;i++){let s=this.running[i];if(void 0===s.done)continue;if(this.running.splice(i--,1),s.done){let r=p(s.updates.length?s.updates[0].startState:this.view.state),i=Math.min(r,s.done.from+(s.active.explicit?0:1)),o=new R(s.active.source,s.active.explicit,i,s.done,s.done.from,null!==(t=s.done.to)&&void 0!==t?t:r);for(let t of s.updates)o=o.update(t,n);if(o.hasResult()){e.push(o);continue}}let o=r.active.find((t=>t.source==s.active.source));if(o&&o.isPending)if(null==s.done){let t=new B(s.active.source,0);for(let e of s.updates)t=t.update(e,n);t.isPending||e.push(t)}else this.startQuery(o)}(e.length||r.open&&r.open.disabled)&&this.view.dispatch({effects:F.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(U,!1);if(e&&e.tooltip&&this.view.state.facet(S).closeOnBlur){let n=e.open&&(0,i.Eg)(this.view,e.open.tooltip);n&&n.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:b.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:v.of(!1)})),20),this.composing=0}}}),J="object"==typeof navigator&&/Win/.test(navigator.platform),X=r.Nb.highest(i.Lz.domEventHandlers({keydown(t,e){let n=e.state.field(U,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&(!J||!t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find((t=>t.source==r.source)),s=r.completion.commitCharacters||i.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&V(e,r),!1}})),G=i.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Z{constructor(t,e,n,r){this.field=t,this.line=e,this.from=n,this.to=r}}class Q{constructor(t,e,n){this.field=t,this.from=e,this.to=n}map(t){let e=t.mapPos(this.from,-1,r.iR.TrackDel),n=t.mapPos(this.to,1,r.iR.TrackDel);return null==e||null==n?null:new Q(this.field,e,n)}}class tt{constructor(t,e){this.lines=t,this.fieldPositions=e}instantiate(t,e){let n=[],r=[e],i=t.doc.lineAt(e),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,a=/^\t*/.exec(i)[0].length;for(let e=0;e<a;e++)n+=t.facet(s.Xt);r.push(e+n.length-a),i=n+i.slice(a)}n.push(i),e+=i.length+1}let a=this.fieldPositions.map((t=>new Q(t.field,r[t.line]+t.from,r[t.line]+t.to)));return{text:n,ranges:a}}static parse(t){let e,n=[],r=[],i=[];for(let s of t.split(/\r\n?|\n/)){for(;e=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(s);){let t=e[1]?+e[1]:null,o=e[2]||e[3]||"",a=-1,l=o.replace(/\\[{}]/g,(t=>t[1]));for(let e=0;e<n.length;e++)(null!=t?n[e].seq==t:l&&n[e].name==l)&&(a=e);if(a<0){let e=0;for(;e<n.length&&(null==t||null!=n[e].seq&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:l}),a=e;for(let t of i)t.field>=a&&t.field++}i.push(new Z(a,r.length,e.index,e.index+l.length)),s=s.slice(0,e.index)+o+s.slice(e.index+e[0].length)}s=s.replace(/\\([{}])/g,((t,e,n)=>{for(let t of i)t.line==r.length&&t.from>n&&(t.from--,t.to--);return e})),r.push(s)}return new tt(r,i)}}let et=i.NZ.widget({widget:new class extends i.xO{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),nt=i.NZ.mark({class:"cm-snippetField"});class rt{constructor(t,e){this.ranges=t,this.active=e,this.deco=i.NZ.set(t.map((t=>(t.from==t.to?et:nt).range(t.from,t.to))))}map(t){let e=[];for(let n of this.ranges){let r=n.map(t);if(!r)return null;e.push(r)}return new rt(e,this.active)}selectionInsideField(t){return t.ranges.every((t=>this.ranges.some((e=>e.field==this.active&&e.from<=t.from&&e.to>=t.to))))}}const it=r.Pe.define({map:(t,e)=>t&&t.map(e)}),st=r.Pe.define(),ot=r.sU.define({create:()=>null,update(t,e){for(let n of e.effects){if(n.is(it))return n.value;if(n.is(st)&&t)return new rt(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>i.Lz.decorations.from(t,(t=>t?t.deco:i.NZ.none))});function at(t,e){return r.OF.create(t.filter((t=>t.field==e)).map((t=>r.OF.range(t.from,t.to))))}function lt(t){let e=tt.parse(t);return(t,n,i,s)=>{let{text:o,ranges:a}=e.instantiate(t.state,i),{main:l}=t.state.selection,c={changes:{from:i,to:s==l.from?l.to:s,insert:r.EY.of(o)},scrollIntoView:!0,annotations:n?[f.of(n),r.ZX.userEvent.of("input.complete")]:void 0};if(a.length&&(c.selection=at(a,0)),a.some((t=>t.field>0))){let e=new rt(a,0),n=c.effects=[it.of(e)];void 0===t.state.field(ot,!1)&&n.push(r.Pe.appendConfig.of([ot,pt,ft,G]))}t.dispatch(t.state.update(c))}}function ct(t){return({state:e,dispatch:n})=>{let r=e.field(ot,!1);if(!r||t<0&&0==r.active)return!1;let i=r.active+t,s=t>0&&!r.ranges.some((e=>e.field==i+t));return n(e.update({selection:at(r.ranges,i),effects:it.of(s?null:new rt(r.ranges,i)),scrollIntoView:!0})),!0}}const ut=[{key:"Tab",run:ct(1),shift:ct(-1)},{key:"Escape",run:({state:t,dispatch:e})=>!!t.field(ot,!1)&&(e(t.update({effects:it.of(null)})),!0)}],ht=r.sj.define({combine:t=>t.length?t[0]:ut}),pt=r.Nb.highest(i.w4.compute([ht],(t=>t.facet(ht))));function dt(t,e){return Object.assign(Object.assign({},e),{apply:lt(t)})}const ft=i.Lz.domEventHandlers({mousedown(t,e){let n,r=e.state.field(ot,!1);if(!r||null==(n=e.posAtCoords({x:t.clientX,y:t.clientY})))return!1;let i=r.ranges.find((t=>t.from<=n&&t.to>=n));return!(!i||i.field==r.active||(e.dispatch({selection:at(r.ranges,i.field),effects:it.of(r.ranges.some((t=>t.field>i.field))?new rt(r.ranges,i.field):null),scrollIntoView:!0}),0))}});function mt(t,e){return new RegExp(e(t.source),t.unicode?"u":"")}const yt=Object.create(null);function gt(t,e,n,r,i){for(let s=t.iterLines(),o=0;!s.next().done;){let t,{value:a}=s;for(e.lastIndex=0;t=e.exec(a);)if(!r[t[0]]&&o+t.index!=i&&(n.push({type:"text",label:t[0]}),r[t[0]]=!0,n.length>=2e3))return;o+=a.length+1}}function vt(t,e,n,r,i){let s=t.length>=1e3,o=s&&e.get(t);if(o)return o;let a=[],l=Object.create(null);if(t.children){let s=0;for(let o of t.children){if(o.length>=1e3)for(let t of vt(o,e,n,r-s,i-s))l[t.label]||(l[t.label]=!0,a.push(t));else gt(o,n,a,l,i-s);s+=o.length+1}}else gt(t,n,a,l,i);return s&&a.length<2e3&&e.set(t,a),a}const bt=t=>{let e=t.state.languageDataAt("wordChars",t.pos).join(""),n=function(t){let e=t.replace(/[\]\-\\]/g,"\\$&");try{return new RegExp(`[\\p{Alphabetic}\\p{Number}_${e}]+`,"ug")}catch(t){return new RegExp(`[w${e}]`,"g")}}(e),r=t.matchBefore(mt(n,(t=>t+"$")));if(!r&&!t.explicit)return null;let i=r?r.from:t.pos,s=vt(t.state.doc,function(t){return yt[t]||(yt[t]=new WeakMap)}(e),n,5e4,i);return{from:i,options:s,validFor:mt(n,(t=>"^"+t))}},Tt={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},xt=r.Pe.define({map(t,e){let n=e.mapPos(t,-1,r.iR.TrackAfter);return null==n?void 0:n}}),St=new class extends r.FB{};St.startSide=1,St.endSide=-1;const wt=r.sU.define({create:()=>r.om.empty,update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=n.from&&t<=n.to})}for(let n of e.effects)n.is(xt)&&(t=t.update({add:[St.range(n.value,n.value+1)]}));return t}});function Et(){return[kt,wt]}const At="()[]{}<>«»»«[]{}";function Pt(t){for(let e=0;e<16;e+=2)if(At.charCodeAt(e)==t)return At.charAt(e+1);return(0,r.MK)(t<128?t:t+1)}function Mt(t,e){return t.languageDataAt("closeBrackets",e)[0]||Tt}const Ct="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),kt=i.Lz.inputHandler.of(((t,e,n,i)=>{if((Ct?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let s=t.state.selection.main;if(i.length>2||2==i.length&&1==(0,r.Fh)((0,r.vS)(i,0))||e!=s.from||n!=s.to)return!1;let o=function(t,e){let n=Mt(t,t.selection.main.head),i=n.brackets||Tt.brackets;for(let s of i){let o=Pt((0,r.vS)(s,0));if(e==s)return o==s?Lt(t,s,i.indexOf(s+s+s)>-1,n):_t(t,s,o,n.before||Tt.before);if(e==o&&Ot(t,t.selection.main.from))return Dt(t,0,o)}return null}(t.state,i);return!!o&&(t.dispatch(o),!0)})),It=[{key:"Backspace",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Mt(t,t.selection.main.head).brackets||Tt.brackets,i=null,s=t.changeByRange((e=>{if(e.empty){let i=function(t,e){let n=t.sliceString(e-2,e);return(0,r.Fh)((0,r.vS)(n,0))==n.length?n:n.slice(1)}(t.doc,e.head);for(let s of n)if(s==i&&Nt(t.doc,e.head)==Pt((0,r.vS)(s,0)))return{changes:{from:e.head-s.length,to:e.head+s.length},range:r.OF.cursor(e.head-s.length)}}return{range:i=e}}));return i||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i}}];function Ot(t,e){let n=!1;return t.field(wt).between(0,t.doc.length,(t=>{t==e&&(n=!0)})),n}function Nt(t,e){let n=t.sliceString(e,e+2);return n.slice(0,(0,r.Fh)((0,r.vS)(n,0)))}function _t(t,e,n,i){let s=null,o=t.changeByRange((o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:xt.of(o.to+e.length),range:r.OF.range(o.anchor+e.length,o.head+e.length)};let a=Nt(t.doc,o.head);return!a||/\s/.test(a)||i.indexOf(a)>-1?{changes:{insert:e+n,from:o.head},effects:xt.of(o.head+e.length),range:r.OF.cursor(o.head+e.length)}:{range:s=o}}));return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Dt(t,e,n){let i=null,s=t.changeByRange((e=>e.empty&&Nt(t.doc,e.head)==n?{changes:{from:e.head,to:e.head+n.length,insert:n},range:r.OF.cursor(e.head+n.length)}:i={range:e}));return i?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Lt(t,e,n,i){let o=i.stringPrefixes||Tt.stringPrefixes,a=null,l=t.changeByRange((i=>{if(!i.empty)return{changes:[{insert:e,from:i.from},{insert:e,from:i.to}],effects:xt.of(i.to+e.length),range:r.OF.range(i.anchor+e.length,i.head+e.length)};let l,c=i.head,u=Nt(t.doc,c);if(u==e){if(Bt(t,c))return{changes:{insert:e+e,from:c},effects:xt.of(c+e.length),range:r.OF.cursor(c+e.length)};if(Ot(t,c)){let i=n&&t.sliceDoc(c,c+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+i.length,insert:i},range:r.OF.cursor(c+i.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(l=Rt(t,c-2*e.length,o))>-1&&Bt(t,l))return{changes:{insert:e+e+e+e,from:c},effects:xt.of(c+e.length),range:r.OF.cursor(c+e.length)};if(t.charCategorizer(c)(u)!=r.Je.Word&&Rt(t,c,o)>-1&&!function(t,e,n,r){let i=(0,s.mv)(t).resolveInner(e,-1),o=r.reduce(((t,e)=>Math.max(t,e.length)),0);for(let s=0;s<5;s++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let e=i.firstChild;for(;e&&e.from==i.from&&e.to-e.from>n.length+a;){if(t.sliceDoc(e.to-n.length,e.to)==n)return!1;e=e.firstChild}return!0}let l=i.to==e&&i.parent;if(!l)break;i=l}return!1}(t,c,e,o))return{changes:{insert:e+e,from:c},effects:xt.of(c+e.length),range:r.OF.cursor(c+e.length)}}return{range:a=i}}));return a?null:t.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function Bt(t,e){let n=(0,s.mv)(t).resolveInner(e+1);return n.parent&&n.from==e}function Rt(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=r.Je.Word)return e;for(let s of n){let n=e-s.length;if(t.sliceDoc(n,e)==s&&i(t.sliceDoc(n-1,n))!=r.Je.Word)return n}return-1}function Ft(t={}){return[X,U,S.of(t),W,Ut,G]}const jt=[{key:"Ctrl-Space",run:H},{mac:"Alt-`",run:H},{key:"Escape",run:K},{key:"ArrowDown",run:q(!0)},{key:"ArrowUp",run:q(!1)},{key:"PageDown",run:q(!0,"page")},{key:"PageUp",run:q(!1,"page")},{key:"Enter",run:$}],Ut=r.Nb.highest(i.w4.computeN([S],(t=>t.facet(S).defaultKeymap?[jt]:[])))},22778:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BlockStatement=function(t){var e;this.tokenChar(123);const n=this.enterDelimited(),r=null==(e=t.directives)?void 0:e.length;if(r){var i;const e=t.body.length?2:1;this.printSequence(t.directives,!0,!0,e),null!=(i=t.directives[r-1].trailingComments)&&i.length||this.newline(e)}this.printSequence(t.body,!0,!0),this._noLineTerminatorAfterNode=n,this.rightBrace(t)},e.Directive=function(t){this.print(t.value),this.semicolon()},e.DirectiveLiteral=function(t){const e=this.getPossibleRaw(t);if(!this.format.minified&&void 0!==e)return void this.token(e);const{value:i}=t;if(r.test(i)){if(n.test(i))throw new Error("Malformed AST: it is not possible to print a directive containing both unescaped single and double quotes.");this.token(`'${i}'`)}else this.token(`"${i}"`)},e.File=function(t){t.program&&this.print(t.program.interpreter),this.print(t.program)},e.InterpreterDirective=function(t){this.token(`#!${t.value}`),this._newline()},e.Placeholder=function(t){this.token("%%"),this.print(t.name),this.token("%%"),"Statement"===t.expectedNode&&this.semicolon()},e.Program=function(t){var e;this.printInnerComments(!1);const n=null==(e=t.directives)?void 0:e.length;if(n){var r;const e=t.body.length?2:1;this.printSequence(t.directives,void 0,void 0,e),null!=(r=t.directives[n-1].trailingComments)&&r.length||this.newline(e)}this.printSequence(t.body)};const n=/(?:^|[^\\])(?:\\\\)*'/,r=/(?:^|[^\\])(?:\\\\)*"/},22956:(t,e,n)=>{var r=n(34110).Buffer;function i(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===i(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===i(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===i(t)},e.isError=function(t){return"[object Error]"===i(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r.isBuffer},23122:(t,e,n)=>{var r=n(80421),i=n(22521),s=n(13185),o=n(72341),a=n(21955),l=RegExp.prototype;t.exports=o.correct?function(t){return t.flags}:function(t){return o.correct||!s(l,t)||i(t,"flags")?t.flags:r(a,t)}},23177:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(88087);r({target:"Map",proto:!0,real:!0,forced:!0},{every:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t,r){if(!n(t,r,e))return!1}),!0)}})},23183:(t,e,n)=>{var r=n(52479),i=n(26600),s=n(34024),o=n(78861),a=n(95167),l=i([].concat);t.exports=r("Reflect","ownKeys")||function(t){var e=s.f(a(t)),n=o.f;return n?l(e,n(t)):e}},23273:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n=!1){return t.object=(0,r.memberExpression)(t.object,t.property,t.computed),t.property=e,t.computed=!!n,t};var r=n(53287)},23486:(t,e,n)=>{var r=n(51192),i=n(1483).f,s=n(26531),o=n(33088),a=n(66177),l=n(43092),c=n(4228);t.exports=function(t,e){var n,u,h,p,d,f=t.target,m=t.global,y=t.stat;if(n=m?r:y?r[f]||a(f,{}):r[f]&&r[f].prototype)for(u in e){if(p=e[u],h=t.dontCallGetSet?(d=i(n,u))&&d.value:n[u],!c(m?u:f+(y?".":"#")+u,t.forced)&&void 0!==h){if(typeof p==typeof h)continue;l(p,h)}(t.sham||h&&h.sham)&&s(p,"sham",!0),o(n,u,p,t)}}},23492:(t,e,n)=>{var r=n(3527).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i<e;i++)n[i]=t.readUInt32BE(4*i);return n}function s(t){for(;0<t.length;t++)t[0]=0}function o(t,e,n,r,i){for(var s,o,a,l,c=n[0],u=n[1],h=n[2],p=n[3],d=t[0]^e[0],f=t[1]^e[1],m=t[2]^e[2],y=t[3]^e[3],g=4,v=1;v<i;v++)s=c[d>>>24]^u[f>>>16&255]^h[m>>>8&255]^p[255&y]^e[g++],o=c[f>>>24]^u[m>>>16&255]^h[y>>>8&255]^p[255&d]^e[g++],a=c[m>>>24]^u[y>>>16&255]^h[d>>>8&255]^p[255&f]^e[g++],l=c[y>>>24]^u[d>>>16&255]^h[f>>>8&255]^p[255&m]^e[g++],d=s,f=o,m=a,y=l;return s=(r[d>>>24]<<24|r[f>>>16&255]<<16|r[m>>>8&255]<<8|r[255&y])^e[g++],o=(r[f>>>24]<<24|r[m>>>16&255]<<16|r[y>>>8&255]<<8|r[255&d])^e[g++],a=(r[m>>>24]<<24|r[y>>>16&255]<<16|r[d>>>8&255]<<8|r[255&f])^e[g++],l=(r[y>>>24]<<24|r[d>>>16&255]<<16|r[f>>>8&255]<<8|r[255&m])^e[g++],[s>>>=0,o>>>=0,a>>>=0,l>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],l=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],s=[[],[],[],[]],o=0,a=0,l=0;l<256;++l){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,n[o]=c,r[c]=o;var u=t[o],h=t[u],p=t[h],d=257*t[c]^16843008*c;i[0][o]=d<<24|d>>>8,i[1][o]=d<<16|d>>>16,i[2][o]=d<<8|d>>>24,i[3][o]=d,d=16843009*p^65537*h^257*u^16843008*o,s[0][c]=d<<24|d>>>8,s[1][c]=d<<16|d>>>16,s[2][c]=d<<8|d>>>24,s[3][c]=d,0===o?o=a=1:(o=u^t[t[t[p^u]]],a^=t[t[a]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:s}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],s=0;s<e;s++)i[s]=t[s];for(s=e;s<r;s++){var o=i[s-1];s%e==0?(o=o<<8|o>>>24,o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o],o^=a[s/e|0]<<24):e>6&&s%e==4&&(o=l.SBOX[o>>>24]<<24|l.SBOX[o>>>16&255]<<16|l.SBOX[o>>>8&255]<<8|l.SBOX[255&o]),i[s]=i[s-e]^o}for(var c=[],u=0;u<r;u++){var h=r-u,p=i[h-(u%4?0:4)];c[u]=u<4||h<=4?p:l.INV_SUB_MIX[0][l.SBOX[p>>>24]]^l.INV_SUB_MIX[1][l.SBOX[p>>>16&255]]^l.INV_SUB_MIX[2][l.SBOX[p>>>8&255]]^l.INV_SUB_MIX[3][l.SBOX[255&p]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return o(t=i(t),this._keySchedule,l.SUB_MIX,l.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=o(t,this._invKeySchedule,l.INV_SUB_MIX,l.INV_SBOX,this._nRounds),s=r.allocUnsafe(16);return s.writeUInt32BE(n[0],0),s.writeUInt32BE(n[3],4),s.writeUInt32BE(n[2],8),s.writeUInt32BE(n[1],12),s},c.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},t.exports.AES=c},23666:(t,e,n)=>{function r(t,e){const n=e||{};return(""===t[t.length-1]?[...t,""]:t).join((n.padRight?" ":"")+","+(!1===n.padLeft?"":" ")).trim()}n.d(e,{A:()=>r})},23855:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(53204);r({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return i(o,this,s(t))}})},23878:(t,e,n)=>{var r=n(9106),i=n(64813);t.exports=function(t,e){var n=t[e];return i(n)?void 0:r(n)}},24215:(t,e,n)=>{var r=n(26600),i=n(59767),s=n(26792),o=Object,a=r("".split);t.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(t){return"String"===s(t)?a(t,""):o(t)}:o},24229:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return(0,r.default)(t,e),(0,i.default)(t,e),(0,s.default)(t,e),t};var r=n(82186),i=n(18782),s=n(32740)},24330:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(6695);r({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return i(o,this,s(t))}})},24377:(t,e,n)=>{var r=n(14852),i=n(49589),s=n(62198),o=n(95167),a=n(55953),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",p="configurable",d="writable";e.f=r?s?function(t,e,n){if(o(t),e=a(e),o(n),"function"==typeof t&&"prototype"===e&&"value"in n&&d in n&&!n[d]){var r=u(t,e);r&&r[d]&&(t[e]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:h in n?n[h]:r[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(o(t),e=a(e),o(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},24398:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(53287);e.default=function(t){switch(t){case"string":return(0,r.stringTypeAnnotation)();case"number":return(0,r.numberTypeAnnotation)();case"undefined":return(0,r.voidTypeAnnotation)();case"boolean":return(0,r.booleanTypeAnnotation)();case"function":return(0,r.genericTypeAnnotation)((0,r.identifier)("Function"));case"object":return(0,r.genericTypeAnnotation)((0,r.identifier)("Object"));case"symbol":return(0,r.genericTypeAnnotation)((0,r.identifier)("Symbol"));case"bigint":return(0,r.anyTypeAnnotation)()}throw new Error("Invalid typeof value: "+t)}},24619:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(25364);function i(t,e,n){return(e=(0,r.A)(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},25178:(t,e,n)=>{var r=n(2269);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},25213:(t,e,n)=>{var r,i;!function(){var s={version:"3.5.17"},o=[].slice,a=function(t){return o.call(t)},l=window.document;function c(t){return t&&(t.ownerDocument||t.document||t).documentElement}function u(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{a(l.documentElement.childNodes)[0].nodeType}catch(t){a=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var h=window.Element.prototype,p=h.setAttribute,d=h.setAttributeNS,f=window.CSSStyleDeclaration.prototype,m=f.setProperty;h.setAttribute=function(t,e){p.call(this,t,e+"")},h.setAttributeNS=function(t,e,n){d.call(this,t,e,n+"")},f.setProperty=function(t,e,n){m.call(this,t,e+"",n)}}function y(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function g(t){return null===t?NaN:+t}function v(t){return!isNaN(t)}function b(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var s=r+i>>>1;t(e[s],n)<0?r=s+1:i=s}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);r<i;){var s=r+i>>>1;t(e[s],n)>0?i=s:r=s+1}return r}}}s.ascending=y,s.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},s.min=function(t,e){var n,r,i=-1,s=t.length;if(1===arguments.length){for(;++i<s;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<s;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<s;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<s;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},s.max=function(t,e){var n,r,i=-1,s=t.length;if(1===arguments.length){for(;++i<s;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<s;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<s;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<s;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},s.extent=function(t,e){var n,r,i,s=-1,o=t.length;if(1===arguments.length){for(;++s<o;)if(null!=(r=t[s])&&r>=r){n=i=r;break}for(;++s<o;)null!=(r=t[s])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++s<o;)if(null!=(r=e.call(t,t[s],s))&&r>=r){n=i=r;break}for(;++s<o;)null!=(r=e.call(t,t[s],s))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},s.sum=function(t,e){var n,r=0,i=t.length,s=-1;if(1===arguments.length)for(;++s<i;)v(n=+t[s])&&(r+=n);else for(;++s<i;)v(n=+e.call(t,t[s],s))&&(r+=n);return r},s.mean=function(t,e){var n,r=0,i=t.length,s=-1,o=i;if(1===arguments.length)for(;++s<i;)v(n=g(t[s]))?r+=n:--o;else for(;++s<i;)v(n=g(e.call(t,t[s],s)))?r+=n:--o;if(o)return r/o},s.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],s=n-r;return s?i+s*(t[r]-i):i},s.median=function(t,e){var n,r=[],i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)v(n=g(t[o]))&&r.push(n);else for(;++o<i;)v(n=g(e.call(t,t[o],o)))&&r.push(n);if(r.length)return s.quantile(r.sort(y),.5)},s.variance=function(t,e){var n,r,i=t.length,s=0,o=0,a=-1,l=0;if(1===arguments.length)for(;++a<i;)v(n=g(t[a]))&&(o+=(r=n-s)*(n-(s+=r/++l)));else for(;++a<i;)v(n=g(e.call(t,t[a],a)))&&(o+=(r=n-s)*(n-(s+=r/++l)));if(l>1)return o/(l-1)},s.deviation=function(){var t=s.variance.apply(this,arguments);return t?Math.sqrt(t):t};var T=b(y);function x(t){return t.length}s.bisectLeft=T.left,s.bisect=s.bisectRight=T.right,s.bisector=function(t){return b(1===t.length?function(e,n){return y(t(e),n)}:t)},s.shuffle=function(t,e,n){(s=arguments.length)<3&&(n=t.length,s<2&&(e=0));for(var r,i,s=n-e;s;)i=Math.random()*s--|0,r=t[s+e],t[s+e]=t[i+e],t[i+e]=r;return t},s.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},s.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],i=new Array(n<0?0:n);e<n;)i[e]=[r,r=t[++e]];return i},s.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=s.min(t,x),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r},s.zip=function(){return s.transpose(arguments)},s.keys=function(t){var e=[];for(var n in t)e.push(n);return e},s.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},s.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},s.merge=function(t){for(var e,n,r,i=t.length,s=-1,o=0;++s<i;)o+=t[s].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n};var S=Math.abs;function w(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function E(){this._=Object.create(null)}s.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n==1/0)throw new Error("infinite range");var r,i=[],s=function(t){for(var e=1;t*e%1;)e*=10;return e}(S(n)),o=-1;if(t*=s,e*=s,(n*=s)<0)for(;(r=t+n*++o)>e;)i.push(r/s);else for(;(r=t+n*++o)<e;)i.push(r/s);return i},s.map=function(t,e){var n=new E;if(t instanceof E)t.forEach((function(t,e){n.set(t,e)}));else if(Array.isArray(t)){var r,i=-1,s=t.length;if(1===arguments.length)for(;++i<s;)n.set(i,t[i]);else for(;++i<s;)n.set(e.call(t,r=t[i],i),r)}else for(var o in t)n.set(o,t[o]);return n};var A="__proto__",P="\0";function M(t){return(t+="")===A||t[0]===P?P+t:t}function C(t){return(t+="")[0]===P?t.slice(1):t}function k(t){return M(t)in this._}function I(t){return(t=M(t))in this._&&delete this._[t]}function O(){var t=[];for(var e in this._)t.push(C(e));return t}function N(){var t=0;for(var e in this._)++t;return t}function _(){for(var t in this._)return!1;return!0}function D(){this._=Object.create(null)}function L(t){return t}function B(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function R(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=F.length;n<r;++n){var i=F[n]+e;if(i in t)return i}}w(E,{has:k,get:function(t){return this._[M(t)]},set:function(t,e){return this._[M(t)]=e},remove:I,keys:O,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:C(e),value:this._[e]});return t},size:N,empty:_,forEach:function(t){for(var e in this._)t.call(this,C(e),this._[e])}}),s.nest=function(){var t,e,n={},r=[],i=[];function o(i,s,a){if(a>=r.length)return e?e.call(n,s):t?s.sort(t):s;for(var l,c,u,h,p=-1,d=s.length,f=r[a++],m=new E;++p<d;)(h=m.get(l=f(c=s[p])))?h.push(c):m.set(l,[c]);return i?(c=i(),u=function(t,e){c.set(t,o(i,e,a))}):(c={},u=function(t,e){c[t]=o(i,e,a)}),m.forEach(u),c}function a(t,e){if(e>=r.length)return t;var n=[],s=i[e++];return t.forEach((function(t,r){n.push({key:t,values:a(r,e)})})),s?n.sort((function(t,e){return s(t.key,e.key)})):n}return n.map=function(t,e){return o(e,t,0)},n.entries=function(t){return a(o(s.map,t,0),0)},n.key=function(t){return r.push(t),n},n.sortKeys=function(t){return i[r.length-1]=t,n},n.sortValues=function(e){return t=e,n},n.rollup=function(t){return e=t,n},n},s.set=function(t){var e=new D;if(t)for(var n=0,r=t.length;n<r;++n)e.add(t[n]);return e},w(D,{has:k,add:function(t){return this._[M(t+="")]=!0,t},remove:I,values:O,size:N,empty:_,forEach:function(t){for(var e in this._)t.call(this,C(e))}}),s.behavior={},s.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=B(t,e,e[n]);return t};var F=["webkit","ms","moz","Moz","o","O"];function j(){}function U(){}function V(t){var e=[],n=new E;function r(){for(var n,r=e,i=-1,s=r.length;++i<s;)(n=r[i].on)&&n.apply(this,arguments);return t}return r.on=function(r,i){var s,o=n.get(r);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,s=e.indexOf(o)).concat(e.slice(s+1)),n.remove(r)),i&&e.push(n.set(r,{on:i})),t)},r}function z(){s.event.preventDefault()}function q(){for(var t,e=s.event;t=e.sourceEvent;)e=t;return e}function $(t){for(var e=new U,n=0,r=arguments.length;++n<r;)e[arguments[n]]=V(e);return e.of=function(n,r){return function(i){try{var o=i.sourceEvent=s.event;i.target=t,s.event=i,e[i.type].apply(n,r)}finally{s.event=o}}},e}s.dispatch=function(){for(var t=new U,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=V(t);return t},U.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},s.event=null,s.requote=function(t){return t.replace(H,"\\$&")};var H=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,K=function(t,e){for(var n in e)t[n]=e[n]};function Y(t){return K(t,G),t}var W=function(t,e){return e.querySelector(t)},J=function(t,e){return e.querySelectorAll(t)},X=function(t,e){var n=t.matches||t[R(t,"matchesSelector")];return X=function(t,e){return n.call(t,e)},X(t,e)};"function"==typeof Sizzle&&(W=function(t,e){return Sizzle(t,e)[0]||null},J=Sizzle,X=Sizzle.matchesSelector),s.selection=function(){return s.select(l.documentElement)};var G=s.selection.prototype=[];function Z(t){return"function"==typeof t?t:function(){return W(t,this)}}function Q(t){return"function"==typeof t?t:function(){return J(t,this)}}G.select=function(t){var e,n,r,i,s=[];t=Z(t);for(var o=-1,a=this.length;++o<a;){s.push(e=[]),e.parentNode=(r=this[o]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(e.push(n=t.call(i,i.__data__,l,o)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return Y(s)},G.selectAll=function(t){var e,n,r=[];t=Q(t);for(var i=-1,s=this.length;++i<s;)for(var o=this[i],l=-1,c=o.length;++l<c;)(n=o[l])&&(r.push(e=a(t.call(n,n.__data__,l,i))),e.parentNode=n);return Y(r)};var tt="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:tt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function nt(t,e){return t=s.ns.qualify(t),null==e?t.local?function(){this.removeAttributeNS(t.space,t.local)}:function(){this.removeAttribute(t)}:"function"==typeof e?t.local?function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}:function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}:t.local?function(){this.setAttributeNS(t.space,t.local,e)}:function(){this.setAttribute(t,e)}}function rt(t){return t.trim().replace(/\s+/g," ")}function it(t){return new RegExp("(?:^|\\s+)"+s.requote(t)+"(?:\\s+|$)","g")}function st(t){return(t+"").trim().split(/^|\s+/)}function ot(t,e){var n=(t=st(t).map(at)).length;return"function"==typeof e?function(){for(var r=-1,i=e.apply(this,arguments);++r<n;)t[r](this,i)}:function(){for(var r=-1;++r<n;)t[r](this,e)}}function at(t){var e=it(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",rt(i+" "+t))):n.setAttribute("class",rt(i.replace(e," ")))}}function lt(t,e,n){return null==e?function(){this.style.removeProperty(t)}:"function"==typeof e?function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}:function(){this.style.setProperty(t,e,n)}}function ct(t,e){return null==e?function(){delete this[t]}:"function"==typeof e?function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}:function(){this[t]=e}}function ut(t){return"function"==typeof t?t:(t=s.ns.qualify(t)).local?function(){return this.ownerDocument.createElementNS(t.space,t.local)}:function(){var e=this.ownerDocument,n=this.namespaceURI;return n===tt&&e.documentElement.namespaceURI===tt?e.createElement(t):e.createElementNS(n,t)}}function ht(){var t=this.parentNode;t&&t.removeChild(this)}function pt(t){return{__data__:t}}function dt(t){return function(){return X(this,t)}}function ft(t){return arguments.length||(t=y),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function mt(t,e){for(var n=0,r=t.length;n<r;n++)for(var i,s=t[n],o=0,a=s.length;o<a;o++)(i=s[o])&&e(i,o,n);return t}function yt(t){return K(t,gt),t}s.ns={prefix:et,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),et.hasOwnProperty(n)?{space:et[n],local:t}:t}},G.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=s.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(nt(e,t[e]));return this}return this.each(nt(t,e))},G.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=st(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!it(t[i]).test(e))return!1;return!0}for(e in t)this.each(ot(e,t[e]));return this}return this.each(ot(t,e))},G.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.each(lt(n,t[n],e));return this}if(r<2){var i=this.node();return u(i).getComputedStyle(i,null).getPropertyValue(t)}n=""}return this.each(lt(t,e,n))},G.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(ct(e,t[e]));return this}return this.each(ct(t,e))},G.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},G.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},G.append=function(t){return t=ut(t),this.select((function(){return this.appendChild(t.apply(this,arguments))}))},G.insert=function(t,e){return t=ut(t),e=Z(e),this.select((function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)}))},G.remove=function(){return this.each(ht)},G.data=function(t,e){var n,r,i=-1,s=this.length;if(!arguments.length){for(t=new Array(s=(n=this[0]).length);++i<s;)(r=n[i])&&(t[i]=r.__data__);return t}function o(t,n){var r,i,s,o=t.length,u=n.length,h=Math.min(o,u),p=new Array(u),d=new Array(u),f=new Array(o);if(e){var m,y=new E,g=new Array(o);for(r=-1;++r<o;)(i=t[r])&&(y.has(m=e.call(i,i.__data__,r))?f[r]=i:y.set(m,i),g[r]=m);for(r=-1;++r<u;)(i=y.get(m=e.call(n,s=n[r],r)))?!0!==i&&(p[r]=i,i.__data__=s):d[r]=pt(s),y.set(m,!0);for(r=-1;++r<o;)r in g&&!0!==y.get(g[r])&&(f[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],s=n[r],i?(i.__data__=s,p[r]=i):d[r]=pt(s);for(;r<u;++r)d[r]=pt(n[r]);for(;r<o;++r)f[r]=t[r]}d.update=p,d.parentNode=p.parentNode=f.parentNode=t.parentNode,a.push(d),l.push(p),c.push(f)}var a=yt([]),l=Y([]),c=Y([]);if("function"==typeof t)for(;++i<s;)o(n=this[i],t.call(n,n.parentNode.__data__,i));else for(;++i<s;)o(n=this[i],t);return l.enter=function(){return a},l.exit=function(){return c},l},G.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},G.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=dt(t));for(var s=0,o=this.length;s<o;s++){i.push(e=[]),e.parentNode=(n=this[s]).parentNode;for(var a=0,l=n.length;a<l;a++)(r=n[a])&&t.call(r,r.__data__,a,s)&&e.push(r)}return Y(i)},G.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,s=r[i];--i>=0;)(n=r[i])&&(s&&s!==n.nextSibling&&s.parentNode.insertBefore(n,s),s=n);return this},G.sort=function(t){t=ft.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},G.each=function(t){return mt(this,(function(e,n,r){t.call(e,e.__data__,n,r)}))},G.call=function(t){var e=a(arguments);return t.apply(e[0]=this,e),this},G.empty=function(){return!this.node()},G.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],r=0,i=n.length;r<i;r++){var s=n[r];if(s)return s}return null},G.size=function(){var t=0;return mt(this,(function(){++t})),t};var gt=[];function vt(t,e,n){var r="__on"+t,i=t.indexOf("."),o=Tt;i>0&&(t=t.slice(0,i));var l=bt.get(t);function c(){var e=this[r];e&&(this.removeEventListener(t,e,e.$),delete this[r])}return l&&(t=l,o=xt),i?e?function(){var i=o(e,a(arguments));c.call(this),this.addEventListener(t,this[r]=i,i.$=n),i._=e}:c:e?j:function(){var e,n=new RegExp("^__on([^.]+)"+s.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}}s.selection.enter=yt,s.selection.enter.prototype=gt,gt.append=G.append,gt.empty=G.empty,gt.node=G.node,gt.call=G.call,gt.size=G.size,gt.select=function(t){for(var e,n,r,i,s,o=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,o.push(e=[]),e.parentNode=i.parentNode;for(var c=-1,u=i.length;++c<u;)(s=i[c])?(e.push(r[c]=n=t.call(i.parentNode,s.__data__,c,a)),n.__data__=s.__data__):e.push(null)}return Y(o)},gt.insert=function(t,e){var n,r,i;return arguments.length<2&&(n=this,e=function(t,e,s){var o,a=n[s].update,l=a.length;for(s!=i&&(i=s,r=0),e>=r&&(r=e+1);!(o=a[r])&&++r<l;);return o}),G.insert.call(this,t,e)},s.select=function(t){var e;return"string"==typeof t?(e=[W(t,l)]).parentNode=l.documentElement:(e=[t]).parentNode=c(t),Y([e])},s.selectAll=function(t){var e;return"string"==typeof t?(e=a(J(t,l))).parentNode=l.documentElement:(e=a(t)).parentNode=null,Y([e])},G.on=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=!1),t)this.each(vt(n,t[n],e));return this}if(r<2)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(vt(t,e,n))};var bt=s.map({mouseenter:"mouseover",mouseleave:"mouseout"});function Tt(t,e){return function(n){var r=s.event;s.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{s.event=r}}}function xt(t,e){var n=Tt(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}l&&bt.forEach((function(t){"on"+t in l&&bt.remove(t)}));var St,wt=0;function Et(t){var e=".dragsuppress-"+ ++wt,n="click"+e,r=s.select(u(t)).on("touchmove"+e,z).on("dragstart"+e,z).on("selectstart"+e,z);if(null==St&&(St=!("onselectstart"in t)&&R(t.style,"userSelect")),St){var i=c(t).style,o=i[St];i[St]="none"}return function(t){if(r.on(e,null),St&&(i[St]=o),t){var s=function(){r.on(n,null)};r.on(n,(function(){z(),s()}),!0),setTimeout(s,0)}}}s.mouse=function(t){return Pt(t,q())};var At=window.navigator&&/WebKit/.test(window.navigator.userAgent)?-1:0;function Pt(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(At<0){var i=u(t);if(i.scrollX||i.scrollY){var o=(n=s.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();At=!(o.f||o.e),n.remove()}}return At?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function Mt(){return s.event.changedTouches[0].identifier}s.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=q().changedTouches),e)for(var r,i=0,s=e.length;i<s;++i)if((r=e[i]).identifier===n)return Pt(t,r)},s.behavior.drag=function(){var t=$(i,"drag","dragstart","dragend"),e=null,n=o(j,s.mouse,u,"mousemove","mouseup"),r=o(Mt,s.touch,L,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function o(n,r,i,o,a){return function(){var l,c=this,u=s.event.target.correspondingElement||s.event.target,h=c.parentNode,p=t.of(c,arguments),d=0,f=n(),m=".drag"+(null==f?"":"-"+f),y=s.select(i(u)).on(o+m,(function(){var t,e,n=r(h,f);n&&(t=n[0]-v[0],e=n[1]-v[1],d|=t|e,v=n,p({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:t,dy:e}))})).on(a+m,(function(){r(h,f)&&(y.on(o+m,null).on(a+m,null),g(d),p({type:"dragend"}))})),g=Et(u),v=r(h,f);l=e?[(l=e.apply(c,arguments)).x-v[0],l.y-v[1]]:[0,0],p({type:"dragstart"})}}return i.origin=function(t){return arguments.length?(e=t,i):e},s.rebind(i,t,"on")},s.touches=function(t,e){return arguments.length<2&&(e=q().touches),e?a(e).map((function(e){var n=Pt(t,e);return n.identifier=e.identifier,n})):[]};var Ct=1e-6,kt=Ct*Ct,It=Math.PI,Ot=2*It,Nt=Ot-Ct,_t=It/2,Dt=It/180,Lt=180/It;function Bt(t){return t>0?1:t<0?-1:0}function Rt(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Ft(t){return t>1?0:t<-1?It:Math.acos(t)}function jt(t){return t>1?_t:t<-1?-_t:Math.asin(t)}function Ut(t){return((t=Math.exp(t))+1/t)/2}function Vt(t){return(t=Math.sin(t/2))*t}var zt=Math.SQRT2;s.interpolateZoom=function(t,e){var n,r,i=t[0],s=t[1],o=t[2],a=e[0],l=e[1],c=e[2],u=a-i,h=l-s,p=u*u+h*h;if(p<kt)r=Math.log(c/o)/zt,n=function(t){return[i+t*u,s+t*h,o*Math.exp(zt*t*r)]};else{var d=Math.sqrt(p),f=(c*c-o*o+4*p)/(2*o*2*d),m=(c*c-o*o-4*p)/(2*c*2*d),y=Math.log(Math.sqrt(f*f+1)-f),g=Math.log(Math.sqrt(m*m+1)-m);r=(g-y)/zt,n=function(t){var e,n=t*r,a=Ut(y),l=o/(2*d)*(a*(e=zt*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+l*u,s+l*h,o*a/Ut(zt*n+y)]}}return n.duration=1e3*r,n},s.behavior.zoom=function(){var t,e,n,r,i,o,a,c,h,p={x:0,y:0,k:1},d=[960,500],f=Ht,m=250,y=0,g="mousedown.zoom",v="mousemove.zoom",b="mouseup.zoom",T="touchstart.zoom",x=$(S,"zoomstart","zoom","zoomend");function S(t){t.on(g,O).on($t+".zoom",_).on("dblclick.zoom",D).on(T,N)}function w(t){return[(t[0]-p.x)/p.k,(t[1]-p.y)/p.k]}function E(t){p.k=Math.max(f[0],Math.min(f[1],t))}function A(t,e){e=function(t){return[t[0]*p.k+p.x,t[1]*p.k+p.y]}(e),p.x+=t[0]-e[0],p.y+=t[1]-e[1]}function P(t,n,r,i){t.__chart__={x:p.x,y:p.y,k:p.k},E(Math.pow(2,i)),A(e=n,r),t=s.select(t),m>0&&(t=t.transition().duration(m)),t.call(S.event)}function M(){a&&a.domain(o.range().map((function(t){return(t-p.x)/p.k})).map(o.invert)),h&&h.domain(c.range().map((function(t){return(t-p.y)/p.k})).map(c.invert))}function C(t){y++||t({type:"zoomstart"})}function k(t){M(),t({type:"zoom",scale:p.k,translate:[p.x,p.y]})}function I(t){--y||(t({type:"zoomend"}),e=null)}function O(){var t=this,e=x.of(t,arguments),n=0,r=s.select(u(t)).on(v,(function(){n=1,A(s.mouse(t),i),k(e)})).on(b,(function(){r.on(v,null).on(b,null),o(n),I(e)})),i=w(s.mouse(t)),o=Et(t);Ia.call(t),C(e)}function N(){var t,e=this,n=x.of(e,arguments),r={},o=0,a=".zoom-"+s.event.changedTouches[0].identifier,l="touchmove"+a,c="touchend"+a,u=[],h=s.select(e),d=Et(e);function f(){var n=s.touches(e);return t=p.k,n.forEach((function(t){t.identifier in r&&(r[t.identifier]=w(t))})),n}function m(){var t=s.event.target;s.select(t).on(l,y).on(c,v),u.push(t);for(var n=s.event.changedTouches,a=0,h=n.length;a<h;++a)r[n[a].identifier]=null;var d=f(),m=Date.now();if(1===d.length){if(m-i<500){var g=d[0];P(e,g,r[g.identifier],Math.floor(Math.log(p.k)/Math.LN2)+1),z()}i=m}else if(d.length>1){g=d[0];var b=d[1],T=g[0]-b[0],x=g[1]-b[1];o=T*T+x*x}}function y(){var a,l,c,u,h=s.touches(e);Ia.call(e);for(var p=0,d=h.length;p<d;++p,u=null)if(c=h[p],u=r[c.identifier]){if(l)break;a=c,l=u}if(u){var f=(f=c[0]-a[0])*f+(f=c[1]-a[1])*f,m=o&&Math.sqrt(f/o);a=[(a[0]+c[0])/2,(a[1]+c[1])/2],l=[(l[0]+u[0])/2,(l[1]+u[1])/2],E(m*t)}i=null,A(a,l),k(n)}function v(){if(s.event.touches.length){for(var t=s.event.changedTouches,e=0,i=t.length;e<i;++e)delete r[t[e].identifier];for(var o in r)return void f()}s.selectAll(u).on(a,null),h.on(g,O).on(T,N),d(),I(n)}m(),C(n),h.on(g,null).on(T,m)}function _(){var i=x.of(this,arguments);r?clearTimeout(r):(Ia.call(this),t=w(e=n||s.mouse(this)),C(i)),r=setTimeout((function(){r=null,I(i)}),50),z(),E(Math.pow(2,.002*qt())*p.k),A(e,t),k(i)}function D(){var t=s.mouse(this),e=Math.log(p.k)/Math.LN2;P(this,t,w(t),s.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}return $t||($t="onwheel"in l?(qt=function(){return-s.event.deltaY*(s.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(qt=function(){return s.event.wheelDelta},"mousewheel"):(qt=function(){return-s.event.detail},"MozMousePixelScroll")),S.event=function(t){t.each((function(){var t=x.of(this,arguments),n=p;_a?s.select(this).transition().each("start.zoom",(function(){p=this.__chart__||{x:0,y:0,k:1},C(t)})).tween("zoom:zoom",(function(){var r=d[0],i=d[1],o=e?e[0]:r/2,a=e?e[1]:i/2,l=s.interpolateZoom([(o-p.x)/p.k,(a-p.y)/p.k,r/p.k],[(o-n.x)/n.k,(a-n.y)/n.k,r/n.k]);return function(e){var n=l(e),i=r/n[2];this.__chart__=p={x:o-n[0]*i,y:a-n[1]*i,k:i},k(t)}})).each("interrupt.zoom",(function(){I(t)})).each("end.zoom",(function(){I(t)})):(this.__chart__=p,C(t),k(t),I(t))}))},S.translate=function(t){return arguments.length?(p={x:+t[0],y:+t[1],k:p.k},M(),S):[p.x,p.y]},S.scale=function(t){return arguments.length?(p={x:p.x,y:p.y,k:null},E(+t),M(),S):p.k},S.scaleExtent=function(t){return arguments.length?(f=null==t?Ht:[+t[0],+t[1]],S):f},S.center=function(t){return arguments.length?(n=t&&[+t[0],+t[1]],S):n},S.size=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],S):d},S.duration=function(t){return arguments.length?(m=+t,S):m},S.x=function(t){return arguments.length?(a=t,o=t.copy(),p={x:0,y:0,k:1},S):a},S.y=function(t){return arguments.length?(h=t,c=t.copy(),p={x:0,y:0,k:1},S):h},s.rebind(S,x,"on")};var qt,$t,Ht=[0,1/0];function Kt(){}function Yt(t,e,n){return this instanceof Yt?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof Yt?new Yt(t.h,t.s,t.l):fe(""+t,me,Yt):new Yt(t,e,n)}s.color=Kt,Kt.prototype.toString=function(){return this.rgb()+""},s.hsl=Yt;var Wt=Yt.prototype=new Kt;function Jt(t,e,n){var r,i;function s(t){return Math.round(255*function(t){return t>360?t-=360:t<0&&(t+=360),t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+e):n+e-n*e),new ce(s(t+120),s(t),s(t-120))}function Xt(t,e,n){return this instanceof Xt?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof Xt?new Xt(t.h,t.c,t.l):function(t,e,n){return t>0?new Xt(Math.atan2(n,e)*Lt,Math.sqrt(e*e+n*n),t):new Xt(NaN,NaN,t)}(t instanceof Qt?t.l:(t=ye((t=s.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Xt(t,e,n)}Wt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Yt(this.h,this.s,this.l/t)},Wt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Yt(this.h,this.s,t*this.l)},Wt.rgb=function(){return Jt(this.h,this.s,this.l)},s.hcl=Xt;var Gt=Xt.prototype=new Kt;function Zt(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Qt(n,Math.cos(t*=Dt)*e,Math.sin(t)*e)}function Qt(t,e,n){return this instanceof Qt?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof Qt?new Qt(t.l,t.a,t.b):t instanceof Xt?Zt(t.h,t.c,t.l):ye((t=ce(t)).r,t.g,t.b):new Qt(t,e,n)}Gt.brighter=function(t){return new Xt(this.h,this.c,Math.min(100,this.l+te*(arguments.length?t:1)))},Gt.darker=function(t){return new Xt(this.h,this.c,Math.max(0,this.l-te*(arguments.length?t:1)))},Gt.rgb=function(){return Zt(this.h,this.c,this.l).rgb()},s.lab=Qt;var te=18,ee=.95047,ne=1,re=1.08883,ie=Qt.prototype=new Kt;function se(t,e,n){var r=(t+16)/116,i=r+e/500,s=r-n/200;return new ce(le(3.2404542*(i=oe(i)*ee)-1.5371385*(r=oe(r)*ne)-.4985314*(s=oe(s)*re)),le(-.969266*i+1.8760108*r+.041556*s),le(.0556434*i-.2040259*r+1.0572252*s))}function oe(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ae(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function le(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ce(t,e,n){return this instanceof ce?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof ce?new ce(t.r,t.g,t.b):fe(""+t,ce,Jt):new ce(t,e,n)}function ue(t){return new ce(t>>16,t>>8&255,255&t)}function he(t){return ue(t)+""}ie.brighter=function(t){return new Qt(Math.min(100,this.l+te*(arguments.length?t:1)),this.a,this.b)},ie.darker=function(t){return new Qt(Math.max(0,this.l-te*(arguments.length?t:1)),this.a,this.b)},ie.rgb=function(){return se(this.l,this.a,this.b)},s.rgb=ce;var pe=ce.prototype=new Kt;function de(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function fe(t,e,n){var r,i,s,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(ve(i[0]),ve(i[1]),ve(i[2]))}return(s=be.get(t))?e(s.r,s.g,s.b):(null==t||"#"!==t.charAt(0)||isNaN(s=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&s)>>4,o|=o>>4,a=240&s,a|=a>>4,l=15&s,l|=l<<4):7===t.length&&(o=(16711680&s)>>16,a=(65280&s)>>8,l=255&s)),e(o,a,l))}function me(t,e,n){var r,i,s=Math.min(t/=255,e/=255,n/=255),o=Math.max(t,e,n),a=o-s,l=(o+s)/2;return a?(i=l<.5?a/(o+s):a/(2-o-s),r=t==o?(e-n)/a+(e<n?6:0):e==o?(n-t)/a+2:(t-e)/a+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new Yt(r,i,l)}function ye(t,e,n){var r=ae((.4124564*(t=ge(t))+.3575761*(e=ge(e))+.1804375*(n=ge(n)))/ee),i=ae((.2126729*t+.7151522*e+.072175*n)/ne);return Qt(116*i-16,500*(r-i),200*(i-ae((.0193339*t+.119192*e+.9503041*n)/re)))}function ge(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ve(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}pe.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&e<i&&(e=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ce(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new ce(i,i,i)},pe.darker=function(t){return new ce((t=Math.pow(.7,arguments.length?t:1))*this.r,t*this.g,t*this.b)},pe.hsl=function(){return me(this.r,this.g,this.b)},pe.toString=function(){return"#"+de(this.r)+de(this.g)+de(this.b)};var be=s.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});function Te(t){return"function"==typeof t?t:function(){return t}}function xe(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Se(e,n,t,r)}}function Se(t,e,n,r){var i={},o=s.dispatch("beforesend","progress","load","error"),l={},c=new XMLHttpRequest,u=null;function h(){var t,e=c.status;if(!e&&function(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}(c)||e>=200&&e<300||304===e){try{t=n.call(i,c)}catch(t){return void o.error.call(i,t)}o.load.call(i,t)}else o.error.call(i,c)}return this.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=h:c.onreadystatechange=function(){c.readyState>3&&h()},c.onprogress=function(t){var e=s.event;s.event=t;try{o.progress.call(i,c)}finally{s.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(u=t,i):u},i.response=function(t){return n=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(a(arguments)))}})),i.send=function(n,r,s){if(2===arguments.length&&"function"==typeof r&&(s=r,r=null),c.open(n,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=e&&c.overrideMimeType&&c.overrideMimeType(e),null!=u&&(c.responseType=u),null!=s&&i.on("error",s).on("load",(function(t){s(null,t)})),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},s.rebind(i,o,"on"),null==r?i:i.get(function(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}(r))}be.forEach((function(t,e){be.set(t,ue(e))})),s.functor=Te,s.xhr=xe(L),s.dsv=function(t,e){var n=new RegExp('["'+t+"\n]"),r=t.charCodeAt(0);function i(t,n,r){arguments.length<3&&(r=n,n=null);var i=Se(t,e,null==n?s:o(n),r);return i.row=function(t){return arguments.length?i.response(null==(n=t)?s:o(t)):n},i}function s(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function a(e){return e.map(l).join(t)}function l(t){return n.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var n;return i.parseRows(t,(function(t,r){if(n)return n(t,r-1);var i=new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}");n=e?function(t,n){return e(i(t),n)}:i}))},i.parseRows=function(t,e){var n,i,s={},o={},a=[],l=t.length,c=0,u=0;function h(){if(c>=l)return o;if(i)return i=!1,s;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++<l;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}return c=n+2,13===(a=t.charCodeAt(n+1))?(i=!0,10===t.charCodeAt(n+2)&&++c):10===a&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;c<l;){var a,u=1;if(10===(a=t.charCodeAt(c++)))i=!0;else if(13===a)i=!0,10===t.charCodeAt(c)&&(++c,++u);else if(a!==r)continue;return t.slice(e,c-u)}return t.slice(e)}for(;(n=h())!==o;){for(var p=[];n!==s&&n!==o;)p.push(n),n=h();e&&null==(p=e(p,u++))||a.push(p)}return a},i.format=function(e){if(Array.isArray(e[0]))return i.formatRows(e);var n=new D,r=[];return e.forEach((function(t){for(var e in t)n.has(e)||r.push(n.add(e))})),[r.map(l).join(t)].concat(e.map((function(e){return r.map((function(t){return l(e[t])})).join(t)}))).join("\n")},i.formatRows=function(t){return t.map(a).join("\n")},i},s.csv=s.dsv(",","text/csv"),s.tsv=s.dsv("\t","text/tab-separated-values");var we,Ee,Ae,Pe,Me=window[R(window,"requestAnimationFrame")]||function(t){setTimeout(t,17)};function Ce(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var i={c:t,t:n+e,n:null};return Ee?Ee.n=i:we=i,Ee=i,Ae||(Pe=clearTimeout(Pe),Ae=1,Me(ke)),i}function ke(){var t=Ie(),e=Oe()-t;e>24?(isFinite(e)&&(clearTimeout(Pe),Pe=setTimeout(ke,e)),Ae=0):(Ae=1,Me(ke))}function Ie(){for(var t=Date.now(),e=we;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Oe(){for(var t,e=we,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:we=e.n;return Ee=t,n}function Ne(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}s.timer=function(){Ce.apply(this,arguments)},s.timer.flush=function(){Ie(),Oe()},s.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var _e=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(t,e){var n=Math.pow(10,3*S(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}));function De(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,o=r&&n?function(t,e){for(var i=t.length,s=[],o=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>e&&(a=Math.max(1,e-l)),s.push(t.substring(i-=a,i+a)),!((l+=a+1)>e));)a=r[o=(o+1)%r.length];return s.reverse().join(n)}:L;return function(t){var n=Le.exec(t),r=n[1]||" ",a=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],h=+n[6],p=n[7],d=n[8],f=n[9],m=1,y="",g="",v=!1,b=!0;switch(d&&(d=+d.substring(1)),(u||"0"===r&&"="===a)&&(u=r="0",a="="),f){case"n":p=!0,f="g";break;case"%":m=100,g="%",f="f";break;case"p":m=100,g="%",f="r";break;case"b":case"o":case"x":case"X":"#"===c&&(y="0"+f.toLowerCase());case"c":b=!1;case"d":v=!0,d=0;break;case"s":m=-1,f="r"}"$"===c&&(y=i[0],g=i[1]),"r"!=f||d||(f="g"),null!=d&&("g"==f?d=Math.max(1,Math.min(21,d)):"e"!=f&&"f"!=f||(d=Math.max(0,Math.min(20,d)))),f=Be.get(f)||Re;var T=u&&p;return function(t){var n=g;if(v&&t%1)return"";var i=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===l?"":l;if(m<0){var c=s.formatPrefix(t,d);t=c.scale(t),n=c.symbol+g}else t*=m;var x,S,w=(t=f(t,d)).lastIndexOf(".");if(w<0){var E=b?t.lastIndexOf("e"):-1;E<0?(x=t,S=""):(x=t.substring(0,E),S=t.substring(E))}else x=t.substring(0,w),S=e+t.substring(w+1);!u&&p&&(x=o(x,1/0));var A=y.length+x.length+S.length+(T?0:i.length),P=A<h?new Array(A=h-A+1).join(r):"";return T&&(x=o(P+x,P.length?h-S.length:1/0)),i+=y,t=x+S,("<"===a?i+t+P:">"===a?P+i+t:"^"===a?P.substring(0,A>>=1)+i+t+P.substring(A):i+(T?t:P+t))+n}}}s.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=s.round(t,Ne(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),_e[8+n/3]};var Le=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Be=s.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=s.round(t,Ne(t,e))).toFixed(Math.max(0,Math.min(20,Ne(t*(1+1e-15),e))))}});function Re(t){return t+""}var Fe=s.time={},je=Date;function Ue(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Ue.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Ve.setUTCDate.apply(this._,arguments)},setDay:function(){Ve.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ve.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ve.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ve.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ve.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ve.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ve.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ve.setTime.apply(this._,arguments)}};var Ve=Date.prototype;function ze(t,e,n){function r(e){var n=t(e),r=s(n,1);return e-n<r-e?n:r}function i(n){return e(n=t(new je(n-1)),1),n}function s(t,n){return e(t=new je(+t),n),t}function o(t,r,s){var o=i(t),a=[];if(s>1)for(;o<r;)n(o)%s||a.push(new Date(+o)),e(o,1);else for(;o<r;)a.push(new Date(+o)),e(o,1);return a}t.floor=t,t.round=r,t.ceil=i,t.offset=s,t.range=o;var a=t.utc=qe(t);return a.floor=a,a.round=qe(r),a.ceil=qe(i),a.offset=qe(s),a.range=function(t,e,n){try{je=Ue;var r=new Ue;return r._=t,o(r,e,n)}finally{je=Date}},t}function qe(t){return function(e,n){try{je=Ue;var r=new Ue;return r._=e,t(r,n)._}finally{je=Date}}}function $e(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,l=t.months,c=t.shortMonths;function u(t){var e=t.length;function n(n){for(var r,i,s,o=[],a=-1,l=0;++a<e;)37===t.charCodeAt(a)&&(o.push(t.slice(l,a)),null!=(i=He[r=t.charAt(++a)])&&(r=t.charAt(++a)),(s=x[r])&&(r=s(n,null==i?"e"===r?" ":"0":i)),o.push(r),l=a+1);return o.push(t.slice(l,a)),o.join("")}return n.parse=function(e){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(h(n,t,e,0)!=e.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&je!==Ue,i=new(r?Ue:je);return"j"in n?i.setFullYear(n.y,0,n.j):"W"in n||"U"in n?("w"in n||(n.w="W"in n?1:0),i.setFullYear(n.y,0,1),i.setFullYear(n.y,0,"W"in n?(n.w+6)%7+7*n.W-(i.getDay()+5)%7:n.w+7*n.U-(i.getDay()+6)%7)):i.setFullYear(n.y,n.m,n.d),i.setHours(n.H+(n.Z/100|0),n.M+n.Z%100,n.S,n.L),r?i._:i},n.toString=function(){return t},n}function h(t,e,n,r){for(var i,s,o,a=0,l=e.length,c=n.length;a<l;){if(r>=c)return-1;if(37===(i=e.charCodeAt(a++))){if(o=e.charAt(a++),!(s=S[o in He?e.charAt(a++):o])||(r=s(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}u.utc=function(t){var e=u(t);function n(t){try{var n=new(je=Ue);return n._=t,e(n)}finally{je=Date}}return n.parse=function(t){try{je=Ue;var n=e.parse(t);return n&&n._}finally{je=Date}},n.toString=e.toString,n},u.multi=u.utc.multi=dn;var p=s.map(),d=Je(o),f=Xe(o),m=Je(a),y=Xe(a),g=Je(l),v=Xe(l),b=Je(c),T=Xe(c);i.forEach((function(t,e){p.set(t.toLowerCase(),e)}));var x={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(e),d:function(t,e){return We(t.getDate(),e,2)},e:function(t,e){return We(t.getDate(),e,2)},H:function(t,e){return We(t.getHours(),e,2)},I:function(t,e){return We(t.getHours()%12||12,e,2)},j:function(t,e){return We(1+Fe.dayOfYear(t),e,3)},L:function(t,e){return We(t.getMilliseconds(),e,3)},m:function(t,e){return We(t.getMonth()+1,e,2)},M:function(t,e){return We(t.getMinutes(),e,2)},p:function(t){return i[+(t.getHours()>=12)]},S:function(t,e){return We(t.getSeconds(),e,2)},U:function(t,e){return We(Fe.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return We(Fe.mondayOfYear(t),e,2)},x:u(n),X:u(r),y:function(t,e){return We(t.getFullYear()%100,e,2)},Y:function(t,e){return We(t.getFullYear()%1e4,e,4)},Z:hn,"%":function(){return"%"}},S={a:function(t,e,n){m.lastIndex=0;var r=m.exec(e.slice(n));return r?(t.w=y.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){d.lastIndex=0;var r=d.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){b.lastIndex=0;var r=b.exec(e.slice(n));return r?(t.m=T.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){g.lastIndex=0;var r=g.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return h(t,x.c.toString(),e,n)},d:sn,e:sn,H:an,I:an,j:on,L:un,m:rn,M:ln,p:function(t,e,n){var r=p.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)},S:cn,U:Ze,w:Ge,W:Qe,x:function(t,e,n){return h(t,x.x.toString(),e,n)},X:function(t,e,n){return h(t,x.X.toString(),e,n)},y:en,Y:tn,Z:nn,"%":pn};return u}Fe.year=ze((function(t){return(t=Fe.day(t)).setMonth(0,1),t}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t){return t.getFullYear()})),Fe.years=Fe.year.range,Fe.years.utc=Fe.year.utc.range,Fe.day=ze((function(t){var e=new je(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t){return t.getDate()-1})),Fe.days=Fe.day.range,Fe.days.utc=Fe.day.utc.range,Fe.dayOfYear=function(t){var e=Fe.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,e){e=7-e;var n=Fe[t]=ze((function(t){return(t=Fe.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t}),(function(t,e){t.setDate(t.getDate()+7*Math.floor(e))}),(function(t){var n=Fe.year(t).getDay();return Math.floor((Fe.dayOfYear(t)+(n+e)%7)/7)-(n!==e)}));Fe[t+"s"]=n.range,Fe[t+"s"].utc=n.utc.range,Fe[t+"OfYear"]=function(t){var n=Fe.year(t).getDay();return Math.floor((Fe.dayOfYear(t)+(n+e)%7)/7)}})),Fe.week=Fe.sunday,Fe.weeks=Fe.sunday.range,Fe.weeks.utc=Fe.sunday.utc.range,Fe.weekOfYear=Fe.sundayOfYear;var He={"-":"",_:" ",0:"0"},Ke=/^\s*\d+/,Ye=/^%/;function We(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s<n?new Array(n-s+1).join(e)+i:i)}function Je(t){return new RegExp("^(?:"+t.map(s.requote).join("|")+")","i")}function Xe(t){for(var e=new E,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Ge(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ze(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function Qe(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function tn(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function en(t,e,n){Ke.lastIndex=0;var r,i=Ke.exec(e.slice(n,n+2));return i?(t.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function nn(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function rn(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function sn(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function on(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function an(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ln(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function cn(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function un(t,e,n){Ke.lastIndex=0;var r=Ke.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function hn(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=S(e)/60|0,i=S(e)%60;return n+We(r,"0",2)+We(i,"0",2)}function pn(t,e,n){Ye.lastIndex=0;var r=Ye.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dn(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}s.locale=function(t){return{numberFormat:De(t),timeFormat:$e(t)}};var fn=s.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function mn(){}s.format=fn.numberFormat,s.geo={},mn.prototype={s:0,t:0,add:function(t){gn(t,this.t,yn),gn(yn.s,this.s,this),this.s?this.t+=yn.t:this.s=yn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yn=new mn;function gn(t,e,n){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}function vn(t,e){t&&Tn.hasOwnProperty(t.type)&&Tn[t.type](t,e)}s.geo.stream=function(t,e){t&&bn.hasOwnProperty(t.type)?bn[t.type](t,e):vn(t,e)};var bn={Feature:function(t,e){vn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)vn(n[r].geometry,e)}},Tn={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){xn(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)xn(n[r],e,0)},Polygon:function(t,e){Sn(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Sn(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)vn(n[r],e)}};function xn(t,e,n){var r,i=-1,s=t.length-n;for(e.lineStart();++i<s;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Sn(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)xn(t[n],e,1);e.polygonEnd()}s.geo.area=function(t){return wn=0,s.geo.stream(t,Bn),wn};var wn,En,An,Pn,Mn,Cn,kn,In,On,Nn,_n,Dn,Ln=new mn,Bn={sphere:function(){wn+=4*It},point:j,lineStart:j,lineEnd:j,polygonStart:function(){Ln.reset(),Bn.lineStart=Rn},polygonEnd:function(){var t=2*Ln;wn+=t<0?4*It+t:t,Bn.lineStart=Bn.lineEnd=Bn.point=j}};function Rn(){var t,e,n,r,i;function s(t,e){e=e*Dt/2+It/4;var s=(t*=Dt)-n,o=s>=0?1:-1,a=o*s,l=Math.cos(e),c=Math.sin(e),u=i*c,h=r*l+u*Math.cos(a),p=u*o*Math.sin(a);Ln.add(Math.atan2(p,h)),n=t,r=l,i=c}Bn.point=function(o,a){Bn.point=s,n=(t=o)*Dt,r=Math.cos(a=(e=a)*Dt/2+It/4),i=Math.sin(a)},Bn.lineEnd=function(){s(t,e)}}function Fn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function jn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Un(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Vn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function zn(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function qn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function $n(t){return[Math.atan2(t[1],t[0]),jt(t[2])]}function Hn(t,e){return S(t[0]-e[0])<Ct&&S(t[1]-e[1])<Ct}s.geo.bounds=function(){var t,e,n,r,i,o,a,l,c,u,h,p={point:d,lineStart:m,lineEnd:y,polygonStart:function(){p.point=g,p.lineStart=v,p.lineEnd=b,c=0,Bn.polygonStart()},polygonEnd:function(){Bn.polygonEnd(),p.point=d,p.lineStart=m,p.lineEnd=y,Ln<0?(t=-(n=180),e=-(r=90)):c>Ct?r=90:c<-Ct&&(e=-90),h[0]=t,h[1]=n}};function d(i,s){u.push(h=[t=i,n=i]),s<e&&(e=s),s>r&&(r=s)}function f(s,o){var a=Fn([s*Dt,o*Dt]);if(l){var c=Un(l,a),u=Un([c[1],-c[0],0],c);qn(u),u=$n(u);var h=s-i,p=h>0?1:-1,f=u[0]*Lt*p,m=S(h)>180;if(m^(p*i<f&&f<p*s))(y=u[1]*Lt)>r&&(r=y);else if(m^(p*i<(f=(f+360)%360-180)&&f<p*s)){var y;(y=-u[1]*Lt)<e&&(e=y)}else o<e&&(e=o),o>r&&(r=o);m?s<i?T(t,s)>T(t,n)&&(n=s):T(s,n)>T(t,n)&&(t=s):n>=t?(s<t&&(t=s),s>n&&(n=s)):s>i?T(t,s)>T(t,n)&&(n=s):T(s,n)>T(t,n)&&(t=s)}else d(s,o);l=a,i=s}function m(){p.point=f}function y(){h[0]=t,h[1]=n,p.point=d,l=null}function g(t,e){if(l){var n=t-i;c+=S(n)>180?n+(n>0?360:-360):n}else o=t,a=e;Bn.point(t,e),f(t,e)}function v(){Bn.lineStart()}function b(){g(o,a),Bn.lineEnd(),S(c)>Ct&&(t=-(n=180)),h[0]=t,h[1]=n,l=null}function T(t,e){return(e-=t)<0?e+360:e}function x(t,e){return t[0]-e[0]}function w(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}return function(i){if(r=n=-(t=e=1/0),u=[],s.geo.stream(i,p),c=u.length){u.sort(x);for(var o=1,a=[m=u[0]];o<c;++o)w((d=u[o])[0],m)||w(d[1],m)?(T(m[0],d[1])>T(m[0],m[1])&&(m[1]=d[1]),T(d[0],m[1])>T(m[0],m[1])&&(m[0]=d[0])):a.push(m=d);for(var l,c,d,f=-1/0,m=(o=0,a[c=a.length-1]);o<=c;m=d,++o)d=a[o],(l=T(m[1],d[0]))>f&&(f=l,t=d[0],n=m[1])}return u=h=null,t===1/0||e===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,e],[n,r]]}}(),s.geo.centroid=function(t){En=An=Pn=Mn=Cn=kn=In=On=Nn=_n=Dn=0,s.geo.stream(t,Kn);var e=Nn,n=_n,r=Dn,i=e*e+n*n+r*r;return i<kt&&(e=kn,n=In,r=On,An<Ct&&(e=Pn,n=Mn,r=Cn),(i=e*e+n*n+r*r)<kt)?[NaN,NaN]:[Math.atan2(n,e)*Lt,jt(r/Math.sqrt(i))*Lt]};var Kn={sphere:j,point:Yn,lineStart:Jn,lineEnd:Xn,polygonStart:function(){Kn.lineStart=Gn},polygonEnd:function(){Kn.lineStart=Jn}};function Yn(t,e){t*=Dt;var n=Math.cos(e*=Dt);Wn(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Wn(t,e,n){++En,Pn+=(t-Pn)/En,Mn+=(e-Mn)/En,Cn+=(n-Cn)/En}function Jn(){var t,e,n;function r(r,i){r*=Dt;var s=Math.cos(i*=Dt),o=s*Math.cos(r),a=s*Math.sin(r),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-n*a)*c+(c=n*o-t*l)*c+(c=t*a-e*o)*c),t*o+e*a+n*l);An+=c,kn+=c*(t+(t=o)),In+=c*(e+(e=a)),On+=c*(n+(n=l)),Wn(t,e,n)}Kn.point=function(i,s){i*=Dt;var o=Math.cos(s*=Dt);t=o*Math.cos(i),e=o*Math.sin(i),n=Math.sin(s),Kn.point=r,Wn(t,e,n)}}function Xn(){Kn.point=Yn}function Gn(){var t,e,n,r,i;function s(t,e){t*=Dt;var s=Math.cos(e*=Dt),o=s*Math.cos(t),a=s*Math.sin(t),l=Math.sin(e),c=r*l-i*a,u=i*o-n*l,h=n*a-r*o,p=Math.sqrt(c*c+u*u+h*h),d=n*o+r*a+i*l,f=p&&-Ft(d)/p,m=Math.atan2(p,d);Nn+=f*c,_n+=f*u,Dn+=f*h,An+=m,kn+=m*(n+(n=o)),In+=m*(r+(r=a)),On+=m*(i+(i=l)),Wn(n,r,i)}Kn.point=function(o,a){t=o,e=a,Kn.point=s,o*=Dt;var l=Math.cos(a*=Dt);n=l*Math.cos(o),r=l*Math.sin(o),i=Math.sin(a),Wn(n,r,i)},Kn.lineEnd=function(){s(t,e),Kn.lineEnd=Xn,Kn.point=Yn}}function Zn(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function Qn(){return!0}function tr(t,e,n,r,i){var s=[],o=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(Hn(n,r)){i.lineStart();for(var a=0;a<e;++a)i.point((n=t[a])[0],n[1]);i.lineEnd()}else{var l=new nr(n,t,null,!0),c=new nr(n,null,l,!1);l.o=c,s.push(l),o.push(c),l=new nr(r,t,null,!1),c=new nr(r,null,l,!0),l.o=c,s.push(l),o.push(c)}}})),o.sort(e),er(s),er(o),s.length){for(var a=0,l=n,c=o.length;a<c;++a)o[a].e=l=!l;for(var u,h,p=s[0];;){for(var d=p,f=!0;d.v;)if((d=d.n)===p)return;u=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(a=0,c=u.length;a<c;++a)i.point((h=u[a])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(f)for(a=(u=d.p.z).length-1;a>=0;--a)i.point((h=u[a])[0],h[1]);else r(d.x,d.p.x,-1,i);d=d.p}u=(d=d.o).z,f=!f}while(!d.v);i.lineEnd()}}}function er(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function nr(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rr(t,e,n,r){return function(i,o){var a,l=e(o),c=i.invert(r[0],r[1]),u={point:h,lineStart:d,lineEnd:f,polygonStart:function(){u.point=T,u.lineStart=x,u.lineEnd=S,a=[],m=[]},polygonEnd:function(){u.point=h,u.lineStart=d,u.lineEnd=f,a=s.merge(a);var t=function(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],s=0,o=0;Ln.reset();for(var a=0,l=e.length;a<l;++a){var c=e[a],u=c.length;if(u)for(var h=c[0],p=h[0],d=h[1]/2+It/4,f=Math.sin(d),m=Math.cos(d),y=1;;){y===u&&(y=0);var g=(t=c[y])[0],v=t[1]/2+It/4,b=Math.sin(v),T=Math.cos(v),x=g-p,S=x>=0?1:-1,w=S*x,E=w>It,A=f*b;if(Ln.add(Math.atan2(A*S*Math.sin(w),m*T+A*Math.cos(w))),s+=E?x+S*Ot:x,E^p>=n^g>=n){var P=Un(Fn(h),Fn(t));qn(P);var M=Un(i,P);qn(M);var C=(E^x>=0?-1:1)*jt(M[2]);(r>C||r===C&&(P[0]||P[1]))&&(o+=E^x>=0?1:-1)}if(!y++)break;p=g,f=b,m=T,h=t}}return(s<-Ct||s<Ct&&Ln<-Ct)^1&o}(c,m);a.length?(b||(o.polygonStart(),b=!0),tr(a,or,t,n,o)):t&&(b||(o.polygonStart(),b=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),b&&(o.polygonEnd(),b=!1),a=m=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function h(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function p(t,e){var n=i(t,e);l.point(n[0],n[1])}function d(){u.point=p,l.lineStart()}function f(){u.point=h,l.lineEnd()}var m,y,g=sr(),v=e(g),b=!1;function T(t,e){y.push([t,e]);var n=i(t,e);v.point(n[0],n[1])}function x(){v.lineStart(),y=[]}function S(){T(y[0][0],y[0][1]),v.lineEnd();var t,e=v.clean(),n=g.buffer(),r=n.length;if(y.pop(),m.push(y),y=null,r)if(1&e){var i,s=-1;if((r=(t=n[0]).length-1)>0){for(b||(o.polygonStart(),b=!0),o.lineStart();++s<r;)o.point((i=t[s])[0],i[1]);o.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),a.push(n.filter(ir))}return u}}function ir(t){return t.length>1}function sr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:j,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function or(t,e){return((t=t.x)[0]<0?t[1]-_t-Ct:_t-t[1])-((e=e.x)[0]<0?e[1]-_t-Ct:_t-e[1])}var ar=rr(Qn,(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(s,o){var a=s>0?It:-It,l=S(s-n);S(l-It)<Ct?(t.point(n,r=(r+o)/2>0?_t:-_t),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(s,r),e=0):i!==a&&l>=It&&(S(n-i)<Ct&&(n-=i*Ct),S(s-a)<Ct&&(s-=a*Ct),r=function(t,e,n,r){var i,s,o=Math.sin(t-n);return S(o)>Ct?Math.atan((Math.sin(e)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*s*o)):(e+r)/2}(n,r,s,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),e=0),t.point(n=s,r=o),i=a},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*_t,r.point(-It,i),r.point(0,i),r.point(It,i),r.point(It,0),r.point(It,-i),r.point(0,-i),r.point(-It,-i),r.point(-It,0),r.point(-It,i);else if(S(t[0]-e[0])>Ct){var s=t[0]<e[0]?It:-It;i=n*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(e[0],e[1])}),[-It,-It/2]);function lr(t,e,n,r){return function(i){var s,o=i.a,a=i.b,l=o.x,c=o.y,u=0,h=1,p=a.x-l,d=a.y-c;if(s=t-l,p||!(s>0)){if(s/=p,p<0){if(s<u)return;s<h&&(h=s)}else if(p>0){if(s>h)return;s>u&&(u=s)}if(s=n-l,p||!(s<0)){if(s/=p,p<0){if(s>h)return;s>u&&(u=s)}else if(p>0){if(s<u)return;s<h&&(h=s)}if(s=e-c,d||!(s>0)){if(s/=d,d<0){if(s<u)return;s<h&&(h=s)}else if(d>0){if(s>h)return;s>u&&(u=s)}if(s=r-c,d||!(s<0)){if(s/=d,d<0){if(s>h)return;s>u&&(u=s)}else if(d>0){if(s<u)return;s<h&&(h=s)}return u>0&&(i.a={x:l+u*p,y:c+u*d}),h<1&&(i.b={x:l+h*p,y:c+h*d}),i}}}}}}var cr=1e9;function ur(t,e,n,r){return function(l){var c,u,h,p,d,f,m,y,g,v,b,T=l,x=sr(),S=lr(t,e,n,r),w={point:P,lineStart:function(){w.point=M,u&&u.push(h=[]),v=!0,g=!1,m=y=NaN},lineEnd:function(){c&&(M(p,d),f&&g&&x.rejoin(),c.push(x.buffer())),w.point=P,g&&l.lineEnd()},polygonStart:function(){l=x,c=[],u=[],b=!0},polygonEnd:function(){l=T,c=s.merge(c);var e=function(t){for(var e=0,n=u.length,r=t[1],i=0;i<n;++i)for(var s,o=1,a=u[i],l=a.length,c=a[0];o<l;++o)s=a[o],c[1]<=r?s[1]>r&&Rt(c,s,t)>0&&++e:s[1]<=r&&Rt(c,s,t)<0&&--e,c=s;return 0!==e}([t,r]),n=b&&e,i=c.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),E(null,null,1,l),l.lineEnd()),i&&tr(c,o,e,E,l),l.polygonEnd()),c=u=h=null}};function E(s,o,l,c){var u=0,h=0;if(null==s||(u=i(s,l))!==(h=i(o,l))||a(s,o)<0^l>0)do{c.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+l+4)%4)!==h);else c.point(o[0],o[1])}function A(i,s){return t<=i&&i<=n&&e<=s&&s<=r}function P(t,e){A(t,e)&&l.point(t,e)}function M(t,e){var n=A(t=Math.max(-cr,Math.min(cr,t)),e=Math.max(-cr,Math.min(cr,e)));if(u&&h.push([t,e]),v)p=t,d=e,f=n,v=!1,n&&(l.lineStart(),l.point(t,e));else if(n&&g)l.point(t,e);else{var r={a:{x:m,y},b:{x:t,y:e}};S(r)?(g||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),b=!1):n&&(l.lineStart(),l.point(t,e),b=!1)}m=t,y=e,g=n}return w};function i(r,i){return S(r[0]-t)<Ct?i>0?0:3:S(r[0]-n)<Ct?i>0?2:1:S(r[1]-e)<Ct?i>0?1:0:i>0?3:2}function o(t,e){return a(t.x,e.x)}function a(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}}function hr(t){var e=0,n=It/3,r=Lr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*It/180,n=t[1]*It/180):[e/It*180,n/It*180]},i}function pr(t,e){var n=Math.sin(t),r=(n+Math.sin(e))/2,i=1+n*(2*r-n),s=Math.sqrt(i)/r;function o(t,e){var n=Math.sqrt(i-2*r*Math.sin(e))/r;return[n*Math.sin(t*=r),s-n*Math.cos(t)]}return o.invert=function(t,e){var n=s-e;return[Math.atan2(t,n)/r,jt((i-(t*t+n*n)*r*r)/(2*r))]},o}s.geo.clipExtent=function(){var t,e,n,r,i,s,o={stream:function(t){return i&&(i.valid=!1),(i=s(t)).valid=!0,i},extent:function(a){return arguments.length?(s=ur(t=+a[0][0],e=+a[0][1],n=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[n,r]]}};return o.extent([[0,0],[960,500]])},(s.geo.conicEqualArea=function(){return hr(pr)}).raw=pr,s.geo.albers=function(){return s.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},s.geo.albersUsa=function(){var t,e,n,r,i=s.geo.albers(),o=s.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=s.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(e,n){t=[e,n]}};function c(i){var s=i[0],o=i[1];return t=null,e(s,o),t||(n(s,o),t)||r(s,o),t}return c.invert=function(t){var e=i.scale(),n=i.translate(),r=(t[0]-n[0])/e,s=(t[1]-n[1])/e;return(s>=.12&&s<.234&&r>=-.425&&r<-.214?o:s>=.166&&s<.234&&r>=-.214&&r<-.115?a:i).invert(t)},c.stream=function(t){var e=i.stream(t),n=o.stream(t),r=a.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},c.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),c):i.precision()},c.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),c.translate(i.translate())):i.scale()},c.translate=function(t){if(!arguments.length)return i.translate();var s=i.scale(),u=+t[0],h=+t[1];return e=i.translate(t).clipExtent([[u-.455*s,h-.238*s],[u+.455*s,h+.238*s]]).stream(l).point,n=o.translate([u-.307*s,h+.201*s]).clipExtent([[u-.425*s+Ct,h+.12*s+Ct],[u-.214*s-Ct,h+.234*s-Ct]]).stream(l).point,r=a.translate([u-.205*s,h+.212*s]).clipExtent([[u-.214*s+Ct,h+.166*s+Ct],[u-.115*s-Ct,h+.234*s-Ct]]).stream(l).point,c},c.scale(1070)};var dr,fr,mr,yr,gr,vr,br={point:j,lineStart:j,lineEnd:j,polygonStart:function(){fr=0,br.lineStart=Tr},polygonEnd:function(){br.lineStart=br.lineEnd=br.point=j,dr+=S(fr/2)}};function Tr(){var t,e,n,r;function i(t,e){fr+=r*t-n*e,n=t,r=e}br.point=function(s,o){br.point=i,t=n=s,e=r=o},br.lineEnd=function(){i(t,e)}}var xr={point:function(t,e){t<mr&&(mr=t),t>gr&&(gr=t),e<yr&&(yr=e),e>vr&&(vr=e)},lineStart:j,lineEnd:j,polygonStart:j,polygonEnd:j};function Sr(){var t=wr(4.5),e=[],n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=a},polygonEnd:function(){n.lineEnd=o,n.point=r},pointRadius:function(e){return t=wr(e),n},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function r(n,r){e.push("M",n,",",r,t)}function i(t,r){e.push("M",t,",",r),n.point=s}function s(t,n){e.push("L",t,",",n)}function o(){n.point=r}function a(){e.push("Z")}return n}function wr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var Er,Ar={point:Pr,lineStart:Mr,lineEnd:Cr,polygonStart:function(){Ar.lineStart=kr},polygonEnd:function(){Ar.point=Pr,Ar.lineStart=Mr,Ar.lineEnd=Cr}};function Pr(t,e){Pn+=t,Mn+=e,++Cn}function Mr(){var t,e;function n(n,r){var i=n-t,s=r-e,o=Math.sqrt(i*i+s*s);kn+=o*(t+n)/2,In+=o*(e+r)/2,On+=o,Pr(t=n,e=r)}Ar.point=function(r,i){Ar.point=n,Pr(t=r,e=i)}}function Cr(){Ar.point=Pr}function kr(){var t,e,n,r;function i(t,e){var i=t-n,s=e-r,o=Math.sqrt(i*i+s*s);kn+=o*(n+t)/2,In+=o*(r+e)/2,On+=o,Nn+=(o=r*t-n*e)*(n+t),_n+=o*(r+e),Dn+=3*o,Pr(n=t,r=e)}Ar.point=function(s,o){Ar.point=i,Pr(t=n=s,e=r=o)},Ar.lineEnd=function(){i(t,e)}}function Ir(t){var e=4.5,n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=a},polygonEnd:function(){n.lineEnd=o,n.point=r},pointRadius:function(t){return e=t,n},result:j};function r(n,r){t.moveTo(n+e,r),t.arc(n,r,e,0,Ot)}function i(e,r){t.moveTo(e,r),n.point=s}function s(e,n){t.lineTo(e,n)}function o(){n.point=r}function a(){t.closePath()}return n}function Or(t){var e=.5,n=Math.cos(30*Dt),r=16;function i(t){return(r?o:s)(t)}function s(e){return _r(e,(function(n,r){n=t(n,r),e.point(n[0],n[1])}))}function o(e){var n,i,s,o,l,c,u,h,p,d,f,m,y={point:g,lineStart:v,lineEnd:T,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){h=NaN,y.point=b,e.lineStart()}function b(n,i){var s=Fn([n,i]),o=t(n,i);a(h,p,u,d,f,m,h=o[0],p=o[1],u=n,d=s[0],f=s[1],m=s[2],r,e),e.point(h,p)}function T(){y.point=g,e.lineEnd()}function x(){v(),y.point=S,y.lineEnd=w}function S(t,e){b(n=t,e),i=h,s=p,o=d,l=f,c=m,y.point=b}function w(){a(h,p,u,d,f,m,i,s,n,o,l,c,r,e),y.lineEnd=T,T()}return y}function a(r,i,s,o,l,c,u,h,p,d,f,m,y,g){var v=u-r,b=h-i,T=v*v+b*b;if(T>4*e&&y--){var x=o+d,w=l+f,E=c+m,A=Math.sqrt(x*x+w*w+E*E),P=Math.asin(E/=A),M=S(S(E)-1)<Ct||S(s-p)<Ct?(s+p)/2:Math.atan2(w,x),C=t(M,P),k=C[0],I=C[1],O=k-r,N=I-i,_=b*O-v*N;(_*_/T>e||S((v*O+b*N)/T-.5)>.3||o*d+l*f+c*m<n)&&(a(r,i,s,o,l,c,k,I,M,x/=A,w/=A,E,y,g),g.point(k,I),a(k,I,M,x,w,E,u,h,p,d,f,m,y,g))}}return i.precision=function(t){return arguments.length?(r=(e=t*t)>0&&16,i):Math.sqrt(e)},i}function Nr(t){this.stream=t}function _r(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Dr(t){return Lr((function(){return t}))()}function Lr(t){var e,n,r,i,o,a,l=Or((function(t,n){return[(t=e(t,n))[0]*c+i,o-t[1]*c]})),c=150,u=480,h=250,p=0,d=0,f=0,m=0,y=0,g=ar,v=L,b=null,T=null;function x(t){return[(t=r(t[0]*Dt,t[1]*Dt))[0]*c+i,o-t[1]*c]}function w(t){return(t=r.invert((t[0]-i)/c,(o-t[1])/c))&&[t[0]*Lt,t[1]*Lt]}function E(){r=Zn(n=jr(f,m,y),e);var t=e(p,d);return i=u-t[0]*c,o=h+t[1]*c,A()}function A(){return a&&(a.valid=!1,a=null),x}return x.stream=function(t){return a&&(a.valid=!1),(a=Br(g(n,l(v(t))))).valid=!0,a},x.clipAngle=function(t){return arguments.length?(g=null==t?(b=t,ar):function(t){var e=Math.cos(t),n=e>0,r=S(e)>Ct;return rr(i,(function(t){var e,a,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,p){var d,f=[h,p],m=i(h,p),y=n?m?0:o(h,p):m?o(h+(h<0?It:-It),p):0;if(!e&&(c=l=m)&&t.lineStart(),m!==l&&(d=s(e,f),(Hn(e,d)||Hn(f,d))&&(f[0]+=Ct,f[1]+=Ct,m=i(f[0],f[1]))),m!==l)u=0,m?(t.lineStart(),d=s(f,e),t.point(d[0],d[1])):(d=s(e,f),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(r&&e&&n^m){var g;y&a||!(g=s(f,e,!0))||(u=0,n?(t.lineStart(),t.point(g[0][0],g[0][1]),t.point(g[1][0],g[1][1]),t.lineEnd()):(t.point(g[1][0],g[1][1]),t.lineEnd(),t.lineStart(),t.point(g[0][0],g[0][1])))}!m||e&&Hn(e,f)||t.point(f[0],f[1]),e=f,l=m,a=y},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),qr(t,6*Dt),n?[0,-t]:[-It,t-It]);function i(t,n){return Math.cos(t)*Math.cos(n)>e}function s(t,n,r){var i=[1,0,0],s=Un(Fn(t),Fn(n)),o=jn(s,s),a=s[0],l=o-a*a;if(!l)return!r&&t;var c=e*o/l,u=-e*a/l,h=Un(i,s),p=zn(i,c);Vn(p,zn(s,u));var d=h,f=jn(p,d),m=jn(d,d),y=f*f-m*(jn(p,p)-1);if(!(y<0)){var g=Math.sqrt(y),v=zn(d,(-f-g)/m);if(Vn(v,p),v=$n(v),!r)return v;var b,T=t[0],x=n[0],w=t[1],E=n[1];x<T&&(b=T,T=x,x=b);var A=x-T,P=S(A-It)<Ct;if(!P&&E<w&&(b=w,w=E,E=b),P||A<Ct?P?w+E>0^v[1]<(S(v[0]-T)<Ct?w:E):w<=v[1]&&v[1]<=E:A>It^(T<=v[0]&&v[0]<=x)){var M=zn(d,(-f+g)/m);return Vn(M,p),[v,$n(M)]}}}function o(e,r){var i=n?t:It-t,s=0;return e<-i?s|=1:e>i&&(s|=2),r<-i?s|=4:r>i&&(s|=8),s}}((b=+t)*Dt),A()):b},x.clipExtent=function(t){return arguments.length?(T=t,v=t?ur(t[0][0],t[0][1],t[1][0],t[1][1]):L,A()):T},x.scale=function(t){return arguments.length?(c=+t,E()):c},x.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],E()):[u,h]},x.center=function(t){return arguments.length?(p=t[0]%360*Dt,d=t[1]%360*Dt,E()):[p*Lt,d*Lt]},x.rotate=function(t){return arguments.length?(f=t[0]%360*Dt,m=t[1]%360*Dt,y=t.length>2?t[2]%360*Dt:0,E()):[f*Lt,m*Lt,y*Lt]},s.rebind(x,l,"precision"),function(){return e=t.apply(this,arguments),x.invert=e.invert&&w,E()}}function Br(t){return _r(t,(function(e,n){t.point(e*Dt,n*Dt)}))}function Rr(t,e){return[t,e]}function Fr(t,e){return[t>It?t-Ot:t<-It?t+Ot:t,e]}function jr(t,e,n){return t?e||n?Zn(Vr(t),zr(e,n)):Vr(t):e||n?zr(e,n):Fr}function Ur(t){return function(e,n){return[(e+=t)>It?e-Ot:e<-It?e+Ot:e,n]}}function Vr(t){var e=Ur(t);return e.invert=Ur(-t),e}function zr(t,e){var n=Math.cos(t),r=Math.sin(t),i=Math.cos(e),s=Math.sin(e);function o(t,e){var o=Math.cos(e),a=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*n+a*r;return[Math.atan2(l*i-u*s,a*n-c*r),jt(u*i+l*s)]}return o.invert=function(t,e){var o=Math.cos(e),a=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*s;return[Math.atan2(l*i+c*s,a*n+u*r),jt(u*n-a*r)]},o}function qr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,s,o,a){var l=o*e;null!=i?(i=$r(n,i),s=$r(n,s),(o>0?i<s:i>s)&&(i+=o*Ot)):(i=t+o*Ot,s=t-.5*l);for(var c,u=i;o>0?u>s:u<s;u-=l)a.point((c=$n([n,-r*Math.cos(u),-r*Math.sin(u)]))[0],c[1])}}function $r(t,e){var n=Fn(e);n[0]-=t,qn(n);var r=Ft(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Ct)%(2*Math.PI)}function Hr(t,e,n){var r=s.range(t,e-Ct,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Kr(t,e,n){var r=s.range(t,e-Ct,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Yr(t){return t.source}function Wr(t){return t.target}s.geo.path=function(){var t,e,n,r,i,o=4.5;function a(t){return t&&("function"==typeof o&&r.pointRadius(+o.apply(this,arguments)),i&&i.valid||(i=n(r)),s.geo.stream(t,i)),r.result()}function l(){return i=null,a}return a.area=function(t){return dr=0,s.geo.stream(t,n(br)),dr},a.centroid=function(t){return Pn=Mn=Cn=kn=In=On=Nn=_n=Dn=0,s.geo.stream(t,n(Ar)),Dn?[Nn/Dn,_n/Dn]:On?[kn/On,In/On]:Cn?[Pn/Cn,Mn/Cn]:[NaN,NaN]},a.bounds=function(t){return gr=vr=-(mr=yr=1/0),s.geo.stream(t,n(xr)),[[mr,yr],[gr,vr]]},a.projection=function(e){return arguments.length?(n=(t=e)?e.stream||(r=e,i=Or((function(t,e){return r([t*Lt,e*Lt])})),function(t){return Br(i(t))}):L,l()):t;var r,i},a.context=function(t){return arguments.length?(r=null==(e=t)?new Sr:new Ir(t),"function"!=typeof o&&r.pointRadius(o),l()):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(r.pointRadius(+t),+t),a):o},a.projection(s.geo.albersUsa()).context(null)},s.geo.transform=function(t){return{stream:function(e){var n=new Nr(e);for(var r in t)n[r]=t[r];return n}}},Nr.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},s.geo.projection=Dr,s.geo.projectionMutator=Lr,(s.geo.equirectangular=function(){return Dr(Rr)}).raw=Rr.invert=Rr,s.geo.rotation=function(t){function e(e){return(e=t(e[0]*Dt,e[1]*Dt))[0]*=Lt,e[1]*=Lt,e}return t=jr(t[0]%360*Dt,t[1]*Dt,t.length>2?t[2]*Dt:0),e.invert=function(e){return(e=t.invert(e[0]*Dt,e[1]*Dt))[0]*=Lt,e[1]*=Lt,e},e},Fr.invert=Rr,s.geo.circle=function(){var t,e,n=[0,0],r=6;function i(){var t="function"==typeof n?n.apply(this,arguments):n,r=jr(-t[0]*Dt,-t[1]*Dt,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=r(t,e)),t[0]*=Lt,t[1]*=Lt}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(n=t,i):n},i.angle=function(n){return arguments.length?(e=qr((t=+n)*Dt,r*Dt),i):t},i.precision=function(n){return arguments.length?(e=qr(t*Dt,(r=+n)*Dt),i):r},i.angle(90)},s.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Dt,i=t[1]*Dt,s=e[1]*Dt,o=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),u=Math.sin(s),h=Math.cos(s);return Math.atan2(Math.sqrt((n=h*o)*n+(n=c*u-l*h*a)*n),l*u+c*h*a)},s.geo.graticule=function(){var t,e,n,r,i,o,a,l,c,u,h,p,d=10,f=d,m=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:b()}}function b(){return s.range(Math.ceil(r/m)*m,n,m).map(h).concat(s.range(Math.ceil(l/y)*y,a,y).map(p)).concat(s.range(Math.ceil(e/d)*d,t,d).filter((function(t){return S(t%m)>Ct})).map(c)).concat(s.range(Math.ceil(o/f)*f,i,f).filter((function(t){return S(t%y)>Ct})).map(u))}return v.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[h(r).concat(p(a).slice(1),h(n).reverse().slice(1),p(l).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.majorExtent(t).minorExtent(t):v.minorExtent()},v.majorExtent=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),v.precision(g)):[[r,l],[n,a]]},v.minorExtent=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),v.precision(g)):[[e,o],[t,i]]},v.step=function(t){return arguments.length?v.majorStep(t).minorStep(t):v.minorStep()},v.majorStep=function(t){return arguments.length?(m=+t[0],y=+t[1],v):[m,y]},v.minorStep=function(t){return arguments.length?(d=+t[0],f=+t[1],v):[d,f]},v.precision=function(s){return arguments.length?(g=+s,c=Hr(o,i,90),u=Kr(e,t,g),h=Hr(l,a,90),p=Kr(r,n,g),v):g},v.majorExtent([[-180,-90+Ct],[180,90-Ct]]).minorExtent([[-180,-80-Ct],[180,80+Ct]])},s.geo.greatArc=function(){var t,e,n=Yr,r=Wr;function i(){return{type:"LineString",coordinates:[t||n.apply(this,arguments),e||r.apply(this,arguments)]}}return i.distance=function(){return s.geo.distance(t||n.apply(this,arguments),e||r.apply(this,arguments))},i.source=function(e){return arguments.length?(n=e,t="function"==typeof e?null:e,i):n},i.target=function(t){return arguments.length?(r=t,e="function"==typeof t?null:t,i):r},i.precision=function(){return arguments.length?i:0},i},s.geo.interpolate=function(t,e){return n=t[0]*Dt,r=t[1]*Dt,i=e[0]*Dt,s=e[1]*Dt,o=Math.cos(r),a=Math.sin(r),l=Math.cos(s),c=Math.sin(s),u=o*Math.cos(n),h=o*Math.sin(n),p=l*Math.cos(i),d=l*Math.sin(i),f=2*Math.asin(Math.sqrt(Vt(s-r)+o*l*Vt(i-n))),m=1/Math.sin(f),(y=f?function(t){var e=Math.sin(t*=f)*m,n=Math.sin(f-t)*m,r=n*u+e*p,i=n*h+e*d,s=n*a+e*c;return[Math.atan2(i,r)*Lt,Math.atan2(s,Math.sqrt(r*r+i*i))*Lt]}:function(){return[n*Lt,r*Lt]}).distance=f,y;var n,r,i,s,o,a,l,c,u,h,p,d,f,m,y},s.geo.length=function(t){return Er=0,s.geo.stream(t,Jr),Er};var Jr={sphere:j,point:j,lineStart:function(){var t,e,n;function r(r,i){var s=Math.sin(i*=Dt),o=Math.cos(i),a=S((r*=Dt)-t),l=Math.cos(a);Er+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=n*s-e*o*l)*a),e*s+n*o*l),t=r,e=s,n=o}Jr.point=function(i,s){t=i*Dt,e=Math.sin(s*=Dt),n=Math.cos(s),Jr.point=r},Jr.lineEnd=function(){Jr.point=Jr.lineEnd=j}},lineEnd:j,polygonStart:j,polygonEnd:j};function Xr(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),s=t(r*i);return[s*i*Math.sin(e),s*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*s,r*o),Math.asin(r&&n*s/r)]},n}var Gr=Xr((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(s.geo.azimuthalEqualArea=function(){return Dr(Gr)}).raw=Gr;var Zr=Xr((function(t){var e=Math.acos(t);return e&&e/Math.sin(e)}),L);function Qr(t,e){var n=Math.cos(t),r=function(t){return Math.tan(It/4+t/2)},i=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(r(e)/r(t)),s=n*Math.pow(r(t),i)/i;if(!i)return ni;function o(t,e){s>0?e<-_t+Ct&&(e=-_t+Ct):e>_t-Ct&&(e=_t-Ct);var n=s/Math.pow(r(e),i);return[n*Math.sin(i*t),s-n*Math.cos(i*t)]}return o.invert=function(t,e){var n=s-e,r=Bt(i)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/i,2*Math.atan(Math.pow(s/r,1/i))-_t]},o}function ti(t,e){var n=Math.cos(t),r=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),i=n/r+t;if(S(r)<Ct)return Rr;function s(t,e){var n=i-e;return[n*Math.sin(r*t),i-n*Math.cos(r*t)]}return s.invert=function(t,e){var n=i-e;return[Math.atan2(t,n)/r,i-Bt(r)*Math.sqrt(t*t+n*n)]},s}(s.geo.azimuthalEquidistant=function(){return Dr(Zr)}).raw=Zr,(s.geo.conicConformal=function(){return hr(Qr)}).raw=Qr,(s.geo.conicEquidistant=function(){return hr(ti)}).raw=ti;var ei=Xr((function(t){return 1/t}),Math.atan);function ni(t,e){return[t,Math.log(Math.tan(It/4+e/2))]}function ri(t){var e,n=Dr(t),r=n.scale,i=n.translate,s=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var o=s.apply(n,arguments);if(o===n){if(e=null==t){var a=It*r(),l=i();s([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else e&&(o=null);return o},n.clipExtent(null)}(s.geo.gnomonic=function(){return Dr(ei)}).raw=ei,ni.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-_t]},(s.geo.mercator=function(){return ri(ni)}).raw=ni;var ii=Xr((function(){return 1}),Math.asin);(s.geo.orthographic=function(){return Dr(ii)}).raw=ii;var si=Xr((function(t){return 1/(1+t)}),(function(t){return 2*Math.atan(t)}));function oi(t,e){return[Math.log(Math.tan(It/4+e/2)),-t]}function ai(t){return t[0]}function li(t){return t[1]}function ci(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;i++){for(;r>1&&Rt(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function ui(t,e){return t[0]-e[0]||t[1]-e[1]}(s.geo.stereographic=function(){return Dr(si)}).raw=si,oi.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-_t]},(s.geo.transverseMercator=function(){var t=ri(oi),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90])}).raw=oi,s.geom={},s.geom.hull=function(t){var e=ai,n=li;if(arguments.length)return r(t);function r(t){if(t.length<3)return[];var r,i=Te(e),s=Te(n),o=t.length,a=[],l=[];for(r=0;r<o;r++)a.push([+i.call(this,t[r],r),+s.call(this,t[r],r),r]);for(a.sort(ui),r=0;r<o;r++)l.push([a[r][0],-a[r][1]]);var c=ci(a),u=ci(l),h=u[0]===c[0],p=u[u.length-1]===c[c.length-1],d=[];for(r=c.length-1;r>=0;--r)d.push(t[a[c[r]][2]]);for(r=+h;r<u.length-p;++r)d.push(t[a[u[r]][2]]);return d}return r.x=function(t){return arguments.length?(e=t,r):e},r.y=function(t){return arguments.length?(n=t,r):n},r},s.geom.polygon=function(t){return K(t,hi),t};var hi=s.geom.polygon.prototype=[];function pi(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function di(t,e,n,r){var i=t[0],s=n[0],o=e[0]-i,a=r[0]-s,l=t[1],c=n[1],u=e[1]-l,h=r[1]-c,p=(a*(l-c)-h*(i-s))/(h*o-a*u);return[i+p*o,l+p*u]}function fi(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}hi.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},hi.centroid=function(t){var e,n,r=-1,i=this.length,s=0,o=0,a=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=a,a=this[r],n=e[0]*a[1]-a[0]*e[1],s+=(e[0]+a[0])*n,o+=(e[1]+a[1])*n;return[s*t,o*t]},hi.clip=function(t){for(var e,n,r,i,s,o,a=fi(t),l=-1,c=this.length-fi(this),u=this[c-1];++l<c;){for(e=t.slice(),t.length=0,i=this[l],s=e[(r=e.length-a)-1],n=-1;++n<r;)pi(o=e[n],u,i)?(pi(s,u,i)||t.push(di(s,o,u,i)),t.push(o)):pi(s,u,i)&&t.push(di(s,o,u,i)),s=o;a&&t.push(t[0]),u=i}return t};var mi,yi,gi,vi,bi,Ti=[],xi=[];function Si(){Ui(this),this.edge=this.site=this.circle=null}function wi(t){var e=Ti.pop()||new Si;return e.site=t,e}function Ei(t){_i(t),gi.remove(t),Ti.push(t),Ui(t)}function Ai(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},s=t.P,o=t.N,a=[t];Ei(t);for(var l=s;l.circle&&S(n-l.circle.x)<Ct&&S(r-l.circle.cy)<Ct;)s=l.P,a.unshift(l),Ei(l),l=s;a.unshift(l),_i(l);for(var c=o;c.circle&&S(n-c.circle.x)<Ct&&S(r-c.circle.cy)<Ct;)o=c.N,a.push(c),Ei(c),c=o;a.push(c),_i(c);var u,h=a.length;for(u=1;u<h;++u)c=a[u],l=a[u-1],Ri(c.edge,l.site,c.site,i);l=a[0],(c=a[h-1]).edge=Bi(l.site,c.site,null,i),Ni(l),Ni(c)}function Pi(t){for(var e,n,r,i,s=t.x,o=t.y,a=gi._;a;)if((r=Mi(a,o)-s)>Ct)a=a.L;else{if(!((i=s-Ci(a,o))>Ct)){r>-Ct?(e=a.P,n=a):i>-Ct?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}var l=wi(t);if(gi.insert(e,l),e||n){if(e===n)return _i(e),n=wi(e.site),gi.insert(l,n),l.edge=n.edge=Bi(e.site,l.site),Ni(e),void Ni(n);if(n){_i(e),_i(n);var c=e.site,u=c.x,h=c.y,p=t.x-u,d=t.y-h,f=n.site,m=f.x-u,y=f.y-h,g=2*(p*y-d*m),v=p*p+d*d,b=m*m+y*y,T={x:(y*v-d*b)/g+u,y:(p*b-m*v)/g+h};Ri(n.edge,c,f,T),l.edge=Bi(c,t,null,T),n.edge=Bi(t,f,null,T),Ni(e),Ni(n)}else l.edge=Bi(e.site,l.site)}}function Mi(t,e){var n=t.site,r=n.x,i=n.y,s=i-e;if(!s)return r;var o=t.P;if(!o)return-1/0;var a=(n=o.site).x,l=n.y,c=l-e;if(!c)return a;var u=a-r,h=1/s-1/c,p=u/c;return h?(-p+Math.sqrt(p*p-2*h*(u*u/(-2*c)-l+c/2+i-s/2)))/h+r:(r+a)/2}function Ci(t,e){var n=t.N;if(n)return Mi(n,e);var r=t.site;return r.y===e?r.x:1/0}function ki(t){this.site=t,this.edges=[]}function Ii(t,e){return e.angle-t.angle}function Oi(){Ui(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ni(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,s=n.site;if(r!==s){var o=i.x,a=i.y,l=r.x-o,c=r.y-a,u=s.x-o,h=2*(l*(y=s.y-a)-c*u);if(!(h>=-kt)){var p=l*l+c*c,d=u*u+y*y,f=(y*p-c*d)/h,m=(l*d-u*p)/h,y=m+a,g=xi.pop()||new Oi;g.arc=t,g.site=i,g.x=f+o,g.y=y+Math.sqrt(f*f+m*m),g.cy=y,t.circle=g;for(var v=null,b=bi._;b;)if(g.y<b.y||g.y===b.y&&g.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}bi.insert(v,g),v||(vi=g)}}}}function _i(t){var e=t.circle;e&&(e.P||(vi=e.N),bi.remove(e),xi.push(e),Ui(e),t.circle=null)}function Di(t,e){var n=t.b;if(n)return!0;var r,i,s=t.a,o=e[0][0],a=e[1][0],l=e[0][1],c=e[1][1],u=t.l,h=t.r,p=u.x,d=u.y,f=h.x,m=h.y,y=(p+f)/2,g=(d+m)/2;if(m===d){if(y<o||y>=a)return;if(p>f){if(s){if(s.y>=c)return}else s={x:y,y:l};n={x:y,y:c}}else{if(s){if(s.y<l)return}else s={x:y,y:c};n={x:y,y:l}}}else if(i=g-(r=(p-f)/(m-d))*y,r<-1||r>1)if(p>f){if(s){if(s.y>=c)return}else s={x:(l-i)/r,y:l};n={x:(c-i)/r,y:c}}else{if(s){if(s.y<l)return}else s={x:(c-i)/r,y:c};n={x:(l-i)/r,y:l}}else if(d<m){if(s){if(s.x>=a)return}else s={x:o,y:r*o+i};n={x:a,y:r*a+i}}else{if(s){if(s.x<o)return}else s={x:a,y:r*a+i};n={x:o,y:r*o+i}}return t.a=s,t.b=n,!0}function Li(t,e){this.l=t,this.r=e,this.a=this.b=null}function Bi(t,e,n,r){var i=new Li(t,e);return mi.push(i),n&&Ri(i,t,e,n),r&&Ri(i,e,t,r),yi[t.i].edges.push(new Fi(i,t,e)),yi[e.i].edges.push(new Fi(i,e,t)),i}function Ri(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function Fi(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function ji(){this._=null}function Ui(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Vi(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function zi(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function qi(t){for(;t.L;)t=t.L;return t}function $i(t,e){var n,r,i,s=t.sort(Hi).pop();for(mi=[],yi=new Array(t.length),gi=new ji,bi=new ji;;)if(i=vi,s&&(!i||s.y<i.y||s.y===i.y&&s.x<i.x))s.x===n&&s.y===r||(yi[s.i]=new ki(s),Pi(s),n=s.x,r=s.y),s=t.pop();else{if(!i)break;Ai(i.arc)}e&&(function(t){for(var e,n=mi,r=lr(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)(!Di(e=n[i],t)||!r(e)||S(e.a.x-e.b.x)<Ct&&S(e.a.y-e.b.y)<Ct)&&(e.a=e.b=null,n.splice(i,1))}(e),function(t){for(var e,n,r,i,s,o,a,l,c,u,h=t[0][0],p=t[1][0],d=t[0][1],f=t[1][1],m=yi,y=m.length;y--;)if((s=m[y])&&s.prepare())for(l=(a=s.edges).length,o=0;o<l;)r=(u=a[o].end()).x,i=u.y,e=(c=a[++o%l].start()).x,n=c.y,(S(r-e)>Ct||S(i-n)>Ct)&&(a.splice(o,0,new Fi((g=s.site,v=u,b=S(r-h)<Ct&&f-i>Ct?{x:h,y:S(e-h)<Ct?n:f}:S(i-f)<Ct&&p-r>Ct?{x:S(n-f)<Ct?e:p,y:f}:S(r-p)<Ct&&i-d>Ct?{x:p,y:S(e-p)<Ct?n:d}:S(i-d)<Ct&&r-h>Ct?{x:S(n-d)<Ct?e:h,y:d}:null,T=void 0,(T=new Li(g,null)).a=v,T.b=b,mi.push(T),T),s.site,null)),++l);var g,v,b,T}(e));var o={cells:yi,edges:mi};return gi=bi=mi=yi=null,o}function Hi(t,e){return e.y-t.y||e.x-t.x}ki.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)(t=e[n].edge).b&&t.a||e.splice(n,1);return e.sort(Ii),e.length},Fi.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},ji.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=qi(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Vi(this,n),n=(t=n).U),n.C=!1,r.C=!0,zi(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(zi(this,n),n=(t=n).U),n.C=!1,r.C=!0,Vi(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,s=t.L,o=t.R;if(n=s?o?qi(o):s:o,i?i.L===t?i.L=n:i.R=n:this._=n,s&&o?(r=n.C,n.C=t.C,n.L=s,s.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Vi(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,zi(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Vi(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,zi(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Vi(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,zi(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},s.geom.voronoi=function(t){var e=ai,n=li,r=e,i=n,s=Ki;if(t)return o(t);function o(t){var e=new Array(t.length),n=s[0][0],r=s[0][1],i=s[1][0],o=s[1][1];return $i(a(t),s).cells.forEach((function(s,a){var l=s.edges,c=s.site;(e[a]=l.length?l.map((function(t){var e=t.start();return[e.x,e.y]})):c.x>=n&&c.x<=i&&c.y>=r&&c.y<=o?[[n,o],[i,o],[i,r],[n,r]]:[]).point=t[a]})),e}function a(t){return t.map((function(t,e){return{x:Math.round(r(t,e)/Ct)*Ct,y:Math.round(i(t,e)/Ct)*Ct,i:e}}))}return o.links=function(t){return $i(a(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return $i(a(t)).cells.forEach((function(n,r){for(var i,s,o,a,l=n.site,c=n.edges.sort(Ii),u=-1,h=c.length,p=c[h-1].edge,d=p.l===l?p.r:p.l;++u<h;)i=d,d=(p=c[u].edge).l===l?p.r:p.l,r<i.i&&r<d.i&&(o=i,a=d,((s=l).x-a.x)*(o.y-s.y)-(s.x-o.x)*(a.y-s.y)<0)&&e.push([t[r],t[i.i],t[d.i]])})),e},o.x=function(t){return arguments.length?(r=Te(e=t),o):e},o.y=function(t){return arguments.length?(i=Te(n=t),o):n},o.clipExtent=function(t){return arguments.length?(s=null==t?Ki:t,o):s===Ki?null:s},o.size=function(t){return arguments.length?o.clipExtent(t&&[[0,0],t]):s===Ki?null:s&&s[1]},o};var Ki=[[-1e6,-1e6],[1e6,1e6]];function Yi(t){return t.x}function Wi(t){return t.y}function Ji(t,e,n,r,i,s){if(!t(e,n,r,i,s)){var o=.5*(n+i),a=.5*(r+s),l=e.nodes;l[0]&&Ji(t,l[0],n,r,o,a),l[1]&&Ji(t,l[1],o,r,i,a),l[2]&&Ji(t,l[2],n,a,o,s),l[3]&&Ji(t,l[3],o,a,i,s)}}function Xi(t,e){t=s.rgb(t),e=s.rgb(e);var n=t.r,r=t.g,i=t.b,o=e.r-n,a=e.g-r,l=e.b-i;return function(t){return"#"+de(Math.round(n+o*t))+de(Math.round(r+a*t))+de(Math.round(i+l*t))}}function Gi(t,e){var n,r={},i={};for(n in t)n in e?r[n]=ns(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function Zi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Qi(t,e){var n,r,i,s=ts.lastIndex=es.lastIndex=0,o=-1,a=[],l=[];for(t+="",e+="";(n=ts.exec(t))&&(r=es.exec(e));)(i=r.index)>s&&(i=e.slice(s,i),a[o]?a[o]+=i:a[++o]=i),(n=n[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,l.push({i:o,x:Zi(n,r)})),s=es.lastIndex;return s<e.length&&(i=e.slice(s),a[o]?a[o]+=i:a[++o]=i),a.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var n,r=0;r<e;++r)a[(n=l[r]).i]=n.x(t);return a.join("")})}s.geom.delaunay=function(t){return s.geom.voronoi().triangles(t)},s.geom.quadtree=function(t,e,n,r,i){var s,o=ai,a=li;if(s=arguments.length)return o=Yi,a=Wi,3===s&&(i=n,r=e,n=e=0),l(t);function l(t){var l,c,u,h,p,d,f,m,y,g=Te(o),v=Te(a);if(null!=e)d=e,f=n,m=r,y=i;else if(m=y=-(d=f=1/0),c=[],u=[],p=t.length,s)for(h=0;h<p;++h)(l=t[h]).x<d&&(d=l.x),l.y<f&&(f=l.y),l.x>m&&(m=l.x),l.y>y&&(y=l.y),c.push(l.x),u.push(l.y);else for(h=0;h<p;++h){var b=+g(l=t[h],h),T=+v(l,h);b<d&&(d=b),T<f&&(f=T),b>m&&(m=b),T>y&&(y=T),c.push(b),u.push(T)}var x=m-d,w=y-f;function E(t,e,n,r,i,s,o,a){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(S(l-n)+S(c-r)<.01)A(t,e,n,r,i,s,o,a);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,s,o,a),A(t,e,n,r,i,s,o,a)}else t.x=n,t.y=r,t.point=e}else A(t,e,n,r,i,s,o,a)}function A(t,e,n,r,i,s,o,a){var l=.5*(i+o),c=.5*(s+a),u=n>=l,h=r>=c,p=h<<1|u;t.leaf=!1,u?i=l:o=l,h?s=c:a=c,E(t=t.nodes[p]||(t.nodes[p]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,n,r,i,s,o,a)}x>w?y=f+x:m=d+w;var P={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){E(P,t,+g(t,++h),+v(t,h),d,f,m,y)}};if(P.visit=function(t){Ji(t,P,d,f,m,y)},P.find=function(t){return function(t,e,n,r,i,s,o){var a,l=1/0;return function t(c,u,h,p,d){if(!(u>s||h>o||p<r||d<i)){if(f=c.point){var f,m=e-c.x,y=n-c.y,g=m*m+y*y;if(g<l){var v=Math.sqrt(l=g);r=e-v,i=n-v,s=e+v,o=n+v,a=f}}for(var b=c.nodes,T=.5*(u+p),x=.5*(h+d),S=(n>=x)<<1|e>=T,w=S+4;S<w;++S)if(c=b[3&S])switch(3&S){case 0:t(c,u,h,T,x);break;case 1:t(c,T,h,p,x);break;case 2:t(c,u,x,T,d);break;case 3:t(c,T,x,p,d)}}}(t,r,i,s,o),a}(P,t[0],t[1],d,f,m,y)},h=-1,null==e){for(;++h<p;)E(P,t[h],c[h],u[h],d,f,m,y);--h}else t.forEach(P.add);return c=u=t=l=null,P}return l.x=function(t){return arguments.length?(o=t,l):o},l.y=function(t){return arguments.length?(a=t,l):a},l.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),l):null==e?null:[[e,n],[r,i]]},l.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),l):null==e?null:[r-e,i-n]},l},s.interpolateRgb=Xi,s.interpolateObject=Gi,s.interpolateNumber=Zi,s.interpolateString=Qi;var ts=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,es=new RegExp(ts.source,"g");function ns(t,e){for(var n,r=s.interpolators.length;--r>=0&&!(n=s.interpolators[r](t,e)););return n}function rs(t,e){var n,r=[],i=[],s=t.length,o=e.length,a=Math.min(t.length,e.length);for(n=0;n<a;++n)r.push(ns(t[n],e[n]));for(;n<s;++n)i[n]=t[n];for(;n<o;++n)i[n]=e[n];return function(t){for(n=0;n<a;++n)i[n]=r[n](t);return i}}s.interpolate=ns,s.interpolators=[function(t,e){var n=typeof e;return("string"===n?be.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?Xi:Qi:e instanceof Kt?Xi:Array.isArray(e)?rs:"object"===n&&isNaN(e)?Gi:Zi)(t,e)}],s.interpolateArray=rs;var is=function(){return L},ss=s.map({linear:is,poly:function(t){return function(e){return Math.pow(e,t)}},quad:function(){return cs},cubic:function(){return us},sin:function(){return ps},exp:function(){return ds},circle:function(){return fs},elastic:function(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Ot*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Ot/e)}},back:function(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}},bounce:function(){return ms}}),os=s.map({in:L,out:as,"in-out":ls,"out-in":function(t){return ls(as(t))}});function as(t){return function(e){return 1-t(1-e)}}function ls(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function cs(t){return t*t}function us(t){return t*t*t}function hs(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function ps(t){return 1-Math.cos(t*_t)}function ds(t){return Math.pow(2,10*(t-1))}function fs(t){return 1-Math.sqrt(1-t*t)}function ms(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function ys(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function gs(t){var e,n,r,i=[t.a,t.b],s=[t.c,t.d],o=bs(i),a=vs(i,s),l=bs(((e=s)[0]+=(r=-a)*(n=i)[0],e[1]+=r*n[1],e))||0;i[0]*s[1]<s[0]*i[1]&&(i[0]*=-1,i[1]*=-1,o*=-1,a*=-1),this.rotate=(o?Math.atan2(i[1],i[0]):Math.atan2(-s[0],s[1]))*Lt,this.translate=[t.e,t.f],this.scale=[o,l],this.skew=l?Math.atan2(a,l)*Lt:0}function vs(t,e){return t[0]*e[0]+t[1]*e[1]}function bs(t){var e=Math.sqrt(vs(t,t));return e&&(t[0]/=e,t[1]/=e),e}s.ease=function(t){var e,n=t.indexOf("-"),r=n>=0?t.slice(0,n):t,i=n>=0?t.slice(n+1):"in";return r=ss.get(r)||is,i=os.get(i)||L,e=i(r.apply(null,o.call(arguments,1))),function(t){return t<=0?0:t>=1?1:e(t)}},s.interpolateHcl=function(t,e){t=s.hcl(t),e=s.hcl(e);var n=t.h,r=t.c,i=t.l,o=e.h-n,a=e.c-r,l=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return Zt(n+o*t,r+a*t,i+l*t)+""}},s.interpolateHsl=function(t,e){t=s.hsl(t),e=s.hsl(e);var n=t.h,r=t.s,i=t.l,o=e.h-n,a=e.s-r,l=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(t){return Jt(n+o*t,r+a*t,i+l*t)+""}},s.interpolateLab=function(t,e){t=s.lab(t),e=s.lab(e);var n=t.l,r=t.a,i=t.b,o=e.l-n,a=e.a-r,l=e.b-i;return function(t){return se(n+o*t,r+a*t,i+l*t)+""}},s.interpolateRound=ys,s.transform=function(t){var e=l.createElementNS(s.ns.prefix.svg,"g");return(s.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new gs(n?n.matrix:Ts)})(t)},gs.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Ts={a:1,b:0,c:0,d:1,e:0,f:0};function xs(t){return t.length?t.pop()+",":""}function Ss(t,e){var n=[],r=[];return t=s.transform(t),e=s.transform(e),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:Zi(t[0],e[0])},{i:i-2,x:Zi(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}(t.translate,e.translate,n,r),function(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(xs(n)+"rotate(",null,")")-2,x:Zi(t,e)})):e&&n.push(xs(n)+"rotate("+e+")")}(t.rotate,e.rotate,n,r),function(t,e,n,r){t!==e?r.push({i:n.push(xs(n)+"skewX(",null,")")-2,x:Zi(t,e)}):e&&n.push(xs(n)+"skewX("+e+")")}(t.skew,e.skew,n,r),function(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(xs(n)+"scale(",null,",",null,")");r.push({i:i-4,x:Zi(t[0],e[0])},{i:i-2,x:Zi(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(xs(n)+"scale("+e+")")}(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,s=r.length;++i<s;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function ws(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function Es(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function As(t){for(var e=t.source,n=t.target,r=function(t,e){if(t===e)return t;for(var n=Ps(t),r=Ps(e),i=n.pop(),s=r.pop(),o=null;i===s;)o=i,i=n.pop(),s=r.pop();return o}(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var s=i.length;n!==r;)i.splice(s,0,n),n=n.parent;return i}function Ps(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function Ms(t){t.fixed|=2}function Cs(t){t.fixed&=-7}function ks(t){t.fixed|=4,t.px=t.x,t.py=t.y}function Is(t){t.fixed&=-5}function Os(t,e,n){var r=0,i=0;if(t.charge=0,!t.leaf)for(var s,o=t.nodes,a=o.length,l=-1;++l<a;)null!=(s=o[l])&&(Os(s,e,n),t.charge+=s.charge,r+=s.charge*s.cx,i+=s.charge*s.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var c=e*n[t.point.index];t.charge+=t.pointCharge=c,r+=c*t.point.x,i+=c*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}s.interpolateTransform=Ss,s.layout={},s.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(As(t[n]));return e}},s.layout.chord=function(){var t,e,n,r,i,o,a,l={},c=0;function u(){var l,u,p,d,f,m={},y=[],g=s.range(r),v=[];for(t=[],e=[],l=0,d=-1;++d<r;){for(u=0,f=-1;++f<r;)u+=n[d][f];y.push(u),v.push(s.range(r)),l+=u}for(i&&g.sort((function(t,e){return i(y[t],y[e])})),o&&v.forEach((function(t,e){t.sort((function(t,r){return o(n[e][t],n[e][r])}))})),l=(Ot-c*r)/l,u=0,d=-1;++d<r;){for(p=u,f=-1;++f<r;){var b=g[d],T=v[b][f],x=n[b][T],S=u,w=u+=x*l;m[b+"-"+T]={index:b,subindex:T,startAngle:S,endAngle:w,value:x}}e[b]={index:b,startAngle:p,endAngle:u,value:y[b]},u+=c}for(d=-1;++d<r;)for(f=d-1;++f<r;){var E=m[d+"-"+f],A=m[f+"-"+d];(E.value||A.value)&&t.push(E.value<A.value?{source:A,target:E}:{source:E,target:A})}a&&h()}function h(){t.sort((function(t,e){return a((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)}))}return l.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,t=e=null,l):n},l.padding=function(n){return arguments.length?(c=n,t=e=null,l):c},l.sortGroups=function(n){return arguments.length?(i=n,t=e=null,l):i},l.sortSubgroups=function(e){return arguments.length?(o=e,t=null,l):o},l.sortChords=function(e){return arguments.length?(a=e,t&&h(),l):a},l.chords=function(){return t||u(),t},l.groups=function(){return e||u(),e},l},s.layout.force=function(){var t,e,n,r,i,o,a={},l=s.dispatch("start","tick","end"),c=[1,1],u=.9,h=Ns,p=_s,d=-30,f=Ds,m=.1,y=.64,g=[],v=[];function b(t){return function(e,n,r,i){if(e.point!==t){var s=e.cx-t.x,o=e.cy-t.y,a=i-n,l=s*s+o*o;if(a*a/y<l){if(l<f){var c=e.charge/l;t.px-=s*c,t.py-=o*c}return!0}e.point&&l&&l<f&&(c=e.pointCharge/l,t.px-=s*c,t.py-=o*c)}return!e.charge}}function T(t){t.px=s.event.x,t.py=s.event.y,a.resume()}return a.tick=function(){if((n*=.99)<.005)return t=null,l.end({type:"end",alpha:n=0}),!0;var e,a,h,p,f,y,T,x,S,w=g.length,E=v.length;for(a=0;a<E;++a)p=(h=v[a]).source,(y=(x=(f=h.target).x-p.x)*x+(S=f.y-p.y)*S)&&(x*=y=n*i[a]*((y=Math.sqrt(y))-r[a])/y,S*=y,f.x-=x*(T=p.weight+f.weight?p.weight/(p.weight+f.weight):.5),f.y-=S*T,p.x+=x*(T=1-T),p.y+=S*T);if((T=n*m)&&(x=c[0]/2,S=c[1]/2,a=-1,T))for(;++a<w;)(h=g[a]).x+=(x-h.x)*T,h.y+=(S-h.y)*T;if(d)for(Os(e=s.geom.quadtree(g),n,o),a=-1;++a<w;)(h=g[a]).fixed||e.visit(b(h));for(a=-1;++a<w;)(h=g[a]).fixed?(h.x=h.px,h.y=h.py):(h.x-=(h.px-(h.px=h.x))*u,h.y-=(h.py-(h.py=h.y))*u);l.tick({type:"tick",alpha:n})},a.nodes=function(t){return arguments.length?(g=t,a):g},a.links=function(t){return arguments.length?(v=t,a):v},a.size=function(t){return arguments.length?(c=t,a):c},a.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,a):h},a.distance=a.linkDistance,a.linkStrength=function(t){return arguments.length?(p="function"==typeof t?t:+t,a):p},a.friction=function(t){return arguments.length?(u=+t,a):u},a.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,a):d},a.chargeDistance=function(t){return arguments.length?(f=t*t,a):Math.sqrt(f)},a.gravity=function(t){return arguments.length?(m=+t,a):m},a.theta=function(t){return arguments.length?(y=t*t,a):Math.sqrt(y)},a.alpha=function(e){return arguments.length?(e=+e,n?e>0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=Ce(a.tick)),a):n},a.start=function(){var t,e,n,s=g.length,l=v.length,u=c[0],f=c[1];for(t=0;t<s;++t)(n=g[t]).index=t,n.weight=0;for(t=0;t<l;++t)"number"==typeof(n=v[t]).source&&(n.source=g[n.source]),"number"==typeof n.target&&(n.target=g[n.target]),++n.source.weight,++n.target.weight;for(t=0;t<s;++t)n=g[t],isNaN(n.x)&&(n.x=m("x",u)),isNaN(n.y)&&(n.y=m("y",f)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof h)for(t=0;t<l;++t)r[t]=+h.call(this,v[t],t);else for(t=0;t<l;++t)r[t]=h;if(i=[],"function"==typeof p)for(t=0;t<l;++t)i[t]=+p.call(this,v[t],t);else for(t=0;t<l;++t)i[t]=p;if(o=[],"function"==typeof d)for(t=0;t<s;++t)o[t]=+d.call(this,g[t],t);else for(t=0;t<s;++t)o[t]=d;function m(n,r){if(!e){for(e=new Array(s),c=0;c<s;++c)e[c]=[];for(c=0;c<l;++c){var i=v[c];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var o,a=e[t],c=-1,u=a.length;++c<u;)if(!isNaN(o=a[c][n]))return o;return Math.random()*r}return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){if(e||(e=s.behavior.drag().origin(L).on("dragstart.force",Ms).on("drag.force",T).on("dragend.force",Cs)),!arguments.length)return e;this.on("mouseover.force",ks).on("mouseout.force",Is).call(e)},s.rebind(a,l,"on")};var Ns=20,_s=1,Ds=1/0;function Ls(t,e){return s.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=Vs,t}function Bs(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Rs(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(s=t.children)&&(i=s.length))for(var i,s,o=-1;++o<i;)n.push(s[o]);for(;null!=(t=r.pop());)e(t)}function Fs(t){return t.children}function js(t){return t.value}function Us(t,e){return e.value-t.value}function Vs(t){return s.merge(t.map((function(t){return(t.children||[]).map((function(e){return{source:t,target:e}}))})))}s.layout.hierarchy=function(){var t=Us,e=Fs,n=js;function r(i){var s,o=[i],a=[];for(i.depth=0;null!=(s=o.pop());)if(a.push(s),(c=e.call(r,s,s.depth))&&(l=c.length)){for(var l,c,u;--l>=0;)o.push(u=c[l]),u.parent=s,u.depth=s.depth+1;n&&(s.value=0),s.children=c}else n&&(s.value=+n.call(r,s,s.depth)||0),delete s.children;return Rs(i,(function(e){var r,i;t&&(r=e.children)&&r.sort(t),n&&(i=e.parent)&&(i.value+=e.value)})),a}return r.sort=function(e){return arguments.length?(t=e,r):t},r.children=function(t){return arguments.length?(e=t,r):e},r.value=function(t){return arguments.length?(n=t,r):n},r.revalue=function(t){return n&&(Bs(t,(function(t){t.children&&(t.value=0)})),Rs(t,(function(t){var e;t.children||(t.value=+n.call(r,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},r},s.layout.partition=function(){var t=s.layout.hierarchy(),e=[1,1];function n(t,e,r,i){var s=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,s&&(o=s.length)){var o,a,l,c=-1;for(r=t.value?r/t.value:0;++c<o;)n(a=s[c],e,l=a.value*r,i),e+=l}}function r(t){var e=t.children,n=0;if(e&&(i=e.length))for(var i,s=-1;++s<i;)n=Math.max(n,r(e[s]));return 1+n}function i(i,s){var o=t.call(this,i,s);return n(o[0],0,e[0],e[1]/r(o[0])),o}return i.size=function(t){return arguments.length?(e=t,i):e},Ls(i,t)},s.layout.pie=function(){var t=Number,e=zs,n=0,r=Ot,i=0;function o(a){var l,c=a.length,u=a.map((function(e,n){return+t.call(o,e,n)})),h=+("function"==typeof n?n.apply(this,arguments):n),p=("function"==typeof r?r.apply(this,arguments):r)-h,d=Math.min(Math.abs(p)/c,+("function"==typeof i?i.apply(this,arguments):i)),f=d*(p<0?-1:1),m=s.sum(u),y=m?(p-c*f)/m:0,g=s.range(c),v=[];return null!=e&&g.sort(e===zs?function(t,e){return u[e]-u[t]}:function(t,n){return e(a[t],a[n])}),g.forEach((function(t){v[t]={data:a[t],value:l=u[t],startAngle:h,endAngle:h+=l*y+f,padAngle:d}})),v}return o.value=function(e){return arguments.length?(t=e,o):t},o.sort=function(t){return arguments.length?(e=t,o):e},o.startAngle=function(t){return arguments.length?(n=t,o):n},o.endAngle=function(t){return arguments.length?(r=t,o):r},o.padAngle=function(t){return arguments.length?(i=t,o):i},o};var zs={};function qs(t){return t.x}function $s(t){return t.y}function Hs(t,e,n){t.y0=e,t.y=n}s.layout.stack=function(){var t=L,e=Ws,n=Js,r=Hs,i=qs,o=$s;function a(l,c){if(!(d=l.length))return l;var u=l.map((function(e,n){return t.call(a,e,n)})),h=u.map((function(t){return t.map((function(t,e){return[i.call(a,t,e),o.call(a,t,e)]}))})),p=e.call(a,h,c);u=s.permute(u,p),h=s.permute(h,p);var d,f,m,y,g=n.call(a,h,c),v=u[0].length;for(m=0;m<v;++m)for(r.call(a,u[0][m],y=g[m],h[0][m][1]),f=1;f<d;++f)r.call(a,u[f][m],y+=h[f-1][m][1],h[f][m][1]);return l}return a.values=function(e){return arguments.length?(t=e,a):t},a.order=function(t){return arguments.length?(e="function"==typeof t?t:Ks.get(t)||Ws,a):e},a.offset=function(t){return arguments.length?(n="function"==typeof t?t:Ys.get(t)||Js,a):n},a.x=function(t){return arguments.length?(i=t,a):i},a.y=function(t){return arguments.length?(o=t,a):o},a.out=function(t){return arguments.length?(r=t,a):r},a};var Ks=s.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(Xs),o=t.map(Gs),a=s.range(r).sort((function(t,e){return i[t]-i[e]})),l=0,c=0,u=[],h=[];for(e=0;e<r;++e)n=a[e],l<c?(l+=o[n],u.push(n)):(c+=o[n],h.push(n));return h.reverse().concat(u)},reverse:function(t){return s.range(t.length).reverse()},default:Ws}),Ys=s.map({silhouette:function(t){var e,n,r,i=t.length,s=t[0].length,o=[],a=0,l=[];for(n=0;n<s;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];r>a&&(a=r),o.push(r)}for(n=0;n<s;++n)l[n]=(a-o[n])/2;return l},wiggle:function(t){var e,n,r,i,s,o,a,l,c,u=t.length,h=t[0],p=h.length,d=[];for(d[0]=l=c=0,n=1;n<p;++n){for(e=0,i=0;e<u;++e)i+=t[e][n][1];for(e=0,s=0,a=h[n][0]-h[n-1][0];e<u;++e){for(r=0,o=(t[e][n][1]-t[e][n-1][1])/(2*a);r<e;++r)o+=(t[r][n][1]-t[r][n-1][1])/a;s+=o*t[e][n][1]}d[n]=l-=i?s/i*a:0,l<c&&(c=l)}for(n=0;n<p;++n)d[n]-=c;return d},expand:function(t){var e,n,r,i=t.length,s=t[0].length,o=1/i,a=[];for(n=0;n<s;++n){for(e=0,r=0;e<i;e++)r+=t[e][n][1];if(r)for(e=0;e<i;e++)t[e][n][1]/=r;else for(e=0;e<i;e++)t[e][n][1]=o}for(n=0;n<s;++n)a[n]=0;return a},zero:Js});function Ws(t){return s.range(t.length)}function Js(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function Xs(t){for(var e,n=1,r=0,i=t[0][1],s=t.length;n<s;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function Gs(t){return t.reduce(Zs,0)}function Zs(t,e){return t+e[1]}function Qs(t,e){return to(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function to(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,s=[];++n<=e;)s[n]=i*n+r;return s}function eo(t){return[s.min(t),s.max(t)]}function no(t,e){return t.value-e.value}function ro(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function io(t,e){t._pack_next=e,e._pack_prev=t}function so(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function oo(t){if((e=t.children)&&(l=e.length)){var e,n,r,i,s,o,a,l,c=1/0,u=-1/0,h=1/0,p=-1/0;if(e.forEach(ao),(n=e[0]).x=-n.r,n.y=0,b(n),l>1&&((r=e[1]).x=r.r,r.y=0,b(r),l>2))for(uo(n,r,i=e[2]),b(i),ro(n,i),n._pack_prev=i,ro(i,r),r=n._pack_next,s=3;s<l;s++){uo(n,r,i=e[s]);var d=0,f=1,m=1;for(o=r._pack_next;o!==r;o=o._pack_next,f++)if(so(o,i)){d=1;break}if(1==d)for(a=n._pack_prev;a!==o._pack_prev&&!so(a,i);a=a._pack_prev,m++);d?(f<m||f==m&&r.r<n.r?io(n,r=o):io(n=a,r),s--):(ro(n,i),r=i,b(i))}var y=(c+u)/2,g=(h+p)/2,v=0;for(s=0;s<l;s++)(i=e[s]).x-=y,i.y-=g,v=Math.max(v,i.r+Math.sqrt(i.x*i.x+i.y*i.y));t.r=v,e.forEach(lo)}function b(t){c=Math.min(t.x-t.r,c),u=Math.max(t.x+t.r,u),h=Math.min(t.y-t.r,h),p=Math.max(t.y+t.r,p)}}function ao(t){t._pack_next=t._pack_prev=t}function lo(t){delete t._pack_next,delete t._pack_prev}function co(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var s=-1,o=i.length;++s<o;)co(i[s],e,n,r)}function uo(t,e,n){var r=t.r+n.r,i=e.x-t.x,s=e.y-t.y;if(r&&(i||s)){var o=e.r+n.r,a=i*i+s*s,l=.5+((r*=r)-(o*=o))/(2*a),c=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);n.x=t.x+l*i+c*s,n.y=t.y+l*s-c*i}else n.x=t.x+r,n.y=t.y}function ho(t,e){return t.parent==e.parent?1:2}function po(t){var e=t.children;return e.length?e[0]:t.t}function fo(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function mo(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yo(t,e,n){return t.a.parent===e.parent?t.a:n}function go(t){var e=t.children;return e&&e.length?go(e[0]):t}function vo(t){var e,n=t.children;return n&&(e=n.length)?vo(n[e-1]):t}function bo(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function To(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],s=t.dy-e[0]-e[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function xo(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function So(t){return t.rangeExtent?t.rangeExtent():xo(t.range())}function wo(t,e,n,r){var i=n(t[0],t[1]),s=r(e[0],e[1]);return function(t){return s(i(t))}}function Eo(t,e){var n,r=0,i=t.length-1,s=t[r],o=t[i];return o<s&&(n=r,r=i,i=n,n=s,s=o,o=n),t[r]=e.floor(s),t[i]=e.ceil(o),t}function Ao(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Po}s.layout.histogram=function(){var t=!0,e=Number,n=eo,r=Qs;function i(i,o){for(var a,l,c=[],u=i.map(e,this),h=n.call(this,u,o),p=r.call(this,h,u,o),d=(o=-1,u.length),f=p.length-1,m=t?1:1/d;++o<f;)(a=c[o]=[]).dx=p[o+1]-(a.x=p[o]),a.y=0;if(f>0)for(o=-1;++o<d;)(l=u[o])>=h[0]&&l<=h[1]&&((a=c[s.bisect(p,l,1,f)-1]).y+=m,a.push(i[o]));return c}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(n=Te(t),i):n},i.bins=function(t){return arguments.length?(r="number"==typeof t?function(e){return to(e,t)}:Te(t),i):r},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},s.layout.pack=function(){var t,e=s.layout.hierarchy().sort(no),n=0,r=[1,1];function i(i,s){var o=e.call(this,i,s),a=o[0],l=r[0],c=r[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,Rs(a,(function(t){t.r=+u(t.value)})),Rs(a,oo),n){var h=n*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;Rs(a,(function(t){t.r+=h})),Rs(a,oo),Rs(a,(function(t){t.r-=h}))}return co(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),o}return i.size=function(t){return arguments.length?(r=t,i):r},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(n=+t,i):n},Ls(i,e)},s.layout.tree=function(){var t=s.layout.hierarchy().sort(null).value(null),e=ho,n=[1,1],r=null;function i(i,s){var c=t.call(this,i,s),u=c[0],h=function(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,s=e.children,o=0,a=s.length;o<a;++o)r.push((s[o]=i={_:s[o],parent:e,children:(i=s[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return n.children[0]}(u);if(Rs(h,o),h.parent.m=-h.z,Bs(h,a),r)Bs(u,l);else{var p=u,d=u,f=u;Bs(u,(function(t){t.x<p.x&&(p=t),t.x>d.x&&(d=t),t.depth>f.depth&&(f=t)}));var m=e(p,d)/2-p.x,y=n[0]/(d.x+e(d,p)/2+m),g=n[1]/(f.depth||1);Bs(u,(function(t){t.x=(t.x+m)*y,t.y=t.depth*g}))}return c}function o(t){var n=t.children,r=t.parent.children,i=t.i?r[t.i-1]:null;if(n.length){!function(t){for(var e,n=0,r=0,i=t.children,s=i.length;--s>=0;)(e=i[s]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var s=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-s):t.z=s}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,n,r){if(n){for(var i,s=t,o=t,a=n,l=s.parent.children[0],c=s.m,u=o.m,h=a.m,p=l.m;a=fo(a),s=po(s),a&&s;)l=po(l),(o=fo(o)).a=t,(i=a.z+h-s.z-c+e(a._,s._))>0&&(mo(yo(a,t,r),t,i),c+=i,u+=i),h+=a.m,c+=s.m,p+=l.m,u+=o.m;a&&!fo(o)&&(o.t=a,o.m+=h-u),s&&!po(l)&&(l.t=s,l.m+=c-p,r=t)}return r}(t,i,t.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t)?l:null,i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null==(n=t)?null:l,i):r?n:null},Ls(i,t)},s.layout.cluster=function(){var t=s.layout.hierarchy().sort(null).value(null),e=ho,n=[1,1],r=!1;function i(i,o){var a,l=t.call(this,i,o),c=l[0],u=0;Rs(c,(function(t){var n=t.children;n&&n.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(n),t.y=function(t){return 1+s.max(t,(function(t){return t.y}))}(n)):(t.x=a?u+=e(t,a):0,t.y=0,a=t)}));var h=go(c),p=vo(c),d=h.x-e(h,p)/2,f=p.x+e(p,h)/2;return Rs(c,r?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-d)/(f-d)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(r=null==(n=t),i):r?null:n},i.nodeSize=function(t){return arguments.length?(r=null!=(n=t),i):r?n:null},Ls(i,t)},s.layout.treemap=function(){var t,e=s.layout.hierarchy(),n=Math.round,r=[1,1],i=null,o=bo,a=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var n,r,i=-1,s=t.length;++i<s;)r=(n=t[i]).value*(e<0?0:e),n.area=isNaN(r)||r<=0?0:r}function h(t){var e=t.children;if(e&&e.length){var n,r,i,s=o(t),a=[],c=e.slice(),p=1/0,m="slice"===l?s.dx:"dice"===l?s.dy:"slice-dice"===l?1&t.depth?s.dy:s.dx:Math.min(s.dx,s.dy);for(u(c,s.dx*s.dy/t.value),a.area=0;(i=c.length)>0;)a.push(n=c[i-1]),a.area+=n.area,"squarify"!==l||(r=d(a,m))<=p?(c.pop(),p=r):(a.area-=a.pop().area,f(a,m,s,!1),m=Math.min(s.dx,s.dy),a.length=a.area=0,p=1/0);a.length&&(f(a,m,s,!0),a.length=a.area=0),e.forEach(h)}}function p(t){var e=t.children;if(e&&e.length){var n,r=o(t),i=e.slice(),s=[];for(u(i,r.dx*r.dy/t.value),s.area=0;n=i.pop();)s.push(n),s.area+=n.area,null!=n.z&&(f(s,n.z?r.dx:r.dy,r,!i.length),s.length=s.area=0);e.forEach(p)}}function d(t,e){for(var n,r=t.area,i=0,s=1/0,o=-1,a=t.length;++o<a;)(n=t[o].area)&&(n<s&&(s=n),n>i&&(i=n));return e*=e,(r*=r)?Math.max(e*i*c/r,r/(e*s*c)):1/0}function f(t,e,r,i){var s,o=-1,a=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++o<a;)(s=t[o]).x=l,s.y=c,s.dy=u,l+=s.dx=Math.min(r.x+r.dx-l,u?n(s.area/u):0);s.z=!0,s.dx+=r.x+r.dx-l,r.y+=u,r.dy-=u}else{for((i||u>r.dx)&&(u=r.dx);++o<a;)(s=t[o]).x=l,s.y=c,s.dx=u,c+=s.dy=Math.min(r.y+r.dy-c,u?n(s.area/u):0);s.z=!1,s.dy+=r.y+r.dy-c,r.x+=u,r.dx-=u}}function m(n){var i=t||e(n),s=i[0];return s.x=s.y=0,s.value?(s.dx=r[0],s.dy=r[1]):s.dx=s.dy=0,t&&e.revalue(s),u([s],s.dx*s.dy/s.value),(t?p:h)(s),a&&(t=i),i}return m.size=function(t){return arguments.length?(r=t,m):r},m.padding=function(t){if(!arguments.length)return i;function e(e){return To(e,t)}var n;return o=null==(i=t)?bo:"function"==(n=typeof t)?function(e){var n=t.call(m,e,e.depth);return null==n?bo(e):To(e,"number"==typeof n?[n,n,n,n]:n)}:"number"===n?(t=[t,t,t,t],e):e,m},m.round=function(t){return arguments.length?(n=t?Math.round:Number,m):n!=Number},m.sticky=function(e){return arguments.length?(a=e,t=null,m):a},m.ratio=function(t){return arguments.length?(c=t,m):c},m.mode=function(t){return arguments.length?(l=t+"",m):l},Ls(m,e)},s.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(t=0),function(){var n,r,i;do{i=(n=2*Math.random()-1)*n+(r=2*Math.random()-1)*r}while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=s.random.normal.apply(s,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=s.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},s.scale={};var Po={floor:L,ceil:L};function Mo(t,e,n,r){var i=[],o=[],a=0,l=Math.min(t.length,e.length)-1;for(t[l]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<=l;)i.push(n(t[a-1],t[a])),o.push(r(e[a-1],e[a]));return function(e){var n=s.bisect(t,e,1,l)-1;return o[n](i[n](e))}}function Co(t,e,n,r){var i,s;function o(){var o=Math.min(t.length,e.length)>2?Mo:wo,l=r?Es:ws;return i=o(t,e,l,n),s=o(e,t,l,ns),a}function a(t){return i(t)}return a.invert=function(t){return s(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},a.range=function(t){return arguments.length?(e=t,o()):e},a.rangeRound=function(t){return a.range(t).interpolate(ys)},a.clamp=function(t){return arguments.length?(r=t,o()):r},a.interpolate=function(t){return arguments.length?(n=t,o()):n},a.ticks=function(e){return No(t,e)},a.tickFormat=function(e,n){return _o(t,e,n)},a.nice=function(e){return Io(t,e),o()},a.copy=function(){return Co(t,e,n,r)},o()}function ko(t,e){return s.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Io(t,e){return Eo(t,Ao(Oo(t,e)[2])),Eo(t,Ao(Oo(t,e)[2])),t}function Oo(t,e){null==e&&(e=10);var n=xo(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),s=e/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function No(t,e){return s.range.apply(s,Oo(t,e))}function _o(t,e,n){var r=Oo(t,e);if(n){var i=Le.exec(n);if(i.shift(),"s"===i[8]){var o=s.formatPrefix(Math.max(S(r[0]),S(r[1])));return i[7]||(i[7]="."+Lo(o.scale(r[2]))),i[8]="f",n=s.format(i.join("")),function(t){return n(o.scale(t))+o.symbol}}i[7]||(i[7]="."+function(t,e){var n=Lo(e[2]);return t in Do?Math.abs(n-Lo(Math.max(S(e[0]),S(e[1]))))+ +("e"!==t):n-2*("%"===t)}(i[8],r)),n=i.join("")}else n=",."+Lo(r[2])+"f";return s.format(n)}s.scale.linear=function(){return Co([0,1],[0,1],ns,!1)};var Do={s:1,g:1,p:1,r:1,e:1};function Lo(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Bo(t,e,n,r){function i(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),a):e},a.nice=function(){var e=Eo(r.map(i),n?Math:Fo);return t.domain(e),r=e.map(o),a},a.ticks=function(){var t=xo(r),s=[],a=t[0],l=t[1],c=Math.floor(i(a)),u=Math.ceil(i(l)),h=e%1?2:e;if(isFinite(u-c)){if(n){for(;c<u;c++)for(var p=1;p<h;p++)s.push(o(c)*p);s.push(o(c))}else for(s.push(o(c));c++<u;)for(p=h-1;p>0;p--)s.push(o(c)*p);for(c=0;s[c]<a;c++);for(u=s.length;s[u-1]>l;u--);s=s.slice(c,u)}return s},a.tickFormat=function(t,n){if(!arguments.length)return Ro;arguments.length<2?n=Ro:"function"!=typeof n&&(n=s.format(n));var r=Math.max(1,e*t/a.ticks().length);return function(t){var s=t/o(Math.round(i(t)));return s*e<e-.5&&(s*=e),s<=r?n(t):""}},a.copy=function(){return Bo(t.copy(),e,n,r)},ko(a,t)}s.scale.log=function(){return Bo(s.scale.linear().domain([0,1]),10,!0,[1,10])};var Ro=s.format(".0e"),Fo={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function jo(t,e,n){var r=Uo(e),i=Uo(1/e);function s(e){return t(r(e))}return s.invert=function(e){return i(t.invert(e))},s.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(r)),s):n},s.ticks=function(t){return No(n,t)},s.tickFormat=function(t,e){return _o(n,t,e)},s.nice=function(t){return s.domain(Io(n,t))},s.exponent=function(o){return arguments.length?(r=Uo(e=o),i=Uo(1/e),t.domain(n.map(r)),s):e},s.copy=function(){return jo(t.copy(),e,n)},ko(s,t)}function Uo(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Vo(t,e){var n,r,i;function o(i){return r[((n.get(i)||("range"===e.t?n.set(i,t.push(i)):NaN))-1)%r.length]}function a(e,n){return s.range(t.length).map((function(t){return e+n*t}))}return o.domain=function(r){if(!arguments.length)return t;t=[],n=new E;for(var i,s=-1,a=r.length;++s<a;)n.has(i=r[s])||n.set(i,t.push(i));return o[e.t].apply(o,e.a)},o.range=function(t){return arguments.length?(r=t,i=0,e={t:"range",a:arguments},o):r},o.rangePoints=function(n,s){arguments.length<2&&(s=0);var l=n[0],c=n[1],u=t.length<2?(l=(l+c)/2,0):(c-l)/(t.length-1+s);return r=a(l+u*s/2,u),i=0,e={t:"rangePoints",a:arguments},o},o.rangeRoundPoints=function(n,s){arguments.length<2&&(s=0);var l=n[0],c=n[1],u=t.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(t.length-1+s)|0;return r=a(l+Math.round(u*s/2+(c-l-(t.length-1+s)*u)/2),u),i=0,e={t:"rangeRoundPoints",a:arguments},o},o.rangeBands=function(n,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var c=n[1]<n[0],u=n[c-0],h=(n[1-c]-u)/(t.length-s+2*l);return r=a(u+h*l,h),c&&r.reverse(),i=h*(1-s),e={t:"rangeBands",a:arguments},o},o.rangeRoundBands=function(n,s,l){arguments.length<2&&(s=0),arguments.length<3&&(l=s);var c=n[1]<n[0],u=n[c-0],h=n[1-c],p=Math.floor((h-u)/(t.length-s+2*l));return r=a(u+Math.round((h-u-(t.length-s)*p)/2),p),c&&r.reverse(),i=Math.round(p*(1-s)),e={t:"rangeRoundBands",a:arguments},o},o.rangeBand=function(){return i},o.rangeExtent=function(){return xo(e.a[0])},o.copy=function(){return Vo(t,e)},o.domain(t)}s.scale.pow=function(){return jo(s.scale.linear(),1,[0,1])},s.scale.sqrt=function(){return s.scale.pow().exponent(.5)},s.scale.ordinal=function(){return Vo([],{t:"range",a:[[]]})},s.scale.category10=function(){return s.scale.ordinal().range(zo)},s.scale.category20=function(){return s.scale.ordinal().range(qo)},s.scale.category20b=function(){return s.scale.ordinal().range($o)},s.scale.category20c=function(){return s.scale.ordinal().range(Ho)};var zo=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(he),qo=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(he),$o=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(he),Ho=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(he);function Ko(t,e){var n;function r(){var r=0,o=e.length;for(n=[];++r<o;)n[r-1]=s.quantile(t,r/o);return i}function i(t){if(!isNaN(t=+t))return e[s.bisect(n,t)]}return i.domain=function(e){return arguments.length?(t=e.map(g).filter(v).sort(y),r()):t},i.range=function(t){return arguments.length?(e=t,r()):e},i.quantiles=function(){return n},i.invertExtent=function(r){return(r=e.indexOf(r))<0?[NaN,NaN]:[r>0?n[r-1]:t[0],r<n.length?n[r]:t[t.length-1]]},i.copy=function(){return Ko(t,e)},r()}function Yo(t,e,n){var r,i;function s(e){return n[Math.max(0,Math.min(i,Math.floor(r*(e-t))))]}function o(){return r=n.length/(e-t),i=n.length-1,s}return s.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],o()):[t,e]},s.range=function(t){return arguments.length?(n=t,o()):n},s.invertExtent=function(e){return[e=(e=n.indexOf(e))<0?NaN:e/r+t,e+1/r]},s.copy=function(){return Yo(t,e,n)},o()}function Wo(t,e){function n(n){if(n<=n)return e[s.bisect(t,n)]}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return Wo(t,e)},n}function Jo(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return No(t,e)},e.tickFormat=function(e,n){return _o(t,e,n)},e.copy=function(){return Jo(t)},e}function Xo(){return 0}s.scale.quantile=function(){return Ko([],[])},s.scale.quantize=function(){return Yo(0,1,[0,1])},s.scale.threshold=function(){return Wo([.5],[0,1])},s.scale.identity=function(){return Jo([0,1])},s.svg={},s.svg.arc=function(){var t=Zo,e=Qo,n=Xo,r=Go,i=ta,s=ea,o=na;function a(){var a=Math.max(0,+t.apply(this,arguments)),c=Math.max(0,+e.apply(this,arguments)),u=i.apply(this,arguments)-_t,h=s.apply(this,arguments)-_t,p=Math.abs(h-u),d=u>h?0:1;if(c<a&&(f=c,c=a,a=f),p>=Nt)return l(c,d)+(a?l(a,1-d):"")+"Z";var f,m,y,g,v,b,T,x,S,w,E,A,P=0,M=0,C=[];if((g=(+o.apply(this,arguments)||0)/2)&&(y=r===Go?Math.sqrt(a*a+c*c):+r.apply(this,arguments),d||(M*=-1),c&&(M=jt(y/c*Math.sin(g))),a&&(P=jt(y/a*Math.sin(g)))),c){v=c*Math.cos(u+M),b=c*Math.sin(u+M),T=c*Math.cos(h-M),x=c*Math.sin(h-M);var k=Math.abs(h-u-2*M)<=It?0:1;if(M&&ra(v,b,T,x)===d^k){var I=(u+h)/2;v=c*Math.cos(I),b=c*Math.sin(I),T=x=null}}else v=b=0;if(a){S=a*Math.cos(h-P),w=a*Math.sin(h-P),E=a*Math.cos(u+P),A=a*Math.sin(u+P);var O=Math.abs(u-h+2*P)<=It?0:1;if(P&&ra(S,w,E,A)===1-d^O){var N=(u+h)/2;S=a*Math.cos(N),w=a*Math.sin(N),E=A=null}}else S=w=0;if(p>Ct&&(f=Math.min(Math.abs(c-a)/2,+n.apply(this,arguments)))>.001){m=a<c^d?0:1;var _=f,D=f;if(p<It){var L=null==E?[S,w]:null==T?[v,b]:di([v,b],[E,A],[T,x],[S,w]),B=v-L[0],R=b-L[1],F=T-L[0],j=x-L[1],U=1/Math.sin(Math.acos((B*F+R*j)/(Math.sqrt(B*B+R*R)*Math.sqrt(F*F+j*j)))/2),V=Math.sqrt(L[0]*L[0]+L[1]*L[1]);D=Math.min(f,(a-V)/(U-1)),_=Math.min(f,(c-V)/(U+1))}if(null!=T){var z=ia(null==E?[S,w]:[E,A],[v,b],c,_,d),q=ia([T,x],[S,w],c,_,d);f===_?C.push("M",z[0],"A",_,",",_," 0 0,",m," ",z[1],"A",c,",",c," 0 ",1-d^ra(z[1][0],z[1][1],q[1][0],q[1][1]),",",d," ",q[1],"A",_,",",_," 0 0,",m," ",q[0]):C.push("M",z[0],"A",_,",",_," 0 1,",m," ",q[0])}else C.push("M",v,",",b);if(null!=E){var $=ia([v,b],[E,A],a,-D,d),H=ia([S,w],null==T?[v,b]:[T,x],a,-D,d);f===D?C.push("L",H[0],"A",D,",",D," 0 0,",m," ",H[1],"A",a,",",a," 0 ",d^ra(H[1][0],H[1][1],$[1][0],$[1][1]),",",1-d," ",$[1],"A",D,",",D," 0 0,",m," ",$[0]):C.push("L",H[0],"A",D,",",D," 0 0,",m," ",$[0])}else C.push("L",S,",",w)}else C.push("M",v,",",b),null!=T&&C.push("A",c,",",c," 0 ",k,",",d," ",T,",",x),C.push("L",S,",",w),null!=E&&C.push("A",a,",",a," 0 ",O,",",1-d," ",E,",",A);return C.push("Z"),C.join("")}function l(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}return a.innerRadius=function(e){return arguments.length?(t=Te(e),a):t},a.outerRadius=function(t){return arguments.length?(e=Te(t),a):e},a.cornerRadius=function(t){return arguments.length?(n=Te(t),a):n},a.padRadius=function(t){return arguments.length?(r=t==Go?Go:Te(t),a):r},a.startAngle=function(t){return arguments.length?(i=Te(t),a):i},a.endAngle=function(t){return arguments.length?(s=Te(t),a):s},a.padAngle=function(t){return arguments.length?(o=Te(t),a):o},a.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +s.apply(this,arguments))/2-_t;return[Math.cos(r)*n,Math.sin(r)*n]},a};var Go="auto";function Zo(t){return t.innerRadius}function Qo(t){return t.outerRadius}function ta(t){return t.startAngle}function ea(t){return t.endAngle}function na(t){return t&&t.padAngle}function ra(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function ia(t,e,n,r,i){var s=t[0]-e[0],o=t[1]-e[1],a=(i?r:-r)/Math.sqrt(s*s+o*o),l=a*o,c=-a*s,u=t[0]+l,h=t[1]+c,p=e[0]+l,d=e[1]+c,f=(u+p)/2,m=(h+d)/2,y=p-u,g=d-h,v=y*y+g*g,b=n-r,T=u*d-p*h,x=(g<0?-1:1)*Math.sqrt(Math.max(0,b*b*v-T*T)),S=(T*g-y*x)/v,w=(-T*y-g*x)/v,E=(T*g+y*x)/v,A=(-T*y+g*x)/v,P=S-f,M=w-m,C=E-f,k=A-m;return P*P+M*M>C*C+k*k&&(S=E,w=A),[[S-l,w-c],[S*n/b,w*n/b]]}function sa(t){var e=ai,n=li,r=Qn,i=aa,s=i.key,o=.7;function a(s){var a,l=[],c=[],u=-1,h=s.length,p=Te(e),d=Te(n);function f(){l.push("M",i(t(c),o))}for(;++u<h;)r.call(this,a=s[u],u)?c.push([+p.call(this,a,u),+d.call(this,a,u)]):c.length&&(f(),c=[]);return c.length&&f(),l.length?l.join(""):null}return a.x=function(t){return arguments.length?(e=t,a):e},a.y=function(t){return arguments.length?(n=t,a):n},a.defined=function(t){return arguments.length?(r=t,a):r},a.interpolate=function(t){return arguments.length?(s="function"==typeof t?i=t:(i=oa.get(t)||aa).key,a):s},a.tension=function(t){return arguments.length?(o=t,a):o},a}s.svg.line=function(){return sa(L)};var oa=s.map({linear:aa,"linear-closed":la,step:function(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")},"step-before":ca,"step-after":ua,basis:da,"basis-open":function(t){if(t.length<4)return aa(t);for(var e,n=[],r=-1,i=t.length,s=[0],o=[0];++r<3;)e=t[r],s.push(e[0]),o.push(e[1]);for(n.push(fa(ga,s)+","+fa(ga,o)),--r;++r<i;)e=t[r],s.shift(),s.push(e[0]),o.shift(),o.push(e[1]),va(n,s,o);return n.join("")},"basis-closed":function(t){for(var e,n,r=-1,i=t.length,s=i+4,o=[],a=[];++r<4;)n=t[r%i],o.push(n[0]),a.push(n[1]);for(e=[fa(ga,o),",",fa(ga,a)],--r;++r<s;)n=t[r%i],o.shift(),o.push(n[0]),a.shift(),a.push(n[1]),va(e,o,a);return e.join("")},bundle:function(t,e){var n=t.length-1;if(n)for(var r,i,s=t[0][0],o=t[0][1],a=t[n][0]-s,l=t[n][1]-o,c=-1;++c<=n;)i=c/n,(r=t[c])[0]=e*r[0]+(1-e)*(s+i*a),r[1]=e*r[1]+(1-e)*(o+i*l);return da(t)},cardinal:function(t,e){return t.length<3?aa(t):t[0]+ha(t,pa(t,e))},"cardinal-open":function(t,e){return t.length<4?aa(t):t[1]+ha(t.slice(1,-1),pa(t,e))},"cardinal-closed":function(t,e){return t.length<3?la(t):t[0]+ha((t.push(t[0]),t),pa([t[t.length-2]].concat(t,[t[1]]),e))},monotone:function(t){return t.length<3?aa(t):t[0]+ha(t,function(t){for(var e,n,r,i,s=[],o=function(t){for(var e=0,n=t.length-1,r=[],i=t[0],s=t[1],o=r[0]=ba(i,s);++e<n;)r[e]=(o+(o=ba(i=s,s=t[e+1])))/2;return r[e]=o,r}(t),a=-1,l=t.length-1;++a<l;)e=ba(t[a],t[a+1]),S(e)<Ct?o[a]=o[a+1]=0:(i=(n=o[a]/e)*n+(r=o[a+1]/e)*r)>9&&(i=3*e/Math.sqrt(i),o[a]=i*n,o[a+1]=i*r);for(a=-1;++a<=l;)i=(t[Math.min(l,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),s.push([i||0,o[a]*i||0]);return s}(t))}});function aa(t){return t.length>1?t.join("L"):t+"Z"}function la(t){return t.join("L")+"Z"}function ca(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function ua(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function ha(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return aa(t);var n=t.length!=e.length,r="",i=t[0],s=t[1],o=e[0],a=o,l=1;if(n&&(r+="Q"+(s[0]-2*o[0]/3)+","+(s[1]-2*o[1]/3)+","+s[0]+","+s[1],i=t[1],l=2),e.length>1){a=e[1],s=t[l],l++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-a[0])+","+(s[1]-a[1])+","+s[0]+","+s[1];for(var c=2;c<e.length;c++,l++)s=t[l],a=e[c],r+="S"+(s[0]-a[0])+","+(s[1]-a[1])+","+s[0]+","+s[1]}if(n){var u=t[l];r+="Q"+(s[0]+2*a[0]/3)+","+(s[1]+2*a[1]/3)+","+u[0]+","+u[1]}return r}function pa(t,e){for(var n,r=[],i=(1-e)/2,s=t[0],o=t[1],a=1,l=t.length;++a<l;)n=s,s=o,o=t[a],r.push([i*(o[0]-n[0]),i*(o[1]-n[1])]);return r}function da(t){if(t.length<3)return aa(t);var e=1,n=t.length,r=t[0],i=r[0],s=r[1],o=[i,i,i,(r=t[1])[0]],a=[s,s,s,r[1]],l=[i,",",s,"L",fa(ga,o),",",fa(ga,a)];for(t.push(t[n-1]);++e<=n;)r=t[e],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),va(l,o,a);return t.pop(),l.push("L",r),l.join("")}function fa(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}oa.forEach((function(t,e){e.key=t,e.closed=/-closed$/.test(t)}));var ma=[0,2/3,1/3,0],ya=[0,1/3,2/3,0],ga=[0,1/6,2/3,1/6];function va(t,e,n){t.push("C",fa(ma,e),",",fa(ma,n),",",fa(ya,e),",",fa(ya,n),",",fa(ga,e),",",fa(ga,n))}function ba(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Ta(t){for(var e,n,r,i=-1,s=t.length;++i<s;)n=(e=t[i])[0],r=e[1]-_t,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function xa(t){var e=ai,n=ai,r=0,i=li,s=Qn,o=aa,a=o.key,l=o,c="L",u=.7;function h(a){var h,p,d,f=[],m=[],y=[],g=-1,v=a.length,b=Te(e),T=Te(r),x=e===n?function(){return p}:Te(n),S=r===i?function(){return d}:Te(i);function w(){f.push("M",o(t(y),u),c,l(t(m.reverse()),u),"Z")}for(;++g<v;)s.call(this,h=a[g],g)?(m.push([p=+b.call(this,h,g),d=+T.call(this,h,g)]),y.push([+x.call(this,h,g),+S.call(this,h,g)])):m.length&&(w(),m=[],y=[]);return m.length&&w(),f.length?f.join(""):null}return h.x=function(t){return arguments.length?(e=n=t,h):n},h.x0=function(t){return arguments.length?(e=t,h):e},h.x1=function(t){return arguments.length?(n=t,h):n},h.y=function(t){return arguments.length?(r=i=t,h):i},h.y0=function(t){return arguments.length?(r=t,h):r},h.y1=function(t){return arguments.length?(i=t,h):i},h.defined=function(t){return arguments.length?(s=t,h):s},h.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=oa.get(t)||aa).key,l=o.reverse||o,c=o.closed?"M":"L",h):a},h.tension=function(t){return arguments.length?(u=t,h):u},h}function Sa(t){return t.radius}function wa(t){return[t.x,t.y]}function Ea(){return 64}function Aa(){return"circle"}function Pa(t){var e=Math.sqrt(t/It);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}s.svg.line.radial=function(){var t=sa(Ta);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},ca.reverse=ua,ua.reverse=ca,s.svg.area=function(){return xa(L)},s.svg.area.radial=function(){var t=xa(Ta);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},s.svg.chord=function(){var t=Yr,e=Wr,n=Sa,r=ta,i=ea;function s(n,r){var i,s,c=o(this,t,n,r),u=o(this,e,n,r);return"M"+c.p0+a(c.r,c.p1,c.a1-c.a0)+(s=u,((i=c).a0==s.a0&&i.a1==s.a1?l(c.r,c.p1,c.r,c.p0):l(c.r,c.p1,u.r,u.p0)+a(u.r,u.p1,u.a1-u.a0)+l(u.r,u.p1,c.r,c.p0))+"Z")}function o(t,e,s,o){var a=e.call(t,s,o),l=n.call(t,a,o),c=r.call(t,a,o)-_t,u=i.call(t,a,o)-_t;return{r:l,a0:c,a1:u,p0:[l*Math.cos(c),l*Math.sin(c)],p1:[l*Math.cos(u),l*Math.sin(u)]}}function a(t,e,n){return"A"+t+","+t+" 0 "+ +(n>It)+",1 "+e}function l(t,e,n,r){return"Q 0,0 "+r}return s.radius=function(t){return arguments.length?(n=Te(t),s):n},s.source=function(e){return arguments.length?(t=Te(e),s):t},s.target=function(t){return arguments.length?(e=Te(t),s):e},s.startAngle=function(t){return arguments.length?(r=Te(t),s):r},s.endAngle=function(t){return arguments.length?(i=Te(t),s):i},s},s.svg.diagonal=function(){var t=Yr,e=Wr,n=wa;function r(r,i){var s=t.call(this,r,i),o=e.call(this,r,i),a=(s.y+o.y)/2,l=[s,{x:s.x,y:a},{x:o.x,y:a},o];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(e){return arguments.length?(t=Te(e),r):t},r.target=function(t){return arguments.length?(e=Te(t),r):e},r.projection=function(t){return arguments.length?(n=t,r):n},r},s.svg.diagonal.radial=function(){var t=s.svg.diagonal(),e=wa,n=t.projection;return t.projection=function(t){return arguments.length?n(function(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-_t;return[n*Math.cos(r),n*Math.sin(r)]}}(e=t)):e},t},s.svg.symbol=function(){var t=Aa,e=Ea;function n(n,r){return(Ma.get(t.call(this,n,r))||Pa)(e.call(this,n,r))}return n.type=function(e){return arguments.length?(t=Te(e),n):t},n.size=function(t){return arguments.length?(e=Te(t),n):e},n};var Ma=s.map({circle:Pa,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*ka)),n=e*ka;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Ca),n=e*Ca/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Ca),n=e*Ca/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});s.svg.symbolTypes=Ma.keys();var Ca=Math.sqrt(3),ka=Math.tan(30*Dt);G.transition=function(t){for(var e,n,r=_a||++Ba,i=ja(t),s=[],o=Da||{time:Date.now(),ease:hs,delay:0,duration:250},a=-1,l=this.length;++a<l;){s.push(e=[]);for(var c=this[a],u=-1,h=c.length;++u<h;)(n=c[u])&&Ua(n,u,i,r,o),e.push(n)}return Na(s,i,r)},G.interrupt=function(t){return this.each(null==t?Ia:Oa(ja(t)))};var Ia=Oa(ja());function Oa(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Na(t,e,n){return K(t,La),t.namespace=e,t.id=n,t}var _a,Da,La=[],Ba=0;function Ra(t,e,n,r){var i=t.id,s=t.namespace;return mt(t,"function"==typeof n?function(t,o,a){t[s][i].tween.set(e,r(n.call(t,t.__data__,o,a)))}:(n=r(n),function(t){t[s][i].tween.set(e,n)}))}function Fa(t){return null==t&&(t=""),function(){this.textContent=t}}function ja(t){return null==t?"__transition__":"__transition_"+t+"__"}function Ua(t,e,n,r,i){var s,o,a,l,c,u=t[n]||(t[n]={active:0,count:0}),h=u[r];function p(n){var i=u.active,p=u[i];for(var f in p&&(p.timer.c=null,p.timer.t=NaN,--u.count,delete u[i],p.event&&p.event.interrupt.call(t,t.__data__,p.index)),u)if(+f<r){var m=u[f];m.timer.c=null,m.timer.t=NaN,--u.count,delete u[f]}o.c=d,Ce((function(){return o.c&&d(n||1)&&(o.c=null,o.t=NaN),1}),0,s),u.active=r,h.event&&h.event.start.call(t,t.__data__,e),c=[],h.tween.forEach((function(n,r){(r=r.call(t,t.__data__,e))&&c.push(r)})),l=h.ease,a=h.duration}function d(i){for(var s=i/a,o=l(s),p=c.length;p>0;)c[--p].call(t,o);if(s>=1)return h.event&&h.event.end.call(t,t.__data__,e),--u.count?delete u[r]:delete t[n],1}h||(s=i.time,o=Ce((function(t){var e=h.delay;if(o.t=e+s,e<=t)return p(t-e);o.c=p}),0,s),h=u[r]={tween:new E,time:s,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}La.call=G.call,La.empty=G.empty,La.node=G.node,La.size=G.size,s.transition=function(t,e){return t&&t.transition?_a?t.transition(e):t:s.selection().transition(t)},s.transition.prototype=La,La.select=function(t){var e,n,r,i=this.id,s=this.namespace,o=[];t=Z(t);for(var a=-1,l=this.length;++a<l;){o.push(e=[]);for(var c=this[a],u=-1,h=c.length;++u<h;)(r=c[u])&&(n=t.call(r,r.__data__,u,a))?("__data__"in r&&(n.__data__=r.__data__),Ua(n,u,s,i,r[s][i]),e.push(n)):e.push(null)}return Na(o,s,i)},La.selectAll=function(t){var e,n,r,i,s,o=this.id,a=this.namespace,l=[];t=Q(t);for(var c=-1,u=this.length;++c<u;)for(var h=this[c],p=-1,d=h.length;++p<d;)if(r=h[p]){s=r[a][o],n=t.call(r,r.__data__,p,c),l.push(e=[]);for(var f=-1,m=n.length;++f<m;)(i=n[f])&&Ua(i,f,a,o,s),e.push(i)}return Na(l,a,o)},La.filter=function(t){var e,n,r=[];"function"!=typeof t&&(t=dt(t));for(var i=0,s=this.length;i<s;i++){r.push(e=[]);for(var o,a=0,l=(o=this[i]).length;a<l;a++)(n=o[a])&&t.call(n,n.__data__,a,i)&&e.push(n)}return Na(r,this.namespace,this.id)},La.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):mt(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},La.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n="transform"==t?Ss:ns,r=s.ns.qualify(t);function i(){this.removeAttribute(r)}function o(){this.removeAttributeNS(r.space,r.local)}return Ra(this,"attr."+t,e,r.local?function(t){return null==t?o:(t+="",function(){var e,i=this.getAttributeNS(r.space,r.local);return i!==t&&(e=n(i,t),function(t){this.setAttributeNS(r.space,r.local,e(t))})})}:function(t){return null==t?i:(t+="",function(){var e,i=this.getAttribute(r);return i!==t&&(e=n(i,t),function(t){this.setAttribute(r,e(t))})})})},La.attrTween=function(t,e){var n=s.ns.qualify(t);return this.tween("attr."+t,n.local?function(t,r){var i=e.call(this,t,r,this.getAttributeNS(n.space,n.local));return i&&function(t){this.setAttributeNS(n.space,n.local,i(t))}}:function(t,r){var i=e.call(this,t,r,this.getAttribute(n));return i&&function(t){this.setAttribute(n,i(t))}})},La.style=function(t,e,n){var r=arguments.length;if(r<3){if("string"!=typeof t){for(n in r<2&&(e=""),t)this.style(n,t[n],e);return this}n=""}function i(){this.style.removeProperty(t)}return Ra(this,"style."+t,e,(function(e){return null==e?i:(e+="",function(){var r,i=u(this).getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=ns(i,e),function(e){this.style.setProperty(t,r(e),n)})})}))},La.styleTween=function(t,e,n){return arguments.length<3&&(n=""),this.tween("style."+t,(function(r,i){var s=e.call(this,r,i,u(this).getComputedStyle(this,null).getPropertyValue(t));return s&&function(e){this.style.setProperty(t,s(e),n)}}))},La.text=function(t){return Ra(this,"text",t,Fa)},La.remove=function(){var t=this.namespace;return this.each("end.transition",(function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)}))},La.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=s.ease.apply(s,arguments)),mt(this,(function(r){r[n][e].ease=t})))},La.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:mt(this,"function"==typeof t?function(r,i,s){r[n][e].delay=+t.call(r,r.__data__,i,s)}:(t=+t,function(r){r[n][e].delay=t}))},La.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:mt(this,"function"==typeof t?function(r,i,s){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,s))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},La.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Da,o=_a;try{_a=n,mt(this,(function(e,i,s){Da=e[r][n],t.call(e,e.__data__,i,s)}))}finally{Da=i,_a=o}}else mt(this,(function(i){var o=i[r][n];(o.event||(o.event=s.dispatch("start","end","interrupt"))).on(t,e)}));return this},La.transition=function(){for(var t,e,n,r=this.id,i=++Ba,s=this.namespace,o=[],a=0,l=this.length;a<l;a++){o.push(t=[]);for(var c,u=0,h=(c=this[a]).length;u<h;u++)(e=c[u])&&Ua(e,u,s,i,{time:(n=e[s][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),t.push(e)}return Na(o,s,i)},s.svg.axis=function(){var t,e=s.scale.linear(),n=Va,r=6,i=6,o=3,l=[10],c=null;function u(a){a.each((function(){var a,u=s.select(this),h=this.__chart__||e,p=this.__chart__=e.copy(),d=null==c?p.ticks?p.ticks.apply(p,l):p.domain():c,f=null==t?p.tickFormat?p.tickFormat.apply(p,l):L:t,m=u.selectAll(".tick").data(d,p),y=m.enter().insert("g",".domain").attr("class","tick").style("opacity",Ct),g=s.transition(m.exit()).style("opacity",Ct).remove(),v=s.transition(m.order()).style("opacity",1),b=Math.max(r,0)+o,T=So(p),x=u.selectAll(".domain").data([0]),S=(x.enter().append("path").attr("class","domain"),s.transition(x));y.append("line"),y.append("text");var w,E,A,P,M=y.select("line"),C=v.select("line"),k=m.select("text").text(f),I=y.select("text"),O=v.select("text"),N="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(a=qa,w="x",A="y",E="x2",P="y2",k.attr("dy",N<0?"0em":".71em").style("text-anchor","middle"),S.attr("d","M"+T[0]+","+N*i+"V0H"+T[1]+"V"+N*i)):(a=$a,w="y",A="x",E="y2",P="x2",k.attr("dy",".32em").style("text-anchor",N<0?"end":"start"),S.attr("d","M"+N*i+","+T[0]+"H0V"+T[1]+"H"+N*i)),M.attr(P,N*r),I.attr(A,N*b),C.attr(E,0).attr(P,N*r),O.attr(w,0).attr(A,N*b),p.rangeBand){var _=p,D=_.rangeBand()/2;h=p=function(t){return _(t)+D}}else h.rangeBand?h=p:g.call(a,p,h);y.call(a,h,p),v.call(a,p,p)}))}return u.scale=function(t){return arguments.length?(e=t,u):e},u.orient=function(t){return arguments.length?(n=t in za?t+"":Va,u):n},u.ticks=function(){return arguments.length?(l=a(arguments),u):l},u.tickValues=function(t){return arguments.length?(c=t,u):c},u.tickFormat=function(e){return arguments.length?(t=e,u):t},u.tickSize=function(t){var e=arguments.length;return e?(r=+t,i=+arguments[e-1],u):r},u.innerTickSize=function(t){return arguments.length?(r=+t,u):r},u.outerTickSize=function(t){return arguments.length?(i=+t,u):i},u.tickPadding=function(t){return arguments.length?(o=+t,u):o},u.tickSubdivide=function(){return arguments.length&&u},u};var Va="bottom",za={top:1,right:1,bottom:1,left:1};function qa(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"}))}function $a(t,e,n){t.attr("transform",(function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"}))}s.svg.brush=function(){var t,e,n=$(p,"brushstart","brush","brushend"),r=null,i=null,o=[0,0],a=[0,0],l=!0,c=!0,h=Ka[0];function p(t){t.each((function(){var t=s.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",y).on("touchstart.brush",y),e=t.selectAll(".background").data([0]);e.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),t.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=t.selectAll(".resize").data(h,L);n.exit().remove(),n.enter().append("g").attr("class",(function(t){return"resize "+t})).style("cursor",(function(t){return Ha[t]})).append("rect").attr("x",(function(t){return/[ew]$/.test(t)?-3:null})).attr("y",(function(t){return/^[ns]/.test(t)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",p.empty()?"none":null);var o,a=s.transition(t),l=s.transition(e);r&&(o=So(r),l.attr("x",o[0]).attr("width",o[1]-o[0]),f(a)),i&&(o=So(i),l.attr("y",o[0]).attr("height",o[1]-o[0]),m(a)),d(a)}))}function d(t){t.selectAll(".resize").attr("transform",(function(t){return"translate("+o[+/e$/.test(t)]+","+a[+/^s/.test(t)]+")"}))}function f(t){t.select(".extent").attr("x",o[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1]-o[0])}function m(t){t.select(".extent").attr("y",a[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",a[1]-a[0])}function y(){var h,y,g=this,v=s.select(s.event.target),b=n.of(g,arguments),T=s.select(g),x=v.datum(),S=!/^(n|s)$/.test(x)&&r,w=!/^(e|w)$/.test(x)&&i,E=v.classed("extent"),A=Et(g),P=s.mouse(g),M=s.select(u(g)).on("keydown.brush",(function(){32==s.event.keyCode&&(E||(h=null,P[0]-=o[1],P[1]-=a[1],E=2),z())})).on("keyup.brush",(function(){32==s.event.keyCode&&2==E&&(P[0]+=o[1],P[1]+=a[1],E=0,z())}));if(s.event.changedTouches?M.on("touchmove.brush",I).on("touchend.brush",N):M.on("mousemove.brush",I).on("mouseup.brush",N),T.interrupt().selectAll("*").interrupt(),E)P[0]=o[0]-P[0],P[1]=a[0]-P[1];else if(x){var C=+/w$/.test(x),k=+/^n/.test(x);y=[o[1-C]-P[0],a[1-k]-P[1]],P[0]=o[C],P[1]=a[k]}else s.event.altKey&&(h=P.slice());function I(){var t=s.mouse(g),e=!1;y&&(t[0]+=y[0],t[1]+=y[1]),E||(s.event.altKey?(h||(h=[(o[0]+o[1])/2,(a[0]+a[1])/2]),P[0]=o[+(t[0]<h[0])],P[1]=a[+(t[1]<h[1])]):h=null),S&&O(t,r,0)&&(f(T),e=!0),w&&O(t,i,1)&&(m(T),e=!0),e&&(d(T),b({type:"brush",mode:E?"move":"resize"}))}function O(n,r,i){var s,u,p=So(r),d=p[0],f=p[1],m=P[i],y=i?a:o,g=y[1]-y[0];if(E&&(d-=m,f-=g+m),s=(i?c:l)?Math.max(d,Math.min(f,n[i])):n[i],E?u=(s+=m)+g:(h&&(m=Math.max(d,Math.min(f,2*h[i]-s))),m<s?(u=s,s=m):u=m),y[0]!=s||y[1]!=u)return i?e=null:t=null,y[0]=s,y[1]=u,!0}function N(){I(),T.style("pointer-events","all").selectAll(".resize").style("display",p.empty()?"none":null),s.select("body").style("cursor",null),M.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),A(),b({type:"brushend"})}T.style("pointer-events","none").selectAll(".resize").style("display",null),s.select("body").style("cursor",v.style("cursor")),b({type:"brushstart"}),I()}return p.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:o,y:a,i:t,j:e},l=this.__chart__||i;this.__chart__=i,_a?s.select(this).transition().each("start.brush",(function(){t=l.i,e=l.j,o=l.x,a=l.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=rs(o,i.x),s=rs(a,i.y);return t=e=null,function(t){o=i.x=n(t),a=i.y=s(t),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){t=i.i,e=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},p.x=function(t){return arguments.length?(h=Ka[!(r=t)<<1|!i],p):r},p.y=function(t){return arguments.length?(h=Ka[!r<<1|!(i=t)],p):i},p.clamp=function(t){return arguments.length?(r&&i?(l=!!t[0],c=!!t[1]):r?l=!!t:i&&(c=!!t),p):r&&i?[l,c]:r?l:i?c:null},p.extent=function(n){var s,l,c,u,h;return arguments.length?(r&&(s=n[0],l=n[1],i&&(s=s[0],l=l[0]),t=[s,l],r.invert&&(s=r(s),l=r(l)),l<s&&(h=s,s=l,l=h),s==o[0]&&l==o[1]||(o=[s,l])),i&&(c=n[0],u=n[1],r&&(c=c[1],u=u[1]),e=[c,u],i.invert&&(c=i(c),u=i(u)),u<c&&(h=c,c=u,u=h),c==a[0]&&u==a[1]||(a=[c,u])),p):(r&&(t?(s=t[0],l=t[1]):(s=o[0],l=o[1],r.invert&&(s=r.invert(s),l=r.invert(l)),l<s&&(h=s,s=l,l=h))),i&&(e?(c=e[0],u=e[1]):(c=a[0],u=a[1],i.invert&&(c=i.invert(c),u=i.invert(u)),u<c&&(h=c,c=u,u=h))),r&&i?[[s,c],[l,u]]:r?[s,l]:i&&[c,u])},p.clear=function(){return p.empty()||(o=[0,0],a=[0,0],t=e=null),p},p.empty=function(){return!!r&&o[0]==o[1]||!!i&&a[0]==a[1]},s.rebind(p,n,"on")};var Ha={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Ka=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ya=Fe.format=fn.timeFormat,Wa=Ya.utc,Ja=Wa("%Y-%m-%dT%H:%M:%S.%LZ");function Xa(t){return t.toISOString()}function Ga(t,e,n){function r(e){return t(e)}function i(t,n){var r=(t[1]-t[0])/n,i=s.bisect(Qa,r);return i==Qa.length?[e.year,Oo(t.map((function(t){return t/31536e6})),n)[2]]:i?e[r/Qa[i-1]<Qa[i]/r?i-1:i]:[nl,Oo(t,n)[2]]}return r.invert=function(e){return Za(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(Za)},r.nice=function(t,e){var n=r.domain(),s=xo(n),o=null==t?i(s,10):"number"==typeof t&&i(s,t);function a(n){return!isNaN(n)&&!t.range(n,Za(+n+1),e).length}return o&&(t=o[0],e=o[1]),r.domain(Eo(n,e>1?{floor:function(e){for(;a(e=t.floor(e));)e=Za(e-1);return e},ceil:function(e){for(;a(e=t.ceil(e));)e=Za(+e+1);return e}}:t))},r.ticks=function(t,e){var n=xo(r.domain()),s=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return s&&(t=s[0],e=s[1]),t.range(n[0],Za(+n[1]+1),e<1?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Ga(t.copy(),e,n)},ko(r,t)}function Za(t){return new Date(t)}Ya.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Xa:Ja,Xa.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Xa.toString=Ja.toString,Fe.second=ze((function(t){return new je(1e3*Math.floor(t/1e3))}),(function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))}),(function(t){return t.getSeconds()})),Fe.seconds=Fe.second.range,Fe.seconds.utc=Fe.second.utc.range,Fe.minute=ze((function(t){return new je(6e4*Math.floor(t/6e4))}),(function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))}),(function(t){return t.getMinutes()})),Fe.minutes=Fe.minute.range,Fe.minutes.utc=Fe.minute.utc.range,Fe.hour=ze((function(t){var e=t.getTimezoneOffset()/60;return new je(36e5*(Math.floor(t/36e5-e)+e))}),(function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))}),(function(t){return t.getHours()})),Fe.hours=Fe.hour.range,Fe.hours.utc=Fe.hour.utc.range,Fe.month=ze((function(t){return(t=Fe.day(t)).setDate(1),t}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t){return t.getMonth()})),Fe.months=Fe.month.range,Fe.months.utc=Fe.month.utc.range;var Qa=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],tl=[[Fe.second,1],[Fe.second,5],[Fe.second,15],[Fe.second,30],[Fe.minute,1],[Fe.minute,5],[Fe.minute,15],[Fe.minute,30],[Fe.hour,1],[Fe.hour,3],[Fe.hour,6],[Fe.hour,12],[Fe.day,1],[Fe.day,2],[Fe.week,1],[Fe.month,1],[Fe.month,3],[Fe.year,1]],el=Ya.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Qn]]),nl={range:function(t,e,n){return s.range(Math.ceil(t/n)*n,+e,n).map(Za)},floor:L,ceil:L};tl.year=Fe.year,Fe.scale=function(){return Ga(s.scale.linear(),tl,el)};var rl=tl.map((function(t){return[t[0].utc,t[1]]})),il=Wa.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Qn]]);function sl(t){return JSON.parse(t.responseText)}function ol(t){var e=l.createRange();return e.selectNode(l.body),e.createContextualFragment(t.responseText)}rl.year=Fe.year.utc,Fe.scale.utc=function(){return Ga(s.scale.linear(),rl,il)},s.text=xe((function(t){return t.responseText})),s.json=function(t,e){return Se(t,"application/json",sl,e)},s.html=function(t,e){return Se(t,"text/html",ol,e)},s.xml=xe((function(t){return t.responseXML})),window.d3=s,void 0===(i="function"==typeof(r=s)?r.call(e,n,e,t):r)||(t.exports=i)}()},25364:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}n.d(e,{A:()=>i})},25691:(t,e,n)=>{var r=n(23486),i=n(84538),s=n(71856),o=s.get,a=s.has,l=s.set;r({target:"Map",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var n,r,s=i(this);return a(s,t)?(n=o(s,t),"update"in e&&(n=e.update(n,t,s),l(s,t,n)),n):(r=e.insert(t,s),l(s,t,r),r)}})},25754:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var r=n(66360),i=n(19415),s=n(64079);function o(t,e=t.key){let n;return"method"===t.kind?o.increment()+"":(n=(0,r.isIdentifier)(e)?e.name:(0,r.isStringLiteral)(e)?JSON.stringify(e.value):JSON.stringify((0,s.default)((0,i.default)(e))),t.computed&&(n=`[${n}]`),t.static&&(n=`static:${n}`),n)}o.uid=0,o.increment=function(){return o.uid>=Number.MAX_SAFE_INTEGER?o.uid=0:o.uid++}},25869:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e){const n=Array.from(e),s=new Map,o=new Map,a=new Set,l=[];for(let e=0;e<n.length;e++){const c=n[e];if(c&&!l.includes(c)){if((0,r.isAnyTypeAnnotation)(c))return[c];if((0,r.isFlowBaseAnnotation)(c))o.set(c.type,c);else if((0,r.isUnionTypeAnnotation)(c))a.has(c.types)||(n.push(...c.types),a.add(c.types));else if((0,r.isGenericTypeAnnotation)(c)){const e=i(c.id);if(s.has(e)){let n=s.get(e);n.typeParameters?c.typeParameters&&(n.typeParameters.params.push(...c.typeParameters.params),n.typeParameters.params=t(n.typeParameters.params)):n=c.typeParameters}else s.set(e,c)}else l.push(c)}}for(const[,t]of o)l.push(t);for(const[,t]of s)l.push(t);return l};var r=n(66360);function i(t){return(0,r.isIdentifier)(t)?t.name:`${t.id.name}.${i(t.qualification)}`}},25953:(t,e,n)=>{var r=n(23486),i=n(38909),s=n(84538),o=n(88087);r({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===o(s(this),(function(e){if(i(e,t))return!0}),!0)}})},25965:t=>{t.exports={}},26350:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArgumentPlaceholder=function(){this.tokenChar(63)},e.ArrayPattern=e.ArrayExpression=function(t){const e=t.elements,n=e.length;this.tokenChar(91);const r=this.enterDelimited();for(let t=0;t<e.length;t++){const r=e[t];r?(t>0&&this.space(),this.print(r,void 0,!0),(t<n-1||this.shouldPrintTrailingComma("]"))&&this.tokenChar(44,t)):this.tokenChar(44,t)}this._noLineTerminatorAfterNode=r,this.tokenChar(93)},e.BigIntLiteral=function(t){const e=this.getPossibleRaw(t);this.format.minified||void 0===e?this.word(t.value+"n"):this.word(e)},e.BooleanLiteral=function(t){this.word(t.value?"true":"false")},e.Identifier=function(t){var e;this._buf._map&&this.sourceIdentifierName((null==(e=t.loc)?void 0:e.identifierName)||t.name),this.word(this.tokenMap?l:t.name)},e.NullLiteral=function(){this.word("null")},e.NumericLiteral=function(t){const e=this.getPossibleRaw(t),n=this.format.jsescOption,r=t.value,s=r+"";n.numbers?this.number(i(r,n),r):null==e?this.number(s,r):this.format.minified?this.number(e.length<s.length?e:s,r):this.number(e,r)},e.ObjectPattern=e.ObjectExpression=function(t){const e=t.properties;if(this.tokenChar(123),e.length){const t=this.enterDelimited();this.space(),this.printList(e,this.shouldPrintTrailingComma("}"),!0,!0,void 0,!0),this.space(),this._noLineTerminatorAfterNode=t}this.rightBrace(t)},e.ObjectMethod=function(t){this.printJoin(t.decorators),s._methodHead.call(this,t),this.space(),this.print(t.body)},e.ObjectProperty=function(t){if(this.printJoin(t.decorators),t.computed)this.tokenChar(91),this.print(t.key),this.tokenChar(93);else{if(o(t.value)&&a(t.key)&&t.key.name===t.value.left.name)return void this.print(t.value);if(this.print(t.key),t.shorthand&&a(t.key)&&a(t.value)&&t.key.name===t.value.name)return}this.tokenChar(58),this.space(),this.print(t.value)},e.PipelineBareFunction=function(t){this.print(t.callee)},e.PipelinePrimaryTopicReference=function(){this.tokenChar(35)},e.PipelineTopicExpression=function(t){this.print(t.expression)},e.RegExpLiteral=function(t){this.word(`/${t.pattern}/${t.flags}`,!1)},e.SpreadElement=e.RestElement=function(t){this.token("..."),this.print(t.argument)},e.StringLiteral=function(t){const e=this.getPossibleRaw(t);if(!this.format.minified&&void 0!==e)return void this.token(e);const n=i(t.value,this.format.jsescOption);this.token(n)},e.TopicReference=function(){const{topicToken:t}=this.format;if(!c.has(t)){const e=JSON.stringify(t),n=Array.from(c,(t=>JSON.stringify(t)));throw new Error(`The "topicToken" generator option must be one of ${n.join(", ")} (${e} received instead).`)}this.token(t)},e.VoidPattern=function(){this.word("void")},e._getRawIdentifier=function(t){const{name:e}=t,n=this.tokenMap.find(t,(t=>t.value===e));return n?(l=this._originalCode.slice(n.start,n.end),l):l=t.name};var r=n(56872),i=n(11853),s=n(32917);const{isAssignmentPattern:o,isIdentifier:a}=r;let l="";const c=new Set(["^^","@@","^","%","#"])},26499:(t,e,n)=>{var r=n(14669),i=n(3527).Buffer,s=n(67892);function o(t){var e=t._cipher.encryptBlockRaw(t._prev);return s(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),s=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var l=o(t),c=s+16*a;t._cache.writeUInt32BE(l[0],c+0),t._cache.writeUInt32BE(l[1],c+4),t._cache.writeUInt32BE(l[2],c+8),t._cache.writeUInt32BE(l[3],c+12)}var u=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),r(e,u)}},26531:(t,e,n)=>{var r=n(14852),i=n(24377),s=n(21804);t.exports=r?function(t,e,n){return i.f(t,e,s(1,n))}:function(t,e,n){return t[e]=n,t}},26600:(t,e,n)=>{var r=n(18832),i=Function.prototype,s=i.call,o=r&&i.bind.bind(s,s);t.exports=r?o:function(t){return function(){return s.apply(t,arguments)}}},26792:(t,e,n)=>{var r=n(26600),i=r({}.toString),s=r("".slice);t.exports=function(t){return s(i(t),8,-1)}},26835:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e="body"){const n=(0,r.default)(t[e],t);return t[e]=n,n};var r=n(92442)},27008:(t,e,n)=>{function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}n.d(e,{A:()=>o});var i=n(64902);function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return function(t,e,n){if(s())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,e);var o=new(t.bind.apply(t,r));return n&&(0,i.A)(o,n.prototype),o}(t,arguments,r(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,t)},o(t)}},27134:(t,e,n)=>{var r=n(31733),i=n(8520),s=n(9754),o=n(76145);t.exports=o||r.call(s,i)},27293:(t,e,n)=>{var r=n(26600),i=n(52307),s=n(38378),o=s.Set,a=s.proto,l=r(a.forEach),c=r(a.keys),u=c(new o).next;t.exports=function(t,e,n){return n?i({iterator:c(t),next:u},e):l(t,e)}},27787:(t,e,n)=>{var r,i,s,o,a=n(51192),l=n(43149),c=n(14868),u=a.structuredClone,h=a.ArrayBuffer,p=a.MessageChannel,d=!1;if(c)d=function(t){u(t,{transfer:[t]})};else if(h)try{p||(r=l("worker_threads"))&&(p=r.MessageChannel),p&&(i=new p,s=new h(2),o=function(t){i.port1.postMessage(null,[t])},2===s.byteLength&&(o(s),0===s.byteLength&&(d=o)))}catch(t){}t.exports=d},28009:t=>{t.exports=function(t,e){return{value:t,done:e}}},28465:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(71856),a=n(88087),l=o.Map,c=o.set;r({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=new l;return a(e,(function(t,i){c(r,n(t,i,e),t)})),r}})},28995:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,i.isSuper)(t.object))throw new Error("Cannot prepend node to super property access (`super.foo`).");return t.object=(0,r.memberExpression)(e,t.object),t};var r=n(53287),i=n(56872)},29113:(t,e,n)=>{var r=n(43469),i=n(92658),s=n(5550),o=function(t){return function(e,n,o){var a=r(e),l=s(a);if(0===l)return!t&&-1;var c,u=i(o,l);if(t&&n!=n){for(;l>u;)if((c=a[u++])!=c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:o(!0),indexOf:o(!1)}},29753:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=t.map((t=>(0,s.isTSTypeAnnotation)(t)?t.typeAnnotation:t)),n=(0,i.default)(e);return 1===n.length?n[0]:(0,r.tsUnionType)(n)};var r=n(53287),i=n(64100),s=n(66360)},30116:(t,e,n)=>{var r=n(7890),i=n(38460).getTypedArrayConstructor;t.exports=function(t,e){return r(i(t),e)}},30914:t=>{t.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}},31020:(t,e,n)=>{var r=n(83843);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,s=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return s||o?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,r.nextTick(i,this,t)):r.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?n._writableState?n._writableState.errorEmitted||(n._writableState.errorEmitted=!0,r.nextTick(i,n,t)):r.nextTick(i,n,t):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},31377:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DEPRECATED_ALIASES=void 0,e.DEPRECATED_ALIASES={ModuleDeclaration:"ImportOrExportDeclaration"}},31580:(t,e)=>{e.byteLength=function(t){var e=a(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,s=a(t),o=s[0],l=s[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,o,l)),u=0,h=l>0?o-4:o;for(n=0;n<h;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[u++]=e>>16&255,c[u++]=e>>8&255,c[u++]=255&e;return 2===l&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[u++]=255&e),1===l&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[u++]=e>>8&255,c[u++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,s=[],o=16383,a=0,c=r-i;a<c;a+=o)s.push(l(t,a,a+o>c?c:a+o));return 1===i?(e=t[r-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),s.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)n[o]=s[o],r[s.charCodeAt(o)]=o;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function l(t,e,r){for(var i,s,o=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),o.push(n[(s=i)>>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},31597:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}},31610:(t,e,n)=>{var r=n(52479),i=n(2269),s=n(49059),o=n(25178),a=r("Set");t.exports=function(t){return function(t){return o(t)&&"number"==typeof t.size&&i(t.has)&&i(t.keys)}(t)?t:s(t)?new a(t):t}},31977:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(68456);r({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return i(o,this,s(t))}})},32001:(t,e,n)=>{var r,i,s,o=n(59767),a=n(2269),l=n(25178),c=n(76128),u=n(90475),h=n(33088),p=n(83115),d=n(86115),f=p("iterator"),m=!1;[].keys&&("next"in(s=[].keys())?(i=u(u(s)))!==Object.prototype&&(r=i):m=!0),!l(r)||o((function(){var t={};return r[f].call(t)!==t}))?r={}:d&&(r=c(r)),a(r[f])||h(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:m}},32005:(t,e,n)=>{var r=n(3527).Buffer;function i(t,e,n){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([n?e:i])]),i}e.encrypt=function(t,e,n){for(var s=e.length,o=r.allocUnsafe(s),a=-1;++a<s;)o[a]=i(t,e[a],n);return o}},32457:(t,e,n)=>{var r=n(26600),i=Error,s=r("".replace),o=String(new i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(o);t.exports=function(t,e){if(l&&"string"==typeof t&&!i.prepareStackTrace)for(;e--;)t=s(t,a,"");return t}},32626:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return"eval"!==(t=(0,r.default)(t))&&"arguments"!==t||(t="_"+t),t};var r=n(39664)},32740:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,r.default)("innerComments",t,e)};var r=n(34349)},32917:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ArrowFunctionExpression=function(t,e){t.async&&(this.word("async",!0),this.space()),h.call(this,t)?o.call(this,t,!0,void 0,this._buf._map?e:void 0):this.print(t.params[0],!0),c.call(this,t,!0),this.space(),this.printInnerComments(),this.token("=>"),this.space(),this.tokenContext|=i.TokenContext.arrowBody,this.print(t.body)},e.FunctionDeclaration=e.FunctionExpression=function(t,e){u.call(this,t,e,!0),this.space(),this.print(t.body)},e._functionHead=u,e._methodHead=function(t){const e=t.kind,n=t.key;"get"!==e&&"set"!==e||(this.word(e),this.space()),t.async&&(this.word("async",!0),this.space()),"method"!==e&&"init"!==e||t.generator&&this.tokenChar(42),t.computed?(this.tokenChar(91),this.print(n),this.tokenChar(93)):this.print(n),t.optional&&this.tokenChar(63),this._buf._map?o.call(this,t,!1,t.computed&&"StringLiteral"!==t.key.type?void 0:t.key):o.call(this,t,!1)},e._param=l,e._parameters=a,e._params=o,e._predicate=c,e._shouldPrintArrowParamsParens=h;var r=n(56872),i=n(91317);const{isIdentifier:s}=r;function o(t,e,n,r){if(this.print(t.typeParameters),void 0!==n||void 0!==r){const t=p.call(this,n,r);t&&this.sourceIdentifierName(t.name,t.pos)}this.tokenChar(40),a.call(this,t.params,41),this.print(t.returnType,e),this._noLineTerminator=e}function a(t,e){const n=this.enterDelimited(),r=this.shouldPrintTrailingComma(e),i=t.length;for(let e=0;e<i;e++)l.call(this,t[e]),(r||e<i-1)&&(this.tokenChar(44,e),this.space());this.tokenChar(e),this._noLineTerminatorAfterNode=n}function l(t){this.printJoin(t.decorators,void 0,void 0,void 0,void 0,!0),this.print(t,void 0,!0),t.optional&&this.tokenChar(63),this.print(t.typeAnnotation,void 0,!0)}function c(t,e){t.predicate&&(t.returnType||this.tokenChar(58),this.space(),this.print(t.predicate,e))}function u(t,e,n){t.async&&(this.word("async"),this.format.preserveFormat||(this._innerCommentsState=0),this.space()),this.word("function"),t.generator&&(this.format.preserveFormat||(this._innerCommentsState=0),this.tokenChar(42)),this.space(),t.id&&this.print(t.id),this._buf._map?o.call(this,t,!1,t.id,e):o.call(this,t,!1),n&&c.call(this,t)}function h(t){var e,n;if(1!==t.params.length)return!0;if(t.typeParameters||t.returnType||t.predicate)return!0;const r=t.params[0];if(!s(r)||r.typeAnnotation||r.optional||null!=(e=r.leadingComments)&&e.length||null!=(n=r.trailingComments)&&n.length)return!0;if(this.tokenMap){if(null==t.loc)return!0;if(null!==this.tokenMap.findMatching(t,"("))return!0;const e=this.tokenMap.findMatching(t,"=>");return null==(null==e?void 0:e.loc)||e.loc.start.line!==t.loc.start.line}return!!this.format.retainLines}function p(t,e){let n,r=t;if(!r&&e){const t=e.type;"VariableDeclarator"===t?r=e.id:"AssignmentExpression"===t||"AssignmentPattern"===t?r=e.left:"ObjectProperty"===t||"ClassProperty"===t?e.computed&&"StringLiteral"!==e.key.type||(r=e.key):"ClassPrivateProperty"!==t&&"ClassAccessorProperty"!==t||(r=e.key)}if(r){var i,s;if("Identifier"===r.type)n={pos:null==(i=r.loc)?void 0:i.start,name:(null==(s=r.loc)?void 0:s.identifierName)||r.name};else if("PrivateName"===r.type){var o;n={pos:null==(o=r.loc)?void 0:o.start,name:"#"+r.id.name}}else if("StringLiteral"===r.type){var a;n={pos:null==(a=r.loc)?void 0:a.start,name:r.value}}return n}}},32960:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"isIdentifierChar",{enumerable:!0,get:function(){return r.isIdentifierChar}}),Object.defineProperty(e,"isIdentifierName",{enumerable:!0,get:function(){return r.isIdentifierName}}),Object.defineProperty(e,"isIdentifierStart",{enumerable:!0,get:function(){return r.isIdentifierStart}}),Object.defineProperty(e,"isKeyword",{enumerable:!0,get:function(){return i.isKeyword}}),Object.defineProperty(e,"isReservedWord",{enumerable:!0,get:function(){return i.isReservedWord}}),Object.defineProperty(e,"isStrictBindOnlyReservedWord",{enumerable:!0,get:function(){return i.isStrictBindOnlyReservedWord}}),Object.defineProperty(e,"isStrictBindReservedWord",{enumerable:!0,get:function(){return i.isStrictBindReservedWord}}),Object.defineProperty(e,"isStrictReservedWord",{enumerable:!0,get:function(){return i.isStrictReservedWord}});var r=n(60089),i=n(81443)},33088:(t,e,n)=>{var r=n(2269),i=n(24377),s=n(47267),o=n(66177);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&s(n,c,a),a.global)l?t[e]=n:o(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},33579:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(24619);function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){(0,r.A)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}},33599:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.isVariableDeclaration)(t)&&("var"!==t.kind||t[i])};var r=n(66360),i=Symbol.for("var used to be block scoped")},33759:(t,e,n)=>{var r=n(80312),i=n(38691),s=n(81847),o=n(60744),a=n(5076);function l(t,e,n){if(t=t.toLowerCase(),s[t])return i.createCipheriv(t,e,n);if(o[t])return new r({key:e,iv:n,mode:t});throw new TypeError("invalid suite type")}function c(t,e,n){if(t=t.toLowerCase(),s[t])return i.createDecipheriv(t,e,n);if(o[t])return new r({key:e,iv:n,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var n,r;if(t=t.toLowerCase(),s[t])n=s[t].key,r=s[t].iv;else{if(!o[t])throw new TypeError("invalid suite type");n=8*o[t].key,r=o[t].iv}var i=a(e,!1,n,r);return l(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=l,e.createDecipher=e.Decipher=function(t,e){var n,r;if(t=t.toLowerCase(),s[t])n=s[t].key,r=s[t].iv;else{if(!o[t])throw new TypeError("invalid suite type");n=8*o[t].key,r=o[t].iv}var i=a(e,!1,n,r);return c(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(o).concat(i.getCiphers())}},34e3:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!(0,r.default)(t)){var e;const n=null!=(e=null==t?void 0:t.type)?e:JSON.stringify(t);throw new TypeError(`Not a valid node of type "${n}"`)}};var r=n(58540)},34024:(t,e,n)=>{var r=n(41100),i=n(93263).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},34110:(t,e,n)=>{const r=n(31580),i=n(24361),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=l,e.SlowBuffer=function(t){return+t!=t&&(t=0),l.alloc(+t)},e.INSPECT_MAX_BYTES=50;const o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,l.prototype),e}function l(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!l.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|m(t,e);let r=a(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return p(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return l.from(r,e,n);const i=function(t){if(l.isBuffer(t)){const e=0|f(t.length),n=a(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?a(0):p(t):"Buffer"===t.type&&Array.isArray(t.data)?p(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return l.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),a(t<0?0:0|f(t))}function p(t){const e=t.length<0?0:0|f(t.length),n=a(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function d(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,l.prototype),r}function f(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function m(t,e){if(l.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return K(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(i)return r?-1:K(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,n);case"utf8":case"utf-8":return P(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return k(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function g(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=l.from(e,r)),l.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){let s,o=1,a=t.length,l=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){let r=-1;for(s=n;s<a;s++)if(c(t,s)===c(e,-1===r?0:s-r)){if(-1===r&&(r=s),s-r+1===l)return r*o}else-1!==r&&(s-=s-r),r=-1}else for(n+l>a&&(n=a-l),s=n;s>=0;s--){let n=!0;for(let r=0;r<l;r++)if(c(t,s+r)!==c(e,r)){n=!1;break}if(n)return s}return-1}function T(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const s=e.length;let o;for(r>s/2&&(r=s/2),o=0;o<r;++o){const r=parseInt(e.substr(2*o,2),16);if(X(r))return o;t[n+o]=r}return o}function x(t,e,n,r){return W(K(e,t.length-n),t,n,r)}function S(t,e,n,r){return W(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function w(t,e,n,r){return W(Y(e),t,n,r)}function E(t,e,n,r){return W(function(t,e){let n,r,i;const s=[];for(let o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),r=n>>8,i=n%256,s.push(i),s.push(r);return s}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function P(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let s=null,o=e>239?4:e>223?3:e>191?2:1;if(i+o<=n){let n,r,a,l;switch(o){case 1:e<128&&(s=e);break;case 2:n=t[i+1],128==(192&n)&&(l=(31&e)<<6|63&n,l>127&&(s=l));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(l=(15&e)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:n=t[i+1],r=t[i+2],a=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&a)&&(l=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&a,l>65535&&l<1114112&&(s=l))}}null===s?(s=65533,o=1):s>65535&&(s-=65536,r.push(s>>>10&1023|55296),s=56320|1023&s),r.push(s),i+=o}return function(t){const e=t.length;if(e<=M)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=M));return n}(r)}e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),l.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}}),l.poolSize=8192,l.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array),l.alloc=function(t,e,n){return function(t,e,n){return u(t),t<=0?a(t):void 0!==e?"string"==typeof n?a(t).fill(e,n):a(t).fill(e):a(t)}(t,e,n)},l.allocUnsafe=function(t){return h(t)},l.allocUnsafeSlow=function(t){return h(t)},l.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==l.prototype},l.compare=function(t,e){if(J(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(t)||!l.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,s=Math.min(n,r);i<s;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},l.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return l.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=l.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(J(e,Uint8Array))i+e.length>r.length?(l.isBuffer(e)||(e=l.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!l.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},l.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},l.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},l.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?P(this,0,t):y.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(t){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===l.compare(this,t)},l.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},s&&(l.prototype[s]=l.prototype.inspect),l.prototype.compare=function(t,e,n,r,i){if(J(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let s=(i>>>=0)-(r>>>=0),o=(n>>>=0)-(e>>>=0);const a=Math.min(s,o),c=this.slice(r,i),u=t.slice(e,n);for(let t=0;t<a;++t)if(c[t]!==u[t]){s=c[t],o=u[t];break}return s<o?-1:o<s?1:0},l.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},l.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},l.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},l.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let s=!1;for(;;)switch(r){case"hex":return T(this,t,e,n);case"utf8":case"utf-8":return x(this,t,e,n);case"ascii":case"latin1":case"binary":return S(this,t,e,n);case"base64":return w(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const M=4096;function C(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function k(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function I(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=G[t[r]];return i}function O(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function N(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function _(t,e,n,r,i,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<s)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function D(t,e,n,r,i){z(e,r,i,t,n,7);let s=Number(e&BigInt(4294967295));t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s,s>>=8,t[n++]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,n}function L(t,e,n,r,i){z(e,r,i,t,n,7);let s=Number(e&BigInt(4294967295));t[n+7]=s,s>>=8,t[n+6]=s,s>>=8,t[n+5]=s,s>>=8,t[n+4]=s;let o=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=o,o>>=8,t[n+2]=o,o>>=8,t[n+1]=o,o>>=8,t[n]=o,n+8}function B(t,e,n,r,i,s){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(t,e,n,r,s){return e=+e,n>>>=0,s||B(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,s){return e=+e,n>>>=0,s||B(t,0,n,8),i.write(t,e,n,r,52,8),n+8}l.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,l.prototype),r},l.prototype.readUintLE=l.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,s=0;for(;++s<e&&(i*=256);)r+=this[t+s]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readBigUInt64LE=Z((function(t){q(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||$(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),l.prototype.readBigUInt64BE=Z((function(t){q(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||$(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),l.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=this[t],i=1,s=0;for(;++s<e&&(i*=256);)r+=this[t+s]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},l.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||N(t,e,this.length);let r=e,i=1,s=this[t+--r];for(;r>0&&(i*=256);)s+=this[t+--r]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readBigInt64LE=Z((function(t){q(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||$(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),l.prototype.readBigInt64BE=Z((function(t){q(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||$(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),l.prototype.readFloatLE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),i.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),i.read(this,t,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||_(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,s=0;for(this[e]=255&t;++s<n&&(i*=256);)this[e+s]=t/i&255;return e+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||_(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,s=1;for(this[e+i]=255&t;--i>=0&&(s*=256);)this[e+i]=t/s&255;return e+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,1,255,0),this[e]=255&t,e+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigUInt64LE=Z((function(t,e=0){return D(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);_(this,t,e,n,r-1,-r)}let i=0,s=1,o=0;for(this[e]=255&t;++i<n&&(s*=256);)t<0&&0===o&&0!==this[e+i-1]&&(o=1),this[e+i]=(t/s|0)-o&255;return e+n},l.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);_(this,t,e,n,r-1,-r)}let i=n-1,s=1,o=0;for(this[e+i]=255&t;--i>=0&&(s*=256);)t<0&&0===o&&0!==this[e+i+1]&&(o=1),this[e+i]=(t/s|0)-o&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||_(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},l.prototype.writeBigInt64LE=Z((function(t,e=0){return D(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,r){if(!l.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},l.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!l.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const s=l.isBuffer(t)?t:l.from(t,r),o=s.length;if(0===o)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=s[i%o]}return this};const j={};function U(t,e,n){j[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function V(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function z(t,e,n,r,i,s){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=s>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(s+1)}${r}`:`>= -(2${r} ** ${8*(s+1)-1}${r}) and < 2 ** ${8*(s+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new j.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){q(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||$(e,t.length-(n+1))}(r,i,s)}function q(t,e){if("number"!=typeof t)throw new j.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,n){if(Math.floor(t)!==t)throw q(t,n),new j.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new j.ERR_BUFFER_OUT_OF_BOUNDS;throw new j.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=V(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=V(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function K(t,e){let n;e=e||1/0;const r=t.length;let i=null;const s=[];for(let o=0;o<r;++o){if(n=t.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&s.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&s.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;s.push(n)}else if(n<2048){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function Y(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}const G=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function Z(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},34349:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){e&&n&&(e[t]=Array.from(new Set([].concat(e[t],n[t]).filter(Boolean))))}},34378:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;const r=(0,n(80905).default)("React.Component");e.default=r},34526:(t,e,n)=>{var r=n(1811),i=RangeError;t.exports=function(t){var e=r(t);if(e<0)throw new i("The argument can't be less than 0");return e}},35265:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.isImportDefaultSpecifier)(t)||(0,r.isIdentifier)(t.imported||t.exported,{name:"default"})};var r=n(66360)},35467:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(55222);r({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return i(o,this,s(t))}})},35525:(t,e,n)=>{var r=n(9106),i=n(95167),s=n(80421),o=n(1811),a=n(22159),l="Invalid size",c=RangeError,u=TypeError,h=Math.max,p=function(t,e){this.set=t,this.size=h(e,0),this.has=r(t.has),this.keys=r(t.keys)};p.prototype={getIterator:function(){return a(i(s(this.keys,this.set)))},includes:function(t){return s(this.has,this.set,t)}},t.exports=function(t){i(t);var e=+t.size;if(e!=e)throw new u(l);var n=o(e);if(n<0)throw new c(l);return new p(t,n)}},35746:(t,e,n)=>{var r=n(47267),i=n(24377);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),i.f(t,e,n)}},36106:(t,e,n)=>{var r=n(23486),i=n(84538),s=n(40372),o=n(71856).set;r({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=i(this),n=arguments.length,r=0;r<n;)s(arguments[r++],(function(t,n){o(e,t,n)}),{AS_ENTRIES:!0});return e}})},36142:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(!t)return;const o=r.NODE_FIELDS[t.type];if(!o)return;i(t,e,n,o[e]),s(t,e,n)},e.validateChild=s,e.validateField=i,e.validateInternal=function(t,e,n,i,s){if(null!=t&&t.validate&&(!t.optional||null!=i)&&(t.validate(e,n,i),s)){var o;const t=i.type;if(null==t)return;null==(o=r.NODE_PARENT_VALIDATIONS[t])||o.call(r.NODE_PARENT_VALIDATIONS,e,n,i)}};var r=n(49625);function i(t,e,n,r){null!=r&&r.validate&&(r.optional&&null==n||r.validate(t,e,n))}function s(t,e,n){var i;const s=null==n?void 0:n.type;null!=s&&(null==(i=r.NODE_PARENT_VALIDATIONS[s])||i.call(r.NODE_PARENT_VALIDATIONS,t,e,n))}},36646:t=>{t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},37400:(t,e,n)=>{var r=n(67004),i=n(9106),s=n(18832),o=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:s?o(t,e):function(){return t.apply(e,arguments)}}},37903:(t,e,n)=>{var r=n(51192),i=n(25178),s=r.document,o=i(s)&&i(s.createElement);t.exports=function(t){return o?s.createElement(t):{}}},38084:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(17777);e.default=function(t,e){return(0,r.default)(t,e,!0)}},38155:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AnyTypeAnnotation=function(){this.word("any")},e.ArrayTypeAnnotation=function(t){this.print(t.elementType,!0),this.tokenChar(91),this.tokenChar(93)},e.BooleanLiteralTypeAnnotation=function(t){this.word(t.value?"true":"false")},e.BooleanTypeAnnotation=function(){this.word("boolean")},e.DeclareClass=function(t,e){a(e)||(this.word("declare"),this.space()),this.word("class"),this.space(),d.call(this,t)},e.DeclareExportAllDeclaration=function(t){this.word("declare"),this.space(),i.ExportAllDeclaration.call(this,t)},e.DeclareExportDeclaration=function(t){this.word("declare"),this.space(),this.word("export"),this.space(),t.default&&(this.word("default"),this.space()),p.call(this,t)},e.DeclareFunction=function(t,e){a(e)||(this.word("declare"),this.space()),this.word("function"),this.space(),this.print(t.id),this.print(t.id.typeAnnotation.typeAnnotation),t.predicate&&(this.space(),this.print(t.predicate)),this.semicolon()},e.DeclareInterface=function(t){this.word("declare"),this.space(),m.call(this,t)},e.DeclareModule=function(t){this.word("declare"),this.space(),this.word("module"),this.space(),this.print(t.id),this.space(),this.print(t.body)},e.DeclareModuleExports=function(t){this.word("declare"),this.space(),this.word("module"),this.tokenChar(46),this.word("exports"),this.print(t.typeAnnotation)},e.DeclareOpaqueType=function(t,e){a(e)||(this.word("declare"),this.space()),v.call(this,t)},e.DeclareTypeAlias=function(t){this.word("declare"),this.space(),g.call(this,t)},e.DeclareVariable=function(t,e){a(e)||(this.word("declare"),this.space()),this.word("var"),this.space(),this.print(t.id),this.print(t.id.typeAnnotation),this.semicolon()},e.DeclaredPredicate=function(t){this.tokenChar(37),this.word("checks"),this.tokenChar(40),this.print(t.value),this.tokenChar(41)},e.EmptyTypeAnnotation=function(){this.word("empty")},e.EnumBooleanBody=function(t){const{explicitType:e}=t;c(this,"boolean",e),u(this,t)},e.EnumBooleanMember=function(t){h(this,t)},e.EnumDeclaration=function(t){const{id:e,body:n}=t;this.word("enum"),this.space(),this.print(e),this.print(n)},e.EnumDefaultedMember=function(t){const{id:e}=t;this.print(e),this.tokenChar(44)},e.EnumNumberBody=function(t){const{explicitType:e}=t;c(this,"number",e),u(this,t)},e.EnumNumberMember=function(t){h(this,t)},e.EnumStringBody=function(t){const{explicitType:e}=t;c(this,"string",e),u(this,t)},e.EnumStringMember=function(t){h(this,t)},e.EnumSymbolBody=function(t){c(this,"symbol",!0),u(this,t)},e.ExistsTypeAnnotation=function(){this.tokenChar(42)},e.FunctionTypeAnnotation=function(t,e){this.print(t.typeParameters),this.tokenChar(40),t.this&&(this.word("this"),this.tokenChar(58),this.space(),this.print(t.this.typeAnnotation),(t.params.length||t.rest)&&(this.tokenChar(44),this.space())),this.printList(t.params),t.rest&&(t.params.length&&(this.tokenChar(44),this.space()),this.token("..."),this.print(t.rest)),this.tokenChar(41);const n=null==e?void 0:e.type;null!=n&&("ObjectTypeCallProperty"===n||"ObjectTypeInternalSlot"===n||"DeclareFunction"===n||"ObjectTypeProperty"===n&&e.method)?this.tokenChar(58):(this.space(),this.token("=>")),this.space(),this.print(t.returnType)},e.FunctionTypeParam=function(t){this.print(t.name),t.optional&&this.tokenChar(63),t.name&&(this.tokenChar(58),this.space()),this.print(t.typeAnnotation)},e.IndexedAccessType=function(t){this.print(t.objectType,!0),this.tokenChar(91),this.print(t.indexType),this.tokenChar(93)},e.InferredPredicate=function(){this.tokenChar(37),this.word("checks")},e.InterfaceDeclaration=m,e.GenericTypeAnnotation=e.ClassImplements=e.InterfaceExtends=function(t){this.print(t.id),this.print(t.typeParameters,!0)},e.InterfaceTypeAnnotation=function(t){var e;this.word("interface"),null!=(e=t.extends)&&e.length&&(this.space(),this.word("extends"),this.space(),this.printList(t.extends)),this.space(),this.print(t.body)},e.IntersectionTypeAnnotation=function(t){this.printJoin(t.types,void 0,void 0,y)},e.MixedTypeAnnotation=function(){this.word("mixed")},e.NullLiteralTypeAnnotation=function(){this.word("null")},e.NullableTypeAnnotation=function(t){this.tokenChar(63),this.print(t.typeAnnotation)},Object.defineProperty(e,"NumberLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.NumericLiteral}}),e.NumberTypeAnnotation=function(){this.word("number")},e.ObjectTypeAnnotation=function(t){t.exact?this.token("{|"):this.tokenChar(123);const e=[...t.properties,...t.callProperties||[],...t.indexers||[],...t.internalSlots||[]];e.length&&(this.newline(),this.space(),this.printJoin(e,!0,!0,(()=>{(1!==e.length||t.inexact)&&(this.tokenChar(44),this.space())}),!0),this.space()),t.inexact&&(this.indent(),this.token("..."),e.length&&this.newline(),this.dedent()),t.exact?this.token("|}"):this.tokenChar(125)},e.ObjectTypeCallProperty=function(t){t.static&&(this.word("static"),this.space()),this.print(t.value)},e.ObjectTypeIndexer=function(t){t.static&&(this.word("static"),this.space()),f.call(this,t),this.tokenChar(91),t.id&&(this.print(t.id),this.tokenChar(58),this.space()),this.print(t.key),this.tokenChar(93),this.tokenChar(58),this.space(),this.print(t.value)},e.ObjectTypeInternalSlot=function(t){t.static&&(this.word("static"),this.space()),this.tokenChar(91),this.tokenChar(91),this.print(t.id),this.tokenChar(93),this.tokenChar(93),t.optional&&this.tokenChar(63),t.method||(this.tokenChar(58),this.space()),this.print(t.value)},e.ObjectTypeProperty=function(t){t.proto&&(this.word("proto"),this.space()),t.static&&(this.word("static"),this.space()),"get"!==t.kind&&"set"!==t.kind||(this.word(t.kind),this.space()),f.call(this,t),this.print(t.key),t.optional&&this.tokenChar(63),t.method||(this.tokenChar(58),this.space()),this.print(t.value)},e.ObjectTypeSpreadProperty=function(t){this.token("..."),this.print(t.argument)},e.OpaqueType=v,e.OptionalIndexedAccessType=function(t){this.print(t.objectType),t.optional&&this.token("?."),this.tokenChar(91),this.print(t.indexType),this.tokenChar(93)},e.QualifiedTypeIdentifier=function(t){this.print(t.qualification),this.tokenChar(46),this.print(t.id)},Object.defineProperty(e,"StringLiteralTypeAnnotation",{enumerable:!0,get:function(){return o.StringLiteral}}),e.StringTypeAnnotation=function(){this.word("string")},e.SymbolTypeAnnotation=function(){this.word("symbol")},e.ThisTypeAnnotation=function(){this.word("this")},e.TupleTypeAnnotation=function(t){this.tokenChar(91),this.printList(t.types),this.tokenChar(93)},e.TypeAlias=g,e.TypeAnnotation=function(t,e){this.tokenChar(58),this.space(),"ArrowFunctionExpression"===e.type?this.tokenContext|=s.TokenContext.arrowFlowReturnType:t.optional&&this.tokenChar(63),this.print(t.typeAnnotation)},e.TypeCastExpression=function(t){this.tokenChar(40),this.print(t.expression),this.print(t.typeAnnotation),this.tokenChar(41)},e.TypeParameter=function(t){f.call(this,t),this.word(t.name),t.bound&&this.print(t.bound),t.default&&(this.space(),this.tokenChar(61),this.space(),this.print(t.default))},e.TypeParameterDeclaration=e.TypeParameterInstantiation=function(t){this.tokenChar(60),this.printList(t.params),this.tokenChar(62)},e.TypeofTypeAnnotation=function(t){this.word("typeof"),this.space(),this.print(t.argument)},e.UnionTypeAnnotation=function(t){this.printJoin(t.types,void 0,void 0,b)},e.Variance=function(t){"plus"===t.kind?this.tokenChar(43):this.tokenChar(45)},e.VoidTypeAnnotation=function(){this.word("void")},e._interfaceish=d,e._variance=f;var r=n(56872),i=n(46190),s=n(91317),o=n(26350);const{isDeclareExportDeclaration:a,isStatement:l}=r;function c(t,e,n){n&&(t.space(),t.word("of"),t.space(),t.word(e)),t.space()}function u(t,e){const{members:n}=e;t.token("{"),t.indent(),t.newline();for(const e of n)t.print(e),t.newline();e.hasUnknownMembers&&(t.token("..."),t.newline()),t.dedent(),t.token("}")}function h(t,e){t.print(e.id),t.space(),t.token("="),t.space(),t.print(e.init),t.token(",")}function p(t){if(t.declaration){const e=t.declaration;this.print(e),l(e)||this.semicolon()}else this.tokenChar(123),t.specifiers.length&&(this.space(),this.printList(t.specifiers),this.space()),this.tokenChar(125),t.source&&(this.space(),this.word("from"),this.space(),this.print(t.source)),this.semicolon()}function d(t){var e,n,r;this.print(t.id),this.print(t.typeParameters),null!=(e=t.extends)&&e.length&&(this.space(),this.word("extends"),this.space(),this.printList(t.extends)),"DeclareClass"===t.type&&(null!=(n=t.mixins)&&n.length&&(this.space(),this.word("mixins"),this.space(),this.printList(t.mixins)),null!=(r=t.implements)&&r.length&&(this.space(),this.word("implements"),this.space(),this.printList(t.implements))),this.space(),this.print(t.body)}function f(t){var e;const n=null==(e=t.variance)?void 0:e.kind;null!=n&&("plus"===n?this.tokenChar(43):"minus"===n&&this.tokenChar(45))}function m(t){this.word("interface"),this.space(),d.call(this,t)}function y(t){this.space(),this.token("&",!1,t),this.space()}function g(t){this.word("type"),this.space(),this.print(t.id),this.print(t.typeParameters),this.space(),this.tokenChar(61),this.space(),this.print(t.right),this.semicolon()}function v(t){this.word("opaque"),this.space(),this.word("type"),this.space(),this.print(t.id),this.print(t.typeParameters),t.supertype&&(this.tokenChar(58),this.space(),this.print(t.supertype)),t.impltype&&(this.space(),this.tokenChar(61),this.space(),this.print(t.impltype)),this.semicolon()}function b(t){this.space(),this.token("|",!1,t),this.space()}},38199:(t,e,n)=>{var r=n(34110),i=r.Buffer;function s(t,e){for(var n in t)e[n]=t[n]}function o(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(s(r,e),e.Buffer=o),s(i,o),o.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},o.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},38203:(t,e,n)=>{var r=n(59767),i=n(21804);t.exports=!r((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",i(1,7)),7!==t.stack)}))},38273:(t,e,n)=>{n.d(e,{$t:()=>mt,EY:()=>i,FB:()=>gt,Fh:()=>g,Gu:()=>T,Je:()=>pt,MK:()=>y,Nb:()=>V,OF:()=>k,Pe:()=>it,QR:()=>yt,VR:()=>x,YH:()=>et,ZX:()=>st,iR:()=>b,kn:()=>Dt,om:()=>xt,sU:()=>j,sj:()=>N,vB:()=>St,vS:()=>m,xx:()=>q,y$:()=>_t,zK:()=>f});var r=n(93403);class i{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,n){[t,e]=d(this,t,e);let r=[];return this.decompose(0,t,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(e,this.length,r,1),o.from(r,this.length-(e-t)+n.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=d(this,t,e);let n=[];return this.decompose(t,e,n,0),o.from(n,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),n=this.length-this.scanIdentical(t,-1),r=new c(this),i=new c(t);for(let t=e,s=e;;){if(r.next(t),i.next(t),t=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(s+=r.value.length,r.done||s>=n)return!0}}iter(t=1){return new c(this,t)}iterRange(t,e=this.length){return new u(this,t,e)}iterLines(t,e){let n;if(null==t)n=this.iter();else{null==e&&(e=this.lines+1);let r=this.line(t).from;n=this.iterRange(r,Math.max(r,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new h(n)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):o.from(s.split(t,[])):i.empty}}class s extends i{constructor(t,e=function(t){let e=-1;for(let n of t)e+=n.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,n,r){for(let i=0;;i++){let s=this.text[i],o=r+s.length;if((e?n:o)>=t)return new p(r,o,n,s);r=o+1,n++}}decompose(t,e,n,r){let i=t<=0&&e>=this.length?this:new s(l(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&r){let t=n.pop(),e=a(i.text,t.text.slice(),0,i.length);if(e.length<=32)n.push(new s(e,t.length+i.length));else{let t=e.length>>1;n.push(new s(e.slice(0,t)),new s(e.slice(t)))}}else n.push(i)}replace(t,e,n){if(!(n instanceof s))return super.replace(t,e,n);[t,e]=d(this,t,e);let r=a(this.text,a(n.text,l(this.text,0,t)),e),i=this.length+n.length-(e-t);return r.length<=32?new s(r,i):o.from(s.split(r,[]),i)}sliceString(t,e=this.length,n="\n"){[t,e]=d(this,t,e);let r="";for(let i=0,s=0;i<=e&&s<this.text.length;s++){let o=this.text[s],a=i+o.length;i>t&&s&&(r+=n),t<a&&e>i&&(r+=o.slice(Math.max(0,t-i),e-i)),i=a+1}return r}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let n=[],r=-1;for(let i of t)n.push(i),r+=i.length+1,32==n.length&&(e.push(new s(n,r)),n=[],r=-1);return r>-1&&e.push(new s(n,r)),e}}class o extends i{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,n,r){for(let i=0;;i++){let s=this.children[i],o=r+s.length,a=n+s.lines-1;if((e?a:o)>=t)return s.lineInner(t,e,n,r);r=o+1,n=a+1}}decompose(t,e,n,r){for(let i=0,s=0;s<=e&&i<this.children.length;i++){let o=this.children[i],a=s+o.length;if(t<=a&&e>=s){let i=r&((s<=t?1:0)|(a>=e?2:0));s>=t&&a<=e&&!i?n.push(o):o.decompose(t-s,e-s,n,i)}s=a+1}}replace(t,e,n){if([t,e]=d(this,t,e),n.lines<this.lines)for(let r=0,i=0;r<this.children.length;r++){let s=this.children[r],a=i+s.length;if(t>=i&&e<=a){let l=s.replace(t-i,e-i,n),c=this.lines-s.lines+l.lines;if(l.lines<c>>4&&l.lines>c>>6){let i=this.children.slice();return i[r]=l,new o(i,this.length-(e-t)+n.length)}return super.replace(i,a,l)}i=a+1}return super.replace(t,e,n)}sliceString(t,e=this.length,n="\n"){[t,e]=d(this,t,e);let r="";for(let i=0,s=0;i<this.children.length&&s<=e;i++){let o=this.children[i],a=s+o.length;s>t&&i&&(r+=n),t<a&&e>s&&(r+=o.sliceString(t-s,e-s,n)),s=a+1}return r}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof o))return 0;let n=0,[r,i,s,a]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;r+=e,i+=e){if(r==s||i==a)return n;let o=this.children[r],l=t.children[i];if(o!=l)return n+o.scanIdentical(l,e);n+=o.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let n=0;for(let e of t)n+=e.lines;if(n<32){let n=[];for(let e of t)e.flatten(n);return new s(n,e)}let r=Math.max(32,n>>5),i=r<<1,a=r>>1,l=[],c=0,u=-1,h=[];function p(t){let e;if(t.lines>i&&t instanceof o)for(let e of t.children)p(e);else t.lines>a&&(c>a||!c)?(d(),l.push(t)):t instanceof s&&c&&(e=h[h.length-1])instanceof s&&t.lines+e.lines<=32?(c+=t.lines,u+=t.length+1,h[h.length-1]=new s(e.text.concat(t.text),e.length+1+t.length)):(c+t.lines>r&&d(),c+=t.lines,u+=t.length+1,h.push(t))}function d(){0!=c&&(l.push(1==h.length?h[0]:o.from(h,u)),u=-1,c=h.length=0)}for(let e of t)p(e);return d(),1==l.length?l[0]:new o(l,e)}}function a(t,e,n=0,r=1e9){for(let i=0,s=0,o=!0;s<t.length&&i<=r;s++){let a=t[s],l=i+a.length;l>=n&&(l>r&&(a=a.slice(0,r-i)),i<n&&(a=a.slice(n-i)),o?(e[e.length-1]+=a,o=!1):e.push(a)),i=l+1}return e}function l(t,e,n){return a(t,[""],e,n)}i.empty=new s([""],0);class c{constructor(t,e=1){this.dir=e,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[t],this.offsets=[e>0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,a=r instanceof s?r.text.length:r.children.length;if(o==(e>0?a:0)){if(0==n)return this.done=!0,this.value="",this;e>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(e>0?0:1)){if(this.offsets[n]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(r instanceof s){let i=r.text[o+(e<0?-1:0)];if(this.offsets[n]+=e,i.length>Math.max(0,t))return this.value=0==t?i:e>0?i.slice(t):i.slice(0,i.length-t),this;t-=i.length}else{let i=r.children[o+(e<0?-1:0)];t>i.length?(t-=i.length,this.offsets[n]+=e):(e<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(e>0?1:(i instanceof s?i.text.length:i.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class u{constructor(t,e,n){this.value="",this.done=!1,this.cursor=new c(t,e>n?-1:1),this.pos=e>n?t.length:0,this.from=Math.min(e,n),this.to=Math.max(e,n)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let n=e<0?this.pos-this.from:this.to-this.pos;t>n&&(t=n),n-=t;let{value:r}=this.cursor.next(t);return this.pos+=(r.length+t)*e,this.value=r.length<=n?r:e<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class h{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:n,value:r}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(i.prototype[Symbol.iterator]=function(){return this.iter()},c.prototype[Symbol.iterator]=u.prototype[Symbol.iterator]=h.prototype[Symbol.iterator]=function(){return this});class p{constructor(t,e,n,r){this.from=t,this.to=e,this.number=n,this.text=r}get length(){return this.to-this.from}}function d(t,e,n){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,n))]}function f(t,e,n=!0,i=!0){return(0,r.z)(t,e,n,i)}function m(t,e){let n=t.charCodeAt(e);if(!((r=n)>=55296&&r<56320&&e+1!=t.length))return n;var r;let i=t.charCodeAt(e+1);return function(t){return t>=56320&&t<57344}(i)?i-56320+(n-55296<<10)+65536:n}function y(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function g(t){return t<65536?1:2}const v=/\r\n?|\n/;var b=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(b||(b={}));class T{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e+1];t+=n<0?this.sections[e]:n}return t}get empty(){return 0==this.sections.length||2==this.sections.length&&this.sections[1]<0}iterGaps(t){for(let e=0,n=0,r=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];s<0?(t(n,r,i),r+=i):r+=s,n+=i}}iterChangedRanges(t,e=!1){E(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];r<0?t.push(n,r):t.push(r,n)}return new T(t)}composeDesc(t){return this.empty?t:t.empty?this:P(this,t)}mapDesc(t,e=!1){return t.empty?this:A(this,t,e)}mapPos(t,e=-1,n=b.Simple){let r=0,i=0;for(let s=0;s<this.sections.length;){let o=this.sections[s++],a=this.sections[s++],l=r+o;if(a<0){if(l>t)return i+(t-r);i+=o}else{if(n!=b.Simple&&l>=t&&(n==b.TrackDel&&r<t&&l>t||n==b.TrackBefore&&r<t||n==b.TrackAfter&&l>t))return null;if(l>t||l==t&&e<0&&!o)return t==r||e<0?i:i+a;i+=a}r=l}if(t>r)throw new RangeError(`Position ${t} is out of range for changeset of length ${r}`);return i}touchesRange(t,e=t){for(let n=0,r=0;n<this.sections.length&&r<=e;){let i=r+this.sections[n++];if(this.sections[n++]>=0&&r<=e&&i>=t)return!(r<t&&i>e)||"cover";r=i}return!1}toString(){let t="";for(let e=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];t+=(t?" ":"")+n+(r>=0?":"+r:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new T(t)}static create(t){return new T(t)}}class x extends T{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return E(this,((e,n,r,i,s)=>t=t.replace(r,r+(n-e),s)),!1),t}mapDesc(t,e=!1){return A(this,t,e,!0)}invert(t){let e=this.sections.slice(),n=[];for(let r=0,s=0;r<e.length;r+=2){let o=e[r],a=e[r+1];if(a>=0){e[r]=a,e[r+1]=o;let l=r>>1;for(;n.length<l;)n.push(i.empty);n.push(o?t.slice(s,s+o):i.empty)}s+=o}return new x(e,n)}compose(t){return this.empty?t:t.empty?this:P(this,t,!0)}map(t,e=!1){return t.empty?this:A(this,t,e,!0)}iterChanges(t,e=!1){E(this,t,e)}get desc(){return T.create(this.sections)}filter(t){let e=[],n=[],r=[],i=new M(this);t:for(let s=0,o=0;;){let a=s==t.length?1e9:t[s++];for(;o<a||o==a&&0==i.len;){if(i.done)break t;let t=Math.min(i.len,a-o);S(r,t,-1);let s=-1==i.ins?-1:0==i.off?i.ins:0;S(e,t,s),s>0&&w(n,e,i.text),i.forward(t),o+=t}let l=t[s++];for(;o<l;){if(i.done)break t;let t=Math.min(i.len,l-o);S(e,t,-1),S(r,t,-1==i.ins?-1:0==i.off?i.ins:0),i.forward(t),o+=t}}return{changes:new x(e,n),filtered:T.create(r)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let n=this.sections[e],r=this.sections[e+1];r<0?t.push(n):0==r?t.push([n]):t.push([n].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,n){let r=[],s=[],o=0,a=null;function l(t=!1){if(!t&&!r.length)return;o<e&&S(r,e-o,-1);let n=new x(r,s);a=a?a.compose(n.map(a)):n,r=[],s=[],o=0}return function t(c){if(Array.isArray(c))for(let e of c)t(e);else if(c instanceof x){if(c.length!=e)throw new RangeError(`Mismatched change set length (got ${c.length}, expected ${e})`);l(),a=a?a.compose(c.map(a)):c}else{let{from:t,to:a=t,insert:u}=c;if(t>a||t<0||a>e)throw new RangeError(`Invalid change range ${t} to ${a} (in doc of length ${e})`);let h=u?"string"==typeof u?i.of(u.split(n||v)):u:i.empty,p=h.length;if(t==a&&0==p)return;t<o&&l(),t>o&&S(r,t-o,-1),S(r,a-t,p),w(s,r,h),o=a}}(t),l(!a),a}static empty(t){return new x(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],n=[];for(let r=0;r<t.length;r++){let s=t[r];if("number"==typeof s)e.push(s,-1);else{if(!Array.isArray(s)||"number"!=typeof s[0]||s.some(((t,e)=>e&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==s.length)e.push(s[0],0);else{for(;n.length<r;)n.push(i.empty);n[r]=i.of(s.slice(1)),e.push(s[0],n[r].length)}}}return new x(e,n)}static createSet(t,e){return new x(t,e)}}function S(t,e,n,r=!1){if(0==e&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&0==e&&0==t[i]?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function w(t,e,n){if(0==n.length)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(i.empty);t.push(n)}}function E(t,e,n){let r=t.inserted;for(let s=0,o=0,a=0;a<t.sections.length;){let l=t.sections[a++],c=t.sections[a++];if(c<0)s+=l,o+=l;else{let u=s,h=o,p=i.empty;for(;u+=l,h+=c,c&&r&&(p=p.append(r[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)l=t.sections[a++],c=t.sections[a++];e(s,u,o,h,p),s=u,o=h}}}function A(t,e,n,r=!1){let i=[],s=r?[]:null,o=new M(t),a=new M(e);for(let t=-1;;){if(o.done&&a.len||a.done&&o.len)throw new Error("Mismatched change set lengths");if(-1==o.ins&&-1==a.ins){let t=Math.min(o.len,a.len);S(i,t,-1),o.forward(t),a.forward(t)}else if(a.ins>=0&&(o.ins<0||t==o.i||0==o.off&&(a.len<o.len||a.len==o.len&&!n))){let e=a.len;for(S(i,a.ins,-1);e;){let n=Math.min(o.len,e);o.ins>=0&&t<o.i&&o.len<=n&&(S(i,0,o.ins),s&&w(s,i,o.text),t=o.i),o.forward(n),e-=n}a.next()}else{if(!(o.ins>=0)){if(o.done&&a.done)return s?x.createSet(i,s):T.create(i);throw new Error("Mismatched change set lengths")}{let e=0,n=o.len;for(;n;)if(-1==a.ins){let t=Math.min(n,a.len);e+=t,n-=t,a.forward(t)}else{if(!(0==a.ins&&a.len<n))break;n-=a.len,a.next()}S(i,e,t<o.i?o.ins:0),s&&t<o.i&&w(s,i,o.text),t=o.i,o.forward(o.len-n)}}}}function P(t,e,n=!1){let r=[],i=n?[]:null,s=new M(t),o=new M(e);for(let t=!1;;){if(s.done&&o.done)return i?x.createSet(r,i):T.create(r);if(0==s.ins)S(r,s.len,0,t),s.next();else if(0!=o.len||o.done){if(s.done||o.done)throw new Error("Mismatched change set lengths");{let e=Math.min(s.len2,o.len),n=r.length;if(-1==s.ins){let n=-1==o.ins?-1:o.off?0:o.ins;S(r,e,n,t),i&&n&&w(i,r,o.text)}else-1==o.ins?(S(r,s.off?0:s.len,e,t),i&&w(i,r,s.textBit(e))):(S(r,s.off?0:s.len,o.off?0:o.ins,t),i&&!o.off&&w(i,r,o.text));t=(s.ins>e||o.ins>=0&&o.len>e)&&(t||r.length>n),s.forward2(e),o.forward(e)}}else S(r,0,o.ins,t),i&&w(i,r,o.text),o.next()}}class M{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i<t.length?(this.len=t[this.i++],this.ins=t[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return-2==this.ins}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?i.empty:t[e]}textBit(t){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length&&!t?i.empty:e[n].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class C{constructor(t,e,n){this.from=t,this.to=e,this.flags=n}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let n,r;return this.empty?n=r=t.mapPos(this.from,e):(n=t.mapPos(this.from,1),r=t.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new C(n,r,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return k.range(t,e);let n=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return k.range(this.anchor,n)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return k.range(t.anchor,t.head)}static create(t,e,n){return new C(t,e,n)}}class k{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:k.create(this.ranges.map((n=>n.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(t.ranges[n],e))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return 1==this.ranges.length?this:new k([this.main],0)}addRange(t,e=!0){return k.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let n=this.ranges.slice();return n[e]=t,k.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new k(t.ranges.map((t=>C.fromJSON(t))),t.main)}static single(t,e=t){return new k([k.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;r<t.length;r++){let i=t[r];if(i.empty?i.from<=n:i.from<n)return k.normalized(t.slice(),e);n=i.to}return new k(t,e)}static cursor(t,e=0,n,r){return C.create(t,t,(0==e?0:e<0?8:16)|(null==n?7:Math.min(6,n))|(null!=r?r:16777215)<<6)}static range(t,e,n,r){let i=(null!=n?n:16777215)<<6|(null==r?7:Math.min(6,r));return e<t?C.create(e,t,48|i):C.create(t,e,(e>t?8:0)|i)}static normalized(t,e=0){let n=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(n);for(let n=1;n<t.length;n++){let r=t[n],i=t[n-1];if(r.empty?r.from<=i.to:r.from<i.to){let s=i.from,o=Math.max(r.to,i.to);n<=e&&e--,t.splice(--n,2,r.anchor>r.head?k.range(o,s):k.range(s,o))}}return new k(t,e)}}function I(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let O=0;class N{constructor(t,e,n,r,i){this.combine=t,this.compareInput=e,this.compare=n,this.isStatic=r,this.id=O++,this.default=t([]),this.extensions="function"==typeof i?i(this):i}get reader(){return this}static define(t={}){return new N(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:_),!!t.static,t.enables)}of(t){return new D([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new D(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new D(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(n=>e(n.field(t))))}}function _(t,e){return t==e||t.length==e.length&&t.every(((t,n)=>t===e[n]))}class D{constructor(t,e,n,r){this.dependencies=t,this.facet=e,this.type=n,this.value=r,this.id=O++}dynamicSlot(t){var e;let n=this.value,r=this.facet.compareInput,i=this.id,s=t[i]>>1,o=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:1&(null!==(e=t[n.id])&&void 0!==e?e:1)||c.push(t[n.id]);return{create:t=>(t.values[s]=n(t),1),update(t,e){if(a&&e.docChanged||l&&(e.docChanged||e.selection)||B(t,c)){let e=n(t);if(o?!L(e,t.values[s],r):!r(e,t.values[s]))return t.values[s]=e,1}return 0},reconfigure:(t,e)=>{let a,l=e.config.address[i];if(null!=l){let i=Y(e,l);if(this.dependencies.every((n=>n instanceof N?e.facet(n)===t.facet(n):!(n instanceof j)||e.field(n,!1)==t.field(n,!1)))||(o?L(a=n(t),i,r):r(a=n(t),i)))return t.values[s]=i,0}else a=n(t);return t.values[s]=a,1}}}}function L(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function B(t,e){let n=!1;for(let r of e)1&K(t,r)&&(n=!0);return n}function R(t,e,n){let r=n.map((e=>t[e.id])),i=n.map((t=>t.type)),s=r.filter((t=>!(1&t))),o=t[e.id]>>1;function a(t){let n=[];for(let e=0;e<r.length;e++){let s=Y(t,r[e]);if(2==i[e])for(let t of s)n.push(t);else n.push(s)}return e.combine(n)}return{create(t){for(let e of r)K(t,e);return t.values[o]=a(t),1},update(t,n){if(!B(t,s))return 0;let r=a(t);return e.compare(r,t.values[o])?0:(t.values[o]=r,1)},reconfigure(t,i){let s=B(t,r),l=i.config.facets[e.id],c=i.facet(e);if(l&&!s&&_(n,l))return t.values[o]=c,0;let u=a(t);return e.compare(u,c)?(t.values[o]=c,0):(t.values[o]=u,1)}}}const F=N.define({static:!0});class j{constructor(t,e,n,r,i){this.id=t,this.createF=e,this.updateF=n,this.compareF=r,this.spec=i,this.provides=void 0}static define(t){let e=new j(O++,t.create,t.update,t.compare||((t,e)=>t===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(F).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,n)=>{let r=t.values[e],i=this.updateF(r,n);return this.compareF(r,i)?0:(t.values[e]=i,1)},reconfigure:(t,n)=>{let r,i=t.facet(F),s=n.facet(F);return(r=i.find((t=>t.field==this)))&&r!=s.find((t=>t.field==this))?(t.values[e]=r.create(t),1):null!=n.config.address[this.id]?(t.values[e]=n.field(this),0):(t.values[e]=this.create(t),1)}}}init(t){return[this,F.of({field:this,create:t})]}get extension(){return this}}function U(t){return e=>new z(e,t)}const V={highest:U(0),high:U(1),default:U(2),low:U(3),lowest:U(4)};class z{constructor(t,e){this.inner=t,this.prec=e}}class q{of(t){return new $(this,t)}reconfigure(t){return q.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class ${constructor(t,e){this.compartment=t,this.inner=e}}class H{constructor(t,e,n,r,i,s){for(this.base=t,this.compartments=e,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=s,this.statusTemplate=[];this.statusTemplate.length<n.length;)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return null==e?t.default:this.staticValues[e>>1]}static resolve(t,e,n){let r=[],i=Object.create(null),s=new Map;for(let n of function(t,e,n){let r=[[],[],[],[],[]],i=new Map;return function t(s,o){let a=i.get(s);if(null!=a){if(a<=o)return;let t=r[a].indexOf(s);t>-1&&r[a].splice(t,1),s instanceof $&&n.delete(s.compartment)}if(i.set(s,o),Array.isArray(s))for(let e of s)t(e,o);else if(s instanceof $){if(n.has(s.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=e.get(s.compartment)||s.inner;n.set(s.compartment,r),t(r,o)}else if(s instanceof z)t(s.inner,s.prec);else if(s instanceof j)r[o].push(s),s.provides&&t(s.provides,o);else if(s instanceof D)r[o].push(s),s.facet.extensions&&t(s.facet.extensions,2);else{let e=s.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);t(e,o)}}(t,2),r.reduce(((t,e)=>t.concat(e)))}(t,e,s))n instanceof j?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let o=Object.create(null),a=[],l=[];for(let t of r)o[t.id]=l.length<<1,l.push((e=>t.slot(e)));let c=null==n?void 0:n.config.facets;for(let t in i){let e=i[t],r=e[0].facet,s=c&&c[t]||[];if(e.every((t=>0==t.type)))if(o[r.id]=a.length<<1|1,_(s,e))a.push(n.facet(r));else{let t=r.combine(e.map((t=>t.value)));a.push(n&&r.compare(t,n.facet(r))?n.facet(r):t)}else{for(let t of e)0==t.type?(o[t.id]=a.length<<1|1,a.push(t.value)):(o[t.id]=l.length<<1,l.push((e=>t.dynamicSlot(e))));o[r.id]=l.length<<1,l.push((t=>R(t,r,e)))}}let u=l.map((t=>t(o)));return new H(t,s,u,o,a,i)}}function K(t,e){if(1&e)return 2;let n=e>>1,r=t.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function Y(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const W=N.define(),J=N.define({combine:t=>t.some((t=>t)),static:!0}),X=N.define({combine:t=>t.length?t[0]:void 0,static:!0}),G=N.define(),Z=N.define(),Q=N.define(),tt=N.define({combine:t=>!!t.length&&t[0]});class et{constructor(t,e){this.type=t,this.value=e}static define(){return new nt}}class nt{of(t){return new et(this,t)}}class rt{constructor(t){this.map=t}of(t){return new it(this,t)}}class it{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new it(this.type,e)}is(t){return this.type==t}static define(t={}){return new rt(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let n=[];for(let r of t){let t=r.map(e);t&&n.push(t)}return n}}it.reconfigure=it.define(),it.appendConfig=it.define();class st{constructor(t,e,n,r,i,s){this.startState=t,this.changes=e,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=s,this._doc=null,this._state=null,n&&I(n,e.newLength),i.some((t=>t.type==st.time))||(this.annotations=i.concat(st.time.of(Date.now())))}static create(t,e,n,r,i,s){return new st(t,e,n,r,i,s)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(st.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function ot(t,e){let n=[];for(let r=0,i=0;;){let s,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))s=t[r++],o=t[r++];else{if(!(i<e.length))return n;s=e[i++],o=e[i++]}!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function at(t,e,n){var r;let i,s,o;return n?(i=e.changes,s=x.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):null===(r=t.selection)||void 0===r?void 0:r.map(i),effects:it.mapEffects(t.effects,i).concat(it.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function lt(t,e,n){let r=e.selection,i=ht(e.annotations);return e.userEvent&&(i=i.concat(st.userEvent.of(e.userEvent))),{changes:e.changes instanceof x?e.changes:x.of(e.changes||[],n,t.facet(X)),selection:r&&(r instanceof k?r:k.single(r.anchor,r.head)),effects:ht(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function ct(t,e,n){let r=lt(t,e.length?e[0]:{},t.doc.length);e.length&&!1===e[0].filter&&(n=!1);for(let i=1;i<e.length;i++){!1===e[i].filter&&(n=!1);let s=!!e[i].sequential;r=at(r,lt(t,e[i],s?r.changes.newLength:t.doc.length),s)}let i=st.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return function(t){let e=t.startState,n=e.facet(Q),r=t;for(let i=n.length-1;i>=0;i--){let s=n[i](t);s&&Object.keys(s).length&&(r=at(r,lt(e,s,t.changes.newLength),!0))}return r==t?t:st.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(t){let e=t.startState,n=!0;for(let r of e.facet(G)){let e=r(t);if(!1===e){n=!1;break}Array.isArray(e)&&(n=!0===n?e:ot(n,e))}if(!0!==n){let r,i;if(!1===n)i=t.changes.invertedDesc,r=x.empty(e.doc.length);else{let e=t.changes.filter(n);r=e.changes,i=e.filtered.mapDesc(e.changes).invertedDesc}t=st.create(e,r,t.selection&&t.selection.map(i),it.mapEffects(t.effects,i),t.annotations,t.scrollIntoView)}let r=e.facet(Z);for(let n=r.length-1;n>=0;n--){let i=r[n](t);t=i instanceof st?i:Array.isArray(i)&&1==i.length&&i[0]instanceof st?i[0]:ct(e,ht(i),!1)}return t}(i):i)}st.time=et.define(),st.userEvent=et.define(),st.addToHistory=et.define(),st.remote=et.define();const ut=[];function ht(t){return null==t?ut:Array.isArray(t)?t:[t]}var pt=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(pt||(pt={}));const dt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ft;try{ft=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}class mt{constructor(t,e,n,r,i,s){this.config=t,this.doc=e,this.selection=n,this.values=r,this.status=t.statusTemplate.slice(),this.computeSlot=i,s&&(s._state=this);for(let t=0;t<this.config.dynamicSlots.length;t++)K(this,t<<1);this.computeSlot=null}field(t,e=!0){let n=this.config.address[t.id];if(null!=n)return K(this,n),Y(this,n);if(e)throw new RangeError("Field is not present in this state")}update(...t){return ct(this,t,!0)}applyTransaction(t){let e,n=this.config,{base:r,compartments:i}=n;for(let e of t.effects)e.is(q.reconfigure)?(n&&(i=new Map,n.compartments.forEach(((t,e)=>i.set(e,t))),n=null),i.set(e.value.compartment,e.value.extension)):e.is(it.reconfigure)?(n=null,r=e.value):e.is(it.appendConfig)&&(n=null,r=ht(r).concat(e.value));n?e=t.startState.values.slice():(n=H.resolve(r,i,this),e=new mt(n,this.doc,this.selection,n.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values);let s=t.startState.facet(J)?t.newSelection:t.newSelection.asSingle();new mt(n,t.newDoc,s,e,((e,n)=>n.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:k.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,n=t(e.ranges[0]),r=this.changes(n.changes),i=[n.range],s=ht(n.effects);for(let n=1;n<e.ranges.length;n++){let o=t(e.ranges[n]),a=this.changes(o.changes),l=a.map(r);for(let t=0;t<n;t++)i[t]=i[t].map(l);let c=r.mapDesc(a,!0);i.push(o.range.map(c)),r=r.compose(l),s=it.mapEffects(s,l).concat(it.mapEffects(ht(o.effects),c))}return{changes:r,selection:k.create(i,e.mainIndex),effects:s}}changes(t=[]){return t instanceof x?t:x.of(t,this.doc.length,this.facet(mt.lineSeparator))}toText(t){return i.of(t.split(this.facet(mt.lineSeparator)||v))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];return null==e?t.default:(K(this,e),Y(this,e))}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let n in t){let r=t[n];r instanceof j&&null!=this.config.address[r.id]&&(e[n]=r.spec.toJSON(this.field(t[n]),this))}return e}static fromJSON(t,e={},n){if(!t||"string"!=typeof t.doc)throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(n)for(let e in n)if(Object.prototype.hasOwnProperty.call(t,e)){let i=n[e],s=t[e];r.push(i.init((t=>i.spec.fromJSON(s,t))))}return mt.create({doc:t.doc,selection:k.fromJSON(t.selection),extensions:e.extensions?r.concat([e.extensions]):r})}static create(t={}){let e=H.resolve(t.extensions||[],new Map),n=t.doc instanceof i?t.doc:i.of((t.doc||"").split(e.staticFacet(mt.lineSeparator)||v)),r=t.selection?t.selection instanceof k?t.selection:k.single(t.selection.anchor,t.selection.head):k.single(0);return I(r,n.length),e.staticFacet(J)||(r=r.asSingle()),new mt(e,n,r,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(mt.tabSize)}get lineBreak(){return this.facet(mt.lineSeparator)||"\n"}get readOnly(){return this.facet(tt)}phrase(t,...e){for(let e of this.facet(mt.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>e.length?t:e[r-1]}))),t}languageDataAt(t,e,n=-1){let r=[];for(let i of this.facet(W))for(let s of i(this,e,n))Object.prototype.hasOwnProperty.call(s,t)&&r.push(s[t]);return r}charCategorizer(t){return e=this.languageDataAt("wordChars",t).join(""),t=>{if(!/\S/.test(t))return pt.Space;if(function(t){if(ft)return ft.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||dt.test(n)))return!0}return!1}(t))return pt.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return pt.Word;return pt.Other};var e}wordAt(t){let{text:e,from:n,length:r}=this.doc.lineAt(t),i=this.charCategorizer(t),s=t-n,o=t-n;for(;s>0;){let t=f(e,s,!1);if(i(e.slice(t,s))!=pt.Word)break;s=t}for(;o<r;){let t=f(e,o);if(i(e.slice(o,t))!=pt.Word)break;o=t}return s==o?null:k.range(s+n,o+n)}}function yt(t,e,n={}){let r={};for(let e of t)for(let t of Object.keys(e)){let i=e[t],s=r[t];if(void 0===s)r[t]=i;else if(s===i||void 0===i);else{if(!Object.hasOwnProperty.call(n,t))throw new Error("Config merge conflict for field "+t);r[t]=n[t](s,i)}}for(let t in e)void 0===r[t]&&(r[t]=e[t]);return r}mt.allowMultipleSelections=J,mt.tabSize=N.define({combine:t=>t.length?t[0]:4}),mt.lineSeparator=X,mt.readOnly=tt,mt.phrases=N.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every((n=>t[n]==e[n]))}}),mt.languageData=W,mt.changeFilter=G,mt.transactionFilter=Z,mt.transactionExtender=Q,q.reconfigure=it.define();class gt{eq(t){return this==t}range(t,e=t){return vt.create(t,e,this)}}gt.prototype.startSide=gt.prototype.endSide=0,gt.prototype.point=!1,gt.prototype.mapMode=b.TrackDel;class vt{constructor(t,e,n){this.from=t,this.to=e,this.value=n}static create(t,e,n){return new vt(t,e,n)}}function bt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Tt{constructor(t,e,n,r){this.from=t,this.to=e,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(t,e,n,r=0){let i=n?this.to:this.from;for(let s=r,o=i.length;;){if(s==o)return s;let r=s+o>>1,a=i[r]-t||(n?this.value[r].endSide:this.value[r].startSide)-e;if(r==s)return a>=0?s:o;a>=0?o=r:s=r+1}}between(t,e,n,r){for(let i=this.findIndex(e,-1e9,!0),s=this.findIndex(n,1e9,!1,i);i<s;i++)if(!1===r(this.from[i]+t,this.to[i]+t,this.value[i]))return!1}map(t,e){let n=[],r=[],i=[],s=-1,o=-1;for(let a=0;a<this.value.length;a++){let l,c,u=this.value[a],h=this.from[a]+t,p=this.to[a]+t;if(h==p){let t=e.mapPos(h,u.startSide,u.mapMode);if(null==t)continue;if(l=c=t,u.startSide!=u.endSide&&(c=e.mapPos(h,u.endSide),c<l))continue}else if(l=e.mapPos(h,u.startSide),c=e.mapPos(p,u.endSide),l>c||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(s<0&&(s=l),u.point&&(o=Math.max(o,c-l)),n.push(u),r.push(l-s),i.push(c-s))}return{mapped:n.length?new Tt(r,i,n,o):null,pos:s}}}class xt{constructor(t,e,n,r){this.chunkPos=t,this.chunk=e,this.nextLayer=n,this.maxPoint=r}static create(t,e,n,r){return new xt(t,e,n,r)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=t,s=t.filter;if(0==e.length&&!s)return this;if(n&&(e=e.slice().sort(bt)),this.isEmpty)return e.length?xt.of(e):this;let o=new Et(this,null,-1).goto(0),a=0,l=[],c=new St;for(;o.value||a<e.length;)if(a<e.length&&(o.from-e[a].from||o.startSide-e[a].value.startSide)>=0){let t=e[a++];c.addInner(t.from,t.to,t.value)||l.push(t)}else 1==o.rangeIndex&&o.chunkIndex<this.chunk.length&&(a==e.length||this.chunkEnd(o.chunkIndex)<e[a].from)&&(!s||r>this.chunkEnd(o.chunkIndex)||i<this.chunkPos[o.chunkIndex])&&c.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])?o.nextChunk():((!s||r>o.to||i<o.from||s(o.from,o.to,o.value))&&(c.addInner(o.from,o.to,o.value)||l.push(vt.create(o.from,o.to,o.value))),o.next());return c.finishInner(this.nextLayer.isEmpty&&!l.length?xt.empty:this.nextLayer.update({add:l,filter:s,filterFrom:r,filterTo:i}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],n=[],r=-1;for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i],a=t.touchesRange(s,s+o.length);if(!1===a)r=Math.max(r,o.maxPoint),e.push(o),n.push(t.mapPos(s));else if(!0===a){let{mapped:i,pos:a}=o.map(s,t);i&&(r=Math.max(r,i.maxPoint),e.push(i),n.push(a))}}let i=this.nextLayer.map(t);return 0==e.length?i:new xt(n,e,i||xt.empty,r)}between(t,e,n){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let i=this.chunkPos[r],s=this.chunk[r];if(e>=i&&t<=i+s.length&&!1===s.between(i,t-i,e-i,n))return}this.nextLayer.between(t,e,n)}}iter(t=0){return At.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return At.from(t).goto(e)}static compare(t,e,n,r,i=-1){let s=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),o=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=i)),a=wt(s,o,n),l=new Mt(s,a,i),c=new Mt(o,a,i);n.iterGaps(((t,e,n)=>Ct(l,t,c,e,n,r))),n.empty&&0==n.length&&Ct(l,0,c,0,0,r)}static eq(t,e,n=0,r){null==r&&(r=999999999);let i=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),s=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(i.length!=s.length)return!1;if(!i.length)return!0;let o=wt(i,s),a=new Mt(i,o,0).goto(n),l=new Mt(s,o,0).goto(n);for(;;){if(a.to!=l.to||!kt(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(t,e,n,r,i=-1){let s=new Mt(t,null,i).goto(e),o=e,a=s.openStart;for(;;){let t=Math.min(s.to,n);if(s.point){let n=s.activeForPoint(s.to),i=s.pointFrom<e?n.length+1:s.point.startSide<0?n.length:Math.min(n.length,a);r.point(o,t,s.point,n,i,s.pointRank),a=Math.min(s.openEnd(t),n.length)}else t>o&&(r.span(o,t,s.active,a),a=s.openEnd(t));if(s.to>n)return a+(s.point&&s.to>n?1:0);o=s.to,s.next()}}static of(t,e=!1){let n=new St;for(let r of t instanceof vt?[t]:e?function(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(bt(e,r)>0)return t.slice().sort(bt);e=r}return t}(t):t)n.add(r.from,r.to,r.value);return n.finish()}static join(t){if(!t.length)return xt.empty;let e=t[t.length-1];for(let n=t.length-2;n>=0;n--)for(let r=t[n];r!=xt.empty;r=r.nextLayer)e=new xt(r.chunkPos,r.chunk,e,Math.max(r.maxPoint,e.maxPoint));return e}}xt.empty=new xt([],[],null,-1),xt.empty.nextLayer=xt.empty;class St{finishChunk(t){this.chunks.push(new Tt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,n){this.addInner(t,e,n)||(this.nextLayer||(this.nextLayer=new St)).add(t,e,n)}addInner(t,e,n){let r=t-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(t-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0||(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=n,this.lastFrom=t,this.lastTo=e,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),0))}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let n=e.value.length-1;return this.last=e.value[n],this.lastFrom=e.from[n]+t,this.lastTo=e.to[n]+t,!0}finish(){return this.finishInner(xt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=xt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function wt(t,e,n){let r=new Map;for(let e of t)for(let t=0;t<e.chunk.length;t++)e.chunk[t].maxPoint<=0&&r.set(e.chunk[t],e.chunkPos[t]);let i=new Set;for(let t of e)for(let e=0;e<t.chunk.length;e++){let s=r.get(t.chunk[e]);null==s||(n?n.mapPos(s):s)!=t.chunkPos[e]||(null==n?void 0:n.touchesRange(s,s+t.chunk[e].length))||i.add(t.chunk[e])}return i}class Et{constructor(t,e,n,r=0){this.layer=t,this.skip=e,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(t,e,!1),this}gotoInner(t,e,n){for(;this.chunkIndex<this.layer.chunk.length;){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,!0);(!n||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(t,e){(this.to-t||this.endSide-e)<0&&this.gotoInner(t,e,!0)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex],n=t+e.from[this.rangeIndex];if(this.from=n,this.to=t+e.to[this.rangeIndex],this.value=e.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=t}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class At{constructor(t){this.heap=t}static from(t,e=null,n=-1){let r=[];for(let i=0;i<t.length;i++)for(let s=t[i];!s.isEmpty;s=s.nextLayer)s.maxPoint>=n&&r.push(new Et(s,e,n,i));return 1==r.length?r[0]:new At(r)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let n of this.heap)n.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Pt(this.heap,t);return this.next(),this}forward(t,e){for(let n of this.heap)n.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Pt(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Pt(this.heap,0)}}}function Pt(t,e){for(let n=t[e];;){let r=1+(e<<1);if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Mt{constructor(t,e,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=At.from(t,e,n)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){It(this.active,t),It(this.activeTo,t),It(this.activeRank,t),this.minActive=Nt(this.active,this.activeTo)}addActive(t){let e=0,{value:n,to:r,rank:i}=this.cursor;for(;e<this.activeRank.length&&(i-this.activeRank[e]||r-this.activeTo[e])>0;)e++;Ot(this.active,e,n),Ot(this.activeTo,e,r),Ot(this.activeRank,e,i),t&&Ot(t,e,this.cursor.from),this.minActive=Nt(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>t){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&It(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)){this.point=t,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=t.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}this.cursor.next()}else this.addActive(n),this.cursor.next()}}}if(n){this.openStart=0;for(let e=n.length-1;e>=0&&n[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let n=this.active.length-1;n>=0&&!(this.activeRank[n]<this.pointRank);n--)(this.activeTo[n]>t||this.activeTo[n]==t&&this.active[n].endSide>=this.point.endSide)&&e.push(this.active[n]);return e.reverse()}openEnd(t){let e=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>t;n--)e++;return e}}function Ct(t,e,n,r,i,s){t.goto(e),n.goto(r);let o=r+i,a=r,l=r-e;for(;;){let e=t.to+l-n.to,r=e||t.endSide-n.endSide,i=r<0?t.to+l:n.to,c=Math.min(i,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&kt(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(a,c,t.point,n.point):c>a&&!kt(t.active,n.active)&&s.compareRange(a,c,t.active,n.active),i>o)break;(e||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(i),a=i,r<=0&&t.next(),r>=0&&n.next()}}function kt(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function It(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function Ot(t,e,n){for(let n=t.length-1;n>=e;n--)t[n+1]=t[n];t[e]=n}function Nt(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function _t(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)9==t.charCodeAt(i)?(r+=e-r%e,i++):(r++,i=f(t,i));return r}function Dt(t,e,n,r){for(let r=0,i=0;;){if(i>=e)return r;if(r==t.length)break;i+=9==t.charCodeAt(r)?n-i%n:1,r=f(t,r)}return!0===r?-1:t.length}},38378:(t,e,n)=>{var r=n(26600),i=Set.prototype;t.exports={Set,add:r(i.add),has:r(i.has),remove:r(i.delete),proto:i}},38460:(t,e,n)=>{var r,i,s,o=n(11483),a=n(14852),l=n(51192),c=n(2269),u=n(25178),h=n(22521),p=n(17267),d=n(60047),f=n(26531),m=n(33088),y=n(35746),g=n(13185),v=n(90475),b=n(59887),T=n(83115),x=n(43960),S=n(84069),w=S.enforce,E=S.get,A=l.Int8Array,P=A&&A.prototype,M=l.Uint8ClampedArray,C=M&&M.prototype,k=A&&v(A),I=P&&v(P),O=Object.prototype,N=l.TypeError,_=T("toStringTag"),D=x("TYPED_ARRAY_TAG"),L="TypedArrayConstructor",B=o&&!!b&&"Opera"!==p(l.opera),R=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},j={BigInt64Array:8,BigUint64Array:8},U=function(t){var e=v(t);if(u(e)){var n=E(e);return n&&h(n,L)?n[L]:U(e)}},V=function(t){if(!u(t))return!1;var e=p(t);return h(F,e)||h(j,e)};for(r in F)(s=(i=l[r])&&i.prototype)?w(s)[L]=i:B=!1;for(r in j)(s=(i=l[r])&&i.prototype)&&(w(s)[L]=i);if((!B||!c(k)||k===Function.prototype)&&(k=function(){throw new N("Incorrect invocation")},B))for(r in F)l[r]&&b(l[r],k);if((!B||!I||I===O)&&(I=k.prototype,B))for(r in F)l[r]&&b(l[r].prototype,I);if(B&&v(C)!==I&&b(C,I),a&&!h(I,_))for(r in R=!0,y(I,_,{configurable:!0,get:function(){return u(this)?this[D]:void 0}}),F)l[r]&&f(l[r].prototype,D,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:R&&D,aTypedArray:function(t){if(V(t))return t;throw new N("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!b||g(k,t)))return t;throw new N(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,r){if(a){if(n)for(var i in F){var s=l[i];if(s&&h(s.prototype,t))try{delete s.prototype[t]}catch(n){try{s.prototype[t]=e}catch(t){}}}I[t]&&!n||m(I,t,n?e:B&&P[t]||e,r)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(a){if(b){if(n)for(r in F)if((i=l[r])&&h(i,t))try{delete i[t]}catch(t){}if(k[t]&&!n)return;try{return m(k,t,n?e:B&&k[t]||e)}catch(t){}}for(r in F)!(i=l[r])||i[t]&&!n||m(i,t,e)}},getTypedArrayConstructor:U,isView:function(t){if(!u(t))return!1;var e=p(t);return"DataView"===e||h(F,e)||h(j,e)},isTypedArray:V,TypedArray:k,TypedArrayPrototype:I}},38691:(t,e,n)=>{var r=n(1825),i=n(81673),s=n(50006);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(s)}},38834:(t,e,n)=>{var r=n(26600),i=n(2269),s=n(149),o=r(Function.toString);i(s.inspectSource)||(s.inspectSource=function(t){return o(t)}),t.exports=s.inspectSource},38875:(t,e,n)=>{var r=n(59767);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},38909:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},39561:(t,e,n)=>{var r=n(3527).Buffer,i=n(74325),s=n(50638),o=n(77871).ec,a=n(7642),l=n(66112),c=n(36646);function u(t,e,n,s){if((t=r.from(t.toArray())).length<e.byteLength()){var o=r.alloc(e.byteLength()-t.length);t=r.concat([o,t])}var a=n.length,l=function(t,e){t=(t=h(t,e)).mod(e);var n=r.from(t.toArray());if(n.length<e.byteLength()){var i=r.alloc(e.byteLength()-n.length);n=r.concat([i,n])}return n}(n,e),c=r.alloc(a);c.fill(1);var u=r.alloc(a);return u=i(s,u).update(c).update(r.from([0])).update(t).update(l).digest(),c=i(s,u).update(c).digest(),{k:u=i(s,u).update(c).update(r.from([1])).update(t).update(l).digest(),v:c=i(s,u).update(c).digest()}}function h(t,e){var n=new a(t),r=(t.length<<3)-e.bitLength();return r>0&&n.ishrn(r),n}function p(t,e,n){var s,o;do{for(s=r.alloc(0);8*s.length<t.bitLength();)e.v=i(n,e.k).update(e.v).digest(),s=r.concat([s,e.v]);o=h(s,t),e.k=i(n,e.k).update(e.v).update(r.from([0])).digest(),e.v=i(n,e.k).update(e.v).digest()}while(-1!==o.cmp(t));return o}function d(t,e,n,r){return t.toRed(a.mont(n)).redPow(e).fromRed().mod(r)}t.exports=function(t,e,n,i,f){var m=l(e);if(m.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var n=c[e.curve.join(".")];if(!n)throw new Error("unknown curve "+e.curve.join("."));var i=new o(n).keyFromPrivate(e.privateKey).sign(t);return r.from(i.toDER())}(t,m)}if("dsa"===m.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,n){for(var i,s=e.params.priv_key,o=e.params.p,l=e.params.q,c=e.params.g,f=new a(0),m=h(t,l).mod(l),y=!1,g=u(s,l,t,n);!1===y;)f=d(c,i=p(l,g,n),o,l),0===(y=i.invm(l).imul(m.add(s.mul(f))).mod(l)).cmpn(0)&&(y=!1,f=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var n=[48,t.length+e.length+4,2,t.length];return n=n.concat(t,[2,e.length],e),r.from(n)}(f,y)}(t,m,n)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");if(void 0!==e.padding&&1!==e.padding)throw new Error("illegal or unsupported padding mode");t=r.concat([f,t]);for(var y=m.modulus.byteLength(),g=[0,1];t.length+g.length+1<y;)g.push(255);g.push(0);for(var v=-1;++v<t.length;)g.push(t[v]);return s(g,m)},t.exports.getKey=u,t.exports.makeKey=p},39661:(t,e,n)=>{var r=n(34110).Buffer,i=n(14669);function s(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=r.concat([t._cache,s(t)]);var n=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,n)}},39664:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){t+="";let e="";for(const n of t)e+=(0,i.isIdentifierChar)(n.codePointAt(0))?n:"-";return e=e.replace(/^[-0-9]+/,""),e=e.replace(/[-\s]+(.)?/g,(function(t,e){return e?e.toUpperCase():""})),(0,r.default)(e)||(e=`_${e}`),e||"_"};var r=n(67583),i=n(32960)},40372:(t,e,n)=>{var r=n(37400),i=n(80421),s=n(95167),o=n(60047),a=n(2073),l=n(5550),c=n(13185),u=n(49561),h=n(71147),p=n(11867),d=TypeError,f=function(t,e){this.stopped=t,this.result=e},m=f.prototype;t.exports=function(t,e,n){var y,g,v,b,T,x,S,w=n&&n.that,E=!(!n||!n.AS_ENTRIES),A=!(!n||!n.IS_RECORD),P=!(!n||!n.IS_ITERATOR),M=!(!n||!n.INTERRUPTED),C=r(e,w),k=function(t){var e=y;return y=void 0,e&&p(e,"normal"),new f(!0,t)},I=function(t){return E?(s(t),M?C(t[0],t[1],k):C(t[0],t[1])):M?C(t,k):C(t)};if(A)y=t.iterator;else if(P)y=t;else{if(!(g=h(t)))throw new d(o(t)+" is not iterable");if(a(g)){for(v=0,b=l(t);b>v;v++)if((T=I(t[v]))&&c(m,T))return T;return new f(!1)}y=u(t,g)}for(x=A?t.next:y.next;!(S=i(x,y)).done;){var O=S.value;try{T=I(O)}catch(t){if(!y)throw t;p(y,"throw",t)}if("object"==typeof T&&T&&c(m,T))return T}return new f(!1)}},41100:(t,e,n)=>{var r=n(26600),i=n(22521),s=n(43469),o=n(29113).indexOf,a=n(25965),l=r([].push);t.exports=function(t,e){var n,r=s(t),c=0,u=[];for(n in r)!i(a,n)&&i(r,n)&&l(u,n);for(;e.length>c;)i(r,n=e[c++])&&(~o(u,n)||l(u,n));return u}},41413:(t,e,n)=>{var r=n(79889);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},41652:(t,e,n)=>{var r=n(23486),i=n(62837),s=n(71755),o=s.get,a=s.has,l=s.set;r({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var n,r,s=i(this);return a(s,t)?(n=o(s,t),"update"in e&&(n=e.update(n,t,s),l(s,t,n)),n):(r=e.insert(t,s),l(s,t,r),r)}})},42190:(t,e,n)=>{t.exports=o;var r=n(8290),i=Object.create(n(22956));function s(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);r.call(this,t),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){l(t,e,n)})):l(this,null,null)}function l(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(46324),i.inherits(o,r),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},o.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},42191:(t,e,n)=>{var r=n(17267);t.exports=function(t){var e=r(t);return"BigInt64Array"===e||"BigUint64Array"===e}},42193:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e=t.key||t.property){return!t.computed&&(0,r.isIdentifier)(e)&&(e=(0,i.stringLiteral)(e.name)),e};var r=n(66360),i=n(53287)},42319:(t,e,n)=>{var r=n(23486),i=n(84538),s=n(88087);r({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=s(i(this),(function(e,n){if(e===t)return{key:n}}),!0);return e&&e.key}})},42399:(t,e,n)=>{var r=n(33088);t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},42417:(t,e,n)=>{var r=n(3527).Buffer,i=n(14669);function s(t,e,n){var s=e.length,o=i(e,t._cache);return t._cache=t._cache.slice(s),t._prev=r.concat([t._prev,n?e:o]),o}e.encrypt=function(t,e,n){for(var i,o=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){o=r.concat([o,s(t,e,n)]);break}i=t._cache.length,o=r.concat([o,s(t,e.slice(0,i),n)]),e=e.slice(i)}return o}},42426:(t,e,n)=>{var r=n(26600),i=n(9106);t.exports=function(t,e,n){try{return r(i(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},42582:(t,e,n)=>{var r=n(14669);e.encrypt=function(t,e){var n=r(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return r(i,n)}},42665:(t,e,n)=>{var r=n(149);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},43092:(t,e,n)=>{var r=n(22521),i=n(23183),s=n(1483),o=n(24377);t.exports=function(t,e,n){for(var a=i(e),l=o.f,c=s.f,u=0;u<a.length;u++){var h=a[u];r(t,h)||n&&r(n,h)||l(t,h,c(e,h))}}},43149:(t,e,n)=>{var r=n(51192),i=n(1545);t.exports=function(t){if(i){try{return r.process.getBuiltinModule(t)}catch(t){}try{return Function('return require("'+t+'")')()}catch(t){}}}},43469:(t,e,n)=>{var r=n(24215),i=n(10638);t.exports=function(t){return r(i(t))}},43748:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TSAnyKeyword=function(){this.word("any")},e.TSArrayType=function(t){this.print(t.elementType,!0),this.tokenChar(91),this.tokenChar(93)},e.TSAsExpression=function(t){const{expression:e,typeAnnotation:n}=t;this.print(e,!0),this.space(),this.word("as"),this.space(),this.print(n)},e.TSBigIntKeyword=function(){this.word("bigint")},e.TSBooleanKeyword=function(){this.word("boolean")},e.TSCallSignatureDeclaration=function(t){p.call(this,t),o(this,t)},e.TSInterfaceHeritage=e.TSClassImplements=function(t){this.print(t.expression),this.print(t.typeArguments)},e.TSConditionalType=function(t){this.print(t.checkType),this.space(),this.word("extends"),this.space(),this.print(t.extendsType),this.space(),this.tokenChar(63),this.space(),this.print(t.trueType),this.space(),this.tokenChar(58),this.space(),this.print(t.falseType)},e.TSConstructSignatureDeclaration=function(t){this.word("new"),this.space(),p.call(this,t),o(this,t)},e.TSConstructorType=function(t){t.abstract&&(this.word("abstract"),this.space()),this.word("new"),this.space(),l.call(this,t)},e.TSDeclareFunction=function(t,e){t.declare&&(this.word("declare"),this.space()),r._functionHead.call(this,t,e,!1),this.semicolon()},e.TSDeclareMethod=function(t){i._classMethodHead.call(this,t),this.semicolon()},e.TSEnumBody=h,e.TSEnumDeclaration=function(t){const{declare:e,const:n,id:r}=t;e&&(this.word("declare"),this.space()),n&&(this.word("const"),this.space()),this.word("enum"),this.space(),this.print(r),this.space(),h.call(this,t)},e.TSEnumMember=function(t){const{id:e,initializer:n}=t;this.print(e),n&&(this.space(),this.tokenChar(61),this.space(),this.print(n))},e.TSExportAssignment=function(t){this.word("export"),this.space(),this.tokenChar(61),this.space(),this.print(t.expression),this.semicolon()},e.TSExternalModuleReference=function(t){this.token("require("),this.print(t.expression),this.tokenChar(41)},e.TSFunctionType=function(t){l.call(this,t)},e.TSImportEqualsDeclaration=function(t){const{id:e,moduleReference:n}=t;t.isExport&&(this.word("export"),this.space()),this.word("import"),this.space(),this.print(e),this.space(),this.tokenChar(61),this.space(),this.print(n),this.semicolon()},e.TSImportType=function(t){const{qualifier:e,options:n}=t;this.word("import"),this.tokenChar(40),this.print(t.argument),n&&(this.tokenChar(44),this.print(n)),this.tokenChar(41),e&&(this.tokenChar(46),this.print(e));const r=t.typeParameters;r&&this.print(r)},e.TSIndexSignature=function(t){const{readonly:e,static:n}=t;n&&(this.word("static"),this.space()),e&&(this.word("readonly"),this.space()),this.tokenChar(91),r._parameters.call(this,t.parameters,93),this.print(t.typeAnnotation),o(this,t)},e.TSIndexedAccessType=function(t){this.print(t.objectType,!0),this.tokenChar(91),this.print(t.indexType),this.tokenChar(93)},e.TSInferType=function(t){this.word("infer"),this.print(t.typeParameter)},e.TSInstantiationExpression=function(t){this.print(t.expression),this.print(t.typeParameters)},e.TSInterfaceBody=function(t){d(this,t,(()=>this.printJoin(t.body,!0,!0,void 0,void 0,!0)))},e.TSInterfaceDeclaration=function(t){const{declare:e,id:n,typeParameters:r,extends:i,body:s}=t;e&&(this.word("declare"),this.space()),this.word("interface"),this.space(),this.print(n),this.print(r),null!=i&&i.length&&(this.space(),this.word("extends"),this.space(),this.printList(i)),this.space(),this.print(s)},e.TSIntersectionType=function(t){c(this,t,"&")},e.TSIntrinsicKeyword=function(){this.word("intrinsic")},e.TSLiteralType=function(t){this.print(t.literal)},e.TSMappedType=function(t){const{nameType:e,optional:n,readonly:r,typeAnnotation:i}=t;this.tokenChar(123);const s=this.enterDelimited();this.space(),r&&(u(this,r),this.word("readonly"),this.space()),this.tokenChar(91),this.word(t.typeParameter.name),this.space(),this.word("in"),this.space(),this.print(t.typeParameter.constraint,void 0,!0),e&&(this.space(),this.word("as"),this.space(),this.print(e,void 0,!0)),this.tokenChar(93),n&&(u(this,n),this.tokenChar(63)),i&&(this.tokenChar(58),this.space(),this.print(i,void 0,!0)),this.space(),this._noLineTerminatorAfterNode=s,this.tokenChar(125)},e.TSMethodSignature=function(t){const{kind:e}=t;"set"!==e&&"get"!==e||(this.word(e),this.space()),a.call(this,t),p.call(this,t),o(this,t)},e.TSModuleBlock=function(t){d(this,t,(()=>this.printSequence(t.body,!0,!0)))},e.TSModuleDeclaration=function(t){const{declare:e,id:n,kind:r}=t;if(e&&(this.word("declare"),this.space()),t.global||(this.word(null!=r?r:"Identifier"===n.type?"namespace":"module"),this.space()),this.print(n),!t.body)return void this.semicolon();let i=t.body;for(;"TSModuleDeclaration"===i.type;)this.tokenChar(46),this.print(i.id),i=i.body;this.space(),this.print(i)},e.TSNamedTupleMember=function(t){this.print(t.label),t.optional&&this.tokenChar(63),this.tokenChar(58),this.space(),this.print(t.elementType)},e.TSNamespaceExportDeclaration=function(t){this.word("export"),this.space(),this.word("as"),this.space(),this.word("namespace"),this.space(),this.print(t.id),this.semicolon()},e.TSNeverKeyword=function(){this.word("never")},e.TSNonNullExpression=function(t){this.print(t.expression),this.tokenChar(33),this.setLastChar(33)},e.TSNullKeyword=function(){this.word("null")},e.TSNumberKeyword=function(){this.word("number")},e.TSObjectKeyword=function(){this.word("object")},e.TSOptionalType=function(t){this.print(t.typeAnnotation),this.tokenChar(63)},e.TSParameterProperty=function(t){t.accessibility&&(this.word(t.accessibility),this.space()),t.readonly&&(this.word("readonly"),this.space()),r._param.call(this,t.parameter)},e.TSParenthesizedType=function(t){this.tokenChar(40),this.print(t.typeAnnotation),this.tokenChar(41)},e.TSPropertySignature=function(t){const{readonly:e}=t;e&&(this.word("readonly"),this.space()),a.call(this,t),this.print(t.typeAnnotation),o(this,t)},e.TSQualifiedName=function(t){this.print(t.left),this.tokenChar(46),this.print(t.right)},e.TSRestType=function(t){this.token("..."),this.print(t.typeAnnotation)},e.TSSatisfiesExpression=function(t){const{expression:e,typeAnnotation:n}=t;this.print(e,!0),this.space(),this.word("satisfies"),this.space(),this.print(n)},e.TSStringKeyword=function(){this.word("string")},e.TSSymbolKeyword=function(){this.word("symbol")},e.TSTemplateLiteralType=function(t){s._printTemplate.call(this,t,t.types)},e.TSThisType=function(){this.word("this")},e.TSTupleType=function(t){this.tokenChar(91),this.printList(t.elementTypes,this.shouldPrintTrailingComma("]")),this.tokenChar(93)},e.TSTypeAliasDeclaration=function(t){const{declare:e,id:n,typeParameters:r,typeAnnotation:i}=t;e&&(this.word("declare"),this.space()),this.word("type"),this.space(),this.print(n),this.print(r),this.space(),this.tokenChar(61),this.space(),this.print(i),this.semicolon()},e.TSTypeAnnotation=function(t,e){this.token("TSFunctionType"!==e.type&&"TSConstructorType"!==e.type||e.typeAnnotation!==t?":":"=>"),this.space(),t.optional&&this.tokenChar(63),this.print(t.typeAnnotation)},e.TSTypeAssertion=function(t){const{typeAnnotation:e,expression:n}=t;this.tokenChar(60),this.print(e),this.tokenChar(62),this.space(),this.print(n)},e.TSTypeLiteral=function(t){d(this,t,(()=>this.printJoin(t.members,!0,!0,void 0,void 0,!0)))},e.TSTypeOperator=function(t){this.word(t.operator),this.space(),this.print(t.typeAnnotation)},e.TSTypeParameter=function(t){t.const&&(this.word("const"),this.space()),t.in&&(this.word("in"),this.space()),t.out&&(this.word("out"),this.space()),this.word(t.name),t.constraint&&(this.space(),this.word("extends"),this.space(),this.print(t.constraint)),t.default&&(this.space(),this.tokenChar(61),this.space(),this.print(t.default))},e.TSTypeParameterDeclaration=e.TSTypeParameterInstantiation=function(t,e){this.tokenChar(60);let n="ArrowFunctionExpression"===e.type&&1===t.params.length;this.tokenMap&&null!=t.start&&null!=t.end&&(n&&(n=!!this.tokenMap.find(t,(t=>this.tokenMap.matchesOriginal(t,",")))),n||(n=this.shouldPrintTrailingComma(">"))),this.printList(t.params,n),this.tokenChar(62)},e.TSTypePredicate=function(t){t.asserts&&(this.word("asserts"),this.space()),this.print(t.parameterName),t.typeAnnotation&&(this.space(),this.word("is"),this.space(),this.print(t.typeAnnotation.typeAnnotation))},e.TSTypeQuery=function(t){this.word("typeof"),this.space(),this.print(t.exprName);const e=t.typeParameters;e&&this.print(e)},e.TSTypeReference=function(t){const e=t.typeParameters;this.print(t.typeName,!!e),this.print(e)},e.TSUndefinedKeyword=function(){this.word("undefined")},e.TSUnionType=function(t){c(this,t,"|")},e.TSUnknownKeyword=function(){this.word("unknown")},e.TSVoidKeyword=function(){this.word("void")},e._tsPrintClassMemberModifiers=function(t){const e="ClassPrivateProperty"===t.type,n="ClassAccessorProperty"===t.type||"ClassProperty"===t.type;f(this,t,[n&&t.declare&&"declare",!e&&t.accessibility]),t.static&&(this.word("static"),this.space()),f(this,t,[!e&&t.abstract&&"abstract",!e&&t.override&&"override",(n||e)&&t.readonly&&"readonly"])};var r=n(32917),i=n(83895),s=n(91418);function o(t,e){t.tokenMap&&e.start&&e.end?t.tokenMap.endMatches(e,",")?t.token(","):t.tokenMap.endMatches(e,";")&&t.semicolon():t.semicolon()}function a(t){t.computed&&this.tokenChar(91),this.print(t.key),t.computed&&this.tokenChar(93),t.optional&&this.tokenChar(63)}function l(t){const{typeParameters:e}=t,n=t.parameters;this.print(e),this.tokenChar(40),r._parameters.call(this,n,41),this.space();const i=t.typeAnnotation;this.print(i)}function c(t,e,n){var r;let i=0;null!=(r=t.tokenMap)&&r.startMatches(e,n)&&(i=1,t.token(n)),t.printJoin(e.types,void 0,void 0,(function(t){this.space(),this.token(n,void 0,t+i),this.space()}))}function u(t,e){!0!==e&&t.token(e)}function h(t){d(this,t,(()=>{var e;return this.printList(t.members,null==(e=this.shouldPrintTrailingComma("}"))||e,!0,!0,void 0,!0)}))}function p(t){const{typeParameters:e}=t,n=t.parameters;this.print(e),this.tokenChar(40),r._parameters.call(this,n,41);const i=t.typeAnnotation;this.print(i)}function d(t,e,n){t.token("{");const r=t.enterDelimited();n(),t._noLineTerminatorAfterNode=r,t.rightBrace(e)}function f(t,e,n){var r;const i=new Set;for(const t of n)t&&i.add(t);null==(r=t.tokenMap)||r.find(e,(e=>!!i.has(e.value)&&(t.token(e.value),t.space(),i.delete(e.value),0===i.size)));for(const e of i)t.word(e),t.space()}},43960:(t,e,n)=>{var r=n(26600),i=0,s=Math.random(),o=r(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+o(++i+s,36)}},45385:(t,e,n)=>{var r=n(14852),i=n(62198),s=n(24377),o=n(95167),a=n(43469),l=n(68200);e.f=r&&!i?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),i=l(e),c=i.length,u=0;c>u;)s.f(t,n=i[u++],r[n]);return t}},45487:(t,e,n)=>{var r=n(26600),i=n(1811),s=n(22503),o=n(10638),a=r("".charAt),l=r("".charCodeAt),c=r("".slice),u=function(t){return function(e,n){var r,u,h=s(o(e)),p=i(n),d=h.length;return p<0||p>=d?t?"":void 0:(r=l(h,p))<55296||r>56319||p+1===d||(u=l(h,p+1))<56320||u>57343?t?a(h,p):r:t?c(h,p,p+2):u-56320+(r-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},45602:(t,e,n)=>{var r=n(23486),i=n(71853),s=n(73357);r({target:"Array",proto:!0},{group:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),s("group")},45632:(t,e,n)=>{var r=n(38378).has;t.exports=function(t){return r(t),t}},46190:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ExportAllDeclaration=function(t){var e,n;this.word("export"),this.space(),"type"===t.exportKind&&(this.word("type"),this.space()),this.tokenChar(42),this.space(),this.word("from"),this.space(),null!=(e=t.attributes)&&e.length||null!=(n=t.assertions)&&n.length?(this.print(t.source,!0),this.space(),d.call(this,t,!1)):this.print(t.source),this.semicolon()},e.ExportDefaultDeclaration=function(t){f(this,t),this.word("export"),this.noIndentInnerCommentsHere(),this.space(),this.word("default"),this.space(),this.tokenContext|=i.TokenContext.exportDefault;const e=t.declaration;this.print(e),h(e)||this.semicolon()},e.ExportDefaultSpecifier=function(t){this.print(t.exported)},e.ExportNamedDeclaration=function(t){if(f(this,t),this.word("export"),this.space(),t.declaration){const e=t.declaration;this.print(e),h(e)||this.semicolon()}else{"type"===t.exportKind&&(this.word("type"),this.space());const r=t.specifiers.slice(0);let i=!1;for(;;){const t=r[0];if(!a(t)&&!l(t))break;i=!0,this.print(r.shift()),r.length&&(this.tokenChar(44),this.space())}let s=!1;var e,n;(r.length||!r.length&&!i)&&(s=!0,this.tokenChar(123),r.length&&(this.space(),this.printList(r,this.shouldPrintTrailingComma("}")),this.space()),this.tokenChar(125)),t.source&&(this.space(),this.word("from"),this.space(),null!=(e=t.attributes)&&e.length||null!=(n=t.assertions)&&n.length?(this.print(t.source,!0),this.space(),d.call(this,t,s)):this.print(t.source)),this.semicolon()}},e.ExportNamespaceSpecifier=function(t){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(t.exported)},e.ExportSpecifier=function(t){"type"===t.exportKind&&(this.word("type"),this.space()),this.print(t.local),t.exported&&t.local.name!==t.exported.name&&(this.space(),this.word("as"),this.space(),this.print(t.exported))},e.ImportAttribute=function(t){this.print(t.key),this.tokenChar(58),this.space(),this.print(t.value)},e.ImportDeclaration=function(t){var e,n;this.word("import"),this.space();const r="type"===t.importKind||"typeof"===t.importKind;r?(this.noIndentInnerCommentsHere(),this.word(t.importKind),this.space()):t.module?(this.noIndentInnerCommentsHere(),this.word("module"),this.space()):t.phase&&(this.noIndentInnerCommentsHere(),this.word(t.phase),this.space());const i=t.specifiers.slice(0),s=!!i.length;for(;s;){const t=i[0];if(!c(t)&&!u(t))break;this.print(i.shift()),i.length&&(this.tokenChar(44),this.space())}let o=!1;i.length?(o=!0,this.tokenChar(123),this.space(),this.printList(i,this.shouldPrintTrailingComma("}")),this.space(),this.tokenChar(125)):r&&!s&&(o=!0,this.tokenChar(123),this.tokenChar(125)),(s||r)&&(this.space(),this.word("from"),this.space()),null!=(e=t.attributes)&&e.length||null!=(n=t.assertions)&&n.length?(this.print(t.source,!0),this.space(),d.call(this,t,o)):this.print(t.source),this.semicolon()},e.ImportDefaultSpecifier=function(t){this.print(t.local)},e.ImportExpression=function(t){this.word("import"),t.phase&&(this.tokenChar(46),this.word(t.phase)),this.tokenChar(40);const e=this.shouldPrintTrailingComma(")");this.print(t.source),null!=t.options&&(this.tokenChar(44),this.space(),this.print(t.options)),e&&this.tokenChar(44),this.rightParens(t)},e.ImportNamespaceSpecifier=function(t){this.tokenChar(42),this.space(),this.word("as"),this.space(),this.print(t.local)},e.ImportSpecifier=function(t){"type"!==t.importKind&&"typeof"!==t.importKind||(this.word(t.importKind),this.space()),this.print(t.imported),t.local&&t.local.name!==t.imported.name&&(this.space(),this.word("as"),this.space(),this.print(t.local))},e._printAttributes=d;var r=n(56872),i=n(91317),s=n(69551);const{isClassDeclaration:o,isExportDefaultSpecifier:a,isExportNamespaceSpecifier:l,isImportDefaultSpecifier:c,isImportNamespaceSpecifier:u,isStatement:h}=r;let p=!1;function d(t,e){var n;const{attributes:r}=t;var{assertions:i}=t;const{importAttributesKeyword:s}=this.format;r&&!s&&t.extra&&(t.extra.deprecatedAssertSyntax||t.extra.deprecatedWithLegacySyntax)&&!p&&(p=!0,console.warn('You are using import attributes, without specifying the desired output syntax.\nPlease specify the "importAttributesKeyword" generator option, whose value can be one of:\n - "with" : `import { a } from "b" with { type: "json" };`\n - "assert" : `import { a } from "b" assert { type: "json" };`\n - "with-legacy" : `import { a } from "b" with type: "json";`\n'));const o="assert"===s||!s&&i;if(this.word(o?"assert":"with"),this.space(),!o&&("with-legacy"===s||!s&&null!=(n=t.extra)&&n.deprecatedWithLegacySyntax))return void this.printList(r||i);const a=e?1:0;this.token("{",void 0,a),this.space(),this.printList(r||i,this.shouldPrintTrailingComma("}")),this.space(),this.token("}",void 0,a)}function f(t,e){o(e.declaration)&&s._shouldPrintDecoratorsBeforeExport.call(t,e)&&t.printJoin(e.declaration.decorators)}},46948:(t,e,n)=>{var r=n(23486),i=n(51192),s=n(13185),o=n(90475),a=n(59887),l=n(43092),c=n(76128),u=n(26531),h=n(21804),p=n(93859),d=n(75763),f=n(83115),m=n(59767),y=n(86115),g=i.SuppressedError,v=f("toStringTag"),b=Error,T=!!g&&3!==g.length,x=!!g&&m((function(){return 4===new g(1,2,3,{cause:4}).cause})),S=T||x,w=function(t,e,n){var r,i=s(E,this);return a?r=!S||i&&o(this)!==E?a(new b,i?o(this):E):new g:(r=i?this:c(E),u(r,v,"Error")),void 0!==n&&u(r,"message",d(n)),p(r,w,r.stack,1),u(r,"error",t),u(r,"suppressed",e),r};a?a(w,b):l(w,b,{name:!0});var E=w.prototype=S?g.prototype:c(b.prototype,{constructor:h(1,w),message:h(1,""),name:h(1,"SuppressedError")});S&&!y&&(E.constructor=w),r({global:!0,constructor:!0,arity:3,forced:S},{SuppressedError:w})},47267:(t,e,n)=>{var r=n(26600),i=n(59767),s=n(2269),o=n(22521),a=n(14852),l=n(85302).CONFIGURABLE,c=n(38834),u=n(84069),h=u.enforce,p=u.get,d=String,f=Object.defineProperty,m=r("".slice),y=r("".replace),g=r([].join),v=a&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),T=t.exports=function(t,e,n){"Symbol("===m(d(e),0,7)&&(e="["+y(d(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!o(t,"name")||l&&t.name!==e)&&(a?f(t,"name",{value:e,configurable:!0}):t.name=e),v&&n&&o(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?a&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var r=h(t);return o(r,"source")||(r.source=g(b,"string"==typeof e?e:"")),t};Function.prototype.toString=T((function(){return s(this)&&p(this).source||c(this)}),"toString")},49043:(t,e,n)=>{(e=t.exports=n(50272)).Stream=e,e.Readable=e,e.Writable=n(97344),e.Duplex=n(8290),e.Transform=n(42190),e.PassThrough=n(84708)},49059:(t,e,n)=>{var r=n(17267),i=n(22521),s=n(64813),o=n(83115),a=n(55317),l=o("iterator"),c=Object;t.exports=function(t){if(s(t))return!1;var e=c(t);return void 0!==e[l]||"@@iterator"in e||i(a,r(e))}},49421:(t,e,n)=>{var r=n(10638),i=Object;t.exports=function(t){return i(r(t))}},49561:(t,e,n)=>{var r=n(80421),i=n(9106),s=n(95167),o=n(60047),a=n(71147),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(i(n))return s(r(n,t));throw new l(o(t)+" is not iterable")}},49589:(t,e,n)=>{var r=n(14852),i=n(59767),s=n(37903);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},49625:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"ALIAS_KEYS",{enumerable:!0,get:function(){return r.ALIAS_KEYS}}),Object.defineProperty(e,"BUILDER_KEYS",{enumerable:!0,get:function(){return r.BUILDER_KEYS}}),Object.defineProperty(e,"DEPRECATED_ALIASES",{enumerable:!0,get:function(){return s.DEPRECATED_ALIASES}}),Object.defineProperty(e,"DEPRECATED_KEYS",{enumerable:!0,get:function(){return r.DEPRECATED_KEYS}}),Object.defineProperty(e,"FLIPPED_ALIAS_KEYS",{enumerable:!0,get:function(){return r.FLIPPED_ALIAS_KEYS}}),Object.defineProperty(e,"NODE_FIELDS",{enumerable:!0,get:function(){return r.NODE_FIELDS}}),Object.defineProperty(e,"NODE_PARENT_VALIDATIONS",{enumerable:!0,get:function(){return r.NODE_PARENT_VALIDATIONS}}),Object.defineProperty(e,"NODE_UNION_SHAPES__PRIVATE",{enumerable:!0,get:function(){return r.NODE_UNION_SHAPES__PRIVATE}}),Object.defineProperty(e,"PLACEHOLDERS",{enumerable:!0,get:function(){return i.PLACEHOLDERS}}),Object.defineProperty(e,"PLACEHOLDERS_ALIAS",{enumerable:!0,get:function(){return i.PLACEHOLDERS_ALIAS}}),Object.defineProperty(e,"PLACEHOLDERS_FLIPPED_ALIAS",{enumerable:!0,get:function(){return i.PLACEHOLDERS_FLIPPED_ALIAS}}),e.TYPES=void 0,Object.defineProperty(e,"VISITOR_KEYS",{enumerable:!0,get:function(){return r.VISITOR_KEYS}}),n(15166),n(87649),n(53216),n(71581),n(13679),n(69442);var r=n(6708),i=n(81883),s=n(31377);Object.keys(s.DEPRECATED_ALIASES).forEach((t=>{r.FLIPPED_ALIAS_KEYS[t]=r.FLIPPED_ALIAS_KEYS[s.DEPRECATED_ALIASES[t]]}));for(const{types:t,set:e}of r.allExpandedTypes)for(const n of t){const t=r.FLIPPED_ALIAS_KEYS[n];t?t.forEach(e.add,e):e.add(n)}e.TYPES=[].concat(Object.keys(r.VISITOR_KEYS),Object.keys(r.FLIPPED_ALIAS_KEYS),Object.keys(r.DEPRECATED_KEYS))},49645:(t,e,n)=>{var r=n(66599),i=n(83973),s=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&s(t,".prototype.")>-1?i(n):n}},49743:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(45632),o=n(27293);r({target:"Set",proto:!0,real:!0,forced:!0},{every:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0);return!1!==o(e,(function(t){if(!n(t,t,e))return!1}),!0)}})},50006:t=>{t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},50272:(t,e,n)=>{var r=n(15088).process,i=n(83843);t.exports=b;var s,o=n(45736);b.ReadableState=v,n(4580).EventEmitter;var a=function(t,e){return t.listeners(e).length},l=n(81085),c=n(12006).Buffer,u=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},h=Object.create(n(22956));h.inherits=n(46324);var p=n(13390),d=void 0;d=p&&p.debuglog?p.debuglog("stream"):function(){};var f,m=n(53186),y=n(31020);h.inherits(b,l);var g=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(s=s||n(8290));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(f||(f=n(7313).I),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function b(t){if(s=s||n(8290),!(this instanceof b))return new b(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),l.call(this)}function T(t,e,n,r,i){var s,o=t._readableState;return null===e?(o.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,E(t)}}(t,o)):(i||(s=function(t,e){var n,r;return r=e,c.isBuffer(r)||r instanceof u||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}(o,e)),s?t.emit("error",s):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):x(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?x(t,o,e,!1):P(t,o)):x(t,o,e,!1))):r||(o.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function x(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&E(t)),P(t,e)}Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),b.prototype.destroy=y.destroy,b.prototype._undestroy=y.undestroy,b.prototype._destroy=function(t,e){this.push(null),e(t)},b.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=c.from(t,e),e=""),n=!0),T(this,t,e,!1,n)},b.prototype.unshift=function(t){return T(this,t,null,!0,!1)},b.prototype.isPaused=function(){return!1===this._readableState.flowing},b.prototype.setEncoding=function(t){return f||(f=n(7313).I),this._readableState.decoder=new f(t),this._readableState.encoding=t,this};var S=8388608;function w(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=S?t=S:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(A,t):A(t))}function A(t){d("emit readable"),t.emit("readable"),I(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(M,t,e))}function M(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function C(t){d("readable nexttick read 0"),t.read(0)}function k(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;return t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;for(t-=i.length;n=n.next;){var s=n.data,o=t>s.length?s.length:t;if(o===s.length?i+=s:i+=s.slice(0,t),0==(t-=o)){o===s.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=s.slice(o));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;for(r.data.copy(n),t-=r.data.length;r=r.next;){var s=r.data,o=t>s.length?s.length:t;if(s.copy(n,n.length-t,0,o),0==(t-=o)){o===s.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=s.slice(o));break}++i}return e.length-=i,n}(t,e),r}(t,e.buffer,e.decoder),n);var n}function N(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(_,e,t))}function _(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}b.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):E(this),null;if(0===(t=w(t,e))&&e.ended)return 0===e.length&&N(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=w(n,e))),null===(r=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&N(this)),null!==r&&this.emit("data",r),r},b.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(t,e){var n=this,s=this._readableState;switch(s.pipesCount){case 0:s.pipes=t;break;case 1:s.pipes=[s.pipes,t];break;default:s.pipes.push(t)}s.pipesCount+=1,d("pipe count=%d opts=%j",s.pipesCount,e);var l=e&&!1===e.end||t===r.stdout||t===r.stderr?v:c;function c(){d("onend"),t.end()}s.endEmitted?i.nextTick(l):n.once("end",l),t.on("unpipe",(function e(r,i){d("onunpipe"),r===n&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),t.removeListener("close",y),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",m),t.removeListener("unpipe",e),n.removeListener("end",c),n.removeListener("end",v),n.removeListener("data",f),h=!0,!s.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}));var u=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,I(t))}}(n);t.on("drain",u);var h=!1,p=!1;function f(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===s.pipesCount&&s.pipes===t||s.pipesCount>1&&-1!==D(s.pipes,t))&&!h&&(d("false write response, pause",s.awaitDrain),s.awaitDrain++,p=!0),n.pause())}function m(e){d("onerror",e),v(),t.removeListener("error",m),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",g),v()}function g(){d("onfinish"),t.removeListener("close",y),v()}function v(){d("unpipe"),n.unpipe(t)}return n.on("data",f),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",m),t.once("close",y),t.once("finish",g),t.emit("pipe",n),s.flowing||(d("pipe resume"),n.resume()),t},b.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<i;s++)r[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=D(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n)),this},b.prototype.on=function(t,e){var n=l.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):i.nextTick(C,this))}return n},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(k,t,e))}(this,t)),this},b.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(d("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){d("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<g.length;s++)t.on(g[s],this.emit.bind(this,g[s]));return this._read=function(e){d("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=O},50638:(t,e,n)=>{var r=n(34110).Buffer,i=n(7642),s=n(51843);function o(t){var e,n=t.modulus.byteLength();do{e=new i(s(n))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var n=function(t){var e=o(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),s=e.modulus.byteLength(),a=new i(t).mul(n.blinder).umod(e.modulus),l=a.toRed(i.mont(e.prime1)),c=a.toRed(i.mont(e.prime2)),u=e.coefficient,h=e.prime1,p=e.prime2,d=l.redPow(e.exponent1).fromRed(),f=c.redPow(e.exponent2).fromRed(),m=d.isub(f).imul(u).umod(h).imul(p);return f.iadd(m).imul(n.unblinder).umod(e.modulus).toArrayLike(r,"be",s)}a.getr=o,t.exports=a},50852:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return!!t&&/^[a-z]/.test(t)}},51089:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.buildUndefinedNode=function(){return(0,r.unaryExpression)("void",(0,r.numericLiteral)(0),!0)};var r=n(53287)},51192:function(t,e,n){var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},51615:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(88087);r({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=o(e,(function(t,r){if(n(t,r,e))return{value:t}}),!0);return r&&r.value}})},51618:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMap=void 0;var r=n(56872);const{traverseFast:i,VISITOR_KEYS:s}=r;e.TokenMap=class{constructor(t,e,n){this._tokens=void 0,this._source=void 0,this._nodesToTokenIndexes=new Map,this._nodesOccurrencesCountCache=new Map,this._tokensCache=new Map,this._tokens=e,this._source=n,i(t,(t=>{const e=this._getTokensIndexesOfNode(t);e.length>0&&this._nodesToTokenIndexes.set(t,e)})),this._tokensCache.clear()}has(t){return this._nodesToTokenIndexes.has(t)}getIndexes(t){return this._nodesToTokenIndexes.get(t)}find(t,e){const n=this._nodesToTokenIndexes.get(t);if(n)for(let t=0;t<n.length;t++){const r=n[t],i=this._tokens[r];if(e(i,r))return i}return null}findLastIndex(t,e){const n=this._nodesToTokenIndexes.get(t);if(n)for(let t=n.length-1;t>=0;t--){const r=n[t];if(e(this._tokens[r],r))return r}return-1}findMatching(t,e,n=0){const r=this._nodesToTokenIndexes.get(t);if(r){"number"==typeof e&&(e=String.fromCharCode(e));let i=0;const s=n;if(s>1){const r=this._nodesOccurrencesCountCache.get(t);(null==r?void 0:r.test)===e&&r.count<s&&(i=r.i+1,n-=r.count+1)}for(;i<r.length;i++){const o=this._tokens[r[i]];if(this.matchesOriginal(o,e)){if(0===n)return s>0&&this._nodesOccurrencesCountCache.set(t,{test:e,count:s,i}),o;n--}}}return null}matchesOriginal(t,e){return t.end-t.start===e.length&&(null!=t.value?t.value===e:this._source.startsWith(e,t.start))}startMatches(t,e){const n=this._nodesToTokenIndexes.get(t);if(!n)return!1;const r=this._tokens[n[0]];return r.start===t.start&&this.matchesOriginal(r,e)}endMatches(t,e){const n=this._nodesToTokenIndexes.get(t);if(!n)return!1;const r=this._tokens[n[n.length-1]];return r.end===t.end&&this.matchesOriginal(r,e)}_getTokensIndexesOfNode(t){var e;if(null==t.start||null==t.end)return[];const{first:n,last:r}=this._findTokensOfNode(t,0,this._tokens.length-1);let i=n;const o=function*(t){if("TemplateLiteral"===t.type){yield t.quasis[0];for(let e=1;e<t.quasis.length;e++)yield t.expressions[e-1],yield t.quasis[e];return}const e=s[t.type];for(const n of e){const e=t[n];e&&(Array.isArray(e)?yield*e:yield e)}}(t);"ExportNamedDeclaration"!==t.type&&"ExportDefaultDeclaration"!==t.type||"ClassDeclaration"!==(null==(e=t.declaration)?void 0:e.type)||o.next();const a=[];for(const t of o){if(null==t)continue;if(null==t.start||null==t.end)continue;const e=this._findTokensOfNode(t,i,r),n=e.first;for(let t=i;t<n;t++)a.push(t);i=e.last+1}for(let t=i;t<=r;t++)a.push(t);return a}_findTokensOfNode(t,e,n){const r=this._tokensCache.get(t);if(r)return r;const i=this._findFirstTokenOfNode(t.start,e,n),s=this._findLastTokenOfNode(t.end,i,n);return this._tokensCache.set(t,{first:i,last:s}),{first:i,last:s}}_findFirstTokenOfNode(t,e,n){for(;e<=n;){const r=n+e>>1;if(t<this._tokens[r].start)n=r-1;else{if(!(t>this._tokens[r].start))return r;e=r+1}}return e}_findLastTokenOfNode(t,e,n){for(;e<=n;){const r=n+e>>1;if(t<this._tokens[r].end)n=r-1;else{if(!(t>this._tokens[r].end))return r;e=r+1}}return n}}},52069:(t,e,n)=>{var r=n(26600),i=WeakSet.prototype;t.exports={WeakSet,add:r(i.add),has:r(i.has),remove:r(i.delete)}},52260:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(60472),i=n(91317),s=n(621),o=n(56872),a=n(51618),l=n(26350);const{isExpression:c,isFunction:u,isStatement:h,isClassBody:p,isTSInterfaceBody:d,isTSEnumMember:f}=o,m=/e/i,y=/\.0+$/,g=/[\n\r\u2028\u2029]/,v=/[\n\r\u2028\u2029]|\*\//;function b(t){return"CommentLine"===t.type||g.test(t.value)}function T(t,e){this.tokenChar(44,t),e||this.space()}e.default=class{constructor(t,e,n=null,s=null){this.tokenContext=i.TokenContext.normal,this._tokens=null,this._originalCode=null,this._currentNode=null,this._currentTypeId=null,this._indent=0,this._indentRepeat=0,this._insideAux=!1,this._noLineTerminator=!1,this._noLineTerminatorAfterNode=null,this._printAuxAfterOnNextUserNode=!1,this._printedComments=new Set,this._lastCommentLine=0,this._innerCommentsState=0,this._flags=0,this.tokenMap=null,this._boundGetRawIdentifier=null,this._printSemicolonBeforeNextNode=-1,this._printSemicolonBeforeNextToken=-1,this.format=t,this._tokens=n,this._originalCode=s,this._indentRepeat=t.indent.style.length,this._inputMap=(null==e?void 0:e._inputMap)||null,this._buf=new r.default(e,t.indent.style[0]);const{preserveFormat:o,compact:a,concise:l,retainLines:c,retainFunctionParens:u}=t;o&&(this._flags|=1),a&&(this._flags|=2),l&&(this._flags|=4),c&&(this._flags|=8),u&&(this._flags|=16),(t.auxiliaryCommentBefore||t.auxiliaryCommentAfter)&&(this._flags|=32)}enterDelimited(){const t=this._noLineTerminatorAfterNode;return null!==t&&(this._noLineTerminatorAfterNode=null),t}generate(t){return this.format.preserveFormat&&(this.tokenMap=new a.TokenMap(t,this._tokens,this._originalCode),this._boundGetRawIdentifier=l._getRawIdentifier.bind(this)),this.print(t),this._maybeAddAuxComment(),this._buf.get()}indent(t=this._flags){7&t||(this._indent+=this._indentRepeat)}dedent(t=this._flags){7&t||(this._indent-=this._indentRepeat)}semicolon(t=!1){const e=this._flags;if(32&e&&this._maybeAddAuxComment(),1&e){const t=this._currentNode;if(null!=t.start&&null!=t.end){if(!this.tokenMap.endMatches(t,";"))return void(this._printSemicolonBeforeNextNode=this._buf.getCurrentLine());const e=this.tokenMap.getIndexes(this._currentNode);this._catchUpTo(this._tokens[e[e.length-1]].loc.start)}}t?this._appendChar(59):this._queue(59),this._noLineTerminator=!1}rightBrace(t){this.format.minified&&this._buf.removeLastSemicolon(),this.sourceWithOffset("end",t.loc,-1),this.tokenChar(125)}rightParens(t){this.sourceWithOffset("end",t.loc,-1),this.tokenChar(41)}space(t=!1){if(!(3&this._flags))if(t)this._space();else{const t=this.getLastChar(!0);0!==t&&32!==t&&10!==t&&this._space()}}word(t,e=!1){this.tokenContext&=i.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t);const n=this._flags;32&n&&this._maybeAddAuxComment(),1&n&&this._catchUpToCurrentToken(t);const r=this.getLastChar();(-2===r||-3===r||47===r&&47===t.charCodeAt(0))&&this._space(),this._append(t,!1),this.setLastChar(-3),this._noLineTerminator=e}number(t,e){this.word(t),!Number.isInteger(e)||function(t){if(t.length>2&&48===t.charCodeAt(0)){const e=t.charCodeAt(1);return 98===e||111===e||120===e}return!1}(t)||m.test(t)||y.test(t)||46===t.charCodeAt(t.length-1)||this.setLastChar(-2)}token(t,e=!1,n=0,r=!1){this.tokenContext&=i.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t,n);const s=this._flags;if(32&s&&this._maybeAddAuxComment(),1&s&&this._catchUpToCurrentToken(t,n),r){const e=t.charCodeAt(0);((45===e&&"--"===t||61===e)&&33===this.getLastChar()||43===e&&43===this.getLastChar()||45===e&&45===this.getLastChar()||46===e&&-2===this.getLastChar())&&this._space()}this._append(t,e),this._noLineTerminator=!1}tokenChar(t,e=0){this.tokenContext&=i.TokenContext.forInOrInitHeadAccumulatePassThroughMask,this._maybePrintInnerComments(t,e);const n=this._flags;32&n&&this._maybeAddAuxComment(),1&n&&this._catchUpToCurrentToken(t,e),(43===t&&43===this.getLastChar()||45===t&&45===this.getLastChar()||46===t&&-2===this.getLastChar())&&this._space(),this._appendChar(t),this._noLineTerminator=!1}newline(t=1,e=this._flags){if(!(t<=0||10&e))if(4&e)this.space();else{t>2&&(t=2),t-=this._buf.getNewlineCount();for(let e=0;e<t;e++)this._newline()}}endsWith(t){return this.getLastChar(!0)===t}getLastChar(t){return this._buf.getLastChar(t)}setLastChar(t){this._buf._last=t}exactSource(t,e){t?(this._catchUp("start",t),this._buf.exactSource(t,e)):e()}source(t,e){e&&(this._catchUp(t,e),this._buf.source(t,e))}sourceWithOffset(t,e,n){e&&!this.format.preserveFormat&&(this._catchUp(t,e),this._buf.sourceWithOffset(t,e,n))}sourceIdentifierName(t,e){if(!this._buf._canMarkIdName)return;const n=this._buf._sourcePosition;n.identifierNamePos=e,n.identifierName=t}_space(){this._queue(32)}_newline(){32===this._buf._queuedChar&&(this._buf._queuedChar=0),this._appendChar(10,!0)}_catchUpToCurrentToken(t,e=0){const n=this.tokenMap.findMatching(this._currentNode,t,e);n&&this._catchUpTo(n.loc.start),-1!==this._printSemicolonBeforeNextToken&&this._printSemicolonBeforeNextToken===this._buf.getCurrentLine()&&this._appendChar(59,!0),this._printSemicolonBeforeNextToken=-1,this._printSemicolonBeforeNextNode=-1}_append(t,e){this._maybeIndent(),this._buf.append(t,e)}_appendChar(t,e){e||this._maybeIndent(),this._buf.appendChar(t)}_queue(t){this._buf.queue(t),this.setLastChar(-1)}_maybeIndent(){const t=this._shouldIndent();t>0&&this._buf._appendChar(-1,t,!1)}_shouldIndent(){return this.endsWith(10)?this._indent:0}catchUp(t){if(!this.format.retainLines)return;const e=t-this._buf.getCurrentLine();for(let t=0;t<e;t++)this._newline()}_catchUp(t,e){const n=this._flags;if(!(1&n))return void(8&n&&null!=e&&e[t]&&this.catchUp(e[t].line));const r=null==e?void 0:e[t];null!=r&&this._catchUpTo(r)}_catchUpTo({line:t,column:e,index:n}){const r=t-this._buf.getCurrentLine();if(r>0&&this._noLineTerminator)return;for(let t=0;t<r;t++)this._newline();const i=r>0?e:e-this._buf.getCurrentColumn();if(i>0){const r=this._originalCode?this._originalCode.slice(n-i,n).replace(/[^\t\x0B\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/gu," "):" ".repeat(i);this._buf.append(r,!1,!0),this._buf.setSourcePosition(t,e),this.setLastChar(32)}}printTerminatorless(t){this._noLineTerminator=!0,this.print(t)}print(t,e=!1,n=!1,r){var o,a;if(!t)return;this._innerCommentsState=0;const{type:l,loc:u,extra:h}=t,p=this._flags;let d=!1;t._compact&&(this._flags|=4,d=!0);const f=s.generatorInfosMap.get(l);if(void 0===f)throw new ReferenceError(`unknown node of type ${JSON.stringify(l)} with constructor ${JSON.stringify(t.constructor.name)}`);const[m,y,g]=f,v=this._currentNode,T=this._currentTypeId;let x;this._currentNode=t,this._currentTypeId=y,1&p&&(this._printSemicolonBeforeNextToken=this._printSemicolonBeforeNextNode),32&p&&(x=this._insideAux,this._insideAux=null==u,this._maybeAddAuxComment(this._insideAux&&!x));let S=0;n&&(S=this.tokenContext,S&i.TokenContext.forInOrInitHeadAccumulate?this.tokenContext=0:S=0);const w=null!=h&&h.parenthesized;let E=w&&1&p||w&&16&p&&71===y||v&&((0,i.parentNeedsParens)(t,v,T)||null!=g&&g(t,v,T,this.tokenContext,1&p?this._boundGetRawIdentifier:void 0));if(!E&&w&&null!=(o=t.leadingComments)&&o.length&&"CommentBlock"===t.leadingComments[0].type)switch(T){case 65:case 243:case 6:case 143:break;case 17:case 130:case 112:if(v.callee!==t)break;default:E=!0}let A,P=!1;var M;!E&&this._noLineTerminator&&(null!=(a=t.leadingComments)&&a.some(b)||8&p&&u&&u.start.line>this._buf.getCurrentLine())&&(E=!0,P=!0),E||(e||(e=!!v&&this._noLineTerminatorAfterNode===v&&(0,i.isLastChild)(v,t)),e&&(null!=(M=t.trailingComments)&&M.some(b)?c(t)&&(E=!0):(A=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=t))),E&&(this.tokenChar(40),P&&this.indent(),this._innerCommentsState=0,n||(S=this.tokenContext),S&i.TokenContext.forInOrInitHeadAccumulate&&(this.tokenContext=0),A=this._noLineTerminatorAfterNode,this._noLineTerminatorAfterNode=null),this._printLeadingComments(t,v),this.exactSource(139===y||66===y?null:u,m.bind(this,t,v)),E?(this._printTrailingComments(t,v),P&&(this.dedent(),this.newline()),this.tokenChar(41),this._noLineTerminator=e):e&&!this._noLineTerminator?(this._noLineTerminator=!0,this._printTrailingComments(t,v)):this._printTrailingComments(t,v,r),S&&(this.tokenContext=S),this._currentNode=v,this._currentTypeId=T,d&&(this._flags=p),32&p&&(this._insideAux=x),null!=A&&(this._noLineTerminatorAfterNode=A),this._innerCommentsState=0}_maybeAddAuxComment(t){t&&this._printAuxBeforeComment(),this._insideAux||this._printAuxAfterComment()}_printAuxBeforeComment(){if(this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!0;const t=this.format.auxiliaryCommentBefore;t&&this._printComment({type:"CommentBlock",value:t},0)}_printAuxAfterComment(){if(!this._printAuxAfterOnNextUserNode)return;this._printAuxAfterOnNextUserNode=!1;const t=this.format.auxiliaryCommentAfter;t&&this._printComment({type:"CommentBlock",value:t},0)}getPossibleRaw(t){const e=t.extra;if(null!=(null==e?void 0:e.raw)&&null!=e.rawValue&&t.value===e.rawValue)return e.raw}printJoin(t,e,n,r,i,s,o){if(null==t||!t.length)return;const a=this._flags;if(null==n&&8&a){var l;const e=null==(l=t[0].loc)?void 0:l.start.line;null!=e&&e!==this._buf.getCurrentLine()&&(n=!0)}n&&this.indent(a);const c=t.length;for(let n=0;n<c;n++){const l=t[n];if(l&&(e&&0===n&&this._buf.hasContent()&&this.newline(1,a),this.print(l,!1,s,o||0),null!=r&&(n<c-1?r.call(this,n,!1):i&&r.call(this,n,!0)),e))if(n+1===c)this.newline(1,a);else{const e=this._lastCommentLine;if(e>0){var u;const r=((null==(u=t[n+1].loc)?void 0:u.start.line)||0)-e;if(r>=0){this.newline(r||1,a);continue}}this.newline(1,a)}}n&&this.dedent(a)}printAndIndentOnComments(t){const e=t.leadingComments&&t.leadingComments.length>0;e&&this.indent(),this.print(t),e&&this.dedent()}printBlock(t){"EmptyStatement"!==t.type&&this.space(),this.print(t)}_printTrailingComments(t,e,n){const{innerComments:r,trailingComments:i}=t;null!=r&&r.length&&this._printComments(2,r,t,e,n),null!=i&&i.length?this._printComments(2,i,t,e,n):this._lastCommentLine=0}_printLeadingComments(t,e){const n=t.leadingComments;null!=n&&n.length&&this._printComments(0,n,t,e)}_maybePrintInnerComments(t,e){var n;const r=this._innerCommentsState;switch(3&r){case 0:return void(this._innerCommentsState=5);case 1:this.printInnerComments((4&r)>0,null==(n=this.tokenMap)?void 0:n.findMatching(this._currentNode,t,e))}}printInnerComments(t=!0,e){const n=this._currentNode,r=n.innerComments;if(null==r||!r.length)return void(this._innerCommentsState=2);const i=this.endsWith(32);switch(t&&this.indent(),this._printComments(1,r,n,void 0,void 0,e)){case 2:this._innerCommentsState=2;case 1:i&&this.space()}t&&this.dedent()}noIndentInnerCommentsHere(){this._innerCommentsState&=-5}printSequence(t,e,n,r){this.printJoin(t,!0,null!=e&&e,void 0,void 0,n,r)}printList(t,e,n,r,i,s){this.printJoin(t,n,r,null!=i?i:T,e,s)}shouldPrintTrailingComma(t){if(!this.tokenMap)return null;const e=this.tokenMap.findLastIndex(this._currentNode,(e=>this.tokenMap.matchesOriginal(e,"number"==typeof t?String.fromCharCode(t):t)));return e<=0?null:this.tokenMap.matchesOriginal(this._tokens[e-1],",")}_shouldPrintComment(t,e){if(t.ignore)return 0;if(this._printedComments.has(t))return 0;if(this._noLineTerminator&&v.test(t.value))return 2;if(e&&this.tokenMap){const n=this.tokenMap.find(this._currentNode,(e=>e.value===t.value));if(n&&n.start>e.start)return 2}return this._printedComments.add(t),this.format.shouldPrintComment(t.value)?1:0}_printComment(t,e){const n=this._noLineTerminator,r="CommentBlock"===t.type,i=r&&1!==e&&!n;switch(i&&this._buf.hasContent()&&2!==e&&this.newline(1),this.getLastChar(!0)){case 47:this._space();case 91:case 123:case 40:break;default:this.space()}let s;if(r){if(s=`/*${t.value}*/`,this.format.indent.adjustMultilineComment){var o;const e=null==(o=t.loc)?void 0:o.start.column;if(e){const t=new RegExp("\\n\\s{1,"+e+"}","g");s=s.replace(t,"\n")}if(4&this._flags)s=s.replace(/\n(?!$)/g,"\n");else{let t=this.format.retainLines?0:this._buf.getCurrentColumn();(this._shouldIndent()||this.format.retainLines)&&(t+=this._indent),s=s.replace(/\n(?!$)/g,`\n${" ".repeat(t)}`)}}}else s=n?`/*${t.value}*/`:`//${t.value}`;this.source("start",t.loc),this._append(s,r),r||n||this._newline(),i&&3!==e&&this.newline(1)}_printComments(t,e,n,r,i=0,s){const o=n.loc,a=e.length;let l=!!o;const c=l?o.start.line:0,m=l?o.end.line:0;let y=0,v=0;const{_noLineTerminator:b,_flags:T}=this;for(let o=0;o<a;o++){const x=e[o],S=this._shouldPrintComment(x,s);if(2===S)return 0===o?0:1;if(l&&x.loc&&1===S){const e=x.loc.start.line,n=x.loc.end.line;if(0===t){let t=0;if(0===o?!this._buf.hasContent()||"CommentLine"!==x.type&&e===n||(t=v=1):t=e-y,y=n,t>0&&!b&&this.newline(t,T),this._printComment(x,1),o+1===a){const t=Math.max(c-y,v);t>0&&!b&&this.newline(t,T),y=c}}else if(1===t){const t=e-(0===o?c:y);if(y=n,t>0&&!b&&this.newline(t,T),this._printComment(x,1),o+1===a){const t=Math.min(1,m-y);t>0&&!b&&this.newline(t,T),y=m}}else{const t=e-(0===o?m-i:y);y=n,t>0&&!b&&this.newline(t,T),this._printComment(x,1)}}else{if(l=!1,1!==S)continue;if(1===a){const e=x.loc?x.loc.start.line===x.loc.end.line:!g.test(x.value),i=e&&!h(n)&&!p(r)&&!d(r)&&!f(n);0===t?this._printComment(x,i&&"ObjectExpression"!==n.type||e&&u(r)&&r.body===n?1:0):i&&2===t?this._printComment(x,1):this._printComment(x,0)}else 1!==t||"ObjectExpression"===n.type&&n.properties.length>1||"ClassBody"===n.type||"TSInterfaceBody"===n.type?this._printComment(x,0):this._printComment(x,0===o?2:o===a-1?3:0)}}return 2===t&&l&&y&&(this._lastCommentLine=y),2}}},52307:(t,e,n)=>{var r=n(80421);t.exports=function(t,e,n){for(var i,s,o=n?t:t.iterator,a=t.next;!(i=r(a,o)).done;)if(void 0!==(s=e(i.value)))return s}},52479:(t,e,n)=>{var r=n(51192),i=n(2269);t.exports=function(t,e){return arguments.length<2?(n=r[t],i(n)?n:void 0):r[t]&&r[t][e];var n}},52648:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(null==t||!t.length)return;const n=[],i=(0,r.default)(t,n);if(i){for(const t of n)e.push(t);return i}};var r=n(65841)},53186:(t,e,n)=>{var r=n(12006).Buffer,i=n(13390);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);for(var e,n,i=r.allocUnsafe(t>>>0),s=this.head,o=0;s;)e=i,n=o,s.data.copy(e,n),o+=s.data.length,s=s.next;return i},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},53204:(t,e,n)=>{var r=n(45632),i=n(38378).add,s=n(54430),o=n(35525),a=n(52307);t.exports=function(t){var e=r(this),n=o(t).getIterator(),l=s(e);return a(n,(function(t){i(l,t)})),l}},53216:(t,e,n)=>{var r=n(6708);const i=(0,r.defineAliasedType)("JSX");i("JSXAttribute",{visitor:["name","value"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXNamespacedName")},value:{optional:!0,validate:(0,r.assertNodeType)("JSXElement","JSXFragment","StringLiteral","JSXExpressionContainer")}}}),i("JSXClosingElement",{visitor:["name"],aliases:["Immutable"],fields:{name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")}}}),i("JSXElement",{builder:["openingElement","closingElement","children","selfClosing"],visitor:["openingElement","children","closingElement"],aliases:["Immutable","Expression"],fields:Object.assign({openingElement:{validate:(0,r.assertNodeType)("JSXOpeningElement")},closingElement:{optional:!0,validate:(0,r.assertNodeType)("JSXClosingElement")},children:(0,r.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")},{selfClosing:{validate:(0,r.assertValueType)("boolean"),optional:!0}})}),i("JSXEmptyExpression",{}),i("JSXExpressionContainer",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression","JSXEmptyExpression")}}}),i("JSXSpreadChild",{visitor:["expression"],aliases:["Immutable"],fields:{expression:{validate:(0,r.assertNodeType)("Expression")}}}),i("JSXIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}}),i("JSXMemberExpression",{visitor:["object","property"],fields:{object:{validate:(0,r.assertNodeType)("JSXMemberExpression","JSXIdentifier")},property:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),i("JSXNamespacedName",{visitor:["namespace","name"],fields:{namespace:{validate:(0,r.assertNodeType)("JSXIdentifier")},name:{validate:(0,r.assertNodeType)("JSXIdentifier")}}}),i("JSXOpeningElement",{builder:["name","attributes","selfClosing"],visitor:["name","typeParameters","typeArguments","attributes"],aliases:["Immutable"],fields:Object.assign({name:{validate:(0,r.assertNodeType)("JSXIdentifier","JSXMemberExpression","JSXNamespacedName")},selfClosing:{default:!1},attributes:(0,r.validateArrayOfType)("JSXAttribute","JSXSpreadAttribute"),typeArguments:{validate:(0,r.assertNodeType)("TypeParameterInstantiation"),optional:!0}},{typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterInstantiation"),optional:!0}})}),i("JSXSpreadAttribute",{visitor:["argument"],fields:{argument:{validate:(0,r.assertNodeType)("Expression")}}}),i("JSXText",{aliases:["Immutable"],builder:["value"],fields:{value:{validate:(0,r.assertValueType)("string")}}}),i("JSXFragment",{builder:["openingFragment","closingFragment","children"],visitor:["openingFragment","children","closingFragment"],aliases:["Immutable","Expression"],fields:{openingFragment:{validate:(0,r.assertNodeType)("JSXOpeningFragment")},closingFragment:{validate:(0,r.assertNodeType)("JSXClosingFragment")},children:(0,r.validateArrayOfType)("JSXText","JSXExpressionContainer","JSXSpreadChild","JSXElement","JSXFragment")}}),i("JSXOpeningFragment",{aliases:["Immutable"]}),i("JSXClosingFragment",{aliases:["Immutable"]})},53287:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=n(75518);Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var i=n(86707);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}))},53743:(t,e,n)=>{var r=n(42665),i=n(43960),s=r("keys");t.exports=function(t){return s[t]||(s[t]=i(t))}},54067:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.default)(t,!1)};var r=n(19415)},54430:(t,e,n)=>{var r=n(38378),i=n(27293),s=r.Set,o=r.add;t.exports=function(t){var e=new s;return i(t,(function(t){o(e,t)})),e}},55222:(t,e,n)=>{var r=n(45632),i=n(38378),s=n(86058),o=n(35525),a=n(27293),l=n(52307),c=i.Set,u=i.add,h=i.has;t.exports=function(t){var e=r(this),n=o(t),i=new c;return s(e)>n.size?l(n.getIterator(),(function(t){h(e,t)&&u(i,t)})):a(e,(function(t){n.includes(t)&&u(i,t)})),i}},55317:t=>{t.exports={}},55712:(t,e,n)=>{function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},r.apply(null,arguments)}n.d(e,{A:()=>r})},55953:(t,e,n)=>{var r=n(60209),i=n(99261);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},56094:(t,e,n)=>{var r=n(34110).Buffer,i=n(77871),s=n(68787);t.exports=function(t){return new a(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function l(t,e,n){Array.isArray(t)||(t=t.toArray());var i=new r(t);if(n&&i.length<n){var s=new r(n-i.length);s.fill(0),i=r.concat([s,i])}return e?i.toString(e):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,e,n){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),l(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),n,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var n=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(n[n.length-1]%2?n[0]=7:n[0]=6),l(n,t)},a.prototype.getPrivateKey=function(t){return l(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||"utf8",r.isBuffer(t)||(t=new r(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||"utf8",r.isBuffer(t)||(t=new r(t,e));var n=new s(t);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}},56518:(t,e,n)=>{var r,i=n(86115),s=n(23486),o=n(51192),a=n(52479),l=n(26600),c=n(59767),u=n(43960),h=n(2269),p=n(64997),d=n(64813),f=n(25178),m=n(99261),y=n(40372),g=n(95167),v=n(17267),b=n(22521),T=n(2776),x=n(26531),S=n(5550),w=n(82820),E=n(23122),A=n(71856),P=n(38378),M=n(27293),C=n(27787),k=n(38203),I=n(14868),O=o.Object,N=o.Array,_=o.Date,D=o.Error,L=o.TypeError,B=o.PerformanceMark,R=a("DOMException"),F=A.Map,j=A.has,U=A.get,V=A.set,z=P.Set,q=P.add,$=P.has,H=a("Object","keys"),K=l([].push),Y=l((!0).valueOf),W=l(1.1.valueOf),J=l("".valueOf),X=l(_.prototype.getTime),G=u("structuredClone"),Z="DataCloneError",Q="Transferring",tt=function(t){return!c((function(){var e=new o.Set([7]),n=t(e),r=t(O(7));return n===e||!n.has(7)||!f(r)||7!=+r}))&&t},et=function(t,e){return!c((function(){var n=new e,r=t({a:n,b:n});return!(r&&r.a===r.b&&r.a instanceof e&&r.a.stack===n.stack)}))},nt=o.structuredClone,rt=i||!et(nt,D)||!et(nt,R)||(r=nt,!!c((function(){var t=r(new o.AggregateError([1],G,{cause:3}));return"AggregateError"!==t.name||1!==t.errors[0]||t.message!==G||3!==t.cause}))),it=!nt&&tt((function(t){return new B(G,{detail:t}).detail})),st=tt(nt)||it,ot=function(t){throw new R("Uncloneable type: "+t,Z)},at=function(t,e){throw new R((e||"Cloning")+" of "+t+" cannot be properly polyfilled in this engine",Z)},lt=function(t,e){return st||at(e),st(t)},ct=function(t,e,n){if(j(e,t))return U(e,t);var r,i,s,a,l,c;if("SharedArrayBuffer"===(n||v(t)))r=st?st(t):t;else{var u=o.DataView;u||h(t.slice)||at("ArrayBuffer");try{if(h(t.slice)&&!t.resizable)r=t.slice(0);else{i=t.byteLength,s="maxByteLength"in t?{maxByteLength:t.maxByteLength}:void 0,r=new ArrayBuffer(i,s),a=new u(t),l=new u(r);for(c=0;c<i;c++)l.setUint8(c,a.getUint8(c))}}catch(t){throw new R("ArrayBuffer is detached",Z)}}return V(e,t,r),r},ut=function(t,e){if(m(t)&&ot("Symbol"),!f(t))return t;if(e){if(j(e,t))return U(e,t)}else e=new F;var n,r,i,s,l,c,u,p,d=v(t);switch(d){case"Array":i=N(S(t));break;case"Object":i={};break;case"Map":i=new F;break;case"Set":i=new z;break;case"RegExp":i=new RegExp(t.source,E(t));break;case"Error":switch(r=t.name){case"AggregateError":i=new(a(r))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":i=new(a(r));break;case"CompileError":case"LinkError":case"RuntimeError":i=new(a("WebAssembly",r));break;default:i=new D}break;case"DOMException":i=new R(t.message,t.name);break;case"ArrayBuffer":case"SharedArrayBuffer":i=ct(t,e,d);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":c="DataView"===d?t.byteLength:t.length,i=function(t,e,n,r,i){var s=o[e];return f(s)||at(e),new s(ct(t.buffer,i),n,r)}(t,d,t.byteOffset,c,e);break;case"DOMQuad":try{i=new DOMQuad(ut(t.p1,e),ut(t.p2,e),ut(t.p3,e),ut(t.p4,e))}catch(e){i=lt(t,d)}break;case"File":if(st)try{i=st(t),v(i)!==d&&(i=void 0)}catch(t){}if(!i)try{i=new File([t],t.name,t)}catch(t){}i||at(d);break;case"FileList":if(s=function(){var t;try{t=new o.DataTransfer}catch(e){try{t=new o.ClipboardEvent("").clipboardData}catch(t){}}return t&&t.items&&t.files?t:null}()){for(l=0,c=S(t);l<c;l++)s.items.add(ut(t[l],e));i=s.files}else i=lt(t,d);break;case"ImageData":try{i=new ImageData(ut(t.data,e),t.width,t.height,{colorSpace:t.colorSpace})}catch(e){i=lt(t,d)}break;default:if(st)i=st(t);else switch(d){case"BigInt":i=O(t.valueOf());break;case"Boolean":i=O(Y(t));break;case"Number":i=O(W(t));break;case"String":i=O(J(t));break;case"Date":i=new _(X(t));break;case"Blob":try{i=t.slice(0,t.size,t.type)}catch(t){at(d)}break;case"DOMPoint":case"DOMPointReadOnly":n=o[d];try{i=n.fromPoint?n.fromPoint(t):new n(t.x,t.y,t.z,t.w)}catch(t){at(d)}break;case"DOMRect":case"DOMRectReadOnly":n=o[d];try{i=n.fromRect?n.fromRect(t):new n(t.x,t.y,t.width,t.height)}catch(t){at(d)}break;case"DOMMatrix":case"DOMMatrixReadOnly":n=o[d];try{i=n.fromMatrix?n.fromMatrix(t):new n(t)}catch(t){at(d)}break;case"AudioData":case"VideoFrame":h(t.clone)||at(d);try{i=t.clone()}catch(t){ot(d)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":at(d);default:ot(d)}}switch(V(e,t,i),d){case"Array":case"Object":for(u=H(t),l=0,c=S(u);l<c;l++)p=u[l],T(i,p,ut(t[p],e));break;case"Map":t.forEach((function(t,n){V(i,ut(n,e),ut(t,e))}));break;case"Set":t.forEach((function(t){q(i,ut(t,e))}));break;case"Error":x(i,"message",ut(t.message,e)),b(t,"cause")&&x(i,"cause",ut(t.cause,e)),"AggregateError"===r?i.errors=ut(t.errors,e):"SuppressedError"===r&&(i.error=ut(t.error,e),i.suppressed=ut(t.suppressed,e));case"DOMException":k&&x(i,"stack",ut(t.stack,e))}return i};s({global:!0,enumerable:!0,sham:!I,forced:rt},{structuredClone:function(t){var e,n,r=w(arguments.length,1)>1&&!d(arguments[1])?g(arguments[1]):void 0,i=r?r.transfer:void 0;void 0!==i&&(n=function(t,e){if(!f(t))throw new L("Transfer option cannot be converted to a sequence");var n=[];y(t,(function(t){K(n,g(t))}));for(var r,i,s,a,l,c=0,u=S(n),d=new z;c<u;){if(r=n[c++],a=void 0,"ArrayBuffer"===(i=v(r))?$(d,r):j(e,r))throw new R("Duplicate transferable",Z);if("ArrayBuffer"!==i){if(I)a=nt(r,{transfer:[r]});else switch(i){case"ImageBitmap":s=o.OffscreenCanvas,p(s)||at(i,Q);try{(l=new s(r.width,r.height)).getContext("bitmaprenderer").transferFromImageBitmap(r),a=l.transferToImageBitmap()}catch(t){}break;case"AudioData":case"VideoFrame":h(r.clone)&&h(r.close)||at(i,Q);try{a=r.clone(),r.close()}catch(t){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":at(i,Q)}if(void 0===a)throw new R("This object cannot be transferred: "+i,Z);V(e,r,a)}else q(d,r)}return d}(i,e=new F));var s=ut(t,e);return n&&function(t){M(t,(function(t){I?nt(t,{transfer:[t]}):h(t.transfer)?t.transfer():C?C(t):at("ArrayBuffer",Q)}))}(n),s}})},56826:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r="",i=t){if(n.has(i))return;n.add(i);const{internal:s,trace:o}=function(){const{stackTraceLimit:t,prepareStackTrace:e}=Error;let n;if(Error.stackTraceLimit=4,Error.prepareStackTrace=function(t,e){n=e},(new Error).stack,Error.stackTraceLimit=t,Error.prepareStackTrace=e,!n)return{internal:!1,trace:""};const r=n.slice(2,4);return{internal:/[\\/]@babel[\\/]/.test(r[1].getFileName()),trace:r.map((t=>` at ${t}`)).join("\n")}}();s||console.warn(`${r}\`${t}\` has been deprecated, please migrate to \`${e}\`\n${o}`)};const n=new Set},56872:(t,e,n)=>{var r=n(15088).process;Object.defineProperty(e,"__esModule",{value:!0});var i={react:!0,assertNode:!0,createTypeAnnotationBasedOnTypeof:!0,createUnionTypeAnnotation:!0,createFlowUnionType:!0,createTSUnionType:!0,cloneNode:!0,clone:!0,cloneDeep:!0,cloneDeepWithoutLoc:!0,cloneWithoutLoc:!0,addComment:!0,addComments:!0,inheritInnerComments:!0,inheritLeadingComments:!0,inheritsComments:!0,inheritTrailingComments:!0,removeComments:!0,ensureBlock:!0,toBindingIdentifierName:!0,toBlock:!0,toComputedKey:!0,toExpression:!0,toIdentifier:!0,toKeyAlias:!0,toStatement:!0,valueToNode:!0,appendToMemberExpression:!0,inherits:!0,prependToMemberExpression:!0,removeProperties:!0,removePropertiesDeep:!0,removeTypeDuplicates:!0,getAssignmentIdentifiers:!0,getBindingIdentifiers:!0,getOuterBindingIdentifiers:!0,getFunctionName:!0,traverse:!0,traverseFast:!0,shallowEqual:!0,is:!0,isBinding:!0,isBlockScoped:!0,isImmutable:!0,isLet:!0,isNode:!0,isNodesEquivalent:!0,isPlaceholderType:!0,isReferenced:!0,isScope:!0,isSpecifierDefault:!0,isType:!0,isValidES3Identifier:!0,isValidIdentifier:!0,isVar:!0,matchesPattern:!0,validate:!0,buildMatchMemberExpression:!0,__internal__deprecationWarning:!0};Object.defineProperty(e,"__internal__deprecationWarning",{enumerable:!0,get:function(){return gt.default}}),Object.defineProperty(e,"addComment",{enumerable:!0,get:function(){return T.default}}),Object.defineProperty(e,"addComments",{enumerable:!0,get:function(){return x.default}}),Object.defineProperty(e,"appendToMemberExpression",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"assertNode",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"buildMatchMemberExpression",{enumerable:!0,get:function(){return mt.default}}),Object.defineProperty(e,"clone",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"cloneDeepWithoutLoc",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"cloneNode",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"cloneWithoutLoc",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"createFlowUnionType",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"createTSUnionType",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"createTypeAnnotationBasedOnTypeof",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"createUnionTypeAnnotation",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"ensureBlock",{enumerable:!0,get:function(){return k.default}}),Object.defineProperty(e,"getAssignmentIdentifiers",{enumerable:!0,get:function(){return H.default}}),Object.defineProperty(e,"getBindingIdentifiers",{enumerable:!0,get:function(){return K.default}}),Object.defineProperty(e,"getFunctionName",{enumerable:!0,get:function(){return W.default}}),Object.defineProperty(e,"getOuterBindingIdentifiers",{enumerable:!0,get:function(){return Y.default}}),Object.defineProperty(e,"inheritInnerComments",{enumerable:!0,get:function(){return S.default}}),Object.defineProperty(e,"inheritLeadingComments",{enumerable:!0,get:function(){return w.default}}),Object.defineProperty(e,"inheritTrailingComments",{enumerable:!0,get:function(){return A.default}}),Object.defineProperty(e,"inherits",{enumerable:!0,get:function(){return U.default}}),Object.defineProperty(e,"inheritsComments",{enumerable:!0,get:function(){return E.default}}),Object.defineProperty(e,"is",{enumerable:!0,get:function(){return Z.default}}),Object.defineProperty(e,"isBinding",{enumerable:!0,get:function(){return Q.default}}),Object.defineProperty(e,"isBlockScoped",{enumerable:!0,get:function(){return tt.default}}),Object.defineProperty(e,"isImmutable",{enumerable:!0,get:function(){return et.default}}),Object.defineProperty(e,"isLet",{enumerable:!0,get:function(){return nt.default}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return rt.default}}),Object.defineProperty(e,"isNodesEquivalent",{enumerable:!0,get:function(){return it.default}}),Object.defineProperty(e,"isPlaceholderType",{enumerable:!0,get:function(){return st.default}}),Object.defineProperty(e,"isReferenced",{enumerable:!0,get:function(){return ot.default}}),Object.defineProperty(e,"isScope",{enumerable:!0,get:function(){return at.default}}),Object.defineProperty(e,"isSpecifierDefault",{enumerable:!0,get:function(){return lt.default}}),Object.defineProperty(e,"isType",{enumerable:!0,get:function(){return ct.default}}),Object.defineProperty(e,"isValidES3Identifier",{enumerable:!0,get:function(){return ut.default}}),Object.defineProperty(e,"isValidIdentifier",{enumerable:!0,get:function(){return ht.default}}),Object.defineProperty(e,"isVar",{enumerable:!0,get:function(){return pt.default}}),Object.defineProperty(e,"matchesPattern",{enumerable:!0,get:function(){return dt.default}}),Object.defineProperty(e,"prependToMemberExpression",{enumerable:!0,get:function(){return V.default}}),e.react=void 0,Object.defineProperty(e,"removeComments",{enumerable:!0,get:function(){return P.default}}),Object.defineProperty(e,"removeProperties",{enumerable:!0,get:function(){return z.default}}),Object.defineProperty(e,"removePropertiesDeep",{enumerable:!0,get:function(){return q.default}}),Object.defineProperty(e,"removeTypeDuplicates",{enumerable:!0,get:function(){return $.default}}),Object.defineProperty(e,"shallowEqual",{enumerable:!0,get:function(){return G.default}}),Object.defineProperty(e,"toBindingIdentifierName",{enumerable:!0,get:function(){return I.default}}),Object.defineProperty(e,"toBlock",{enumerable:!0,get:function(){return O.default}}),Object.defineProperty(e,"toComputedKey",{enumerable:!0,get:function(){return N.default}}),Object.defineProperty(e,"toExpression",{enumerable:!0,get:function(){return _.default}}),Object.defineProperty(e,"toIdentifier",{enumerable:!0,get:function(){return D.default}}),Object.defineProperty(e,"toKeyAlias",{enumerable:!0,get:function(){return L.default}}),Object.defineProperty(e,"toStatement",{enumerable:!0,get:function(){return B.default}}),Object.defineProperty(e,"traverse",{enumerable:!0,get:function(){return J.default}}),Object.defineProperty(e,"traverseFast",{enumerable:!0,get:function(){return X.default}}),Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return ft.default}}),Object.defineProperty(e,"valueToNode",{enumerable:!0,get:function(){return R.default}});var s=n(34378),o=n(50852),a=n(63986),l=n(34e3),c=n(21758);Object.keys(c).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===c[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}}))}));var u=n(24398),h=n(85734),p=n(29753),d=n(51089);Object.keys(d).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===d[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))}));var f=n(53287);Object.keys(f).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===f[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return f[t]}}))}));var m=n(19415),y=n(54067),g=n(2973),v=n(88619),b=n(57409),T=n(79467),x=n(4478),S=n(32740),w=n(18782),E=n(24229),A=n(82186),P=n(82421),M=n(60292);Object.keys(M).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===M[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return M[t]}}))}));var C=n(19910);Object.keys(C).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===C[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return C[t]}}))}));var k=n(26835),I=n(32626),O=n(92442),N=n(42193),_=n(4477),D=n(39664),L=n(25754),B=n(96918),R=n(71464),F=n(49625);Object.keys(F).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===F[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return F[t]}}))}));var j=n(23273),U=n(66260),V=n(28995),z=n(96045),q=n(64079),$=n(25869),H=n(22471),K=n(17777),Y=n(38084),W=n(58349),J=n(20197);Object.keys(J).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===J[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return J[t]}}))}));var X=n(10647),G=n(1440),Z=n(93308),Q=n(64039),tt=n(99791),et=n(17829),nt=n(33599),rt=n(58540),it=n(61043),st=n(99496),ot=n(95935),at=n(17942),lt=n(35265),ct=n(88420),ut=n(73968),ht=n(67583),pt=n(3851),dt=n(58125),ft=n(36142),mt=n(80905),yt=n(66360);Object.keys(yt).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||t in e&&e[t]===yt[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return yt[t]}}))}));var gt=n(56826),vt=n(52648);e.react={isReactComponent:s.default,isCompatTag:o.default,buildChildren:a.default},e.toSequenceExpression=vt.default,r.env.BABEL_TYPES_8_BREAKING&&console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!")},56965:(t,e,n)=>{var r=n(52479),i=n(80421),s=n(26600),o=n(37400),a=n(95167),l=n(9106),c=n(64813),u=n(23878),h=n(83115),p=h("asyncDispose"),d=h("dispose"),f=s([].push),m=function(t,e,n){return arguments.length<3&&!c(t)&&(n=l(function(t,e){if("async-dispose"===e){var n=u(t,p);return void 0!==n||void 0===(n=u(t,d))?n:function(){var t=this;return new(r("Promise"))((function(e){i(n,t),e(void 0)}))}}return u(t,d)}(a(t),e))),void 0===n?function(){}:o(n,t)};t.exports=function(t,e,n,r){var i;if(arguments.length<4){if(c(e)&&"sync-dispose"===n)return;i=m(e,n)}else i=m(void 0,n,r);f(t.stack,i)}},57068:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(88087);r({target:"Map",proto:!0,real:!0,forced:!0},{some:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t,r){if(n(t,r,e))return!0}),!0)}})},57409:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.default)(t,!1,!0)};var r=n(19415)},57573:(t,e,n)=>{var r=n(52479);t.exports=r("document","documentElement")},58125:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(!i(t))return!1;const s=Array.isArray(e)?e:e.split("."),o=[];let a;for(a=t;i(a);a=null!=(l=a.object)?l:a.meta){var l;o.push(a.property)}if(o.push(a),o.length<s.length)return!1;if(!n&&o.length>s.length)return!1;for(let t=0,e=o.length-1;t<s.length;t++,e--){const n=o[e];let i;if((0,r.isIdentifier)(n))i=n.name;else if((0,r.isStringLiteral)(n))i=n.value;else if((0,r.isThisExpression)(n))i="this";else if((0,r.isSuper)(n))i="super";else{if(!(0,r.isPrivateName)(n))return!1;i="#"+n.id.name}if(s[t]!==i)return!1}return!0};var r=n(66360);function i(t){return(0,r.isMemberExpression)(t)||(0,r.isMetaProperty)(t)}},58230:(t,e,n)=>{var r=n(80421),i=n(2269),s=n(25178),o=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&i(n=t.toString)&&!s(a=r(n,t)))return a;if(i(n=t.valueOf)&&!s(a=r(n,t)))return a;if("string"!==e&&i(n=t.toString)&&!s(a=r(n,t)))return a;throw new o("Can't convert object to primitive value")}},58349:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if("id"in t&&t.id)return{name:t.id.name,originalNode:t.id};let n,s="";if((0,r.isObjectProperty)(e,{value:t})?n=i(e):(0,r.isObjectMethod)(t)||(0,r.isClassMethod)(t)?(n=i(t),"get"===t.kind?s="get ":"set"===t.kind&&(s="set ")):(0,r.isVariableDeclarator)(e,{init:t})?n=e.id:(0,r.isAssignmentExpression)(e,{operator:"=",right:t})&&(n=e.left),!n)return null;const o=(0,r.isLiteral)(n)?function(t){return(0,r.isNullLiteral)(t)?"null":(0,r.isRegExpLiteral)(t)?`/${t.pattern}/${t.flags}`:(0,r.isTemplateLiteral)(t)?t.quasis.map((t=>t.value.raw)).join(""):void 0!==t.value?String(t.value):null}(n):(0,r.isIdentifier)(n)?n.name:(0,r.isPrivateName)(n)?n.id.name:null;return null==o?null:{name:s+o,originalNode:n}};var r=n(66360);function i(t){if(!t.computed||(0,r.isLiteral)(t.key))return t.key}},58412:(t,e,n)=>{var r=n(80421),i=n(95167),s=n(52479),o=n(23878);t.exports=function(t,e,n,a){try{var l=o(t,"return");if(l)return s("Promise").resolve(r(l,t)).then((function(t){try{e!==a&&i(t)}catch(t){return void a(t)}e(n)}),(function(t){e===a?e(n):a(t)}))}catch(t){return a(e===a?n:t)}e(n)}},58540:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return!(!t||!r.VISITOR_KEYS[t.type])};var r=n(49625)},59509:(t,e,n)=>{var r=n(23486),i=n(84538),s=n(71856).remove;r({target:"Map",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),n=!0,r=0,o=arguments.length;r<o;r++)t=s(e,arguments[r]),n=n&&t;return!!n}})},59636:(t,e,n)=>{var r={};r[n(83115)("toStringTag")]="z",t.exports="[object z]"===String(r)},59767:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},59887:(t,e,n)=>{var r=n(42426),i=n(25178),s=n(10638),o=n(92010);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=r(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return s(n),o(r),i(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0)},60047:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},60089:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isIdentifierChar=u,e.isIdentifierName=function(t){let e=!0;for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(55296==(64512&r)&&n+1<t.length){const e=t.charCodeAt(++n);56320==(64512&e)&&(r=65536+((1023&r)<<10)+(1023&e))}if(e){if(e=!1,!c(r))return!1}else if(!u(r))return!1}return!e},e.isIdentifierStart=c;let n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",r="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const i=new RegExp("["+n+"]"),s=new RegExp("["+n+r+"]");n=r=null;const o=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],a=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function l(t,e){let n=65536;for(let r=0,i=e.length;r<i;r+=2){if(n+=e[r],n>t)return!1;if(n+=e[r+1],n>=t)return!0}return!1}function c(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&i.test(String.fromCharCode(t)):l(t,o)))}function u(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&s.test(String.fromCharCode(t)):l(t,o)||l(t,a))))}},60209:(t,e,n)=>{var r=n(80421),i=n(25178),s=n(99261),o=n(23878),a=n(58230),l=n(83115),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!i(t)||s(t))return t;var n,l=o(t,u);if(l){if(void 0===e&&(e="default"),n=r(l,t,e),!i(n)||s(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},60262:(t,e,n)=>{n.d(e,{Q2:()=>C,o$:()=>T});var r=n(54873),i=n(10906),s=n(38273),o=n(9283),a=n(22756),l=n(38325);const c=[(0,a.Gw)("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),(0,a.Gw)("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),(0,a.Gw)("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),(0,a.Gw)("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),(0,a.Gw)("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),(0,a.Gw)("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),(0,a.Gw)("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),(0,a.Gw)("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),(0,a.Gw)("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),(0,a.Gw)('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),(0,a.Gw)('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],u=c.concat([(0,a.Gw)("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),(0,a.Gw)("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),(0,a.Gw)("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),h=new l.RY,p=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function d(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const f=["FunctionDeclaration"],m={FunctionDeclaration:d("function"),ClassDeclaration:d("class"),ClassExpression:()=>!0,EnumDeclaration:d("constant"),TypeAliasDeclaration:d("type"),NamespaceDeclaration:d("namespace"),VariableDefinition(t,e){t.matchContext(f)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function y(t,e){let n=h.get(e);if(n)return n;let r=[],i=!0;function s(e,n){let i=t.sliceString(e.from,e.to);r.push({label:i,type:n})}return e.cursor(l.Qj.IncludeAnonymous).iterate((e=>{if(i)i=!1;else if(e.name){let t=m[e.name];if(t&&t(e,s)||p.has(e.name))return!1}else if(e.to-e.from>8192){for(let n of y(t,e.node))r.push(n);return!1}})),h.set(e,r),r}const g=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,v=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function b(t){let e=(0,i.mv)(t.state).resolveInner(t.pos,-1);if(v.indexOf(e.name)>-1)return null;let n="VariableName"==e.name||e.to-e.from<20&&g.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let n=e;n;n=n.parent)p.has(n.name)&&(r=r.concat(y(t.state.doc,n)));return{options:r,from:n?e.from:t.pos,validFor:g}}const T=i.bj.define({name:"javascript",parser:r.K.configure({props:[i.Oh.add({IfStatement:(0,i.mz)({except:/^\s*({|else\b)/}),TryStatement:(0,i.mz)({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:i._Y,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:(0,i.Ay)({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":(0,i.mz)({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag":t=>t.column(t.node.from)+t.unit}),i.b_.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":i.yd,BlockComment:t=>({from:t.from+2,to:t.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),x={test:t=>/^JSX/.test(t.name),facet:(0,i.p9)({commentTokens:{block:{open:"{/*",close:"*/}"}}})},S=T.configure({dialect:"ts"},"typescript"),w=T.configure({dialect:"jsx",props:[i.Q0.add((t=>t.isTop?[x]:void 0))]}),E=T.configure({dialect:"jsx ts",props:[i.Q0.add((t=>t.isTop?[x]:void 0))]},"typescript");let A=t=>({label:t,type:"keyword"});const P="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(A),M=P.concat(["declare","implements","private","protected","public"].map(A));function C(t={}){let e=t.jsx?t.typescript?E:w:t.typescript?S:T,n=t.typescript?u.concat(M):c.concat(P);return new i.Yy(e,[T.data.of({autocomplete:(0,a.Ar)(v,(0,a.et)(n))}),T.data.of({autocomplete:b}),t.jsx?O:[]])}function k(t,e,n=t.length){for(let r=null==e?void 0:e.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return t.sliceString(r.from,Math.min(r.to,n));return""}const I="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),O=o.Lz.inputHandler.of(((t,e,n,r,o)=>{if((I?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||">"!=r&&"/"!=r||!T.isActiveAt(t.state,e,-1))return!1;let a=o(),{state:l}=a,c=l.changeByRange((t=>{var e;let n,{head:o}=t,a=(0,i.mv)(l).resolveInner(o-1,-1);if("JSXStartTag"==a.name&&(a=a.parent),l.doc.sliceString(o-1,o)!=r||"JSXAttributeValue"==a.name&&a.to>o);else{if(">"==r&&"JSXFragmentTag"==a.name)return{range:t,changes:{from:o,insert:"</>"}};if("/"==r&&"JSXStartCloseTag"==a.name){let t=a.parent,r=t.parent;if(r&&t.from==o-2&&((n=k(l.doc,r.firstChild,o))||"JSXFragmentTag"==(null===(e=r.firstChild)||void 0===e?void 0:e.name))){let t=`${n}>`;return{range:s.OF.cursor(o+t.length,-1),changes:{from:o,insert:t}}}}else if(">"==r){let e=function(t){for(;;){if("JSXOpenTag"==t.name||"JSXSelfClosingTag"==t.name||"JSXFragmentTag"==t.name)return t;if("JSXEscape"==t.name||!t.parent)return null;t=t.parent}}(a);if(e&&"JSXOpenTag"==e.name&&!/^\/?>|^<\//.test(l.doc.sliceString(o,o+2))&&(n=k(l.doc,e,o)))return{range:t,changes:{from:o,insert:`</${n}>`}}}}return{range:t}}));return!c.changes.empty&&(t.dispatch([a,l.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}))},60292:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WHILE_TYPES=e.USERWHITESPACABLE_TYPES=e.UNARYLIKE_TYPES=e.TYPESCRIPT_TYPES=e.TSTYPE_TYPES=e.TSTYPEELEMENT_TYPES=e.TSENTITYNAME_TYPES=e.TSBASETYPE_TYPES=e.TERMINATORLESS_TYPES=e.STATEMENT_TYPES=e.STANDARDIZED_TYPES=e.SCOPABLE_TYPES=e.PUREISH_TYPES=e.PROPERTY_TYPES=e.PRIVATE_TYPES=e.PATTERN_TYPES=e.PATTERNLIKE_TYPES=e.OBJECTMEMBER_TYPES=e.MODULESPECIFIER_TYPES=e.MODULEDECLARATION_TYPES=e.MISCELLANEOUS_TYPES=e.METHOD_TYPES=e.LVAL_TYPES=e.LOOP_TYPES=e.LITERAL_TYPES=e.JSX_TYPES=e.IMPORTOREXPORTDECLARATION_TYPES=e.IMMUTABLE_TYPES=e.FUNCTION_TYPES=e.FUNCTIONPARENT_TYPES=e.FUNCTIONPARAMETER_TYPES=e.FOR_TYPES=e.FORXSTATEMENT_TYPES=e.FLOW_TYPES=e.FLOWTYPE_TYPES=e.FLOWPREDICATE_TYPES=e.FLOWDECLARATION_TYPES=e.FLOWBASEANNOTATION_TYPES=e.EXPRESSION_TYPES=e.EXPRESSIONWRAPPER_TYPES=e.EXPORTDECLARATION_TYPES=e.ENUMMEMBER_TYPES=e.ENUMBODY_TYPES=e.DECLARATION_TYPES=e.CONDITIONAL_TYPES=e.COMPLETIONSTATEMENT_TYPES=e.CLASS_TYPES=e.BLOCK_TYPES=e.BLOCKPARENT_TYPES=e.BINARY_TYPES=e.ACCESSOR_TYPES=void 0;var r=n(49625);e.STANDARDIZED_TYPES=r.FLIPPED_ALIAS_KEYS.Standardized,e.EXPRESSION_TYPES=r.FLIPPED_ALIAS_KEYS.Expression,e.BINARY_TYPES=r.FLIPPED_ALIAS_KEYS.Binary,e.SCOPABLE_TYPES=r.FLIPPED_ALIAS_KEYS.Scopable,e.BLOCKPARENT_TYPES=r.FLIPPED_ALIAS_KEYS.BlockParent,e.BLOCK_TYPES=r.FLIPPED_ALIAS_KEYS.Block,e.STATEMENT_TYPES=r.FLIPPED_ALIAS_KEYS.Statement,e.TERMINATORLESS_TYPES=r.FLIPPED_ALIAS_KEYS.Terminatorless,e.COMPLETIONSTATEMENT_TYPES=r.FLIPPED_ALIAS_KEYS.CompletionStatement,e.CONDITIONAL_TYPES=r.FLIPPED_ALIAS_KEYS.Conditional,e.LOOP_TYPES=r.FLIPPED_ALIAS_KEYS.Loop,e.WHILE_TYPES=r.FLIPPED_ALIAS_KEYS.While,e.EXPRESSIONWRAPPER_TYPES=r.FLIPPED_ALIAS_KEYS.ExpressionWrapper,e.FOR_TYPES=r.FLIPPED_ALIAS_KEYS.For,e.FORXSTATEMENT_TYPES=r.FLIPPED_ALIAS_KEYS.ForXStatement,e.FUNCTION_TYPES=r.FLIPPED_ALIAS_KEYS.Function,e.FUNCTIONPARENT_TYPES=r.FLIPPED_ALIAS_KEYS.FunctionParent,e.PUREISH_TYPES=r.FLIPPED_ALIAS_KEYS.Pureish,e.DECLARATION_TYPES=r.FLIPPED_ALIAS_KEYS.Declaration,e.FUNCTIONPARAMETER_TYPES=r.FLIPPED_ALIAS_KEYS.FunctionParameter,e.PATTERNLIKE_TYPES=r.FLIPPED_ALIAS_KEYS.PatternLike,e.LVAL_TYPES=r.FLIPPED_ALIAS_KEYS.LVal,e.TSENTITYNAME_TYPES=r.FLIPPED_ALIAS_KEYS.TSEntityName,e.LITERAL_TYPES=r.FLIPPED_ALIAS_KEYS.Literal,e.IMMUTABLE_TYPES=r.FLIPPED_ALIAS_KEYS.Immutable,e.USERWHITESPACABLE_TYPES=r.FLIPPED_ALIAS_KEYS.UserWhitespacable,e.METHOD_TYPES=r.FLIPPED_ALIAS_KEYS.Method,e.OBJECTMEMBER_TYPES=r.FLIPPED_ALIAS_KEYS.ObjectMember,e.PROPERTY_TYPES=r.FLIPPED_ALIAS_KEYS.Property,e.UNARYLIKE_TYPES=r.FLIPPED_ALIAS_KEYS.UnaryLike,e.PATTERN_TYPES=r.FLIPPED_ALIAS_KEYS.Pattern,e.CLASS_TYPES=r.FLIPPED_ALIAS_KEYS.Class;const i=e.IMPORTOREXPORTDECLARATION_TYPES=r.FLIPPED_ALIAS_KEYS.ImportOrExportDeclaration;e.EXPORTDECLARATION_TYPES=r.FLIPPED_ALIAS_KEYS.ExportDeclaration,e.MODULESPECIFIER_TYPES=r.FLIPPED_ALIAS_KEYS.ModuleSpecifier,e.ACCESSOR_TYPES=r.FLIPPED_ALIAS_KEYS.Accessor,e.PRIVATE_TYPES=r.FLIPPED_ALIAS_KEYS.Private,e.FLOW_TYPES=r.FLIPPED_ALIAS_KEYS.Flow,e.FLOWTYPE_TYPES=r.FLIPPED_ALIAS_KEYS.FlowType,e.FLOWBASEANNOTATION_TYPES=r.FLIPPED_ALIAS_KEYS.FlowBaseAnnotation,e.FLOWDECLARATION_TYPES=r.FLIPPED_ALIAS_KEYS.FlowDeclaration,e.FLOWPREDICATE_TYPES=r.FLIPPED_ALIAS_KEYS.FlowPredicate,e.ENUMBODY_TYPES=r.FLIPPED_ALIAS_KEYS.EnumBody,e.ENUMMEMBER_TYPES=r.FLIPPED_ALIAS_KEYS.EnumMember,e.JSX_TYPES=r.FLIPPED_ALIAS_KEYS.JSX,e.MISCELLANEOUS_TYPES=r.FLIPPED_ALIAS_KEYS.Miscellaneous,e.TYPESCRIPT_TYPES=r.FLIPPED_ALIAS_KEYS.TypeScript,e.TSTYPEELEMENT_TYPES=r.FLIPPED_ALIAS_KEYS.TSTypeElement,e.TSTYPE_TYPES=r.FLIPPED_ALIAS_KEYS.TSType,e.TSBASETYPE_TYPES=r.FLIPPED_ALIAS_KEYS.TSBaseType,e.MODULEDECLARATION_TYPES=i},60472:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;const n=[];for(let t=0;t<32;t++)n.push(" ".repeat(2*t));e.default=class{constructor(t,e){this._map=null,this._buf="",this._str="",this._appendCount=0,this._last=0,this._canMarkIdName=!0,this._indentChar="",this._queuedChar=0,this._position={line:1,column:0},this._sourcePosition={identifierName:void 0,identifierNamePos:void 0,line:void 0,column:void 0,filename:void 0},this._map=t,this._indentChar=e}get(){const{_map:t,_last:e}=this;32!==this._queuedChar&&this._flush();const n=10===e?(this._buf+this._str).trimRight():this._buf+this._str;if(null===t)return{code:n,decodedMap:void 0,map:null,rawMappings:void 0};const r={code:n,decodedMap:t.getDecoded(),get __mergedMap(){return this.map},get map(){const e=t.get();return r.map=e,e},set map(t){Object.defineProperty(r,"map",{value:t,writable:!0})},get rawMappings(){const e=t.getRawMappings();return r.rawMappings=e,e},set rawMappings(t){Object.defineProperty(r,"rawMappings",{value:t,writable:!0})}};return r}append(t,e,n=!1){this._flush(),this._append(t,e,n)}appendChar(t){this._flush(),this._appendChar(t,1,!0)}queue(t){this._flush(),this._queuedChar=t}_flush(){const t=this._queuedChar;0!==t&&(this._appendChar(t,1,!0),this._queuedChar=0)}_appendChar(t,e,r){if(this._last=t,-1===t){const t=e>=64?this._indentChar.repeat(e):n[e/2];this._str+=t}else this._str+=e>1?String.fromCharCode(t).repeat(e):String.fromCharCode(t);const i=32===t,s=this._position;if(10!==t){if(this._map){const t=this._sourcePosition;r&&t?(this._map.mark(s,t.line,t.column,i?void 0:t.identifierName,i?void 0:t.identifierNamePos,t.filename),!i&&this._canMarkIdName&&(t.identifierName=void 0,t.identifierNamePos=void 0)):this._map.mark(s)}s.column+=e}else s.line++,s.column=0}_append(t,e,n){const r=t.length,i=this._position,s=this._sourcePosition;this._last=-1,++this._appendCount>4096?(this._str,this._buf+=this._str,this._str=t,this._appendCount=0):this._str+=t;const o=!n&&null!==this._map;if(!e&&!o)return void(i.column+=r);const{column:a,identifierName:l,identifierNamePos:c,filename:u}=s;let h=s.line;null==l&&null==c||!this._canMarkIdName||(s.identifierName=void 0,s.identifierNamePos=void 0);let p=t.indexOf("\n"),d=0;for(o&&0!==p&&this._map.mark(i,h,a,l,c,u);-1!==p;)i.line++,i.column=0,d=p+1,d<r&&void 0!==h&&(h++,o&&this._map.mark(i,h,0,void 0,void 0,u)),p=t.indexOf("\n",d);i.column+=r-d}removeLastSemicolon(){59===this._queuedChar&&(this._queuedChar=0)}getLastChar(t){if(!t)return this._last;const e=this._queuedChar;return 0!==e?e:this._last}getNewlineCount(){return 0===this._queuedChar&&10===this._last?1:0}hasContent(){return 0!==this._last}exactSource(t,e){if(!this._map)return void e();this.source("start",t);const n=t.identifierName,r=this._sourcePosition;null!=n&&(this._canMarkIdName=!1,r.identifierName=n),e(),null!=n&&(this._canMarkIdName=!0,r.identifierName=void 0,r.identifierNamePos=void 0),this.source("end",t)}source(t,e){this._map&&this._normalizePosition(t,e,0)}sourceWithOffset(t,e,n){this._map&&this._normalizePosition(t,e,n)}_normalizePosition(t,e,n){this._flush();const r=e[t];r&&(this.setSourcePosition(r.line,Math.max(r.column+n,0)),this._sourcePosition.filename=e.filename)}setSourcePosition(t,e){const n=this._sourcePosition;n.line=t,n.column=e}getCurrentColumn(){return this._position.column+(this._queuedChar?1:0)}getCurrentLine(){return this._position.line}}},60744:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},61038:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(45632),o=n(27293);r({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0);return!0===o(e,(function(t){if(n(t,t,e))return!0}),!0)}})},61043:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){if("object"!=typeof e||"object"!=typeof n||null==e||null==n)return e===n;if(e.type!==n.type)return!1;const i=Object.keys(r.NODE_FIELDS[e.type]||e.type),s=r.VISITOR_KEYS[e.type];for(const r of i){const i=e[r],o=n[r];if(typeof i!=typeof o)return!1;if(null!=i||null!=o){if(null==i||null==o)return!1;if(Array.isArray(i)){if(!Array.isArray(o))return!1;if(i.length!==o.length)return!1;for(let e=0;e<i.length;e++)if(!t(i[e],o[e]))return!1}else if("object"!=typeof i||null!=s&&s.includes(r)){if(!t(i,o))return!1}else for(const t of Object.keys(i))if(i[t]!==o[t])return!1}}return!0};var r=n(49625)},61143:(t,e,n)=>{var r=n(2269),i=n(25178),s=n(59887);t.exports=function(t,e,n){var o,a;return s&&r(o=e.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&s(t,a),t}},61169:(t,e,n)=>{var r=n(3527).Buffer,i=n(7642),s=n(77871).ec,o=n(66112),a=n(36646);function l(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=0)throw new Error("invalid sig")}t.exports=function(t,e,n,c,u){var h=o(n);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new s(r),o=n.data.subjectPrivateKey.data;return i.verify(e,t,o)}(t,e,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var r=n.data.p,s=n.data.q,a=n.data.g,c=n.data.pub_key,u=o.signature.decode(t,"der"),h=u.s,p=u.r;l(h,s),l(p,s);var d=i.mont(r),f=h.invm(s);return 0===a.toRed(d).redPow(new i(e).mul(f).mod(s)).fromRed().mul(c.toRed(d).redPow(p.mul(f).mod(s)).fromRed()).mod(r).mod(s).cmp(p)}(t,e,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=r.concat([u,e]);for(var p=h.modulus.byteLength(),d=[1],f=0;e.length+d.length+2<p;)d.push(255),f+=1;d.push(0);for(var m=-1;++m<e.length;)d.push(e[m]);d=r.from(d);var y=i.mont(h.modulus);t=(t=new i(t).toRed(y)).redPow(new i(h.publicExponent)),t=r.from(t.fromRed().toArray());var g=f<8?1:0;for(p=Math.min(t.length,d.length),t.length!==d.length&&(g=1),m=-1;++m<p;)g|=t[m]^d[m];return 0===g}},62198:(t,e,n)=>{var r=n(14852),i=n(59767);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},62349:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.readCodePoint=c,e.readInt=l,e.readStringContents=function(t,e,n,r,i,a){const l=n,c=r,u=i;let h="",p=null,d=n;const{length:f}=e;for(;;){if(n>=f){a.unterminated(l,c,u),h+=e.slice(d,n);break}const m=e.charCodeAt(n);if(s(t,m,e,n)){h+=e.slice(d,n);break}if(92===m){h+=e.slice(d,n);const s=o(e,n,r,i,"template"===t,a);null!==s.ch||p?h+=s.ch:p={pos:n,lineStart:r,curLine:i},({pos:n,lineStart:r,curLine:i}=s),d=n}else 8232===m||8233===m?(++i,r=++n):10===m||13===m?"template"===t?(h+=e.slice(d,n)+"\n",++n,13===m&&10===e.charCodeAt(n)&&++n,++i,d=r=n):a.unterminated(l,c,u):++n}return{pos:n,str:h,firstInvalidLoc:p,lineStart:r,curLine:i,containsInvalid:!!p}};var n=function(t){return t>=48&&t<=57};const r={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},i={bin:t=>48===t||49===t,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function s(t,e,n,r){return"template"===t?96===e||36===e&&123===n.charCodeAt(r+1):e===("double"===t?34:39)}function o(t,e,n,r,i,s){const o=!i;e++;const l=t=>({pos:e,ch:t,lineStart:n,curLine:r}),u=t.charCodeAt(e++);switch(u){case 110:return l("\n");case 114:return l("\r");case 120:{let i;return({code:i,pos:e}=a(t,e,n,r,2,!1,o,s)),l(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:e}=c(t,e,n,r,o,s)),l(null===i?null:String.fromCodePoint(i))}case 116:return l("\t");case 98:return l("\b");case 118:return l("\v");case 102:return l("\f");case 13:10===t.charCodeAt(e)&&++e;case 10:n=e,++r;case 8232:case 8233:return l("");case 56:case 57:if(i)return l(null);s.strictNumericEscape(e-1,n,r);default:if(u>=48&&u<=55){const o=e-1;let a=/^[0-7]+/.exec(t.slice(o,e+2))[0],c=parseInt(a,8);c>255&&(a=a.slice(0,-1),c=parseInt(a,8)),e+=a.length-1;const u=t.charCodeAt(e);if("0"!==a||56===u||57===u){if(i)return l(null);s.strictNumericEscape(o,n,r)}return l(String.fromCharCode(c))}return l(String.fromCharCode(u))}}function a(t,e,n,r,i,s,o,a){const c=e;let u;return({n:u,pos:e}=l(t,e,n,r,16,i,s,!1,a,!o)),null===u&&(o?a.invalidEscapeSequence(c,n,r):e=c-1),{code:u,pos:e}}function l(t,e,s,o,a,l,c,u,h,p){const d=e,f=16===a?r.hex:r.decBinOct,m=16===a?i.hex:10===a?i.dec:8===a?i.oct:i.bin;let y=!1,g=0;for(let r=0,i=null==l?1/0:l;r<i;++r){const r=t.charCodeAt(e);let i;if(95!==r||"bail"===u){if(i=r>=97?r-97+10:r>=65?r-65+10:n(r)?r-48:1/0,i>=a){if(i<=9&&p)return{n:null,pos:e};if(i<=9&&h.invalidDigit(e,s,o,a))i=0;else{if(!c)break;i=0,y=!0}}++e,g=g*a+i}else{const n=t.charCodeAt(e-1),r=t.charCodeAt(e+1);if(u){if(Number.isNaN(r)||!m(r)||f.has(n)||f.has(r)){if(p)return{n:null,pos:e};h.unexpectedNumericSeparator(e,s,o)}}else{if(p)return{n:null,pos:e};h.numericSeparatorInEscapeSequence(e,s,o)}++e}}return e===d||null!=l&&e-d!==l||y?{n:null,pos:e}:{n:g,pos:e}}function c(t,e,n,r,i,s){let o;if(123===t.charCodeAt(e)){if(++e,({code:o,pos:e}=a(t,e,n,r,t.indexOf("}",e)-e,!0,i,s)),++e,null!==o&&o>1114111){if(!i)return{code:null,pos:e};s.invalidCodePoint(e,n,r)}}else({code:o,pos:e}=a(t,e,n,r,4,!1,i,s));return{code:o,pos:e}}},62837:(t,e,n)=>{var r=n(71755).has;t.exports=function(t){return r(t),t}},63315:(t,e,n)=>{n.d(e,{C:()=>r});const r={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"}},63678:(t,e,n)=>{var r=n(23486),i=n(71747),s=n(52069).remove;r({target:"WeakSet",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),n=!0,r=0,o=arguments.length;r<o;r++)t=s(e,arguments[r]),n=n&&t;return!!n}})},63745:(t,e,n)=>{function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,{A:()=>r})},63986:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=[];for(let n=0;n<t.children.length;n++){let s=t.children[n];(0,r.isJSXText)(s)?(0,i.default)(s,e):((0,r.isJSXExpressionContainer)(s)&&(s=s.expression),(0,r.isJSXEmptyExpression)(s)||e.push(s))}return e};var r=n(66360),i=n(77227)},64039:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){if(n&&"Identifier"===t.type&&"ObjectProperty"===e.type&&"ObjectExpression"===n.type)return!1;const i=r.default.keys[e.type];if(i)for(let n=0;n<i.length;n++){const r=e[i[n]];if(Array.isArray(r)){if(r.includes(t))return!0}else if(r===t)return!0}return!1};var r=n(17777)},64079:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){return(0,r.default)(t,i.default,e),t};var r=n(10647),i=n(96045)},64100:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e){const n=Array.from(e),s=new Map,o=new Map,a=new Set,l=[];for(let e=0;e<n.length;e++){const c=n[e];if(!c)continue;if(l.includes(c))continue;if((0,r.isTSAnyKeyword)(c))return[c];if((0,r.isTSBaseType)(c)){o.set(c.type,c);continue}if((0,r.isTSUnionType)(c)){a.has(c.types)||(n.push(...c.types),a.add(c.types));continue}const u="typeParameters";if((0,r.isTSTypeReference)(c)&&c[u]){const e=c[u],n=i(c.typeName);if(s.has(n)){let r=s.get(n);const i=r[u];i?(i.params.push(...e.params),i.params=t(i.params)):r=e}else s.set(n,c)}else l.push(c)}for(const[,t]of o)l.push(t);for(const[,t]of s)l.push(t);return l};var r=n(66360);function i(t){return(0,r.isIdentifier)(t)?t.name:(0,r.isThisExpression)(t)?"this":`${t.right.name}.${i(t.left)}`}},64418:(t,e,n)=>{var r=n(23486),i=n(14852),s=n(52479),o=n(9106),a=n(99071),l=n(33088),c=n(42399),u=n(35746),h=n(83115),p=n(84069),d=n(56965),f=s("SuppressedError"),m=ReferenceError,y=h("dispose"),g=h("toStringTag"),v="DisposableStack",b=p.set,T=p.getterFor(v),x="sync-dispose",S="disposed",w=function(t){var e=T(t);if(e.state===S)throw new m(v+" already disposed");return e},E=function(){b(a(this,A),{type:v,state:"pending",stack:[]}),i||(this.disposed=!1)},A=E.prototype;c(A,{dispose:function(){var t=T(this);if(t.state!==S){t.state=S,i||(this.disposed=!0);for(var e,n=t.stack,r=n.length,s=!1;r;){var o=n[--r];n[r]=null;try{o()}catch(t){s?e=new f(t,e):(s=!0,e=t)}}if(t.stack=null,s)throw e}},use:function(t){return d(w(this),t,x),t},adopt:function(t,e){var n=w(this);return o(e),d(n,void 0,x,(function(){e(t)})),t},defer:function(t){var e=w(this);o(t),d(e,void 0,x,t)},move:function(){var t=w(this),e=new E;return T(e).stack=t.stack,t.stack=[],t.state=S,i||(this.disposed=!0),e}}),i&&u(A,"disposed",{configurable:!0,get:function(){return T(this).state===S}}),l(A,y,A.dispose,{name:"dispose"}),l(A,g,v,{nonWritable:!0}),r({global:!0,constructor:!0},{DisposableStack:E})},64525:(t,e,n)=>{var r=n(25178);t.exports=function(t){return r(t)||null===t}},64690:(t,e,n)=>{var r=n(3527).Buffer,i=n(5590),s=n(49043),o=n(46324),a=n(39561),l=n(61169),c=n(4716);function u(t){s.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){s.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function p(t){return new u(t)}function d(t){return new h(t)}Object.keys(c).forEach((function(t){c[t].id=r.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),o(u,s.Writable),u.prototype._write=function(t,e,n){this._hash.update(t),n()},u.prototype.update=function(t,e){return this._hash.update("string"==typeof t?r.from(t,e):t),this},u.prototype.sign=function(t,e){this.end();var n=this._hash.digest(),r=a(n,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},o(h,s.Writable),h.prototype._write=function(t,e,n){this._hash.update(t),n()},h.prototype.update=function(t,e){return this._hash.update("string"==typeof t?r.from(t,e):t),this},h.prototype.verify=function(t,e,n){var i="string"==typeof e?r.from(e,n):e;this.end();var s=this._hash.digest();return l(i,s,t,this._signType,this._tag)},t.exports={Sign:p,Verify:d,createSign:p,createVerify:d}},64710:(t,e,n)=>{n.d(e,{Yc:()=>Dt,aS:()=>mt,b6:()=>T,cL:()=>R,pw:()=>_t});var r=n(38273),i=n(9283),s=n(10906),o=n(38325);function a(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return!!i&&(r(n.update(i)),!0)}}const l=a(f,0),c=a(d,0),u=a(((t,e)=>d(t,e,function(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}(e))),0);function h(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const p=50;function d(t,e,n=e.selection.ranges){let r=n.map((t=>h(e,t.from).block));if(!r.every((t=>t)))return null;let i=n.map(((t,n)=>function(t,{open:e,close:n},r,i){let s,o,a=t.sliceDoc(r-p,r),l=t.sliceDoc(i,i+p),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,h=a.length-c;if(a.slice(h-e.length,h)==e&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=2*p?s=o=t.sliceDoc(r,i):(s=t.sliceDoc(r,r+p),o=t.sliceDoc(i-p,i));let d=/^\s*/.exec(s)[0].length,f=/\s*$/.exec(o)[0].length,m=o.length-f-n.length;return s.slice(d,d+e.length)==e&&o.slice(m,m+n.length)==n?{open:{pos:r+d+e.length,margin:/\s/.test(s.charAt(d+e.length))?1:0},close:{pos:i-f-n.length,margin:/\s/.test(o.charAt(m-1))?1:0}}:null}(e,r[n],t.from,t.to)));if(2!=t&&!i.every((t=>t)))return{changes:e.changes(n.map(((t,e)=>i[e]?[]:[{from:t.from,insert:r[e].open+" "},{from:t.to,insert:" "+r[e].close}])))};if(1!=t&&i.some((t=>t))){let t=[];for(let e,n=0;n<i.length;n++)if(e=i[n]){let i=r[n],{open:s,close:o}=e;t.push({from:s.pos-i.open.length,to:s.pos+s.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:t}}return null}function f(t,e,n=e.selection.ranges){let r=[],i=-1;for(let{from:t,to:s}of n){let n=r.length,o=1e9,a=h(e,t).line;if(a){for(let n=t;n<=s;){let l=e.doc.lineAt(n);if(l.from>i&&(t==s||s>l.from)){i=l.from;let t=/^\s*/.exec(l.text)[0].length,e=t==l.length,n=l.text.slice(t,t+a.length)==a?t:-1;t<l.text.length&&t<o&&(o=t),r.push({line:l,comment:n,token:a,indent:t,empty:e,single:!1})}n=l.to+1}if(o<1e9)for(let t=n;t<r.length;t++)r[t].indent<r[t].line.text.length&&(r[t].indent=o);r.length==n+1&&(r[n].single=!0)}}if(2!=t&&r.some((t=>t.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:n,indent:i,empty:s,single:o}of r)!o&&s||t.push({from:e.from+i,insert:n+" "});let n=e.changes(t);return{changes:n,selection:e.selection.map(n,1)}}if(1!=t&&r.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:n,token:i}of r)if(n>=0){let r=e.from+n,s=r+i.length;" "==e.text[s-e.from]&&s++,t.push({from:r,to:s})}return{changes:t}}return null}const m=r.YH.define(),y=r.YH.define(),g=r.sj.define(),v=r.sj.define({combine:t=>(0,r.QR)(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(n,r)=>t(n,r)||e(n,r)})}),b=r.sU.define({create:()=>B.empty,update(t,e){let n=e.state.facet(v),i=e.annotation(m);if(i){let r=P.fromTransaction(e,i.selection),s=i.side,o=0==s?t.undone:t.done;return o=r?M(o,o.length,n.minDepth,r):O(o,e.startState.selection),new B(0==s?i.rest:o,0==s?o:i.rest)}let s=e.annotation(y);if("full"!=s&&"before"!=s||(t=t.isolate()),!1===e.annotation(r.ZX.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let o=P.fromTransaction(e),a=e.annotation(r.ZX.time),l=e.annotation(r.ZX.userEvent);return o?t=t.addChanges(o,a,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,l,n.newGroupDelay)),"full"!=s&&"after"!=s||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new B(t.done.map(P.fromJSON),t.undone.map(P.fromJSON))});function T(t={}){return[b,v.of(t),i.Lz.domEventHandlers({beforeinput(t,e){let n="historyUndo"==t.inputType?S:"historyRedo"==t.inputType?w:null;return!!n&&(t.preventDefault(),n(e))}})]}function x(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(b,!1);if(!i)return!1;let s=i.pop(t,n,e);return!!s&&(r(s),!0)}}const S=x(0,!1),w=x(1,!1),E=x(0,!0),A=x(1,!0);class P{constructor(t,e,n,r,i){this.changes=t,this.effects=e,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new P(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,n;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new P(t.changes&&r.VR.fromJSON(t.changes),[],t.mapped&&r.Gu.fromJSON(t.mapped),t.startSelection&&r.OF.fromJSON(t.startSelection),t.selectionsAfter.map(r.OF.fromJSON))}static fromTransaction(t,e){let n=k;for(let e of t.startState.facet(g)){let r=e(t);r.length&&(n=n.concat(r))}return!n.length&&t.changes.empty?null:new P(t.changes.invert(t.startState.doc),n,void 0,e||t.startState.selection,k)}static selection(t){return new P(void 0,k,void 0,void 0,t)}}function M(t,e,n,r){let i=e+1>n+20?e-n-1:0,s=t.slice(i,e);return s.push(r),s}function C(t,e){return t.length?e.length?t.concat(e):t:e}const k=[],I=200;function O(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-I));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),M(t,t.length-1,1e9,n.setSelAfter(r)))}return[P.selection([e])]}function N(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function _(t,e){if(!t.length)return t;let n=t.length,r=k;for(;n;){let i=D(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let e=t.slice(0,n);return e[n-1]=i,e}e=i.mapped,n--,r=i.selectionsAfter}return r.length?[P.selection(r)]:k}function D(t,e,n){let i=C(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):k,n);if(!t.changes)return P.selection(i);let s=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new P(s,r.Pe.mapEffects(t.effects,e),a,t.startSelection.map(o),i)}const L=/^(input\.type|delete)($|\.)/;class B{constructor(t,e,n=0,r=void 0){this.done=t,this.undone=e,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new B(this.done,this.undone):this}addChanges(t,e,n,i,s){let o=this.done,a=o[o.length-1];return o=a&&a.changes&&!a.changes.empty&&t.changes&&(!n||L.test(n))&&(!a.selectionsAfter.length&&e-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,function(t,e){let n=[],r=!1;return t.iterChangedRanges(((t,e)=>n.push(t,e))),e.iterChangedRanges(((t,e,i,s)=>{for(let t=0;t<n.length;){let e=n[t++],o=n[t++];s>=e&&i<=o&&(r=!0)}})),r}(a.changes,t.changes))||"input.type.compose"==n)?M(o,o.length-1,i.minDepth,new P(t.changes.compose(a.changes),C(r.Pe.mapEffects(t.effects,a.changes),a.effects),a.mapped,a.startSelection,k)):M(o,o.length,i.minDepth,t),new B(o,k,e,n)}addSelection(t,e,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:k;return i.length>0&&e-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&(s=i[i.length-1],o=t,s.ranges.length==o.ranges.length&&0===s.ranges.filter(((t,e)=>t.empty!=o.ranges[e].empty)).length)?this:new B(O(this.done,t),this.undone,e,n);var s,o}addMapping(t){return new B(_(this.done,t),_(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,n){let r=0==t?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1],s=i.selectionsAfter[0]||e.selection;if(n&&i.selectionsAfter.length)return e.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:m.of({side:t,rest:N(r),selection:s}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?k:r.slice(0,r.length-1);return i.mapped&&(n=_(n,i.mapped)),e.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:m.of({side:t,rest:n,selection:s}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}B.empty=new B(k,k);const R=[{key:"Mod-z",run:S,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:w,preventDefault:!0},{linux:"Ctrl-Shift-z",run:w,preventDefault:!0},{key:"Mod-u",run:E,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:A,preventDefault:!0}];function F(t,e){return r.OF.create(t.ranges.map(e),t.mainIndex)}function j(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function U({state:t,dispatch:e},n){let r=F(t.selection,n);return!r.eq(t.selection,!0)&&(e(j(t,r)),!0)}function V(t,e){return r.OF.cursor(e?t.to:t.from)}function z(t,e){return U(t,(n=>n.empty?t.moveByChar(n,e):V(n,e)))}function q(t){return t.textDirectionAt(t.state.selection.main.head)==i.OP.LTR}const $=t=>z(t,!q(t)),H=t=>z(t,q(t));function K(t,e){return U(t,(n=>n.empty?t.moveByGroup(n,e):V(n,e)))}function Y(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function W(t,e,n){let i,a,l=(0,s.mv)(t).resolveInner(e.head),c=n?o.uY.closedBy:o.uY.openedBy;for(let r=e.head;;){let e=n?l.childAfter(r):l.childBefore(r);if(!e)break;Y(t,e,c)?l=e:r=n?e.to:e.from}return a=l.type.prop(c)&&(i=n?(0,s.jU)(t,l.from,1):(0,s.jU)(t,l.to,-1))&&i.matched?n?i.end.to:i.end.from:n?l.to:l.from,r.OF.cursor(a,n?-1:1)}function J(t,e){return U(t,(n=>{if(!n.empty)return V(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)}))}"undefined"!=typeof Intl&&Intl.Segmenter;const X=t=>J(t,!1),G=t=>J(t,!0);function Z(t){let e,n=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,r=0,s=0;if(n){for(let e of t.state.facet(i.Lz.scrollMargins)){let n=e(t);(null==n?void 0:n.top)&&(r=Math.max(null==n?void 0:n.top,r)),(null==n?void 0:n.bottom)&&(s=Math.max(null==n?void 0:n.bottom,s))}e=t.scrollDOM.clientHeight-r-s}else e=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:s,selfScroll:n,height:Math.max(t.defaultLineHeight,e-5)}}function Q(t,e){let n,r=Z(t),{state:s}=t,o=F(s.selection,(n=>n.empty?t.moveVertically(n,e,r.height):V(n,e)));if(o.eq(s.selection))return!1;if(r.selfScroll){let e=t.coordsAtPos(s.selection.main.head),a=t.scrollDOM.getBoundingClientRect(),l=a.top+r.marginTop,c=a.bottom-r.marginBottom;e&&e.top>l&&e.bottom<c&&(n=i.Lz.scrollIntoView(o.main.head,{y:"start",yMargin:e.top-l}))}return t.dispatch(j(s,o),{effects:n}),!0}const tt=t=>Q(t,!1),et=t=>Q(t,!0);function nt(t,e,n){let i=t.lineBlockAt(e.head),s=t.moveToLineBoundary(e,n);if(s.head==e.head&&s.head!=(n?i.to:i.from)&&(s=t.moveToLineBoundary(e,n,!1)),!n&&s.head==i.from&&i.length){let n=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;n&&e.head!=i.from+n&&(s=r.OF.cursor(i.from+n))}return s}function rt(t,e){let n=F(t.state.selection,(t=>{let n=e(t);return r.OF.range(t.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)}));return!n.eq(t.state.selection)&&(t.dispatch(j(t.state,n)),!0)}function it(t,e){return rt(t,(n=>t.moveByChar(n,e)))}const st=t=>it(t,!q(t)),ot=t=>it(t,q(t));function at(t,e){return rt(t,(n=>t.moveByGroup(n,e)))}function lt(t,e){return rt(t,(n=>t.moveVertically(n,e)))}const ct=t=>lt(t,!1),ut=t=>lt(t,!0);function ht(t,e){return rt(t,(n=>t.moveVertically(n,e,Z(t).height)))}const pt=t=>ht(t,!1),dt=t=>ht(t,!0),ft=({state:t,dispatch:e})=>(e(j(t,{anchor:0})),!0),mt=({state:t,dispatch:e})=>(e(j(t,{anchor:t.doc.length})),!0),yt=({state:t,dispatch:e})=>(e(j(t,{anchor:t.selection.main.anchor,head:0})),!0),gt=({state:t,dispatch:e})=>(e(j(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function vt(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:s}=t,o=s.changeByRange((i=>{let{from:s,to:o}=i;if(s==o){let r=e(i);r<s?(n="delete.backward",r=bt(t,r,!1)):r>s&&(n="delete.forward",r=bt(t,r,!0)),s=Math.min(s,r),o=Math.max(o,r)}else s=bt(t,s,!1),o=bt(t,o,!0);return s==o?{range:i}:{changes:{from:s,to:o},range:r.OF.cursor(s,s<i.head?-1:1)}}));return!o.changes.empty&&(t.dispatch(s.update(o,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?i.Lz.announce.of(s.phrase("Selection deleted")):void 0})),!0)}function bt(t,e,n){if(t instanceof i.Lz)for(let r of t.state.facet(i.Lz.atomicRanges).map((e=>e(t))))r.between(e,e,((t,r)=>{t<e&&r>e&&(e=n?r:t)}));return e}const Tt=(t,e,n)=>vt(t,(i=>{let o,a,l=i.from,{state:c}=t,u=c.doc.lineAt(l);if(n&&!e&&l>u.from&&l<u.from+200&&!/[^ \t]/.test(o=u.text.slice(0,l-u.from))){if("\t"==o[o.length-1])return l-1;let t=(0,r.y$)(o,c.tabSize)%(0,s.tp)(c)||(0,s.tp)(c);for(let e=0;e<t&&" "==o[o.length-1-e];e++)l--;a=l}else a=(0,r.zK)(u.text,l-u.from,e,e)+u.from,a==l&&u.number!=(e?c.doc.lines:1)?a+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(u.text.slice(a-u.from,l-u.from))&&(a=(0,r.zK)(u.text,a-u.from,!1,!1)+u.from);return a})),xt=t=>Tt(t,!1,!0),St=t=>Tt(t,!0,!1),wt=(t,e)=>vt(t,(n=>{let i=n.head,{state:s}=t,o=s.doc.lineAt(i),a=s.charCategorizer(i);for(let t=null;;){if(i==(e?o.to:o.from)){i==n.head&&o.number!=(e?s.doc.lines:1)&&(i+=e?1:-1);break}let l=(0,r.zK)(o.text,i-o.from,e)+o.from,c=o.text.slice(Math.min(i,l)-o.from,Math.max(i,l)-o.from),u=a(c);if(null!=t&&u!=t)break;" "==c&&i==n.head||(t=u),i=l}return i})),Et=t=>wt(t,!1);function At(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),s=t.doc.lineAt(r.to);if(r.empty||r.to!=s.from||(s=t.doc.lineAt(r.to-1)),n>=i.number){let t=e[e.length-1];t.to=s.to,t.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});n=s.number+1}return e}function Pt(t,e,n){if(t.readOnly)return!1;let i=[],s=[];for(let e of At(t)){if(n?e.to==t.doc.length:0==e.from)continue;let o=t.doc.lineAt(n?e.to+1:e.from-1),a=o.length+1;if(n){i.push({from:e.to,to:o.to},{from:e.from,insert:o.text+t.lineBreak});for(let n of e.ranges)s.push(r.OF.range(Math.min(t.doc.length,n.anchor+a),Math.min(t.doc.length,n.head+a)))}else{i.push({from:o.from,to:e.from},{from:e.to,insert:t.lineBreak+o.text});for(let t of e.ranges)s.push(r.OF.range(t.anchor-a,t.head-a))}}return!!i.length&&(e(t.update({changes:i,scrollIntoView:!0,selection:r.OF.create(s,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Mt(t,e,n){if(t.readOnly)return!1;let r=[];for(let e of At(t))n?r.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):r.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Ct=kt(!1);function kt(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange((n=>{let{from:i,to:a}=n,l=e.doc.lineAt(i),c=!t&&i==a&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n,r=(0,s.mv)(t).resolveInner(e),i=r.childBefore(e),a=r.childAfter(e);return i&&a&&i.to<=e&&a.from>=e&&(n=i.type.prop(o.uY.closedBy))&&n.indexOf(a.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(a.from).from&&!/\S/.test(t.sliceDoc(i.to,a.from))?{from:i.to,to:a.from}:null}(e,i);t&&(i=a=(a<=l.to?l:e.doc.lineAt(a)).to);let u=new s.KB(e,{simulateBreak:i,simulateDoubleBreak:!!c}),h=(0,s._v)(u,i);for(null==h&&(h=(0,r.y$)(/^\s*/.exec(e.doc.lineAt(i).text)[0],e.tabSize));a<l.to&&/\s/.test(l.text[a-l.from]);)a++;c?({from:i,to:a}=c):i>l.from&&i<l.from+100&&!/\S/.test(l.text.slice(0,i))&&(i=l.from);let p=["",(0,s.EI)(e,h)];return c&&p.push((0,s.EI)(e,u.lineIndent(l.from,-1))),{changes:{from:i,to:a,insert:r.EY.of(p)},range:r.OF.cursor(i+1+p[1].length)}}));return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function It(t,e){let n=-1;return t.changeByRange((i=>{let s=[];for(let r=i.from;r<=i.to;){let o=t.doc.lineAt(r);o.number>n&&(i.empty||i.to>o.from)&&(e(o,s,i),n=o.number),r=o.to+1}let o=t.changes(s);return{changes:s,range:r.OF.range(o.mapPos(i.anchor,1),o.mapPos(i.head,1))}}))}const Ot=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(It(t,((e,n)=>{n.push({from:e.from,insert:t.facet(s.Xt)})})),{userEvent:"input.indent"})),!0),Nt=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(It(t,((e,n)=>{let i=/^\s*/.exec(e.text)[0];if(!i)return;let o=(0,r.y$)(i,t.tabSize),a=0,l=(0,s.EI)(t,Math.max(0,o-(0,s.tp)(t)));for(;a<i.length&&a<l.length&&i.charCodeAt(a)==l.charCodeAt(a);)a++;n.push({from:e.from+a,to:e.from+i.length,insert:l.slice(a)})})),{userEvent:"delete.dedent"})),!0),_t=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:t=>U(t,(e=>W(t.state,e,!q(t)))),shift:t=>rt(t,(e=>W(t.state,e,!q(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>U(t,(e=>W(t.state,e,q(t)))),shift:t=>rt(t,(e=>W(t.state,e,q(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Pt(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Mt(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Pt(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Mt(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=r.OF.create([n.main]):n.main.empty||(i=r.OF.create([r.OF.cursor(n.main.head)])),!!i&&(e(j(t,i)),!0)}},{key:"Mod-Enter",run:kt(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let n=At(t).map((({from:e,to:n})=>r.OF.range(e,Math.min(n+1,t.doc.length))));return e(t.update({selection:r.OF.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let n=F(t.selection,(e=>{let n=(0,s.mv)(t),i=n.resolveStack(e.from,1);if(e.empty){let t=n.resolveStack(e.from,-1);t.node.from>=i.node.from&&t.node.to<=i.node.to&&(i=t)}for(let t=i;t;t=t.next){let{node:n}=t;if((n.from<e.from&&n.to>=e.to||n.to>e.to&&n.from<=e.from)&&t.next)return r.OF.range(n.to,n.from)}return e}));return!n.eq(t.selection)&&(e(j(t,n)),!0)},preventDefault:!0},{key:"Mod-[",run:Nt},{key:"Mod-]",run:Ot},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new s.KB(t,{overrideIndentation:t=>{let e=n[t];return null==e?-1:e}}),i=It(t,((e,i,o)=>{let a=(0,s._v)(r,e.from);if(null==a)return;/\S/.test(e.text)||(a=0);let l=/^\s*/.exec(e.text)[0],c=(0,s.EI)(t,a);(l!=c||o.from<e.from+l.length)&&(n[e.from]=a,i.push({from:e.from,to:e.from+l.length,insert:c}))}));return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0}},{key:"Shift-Mod-k",run:t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(At(e).map((({from:t,to:n})=>(t>0?t--:n<e.doc.length&&n++,{from:t,to:n})))),r=F(e.selection,(e=>{let n;if(t.lineWrapping){let r=t.lineBlockAt(e.head),i=t.coordsAtPos(e.head,e.assoc||1);i&&(n=r.bottom+t.documentTop-i.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,n)})).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>function(t,e,n){let i=!1,o=F(t.selection,(e=>{let o=(0,s.jU)(t,e.head,-1)||(0,s.jU)(t,e.head,1)||e.head>0&&(0,s.jU)(t,e.head-1,1)||e.head<t.doc.length&&(0,s.jU)(t,e.head+1,-1);if(!o||!o.end)return e;i=!0;let a=o.start.from==e.head?o.end.to:o.end.from;return n?r.OF.range(e.anchor,a):r.OF.cursor(a)}));return!!i&&(e(j(t,o)),!0)}(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=h(t.state,n.from);return r.line?l(t):!!r.block&&u(t)}},{key:"Alt-A",run:c},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:$,shift:st,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>K(t,!q(t)),shift:t=>at(t,!q(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>U(t,(e=>nt(t,e,!q(t)))),shift:t=>rt(t,(e=>nt(t,e,!q(t)))),preventDefault:!0},{key:"ArrowRight",run:H,shift:ot,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>K(t,q(t)),shift:t=>at(t,q(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>U(t,(e=>nt(t,e,q(t)))),shift:t=>rt(t,(e=>nt(t,e,q(t)))),preventDefault:!0},{key:"ArrowUp",run:X,shift:ct,preventDefault:!0},{mac:"Cmd-ArrowUp",run:ft,shift:yt},{mac:"Ctrl-ArrowUp",run:tt,shift:pt},{key:"ArrowDown",run:G,shift:ut,preventDefault:!0},{mac:"Cmd-ArrowDown",run:mt,shift:gt},{mac:"Ctrl-ArrowDown",run:et,shift:dt},{key:"PageUp",run:tt,shift:pt},{key:"PageDown",run:et,shift:dt},{key:"Home",run:t=>U(t,(e=>nt(t,e,!1))),shift:t=>rt(t,(e=>nt(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:ft,shift:yt},{key:"End",run:t=>U(t,(e=>nt(t,e,!0))),shift:t=>rt(t,(e=>nt(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:mt,shift:gt},{key:"Enter",run:Ct,shift:Ct},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:xt,shift:xt},{key:"Delete",run:St},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Et},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>wt(t,!0)},{mac:"Mod-Backspace",run:t=>vt(t,(e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>vt(t,(e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}))}].concat([{key:"Ctrl-b",run:$,shift:st,preventDefault:!0},{key:"Ctrl-f",run:H,shift:ot},{key:"Ctrl-p",run:X,shift:ct},{key:"Ctrl-n",run:G,shift:ut},{key:"Ctrl-a",run:t=>U(t,(e=>r.OF.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>rt(t,(e=>r.OF.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>U(t,(e=>r.OF.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>rt(t,(e=>r.OF.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:St},{key:"Ctrl-h",run:xt},{key:"Ctrl-k",run:t=>vt(t,(e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}))},{key:"Ctrl-Alt-h",run:Et},{key:"Ctrl-o",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:r.EY.of(["",""])},range:r.OF.cursor(t.from)})));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let n=e.from,i=t.doc.lineAt(n),s=n==i.from?n-1:(0,r.zK)(i.text,n-i.from,!1)+i.from,o=n==i.to?n+1:(0,r.zK)(i.text,n-i.from,!0)+i.from;return{changes:{from:s,to:o,insert:t.doc.slice(n,o).append(t.doc.slice(s,n))},range:r.OF.cursor(o)}}));return!n.changes.empty&&(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:et}].map((t=>({mac:t.key,run:t.run,shift:t.shift}))))),Dt={key:"Tab",run:Ot,shift:Nt}},64813:t=>{t.exports=function(t){return null==t}},64902:(t,e,n)=>{function r(t,e){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},r(t,e)}n.d(e,{A:()=>r})},64971:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(74278);r({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return i(o,this,s(t))}})},64983:(t,e,n)=>{var r=n(69959),i=n(59767),s=n(51192).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!s(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},64990:(t,e,n)=>{var r=n(38460),i=n(3877).filterReject,s=n(30116),o=r.aTypedArray;(0,r.exportTypedArrayMethod)("filterReject",(function(t){var e=i(o(this),t,arguments.length>1?arguments[1]:void 0);return s(this,e)}),!0)},64997:(t,e,n)=>{var r=n(26600),i=n(59767),s=n(2269),o=n(17267),a=n(52479),l=n(38834),c=function(){},u=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,p=r(h.exec),d=!h.test(c),f=function(t){if(!s(t))return!1;try{return u(c,[],t),!0}catch(t){return!1}},m=function(t){if(!s(t))return!1;switch(o(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(h,l(t))}catch(t){return!0}};m.sham=!0,t.exports=!u||i((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?m:f},65166:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(45632),o=n(38378),a=n(27293),l=o.Set,c=o.add;r({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=new l;return a(e,(function(t){c(r,n(t,t,e))})),r}})},65841:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function t(e,n){const l=[];let c=!0;for(const u of e)if((0,i.isEmptyStatement)(u)||(c=!1),(0,i.isExpression)(u))l.push(u);else if((0,i.isExpressionStatement)(u))l.push(u.expression);else if((0,i.isVariableDeclaration)(u)){if("var"!==u.kind)return;for(const t of u.declarations){const e=(0,r.default)(t);for(const t of Object.keys(e))n.push({kind:u.kind,id:(0,a.default)(e[t])});t.init&&l.push((0,s.assignmentExpression)("=",t.id,t.init))}c=!0}else if((0,i.isIfStatement)(u)){const e=u.consequent?t([u.consequent],n):(0,o.buildUndefinedNode)(),r=u.alternate?t([u.alternate],n):(0,o.buildUndefinedNode)();if(!e||!r)return;l.push((0,s.conditionalExpression)(u.test,e,r))}else if((0,i.isBlockStatement)(u)){const e=t(u.body,n);if(!e)return;l.push(e)}else{if(!(0,i.isEmptyStatement)(u))return;0===e.indexOf(u)&&(c=!0)}return c&&l.push((0,o.buildUndefinedNode)()),1===l.length?l[0]:(0,s.sequenceExpression)(l)};var r=n(17777),i=n(66360),s=n(53287),o=n(51089),a=n(19415)},65895:(t,e,n)=>{var r=n(83115);e.f=r},66177:(t,e,n)=>{var r=n(51192),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},66260:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(!t||!e)return t;for(const n of r.INHERIT_KEYS.optional)null==t[n]&&(t[n]=e[n]);for(const n of Object.keys(e))n.startsWith("_")&&"__clone"!==n&&(t[n]=e[n]);for(const n of r.INHERIT_KEYS.force)t[n]=e[n];return(0,i.default)(t,e),t};var r=n(19910),i=n(24229)},66360:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isAccessor=function(t,e){return!!t&&("ClassAccessorProperty"===t.type&&(null==e||(0,r.default)(t,e)))},e.isAnyTypeAnnotation=function(t,e){return!!t&&"AnyTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isArgumentPlaceholder=function(t,e){return!!t&&"ArgumentPlaceholder"===t.type&&(null==e||(0,r.default)(t,e))},e.isArrayExpression=function(t,e){return!!t&&"ArrayExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isArrayPattern=function(t,e){return!!t&&"ArrayPattern"===t.type&&(null==e||(0,r.default)(t,e))},e.isArrayTypeAnnotation=function(t,e){return!!t&&"ArrayTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isArrowFunctionExpression=function(t,e){return!!t&&"ArrowFunctionExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isAssignmentExpression=function(t,e){return!!t&&"AssignmentExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isAssignmentPattern=function(t,e){return!!t&&"AssignmentPattern"===t.type&&(null==e||(0,r.default)(t,e))},e.isAwaitExpression=function(t,e){return!!t&&"AwaitExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isBigIntLiteral=function(t,e){return!!t&&"BigIntLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isBinary=function(t,e){if(!t)return!1;switch(t.type){case"BinaryExpression":case"LogicalExpression":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isBinaryExpression=function(t,e){return!!t&&"BinaryExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isBindExpression=function(t,e){return!!t&&"BindExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isBlock=function(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"Program":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isBlockParent=function(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isBlockStatement=function(t,e){return!!t&&"BlockStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isBooleanLiteral=function(t,e){return!!t&&"BooleanLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isBooleanLiteralTypeAnnotation=function(t,e){return!!t&&"BooleanLiteralTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isBooleanTypeAnnotation=function(t,e){return!!t&&"BooleanTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isBreakStatement=function(t,e){return!!t&&"BreakStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isCallExpression=function(t,e){return!!t&&"CallExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isCatchClause=function(t,e){return!!t&&"CatchClause"===t.type&&(null==e||(0,r.default)(t,e))},e.isClass=function(t,e){if(!t)return!1;switch(t.type){case"ClassExpression":case"ClassDeclaration":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isClassAccessorProperty=function(t,e){return!!t&&"ClassAccessorProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassBody=function(t,e){return!!t&&"ClassBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassDeclaration=function(t,e){return!!t&&"ClassDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassExpression=function(t,e){return!!t&&"ClassExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassImplements=function(t,e){return!!t&&"ClassImplements"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassMethod=function(t,e){return!!t&&"ClassMethod"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassPrivateMethod=function(t,e){return!!t&&"ClassPrivateMethod"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassPrivateProperty=function(t,e){return!!t&&"ClassPrivateProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isClassProperty=function(t,e){return!!t&&"ClassProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isCompletionStatement=function(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isConditional=function(t,e){if(!t)return!1;switch(t.type){case"ConditionalExpression":case"IfStatement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isConditionalExpression=function(t,e){return!!t&&"ConditionalExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isContinueStatement=function(t,e){return!!t&&"ContinueStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isDebuggerStatement=function(t,e){return!!t&&"DebuggerStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isDecimalLiteral=function(t,e){return!!t&&"DecimalLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclaration=function(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"VariableDeclaration":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":break;case"Placeholder":if("Declaration"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isDeclareClass=function(t,e){return!!t&&"DeclareClass"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareExportAllDeclaration=function(t,e){return!!t&&"DeclareExportAllDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareExportDeclaration=function(t,e){return!!t&&"DeclareExportDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareFunction=function(t,e){return!!t&&"DeclareFunction"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareInterface=function(t,e){return!!t&&"DeclareInterface"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareModule=function(t,e){return!!t&&"DeclareModule"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareModuleExports=function(t,e){return!!t&&"DeclareModuleExports"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareOpaqueType=function(t,e){return!!t&&"DeclareOpaqueType"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareTypeAlias=function(t,e){return!!t&&"DeclareTypeAlias"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclareVariable=function(t,e){return!!t&&"DeclareVariable"===t.type&&(null==e||(0,r.default)(t,e))},e.isDeclaredPredicate=function(t,e){return!!t&&"DeclaredPredicate"===t.type&&(null==e||(0,r.default)(t,e))},e.isDecorator=function(t,e){return!!t&&"Decorator"===t.type&&(null==e||(0,r.default)(t,e))},e.isDirective=function(t,e){return!!t&&"Directive"===t.type&&(null==e||(0,r.default)(t,e))},e.isDirectiveLiteral=function(t,e){return!!t&&"DirectiveLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isDoExpression=function(t,e){return!!t&&"DoExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isDoWhileStatement=function(t,e){return!!t&&"DoWhileStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isEmptyStatement=function(t,e){return!!t&&"EmptyStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isEmptyTypeAnnotation=function(t,e){return!!t&&"EmptyTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumBody=function(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isEnumBooleanBody=function(t,e){return!!t&&"EnumBooleanBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumBooleanMember=function(t,e){return!!t&&"EnumBooleanMember"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumDeclaration=function(t,e){return!!t&&"EnumDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumDefaultedMember=function(t,e){return!!t&&"EnumDefaultedMember"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumMember=function(t,e){if(!t)return!1;switch(t.type){case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isEnumNumberBody=function(t,e){return!!t&&"EnumNumberBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumNumberMember=function(t,e){return!!t&&"EnumNumberMember"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumStringBody=function(t,e){return!!t&&"EnumStringBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumStringMember=function(t,e){return!!t&&"EnumStringMember"===t.type&&(null==e||(0,r.default)(t,e))},e.isEnumSymbolBody=function(t,e){return!!t&&"EnumSymbolBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isExistsTypeAnnotation=function(t,e){return!!t&&"ExistsTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isExportAllDeclaration=function(t,e){return!!t&&"ExportAllDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isExportDeclaration=function(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isExportDefaultDeclaration=function(t,e){return!!t&&"ExportDefaultDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isExportDefaultSpecifier=function(t,e){return!!t&&"ExportDefaultSpecifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isExportNamedDeclaration=function(t,e){return!!t&&"ExportNamedDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isExportNamespaceSpecifier=function(t,e){return!!t&&"ExportNamespaceSpecifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isExportSpecifier=function(t,e){return!!t&&"ExportSpecifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isExpression=function(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ParenthesizedExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":case"ArrowFunctionExpression":case"ClassExpression":case"ImportExpression":case"MetaProperty":case"Super":case"TaggedTemplateExpression":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"OptionalMemberExpression":case"OptionalCallExpression":case"TypeCastExpression":case"JSXElement":case"JSXFragment":case"BindExpression":case"DoExpression":case"RecordExpression":case"TupleExpression":case"DecimalLiteral":case"ModuleExpression":case"TopicReference":case"PipelineTopicExpression":case"PipelineBareFunction":case"PipelinePrimaryTopicReference":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Expression":case"Identifier":case"StringLiteral":break;default:return!1}break;default:return!1}return null==e||(0,r.default)(t,e)},e.isExpressionStatement=function(t,e){return!!t&&"ExpressionStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isExpressionWrapper=function(t,e){if(!t)return!1;switch(t.type){case"ExpressionStatement":case"ParenthesizedExpression":case"TypeCastExpression":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFile=function(t,e){return!!t&&"File"===t.type&&(null==e||(0,r.default)(t,e))},e.isFlow=function(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ClassImplements":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"DeclaredPredicate":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"FunctionTypeParam":case"GenericTypeAnnotation":case"InferredPredicate":case"InterfaceExtends":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":case"OpaqueType":case"QualifiedTypeIdentifier":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"TypeAlias":case"TypeAnnotation":case"TypeCastExpression":case"TypeParameter":case"TypeParameterDeclaration":case"TypeParameterInstantiation":case"UnionTypeAnnotation":case"Variance":case"VoidTypeAnnotation":case"EnumDeclaration":case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFlowBaseAnnotation=function(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"BooleanTypeAnnotation":case"NullLiteralTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NumberTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"VoidTypeAnnotation":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFlowDeclaration=function(t,e){if(!t)return!1;switch(t.type){case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFlowPredicate=function(t,e){if(!t)return!1;switch(t.type){case"DeclaredPredicate":case"InferredPredicate":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFlowType=function(t,e){if(!t)return!1;switch(t.type){case"AnyTypeAnnotation":case"ArrayTypeAnnotation":case"BooleanTypeAnnotation":case"BooleanLiteralTypeAnnotation":case"NullLiteralTypeAnnotation":case"ExistsTypeAnnotation":case"FunctionTypeAnnotation":case"GenericTypeAnnotation":case"InterfaceTypeAnnotation":case"IntersectionTypeAnnotation":case"MixedTypeAnnotation":case"EmptyTypeAnnotation":case"NullableTypeAnnotation":case"NumberLiteralTypeAnnotation":case"NumberTypeAnnotation":case"ObjectTypeAnnotation":case"StringLiteralTypeAnnotation":case"StringTypeAnnotation":case"SymbolTypeAnnotation":case"ThisTypeAnnotation":case"TupleTypeAnnotation":case"TypeofTypeAnnotation":case"UnionTypeAnnotation":case"VoidTypeAnnotation":case"IndexedAccessType":case"OptionalIndexedAccessType":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFor=function(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForStatement":case"ForOfStatement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isForInStatement=function(t,e){return!!t&&"ForInStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isForOfStatement=function(t,e){return!!t&&"ForOfStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isForStatement=function(t,e){return!!t&&"ForStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isForXStatement=function(t,e){if(!t)return!1;switch(t.type){case"ForInStatement":case"ForOfStatement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFunction=function(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFunctionDeclaration=function(t,e){return!!t&&"FunctionDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isFunctionExpression=function(t,e){return!!t&&"FunctionExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isFunctionParameter=function(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Identifier"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFunctionParent=function(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"ObjectMethod":case"ArrowFunctionExpression":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isFunctionTypeAnnotation=function(t,e){return!!t&&"FunctionTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isFunctionTypeParam=function(t,e){return!!t&&"FunctionTypeParam"===t.type&&(null==e||(0,r.default)(t,e))},e.isGenericTypeAnnotation=function(t,e){return!!t&&"GenericTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isIdentifier=function(t,e){return!!t&&"Identifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isIfStatement=function(t,e){return!!t&&"IfStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isImmutable=function(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"BigIntLiteral":case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXOpeningElement":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isImport=function(t,e){return!!t&&"Import"===t.type&&(null==e||(0,r.default)(t,e))},e.isImportAttribute=function(t,e){return!!t&&"ImportAttribute"===t.type&&(null==e||(0,r.default)(t,e))},e.isImportDeclaration=function(t,e){return!!t&&"ImportDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isImportDefaultSpecifier=function(t,e){return!!t&&"ImportDefaultSpecifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isImportExpression=function(t,e){return!!t&&"ImportExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isImportNamespaceSpecifier=function(t,e){return!!t&&"ImportNamespaceSpecifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isImportOrExportDeclaration=s,e.isImportSpecifier=function(t,e){return!!t&&"ImportSpecifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isIndexedAccessType=function(t,e){return!!t&&"IndexedAccessType"===t.type&&(null==e||(0,r.default)(t,e))},e.isInferredPredicate=function(t,e){return!!t&&"InferredPredicate"===t.type&&(null==e||(0,r.default)(t,e))},e.isInterfaceDeclaration=function(t,e){return!!t&&"InterfaceDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isInterfaceExtends=function(t,e){return!!t&&"InterfaceExtends"===t.type&&(null==e||(0,r.default)(t,e))},e.isInterfaceTypeAnnotation=function(t,e){return!!t&&"InterfaceTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isInterpreterDirective=function(t,e){return!!t&&"InterpreterDirective"===t.type&&(null==e||(0,r.default)(t,e))},e.isIntersectionTypeAnnotation=function(t,e){return!!t&&"IntersectionTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSX=function(t,e){if(!t)return!1;switch(t.type){case"JSXAttribute":case"JSXClosingElement":case"JSXElement":case"JSXEmptyExpression":case"JSXExpressionContainer":case"JSXSpreadChild":case"JSXIdentifier":case"JSXMemberExpression":case"JSXNamespacedName":case"JSXOpeningElement":case"JSXSpreadAttribute":case"JSXText":case"JSXFragment":case"JSXOpeningFragment":case"JSXClosingFragment":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isJSXAttribute=function(t,e){return!!t&&"JSXAttribute"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXClosingElement=function(t,e){return!!t&&"JSXClosingElement"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXClosingFragment=function(t,e){return!!t&&"JSXClosingFragment"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXElement=function(t,e){return!!t&&"JSXElement"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXEmptyExpression=function(t,e){return!!t&&"JSXEmptyExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXExpressionContainer=function(t,e){return!!t&&"JSXExpressionContainer"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXFragment=function(t,e){return!!t&&"JSXFragment"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXIdentifier=function(t,e){return!!t&&"JSXIdentifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXMemberExpression=function(t,e){return!!t&&"JSXMemberExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXNamespacedName=function(t,e){return!!t&&"JSXNamespacedName"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXOpeningElement=function(t,e){return!!t&&"JSXOpeningElement"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXOpeningFragment=function(t,e){return!!t&&"JSXOpeningFragment"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXSpreadAttribute=function(t,e){return!!t&&"JSXSpreadAttribute"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXSpreadChild=function(t,e){return!!t&&"JSXSpreadChild"===t.type&&(null==e||(0,r.default)(t,e))},e.isJSXText=function(t,e){return!!t&&"JSXText"===t.type&&(null==e||(0,r.default)(t,e))},e.isLVal=function(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"TSParameterProperty":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return null==e||(0,r.default)(t,e)},e.isLabeledStatement=function(t,e){return!!t&&"LabeledStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isLiteral=function(t,e){if(!t)return!1;switch(t.type){case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"TemplateLiteral":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isLogicalExpression=function(t,e){return!!t&&"LogicalExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isLoop=function(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":case"ForOfStatement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isMemberExpression=function(t,e){return!!t&&"MemberExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isMetaProperty=function(t,e){return!!t&&"MetaProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isMethod=function(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isMiscellaneous=function(t,e){if(!t)return!1;switch(t.type){case"Noop":case"Placeholder":case"V8IntrinsicIdentifier":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isMixedTypeAnnotation=function(t,e){return!!t&&"MixedTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isModuleDeclaration=function(t,e){return(0,i.default)("isModuleDeclaration","isImportOrExportDeclaration"),s(t,e)},e.isModuleExpression=function(t,e){return!!t&&"ModuleExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isModuleSpecifier=function(t,e){if(!t)return!1;switch(t.type){case"ExportSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isNewExpression=function(t,e){return!!t&&"NewExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isNoop=function(t,e){return!!t&&"Noop"===t.type&&(null==e||(0,r.default)(t,e))},e.isNullLiteral=function(t,e){return!!t&&"NullLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isNullLiteralTypeAnnotation=function(t,e){return!!t&&"NullLiteralTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isNullableTypeAnnotation=function(t,e){return!!t&&"NullableTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isNumberLiteral=function(t,e){return(0,i.default)("isNumberLiteral","isNumericLiteral"),!!t&&"NumberLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isNumberLiteralTypeAnnotation=function(t,e){return!!t&&"NumberLiteralTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isNumberTypeAnnotation=function(t,e){return!!t&&"NumberTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isNumericLiteral=function(t,e){return!!t&&"NumericLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectExpression=function(t,e){return!!t&&"ObjectExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectMember=function(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isObjectMethod=function(t,e){return!!t&&"ObjectMethod"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectPattern=function(t,e){return!!t&&"ObjectPattern"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectProperty=function(t,e){return!!t&&"ObjectProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectTypeAnnotation=function(t,e){return!!t&&"ObjectTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectTypeCallProperty=function(t,e){return!!t&&"ObjectTypeCallProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectTypeIndexer=function(t,e){return!!t&&"ObjectTypeIndexer"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectTypeInternalSlot=function(t,e){return!!t&&"ObjectTypeInternalSlot"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectTypeProperty=function(t,e){return!!t&&"ObjectTypeProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isObjectTypeSpreadProperty=function(t,e){return!!t&&"ObjectTypeSpreadProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isOpaqueType=function(t,e){return!!t&&"OpaqueType"===t.type&&(null==e||(0,r.default)(t,e))},e.isOptionalCallExpression=function(t,e){return!!t&&"OptionalCallExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isOptionalIndexedAccessType=function(t,e){return!!t&&"OptionalIndexedAccessType"===t.type&&(null==e||(0,r.default)(t,e))},e.isOptionalMemberExpression=function(t,e){return!!t&&"OptionalMemberExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isParenthesizedExpression=function(t,e){return!!t&&"ParenthesizedExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isPattern=function(t,e){if(!t)return!1;switch(t.type){case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":break;case"Placeholder":if("Pattern"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isPatternLike=function(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"MemberExpression":case"RestElement":case"AssignmentPattern":case"ArrayPattern":case"ObjectPattern":case"VoidPattern":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":break;case"Placeholder":switch(t.expectedNode){case"Pattern":case"Identifier":break;default:return!1}break;default:return!1}return null==e||(0,r.default)(t,e)},e.isPipelineBareFunction=function(t,e){return!!t&&"PipelineBareFunction"===t.type&&(null==e||(0,r.default)(t,e))},e.isPipelinePrimaryTopicReference=function(t,e){return!!t&&"PipelinePrimaryTopicReference"===t.type&&(null==e||(0,r.default)(t,e))},e.isPipelineTopicExpression=function(t,e){return!!t&&"PipelineTopicExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isPlaceholder=function(t,e){return!!t&&"Placeholder"===t.type&&(null==e||(0,r.default)(t,e))},e.isPrivate=function(t,e){if(!t)return!1;switch(t.type){case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isPrivateName=function(t,e){return!!t&&"PrivateName"===t.type&&(null==e||(0,r.default)(t,e))},e.isProgram=function(t,e){return!!t&&"Program"===t.type&&(null==e||(0,r.default)(t,e))},e.isProperty=function(t,e){if(!t)return!1;switch(t.type){case"ObjectProperty":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isPureish=function(t,e){if(!t)return!1;switch(t.type){case"FunctionDeclaration":case"FunctionExpression":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"ArrowFunctionExpression":case"BigIntLiteral":case"DecimalLiteral":break;case"Placeholder":if("StringLiteral"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isQualifiedTypeIdentifier=function(t,e){return!!t&&"QualifiedTypeIdentifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isRecordExpression=function(t,e){return!!t&&"RecordExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isRegExpLiteral=function(t,e){return!!t&&"RegExpLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isRegexLiteral=function(t,e){return(0,i.default)("isRegexLiteral","isRegExpLiteral"),!!t&&"RegexLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isRestElement=function(t,e){return!!t&&"RestElement"===t.type&&(null==e||(0,r.default)(t,e))},e.isRestProperty=function(t,e){return(0,i.default)("isRestProperty","isRestElement"),!!t&&"RestProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isReturnStatement=function(t,e){return!!t&&"ReturnStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isScopable=function(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"CatchClause":case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Program":case"ObjectMethod":case"SwitchStatement":case"WhileStatement":case"ArrowFunctionExpression":case"ClassExpression":case"ClassDeclaration":case"ForOfStatement":case"ClassMethod":case"ClassPrivateMethod":case"StaticBlock":case"TSModuleBlock":break;case"Placeholder":if("BlockStatement"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isSequenceExpression=function(t,e){return!!t&&"SequenceExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isSpreadElement=function(t,e){return!!t&&"SpreadElement"===t.type&&(null==e||(0,r.default)(t,e))},e.isSpreadProperty=function(t,e){return(0,i.default)("isSpreadProperty","isSpreadElement"),!!t&&"SpreadProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isStandardized=function(t,e){if(!t)return!1;switch(t.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"InterpreterDirective":case"Directive":case"DirectiveLiteral":case"BlockStatement":case"BreakStatement":case"CallExpression":case"CatchClause":case"ConditionalExpression":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"File":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"FunctionExpression":case"Identifier":case"IfStatement":case"LabeledStatement":case"StringLiteral":case"NumericLiteral":case"NullLiteral":case"BooleanLiteral":case"RegExpLiteral":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"Program":case"ObjectExpression":case"ObjectMethod":case"ObjectProperty":case"RestElement":case"ReturnStatement":case"SequenceExpression":case"ParenthesizedExpression":case"SwitchCase":case"SwitchStatement":case"ThisExpression":case"ThrowStatement":case"TryStatement":case"UnaryExpression":case"UpdateExpression":case"VariableDeclaration":case"VariableDeclarator":case"WhileStatement":case"WithStatement":case"AssignmentPattern":case"ArrayPattern":case"ArrowFunctionExpression":case"ClassBody":case"ClassExpression":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportSpecifier":case"ForOfStatement":case"ImportDeclaration":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportExpression":case"MetaProperty":case"ClassMethod":case"ObjectPattern":case"SpreadElement":case"Super":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"YieldExpression":case"AwaitExpression":case"Import":case"BigIntLiteral":case"ExportNamespaceSpecifier":case"OptionalMemberExpression":case"OptionalCallExpression":case"ClassProperty":case"ClassAccessorProperty":case"ClassPrivateProperty":case"ClassPrivateMethod":case"PrivateName":case"StaticBlock":case"ImportAttribute":break;case"Placeholder":switch(t.expectedNode){case"Identifier":case"StringLiteral":case"BlockStatement":case"ClassBody":break;default:return!1}break;default:return!1}return null==e||(0,r.default)(t,e)},e.isStatement=function(t,e){if(!t)return!1;switch(t.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"FunctionDeclaration":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":case"ClassDeclaration":case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ForOfStatement":case"ImportDeclaration":case"DeclareClass":case"DeclareFunction":case"DeclareInterface":case"DeclareModule":case"DeclareModuleExports":case"DeclareTypeAlias":case"DeclareOpaqueType":case"DeclareVariable":case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":case"InterfaceDeclaration":case"OpaqueType":case"TypeAlias":case"EnumDeclaration":case"TSDeclareFunction":case"TSInterfaceDeclaration":case"TSTypeAliasDeclaration":case"TSEnumDeclaration":case"TSModuleDeclaration":case"TSImportEqualsDeclaration":case"TSExportAssignment":case"TSNamespaceExportDeclaration":break;case"Placeholder":switch(t.expectedNode){case"Statement":case"Declaration":case"BlockStatement":break;default:return!1}break;default:return!1}return null==e||(0,r.default)(t,e)},e.isStaticBlock=function(t,e){return!!t&&"StaticBlock"===t.type&&(null==e||(0,r.default)(t,e))},e.isStringLiteral=function(t,e){return!!t&&"StringLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isStringLiteralTypeAnnotation=function(t,e){return!!t&&"StringLiteralTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isStringTypeAnnotation=function(t,e){return!!t&&"StringTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isSuper=function(t,e){return!!t&&"Super"===t.type&&(null==e||(0,r.default)(t,e))},e.isSwitchCase=function(t,e){return!!t&&"SwitchCase"===t.type&&(null==e||(0,r.default)(t,e))},e.isSwitchStatement=function(t,e){return!!t&&"SwitchStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isSymbolTypeAnnotation=function(t,e){return!!t&&"SymbolTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSAnyKeyword=function(t,e){return!!t&&"TSAnyKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSArrayType=function(t,e){return!!t&&"TSArrayType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSAsExpression=function(t,e){return!!t&&"TSAsExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSBaseType=function(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSTemplateLiteralType":case"TSLiteralType":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isTSBigIntKeyword=function(t,e){return!!t&&"TSBigIntKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSBooleanKeyword=function(t,e){return!!t&&"TSBooleanKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSCallSignatureDeclaration=function(t,e){return!!t&&"TSCallSignatureDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSConditionalType=function(t,e){return!!t&&"TSConditionalType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSConstructSignatureDeclaration=function(t,e){return!!t&&"TSConstructSignatureDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSConstructorType=function(t,e){return!!t&&"TSConstructorType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSDeclareFunction=function(t,e){return!!t&&"TSDeclareFunction"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSDeclareMethod=function(t,e){return!!t&&"TSDeclareMethod"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSEntityName=function(t,e){if(!t)return!1;switch(t.type){case"Identifier":case"TSQualifiedName":break;case"Placeholder":if("Identifier"===t.expectedNode)break;default:return!1}return null==e||(0,r.default)(t,e)},e.isTSEnumBody=function(t,e){return!!t&&"TSEnumBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSEnumDeclaration=function(t,e){return!!t&&"TSEnumDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSEnumMember=function(t,e){return!!t&&"TSEnumMember"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSExportAssignment=function(t,e){return!!t&&"TSExportAssignment"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSExpressionWithTypeArguments=function(t,e){return!!t&&"TSExpressionWithTypeArguments"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSExternalModuleReference=function(t,e){return!!t&&"TSExternalModuleReference"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSFunctionType=function(t,e){return!!t&&"TSFunctionType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSImportEqualsDeclaration=function(t,e){return!!t&&"TSImportEqualsDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSImportType=function(t,e){return!!t&&"TSImportType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSIndexSignature=function(t,e){return!!t&&"TSIndexSignature"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSIndexedAccessType=function(t,e){return!!t&&"TSIndexedAccessType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSInferType=function(t,e){return!!t&&"TSInferType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSInstantiationExpression=function(t,e){return!!t&&"TSInstantiationExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSInterfaceBody=function(t,e){return!!t&&"TSInterfaceBody"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSInterfaceDeclaration=function(t,e){return!!t&&"TSInterfaceDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSIntersectionType=function(t,e){return!!t&&"TSIntersectionType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSIntrinsicKeyword=function(t,e){return!!t&&"TSIntrinsicKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSLiteralType=function(t,e){return!!t&&"TSLiteralType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSMappedType=function(t,e){return!!t&&"TSMappedType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSMethodSignature=function(t,e){return!!t&&"TSMethodSignature"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSModuleBlock=function(t,e){return!!t&&"TSModuleBlock"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSModuleDeclaration=function(t,e){return!!t&&"TSModuleDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSNamedTupleMember=function(t,e){return!!t&&"TSNamedTupleMember"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSNamespaceExportDeclaration=function(t,e){return!!t&&"TSNamespaceExportDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSNeverKeyword=function(t,e){return!!t&&"TSNeverKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSNonNullExpression=function(t,e){return!!t&&"TSNonNullExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSNullKeyword=function(t,e){return!!t&&"TSNullKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSNumberKeyword=function(t,e){return!!t&&"TSNumberKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSObjectKeyword=function(t,e){return!!t&&"TSObjectKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSOptionalType=function(t,e){return!!t&&"TSOptionalType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSParameterProperty=function(t,e){return!!t&&"TSParameterProperty"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSParenthesizedType=function(t,e){return!!t&&"TSParenthesizedType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSPropertySignature=function(t,e){return!!t&&"TSPropertySignature"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSQualifiedName=function(t,e){return!!t&&"TSQualifiedName"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSRestType=function(t,e){return!!t&&"TSRestType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSSatisfiesExpression=function(t,e){return!!t&&"TSSatisfiesExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSStringKeyword=function(t,e){return!!t&&"TSStringKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSSymbolKeyword=function(t,e){return!!t&&"TSSymbolKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTemplateLiteralType=function(t,e){return!!t&&"TSTemplateLiteralType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSThisType=function(t,e){return!!t&&"TSThisType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTupleType=function(t,e){return!!t&&"TSTupleType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSType=function(t,e){if(!t)return!1;switch(t.type){case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSImportType":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isTSTypeAliasDeclaration=function(t,e){return!!t&&"TSTypeAliasDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeAnnotation=function(t,e){return!!t&&"TSTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeAssertion=function(t,e){return!!t&&"TSTypeAssertion"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeElement=function(t,e){if(!t)return!1;switch(t.type){case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isTSTypeLiteral=function(t,e){return!!t&&"TSTypeLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeOperator=function(t,e){return!!t&&"TSTypeOperator"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeParameter=function(t,e){return!!t&&"TSTypeParameter"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeParameterDeclaration=function(t,e){return!!t&&"TSTypeParameterDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeParameterInstantiation=function(t,e){return!!t&&"TSTypeParameterInstantiation"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypePredicate=function(t,e){return!!t&&"TSTypePredicate"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeQuery=function(t,e){return!!t&&"TSTypeQuery"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSTypeReference=function(t,e){return!!t&&"TSTypeReference"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSUndefinedKeyword=function(t,e){return!!t&&"TSUndefinedKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSUnionType=function(t,e){return!!t&&"TSUnionType"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSUnknownKeyword=function(t,e){return!!t&&"TSUnknownKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTSVoidKeyword=function(t,e){return!!t&&"TSVoidKeyword"===t.type&&(null==e||(0,r.default)(t,e))},e.isTaggedTemplateExpression=function(t,e){return!!t&&"TaggedTemplateExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTemplateElement=function(t,e){return!!t&&"TemplateElement"===t.type&&(null==e||(0,r.default)(t,e))},e.isTemplateLiteral=function(t,e){return!!t&&"TemplateLiteral"===t.type&&(null==e||(0,r.default)(t,e))},e.isTerminatorless=function(t,e){if(!t)return!1;switch(t.type){case"BreakStatement":case"ContinueStatement":case"ReturnStatement":case"ThrowStatement":case"YieldExpression":case"AwaitExpression":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isThisExpression=function(t,e){return!!t&&"ThisExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isThisTypeAnnotation=function(t,e){return!!t&&"ThisTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isThrowStatement=function(t,e){return!!t&&"ThrowStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isTopicReference=function(t,e){return!!t&&"TopicReference"===t.type&&(null==e||(0,r.default)(t,e))},e.isTryStatement=function(t,e){return!!t&&"TryStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isTupleExpression=function(t,e){return!!t&&"TupleExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTupleTypeAnnotation=function(t,e){return!!t&&"TupleTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeAlias=function(t,e){return!!t&&"TypeAlias"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeAnnotation=function(t,e){return!!t&&"TypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeCastExpression=function(t,e){return!!t&&"TypeCastExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeParameter=function(t,e){return!!t&&"TypeParameter"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeParameterDeclaration=function(t,e){return!!t&&"TypeParameterDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeParameterInstantiation=function(t,e){return!!t&&"TypeParameterInstantiation"===t.type&&(null==e||(0,r.default)(t,e))},e.isTypeScript=function(t,e){if(!t)return!1;switch(t.type){case"TSParameterProperty":case"TSDeclareFunction":case"TSDeclareMethod":case"TSQualifiedName":case"TSCallSignatureDeclaration":case"TSConstructSignatureDeclaration":case"TSPropertySignature":case"TSMethodSignature":case"TSIndexSignature":case"TSAnyKeyword":case"TSBooleanKeyword":case"TSBigIntKeyword":case"TSIntrinsicKeyword":case"TSNeverKeyword":case"TSNullKeyword":case"TSNumberKeyword":case"TSObjectKeyword":case"TSStringKeyword":case"TSSymbolKeyword":case"TSUndefinedKeyword":case"TSUnknownKeyword":case"TSVoidKeyword":case"TSThisType":case"TSFunctionType":case"TSConstructorType":case"TSTypeReference":case"TSTypePredicate":case"TSTypeQuery":case"TSTypeLiteral":case"TSArrayType":case"TSTupleType":case"TSOptionalType":case"TSRestType":case"TSNamedTupleMember":case"TSUnionType":case"TSIntersectionType":case"TSConditionalType":case"TSInferType":case"TSParenthesizedType":case"TSTypeOperator":case"TSIndexedAccessType":case"TSMappedType":case"TSTemplateLiteralType":case"TSLiteralType":case"TSExpressionWithTypeArguments":case"TSInterfaceDeclaration":case"TSInterfaceBody":case"TSTypeAliasDeclaration":case"TSInstantiationExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSEnumBody":case"TSEnumDeclaration":case"TSEnumMember":case"TSModuleDeclaration":case"TSModuleBlock":case"TSImportType":case"TSImportEqualsDeclaration":case"TSExternalModuleReference":case"TSNonNullExpression":case"TSExportAssignment":case"TSNamespaceExportDeclaration":case"TSTypeAnnotation":case"TSTypeParameterInstantiation":case"TSTypeParameterDeclaration":case"TSTypeParameter":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isTypeofTypeAnnotation=function(t,e){return!!t&&"TypeofTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isUnaryExpression=function(t,e){return!!t&&"UnaryExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isUnaryLike=function(t,e){if(!t)return!1;switch(t.type){case"UnaryExpression":case"SpreadElement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isUnionTypeAnnotation=function(t,e){return!!t&&"UnionTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isUpdateExpression=function(t,e){return!!t&&"UpdateExpression"===t.type&&(null==e||(0,r.default)(t,e))},e.isUserWhitespacable=function(t,e){if(!t)return!1;switch(t.type){case"ObjectMethod":case"ObjectProperty":case"ObjectTypeInternalSlot":case"ObjectTypeCallProperty":case"ObjectTypeIndexer":case"ObjectTypeProperty":case"ObjectTypeSpreadProperty":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isV8IntrinsicIdentifier=function(t,e){return!!t&&"V8IntrinsicIdentifier"===t.type&&(null==e||(0,r.default)(t,e))},e.isVariableDeclaration=function(t,e){return!!t&&"VariableDeclaration"===t.type&&(null==e||(0,r.default)(t,e))},e.isVariableDeclarator=function(t,e){return!!t&&"VariableDeclarator"===t.type&&(null==e||(0,r.default)(t,e))},e.isVariance=function(t,e){return!!t&&"Variance"===t.type&&(null==e||(0,r.default)(t,e))},e.isVoidPattern=function(t,e){return!!t&&"VoidPattern"===t.type&&(null==e||(0,r.default)(t,e))},e.isVoidTypeAnnotation=function(t,e){return!!t&&"VoidTypeAnnotation"===t.type&&(null==e||(0,r.default)(t,e))},e.isWhile=function(t,e){if(!t)return!1;switch(t.type){case"DoWhileStatement":case"WhileStatement":break;default:return!1}return null==e||(0,r.default)(t,e)},e.isWhileStatement=function(t,e){return!!t&&"WhileStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isWithStatement=function(t,e){return!!t&&"WithStatement"===t.type&&(null==e||(0,r.default)(t,e))},e.isYieldExpression=function(t,e){return!!t&&"YieldExpression"===t.type&&(null==e||(0,r.default)(t,e))};var r=n(1440),i=n(56826);function s(t,e){if(!t)return!1;switch(t.type){case"ExportAllDeclaration":case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ImportDeclaration":break;default:return!1}return null==e||(0,r.default)(t,e)}},67004:(t,e,n)=>{var r=n(26792),i=n(26600);t.exports=function(t){if("Function"===r(t))return i(t)}},67345:(t,e,n)=>{var r=n(93888),i="undefined"==typeof globalThis?n.g:globalThis;t.exports=function(){for(var t=[],e=0;e<r.length;e++)"function"==typeof i[r[e]]&&(t[t.length]=r[e]);return t}},67583:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e=!0){return"string"==typeof t&&((!e||!(0,r.isKeyword)(t)&&!(0,r.isStrictReservedWord)(t,!0))&&(0,r.isIdentifierName)(t))};var r=n(32960)},67892:t=>{t.exports=function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}},68200:(t,e,n)=>{var r=n(41100),i=n(93263);t.exports=Object.keys||function(t){return r(t,i)}},68456:(t,e,n)=>{var r=n(45632),i=n(38378),s=n(54430),o=n(86058),a=n(35525),l=n(27293),c=n(52307),u=i.has,h=i.remove;t.exports=function(t){var e=r(this),n=a(t),i=s(e);return o(i)<=n.size?l(i,(function(t){n.includes(t)&&h(i,t)})):c(n.getIterator(),(function(t){u(i,t)&&h(i,t)})),i}},68787:function(t,e,n){!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function s(t,e,n){if(s.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var o;"object"==typeof t?t.exports=s:e.BN=s,s.BN=s,s.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(34110).Buffer}catch(t){}function a(t,e){var n=t.charCodeAt(e);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(t,e,n){var r=a(t,n);return n-1>=e&&(r|=a(t,n-1)<<4),r}function c(t,e,n,r){for(var i=0,s=Math.min(t.length,n),o=e;o<s;o++){var a=t.charCodeAt(o)-48;i*=r,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}s.isBN=function(t){return t instanceof s||null!==t&&"object"==typeof t&&t.constructor.wordSize===s.wordSize&&Array.isArray(t.words)},s.max=function(t,e){return t.cmp(e)>0?t:e},s.min=function(t,e){return t.cmp(e)<0?t:e},s.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,n):(this._parseBase(t,e,i),"le"===n&&this._initArray(this.toArray(),e,n)))},s.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},s.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var s,o,a=0;if("be"===n)for(i=t.length-1,s=0;i>=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);else if("le"===n)for(i=0,s=0;i<t.length;i+=3)o=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[s]|=o<<a&67108863,this.words[s+1]=o>>>26-a&67108863,(a+=24)>=26&&(a-=26,s++);return this.strip()},s.prototype._parseHex=function(t,e,n){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,s=0,o=0;if("be"===n)for(r=t.length-1;r>=e;r-=2)i=l(t,e,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;else for(r=(t.length-e)%2==0?e+1:e;r<t.length;r+=2)i=l(t,e,r)<<s,this.words[o]|=67108863&i,s>=18?(s-=18,o+=1,this.words[o]|=i>>>26):s+=8;this.strip()},s.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var s=t.length-n,o=s%r,a=Math.min(s,s-o)+n,l=0,u=n;u<a;u+=r)l=c(t,u,u+r,e),this.imuln(i),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==o){var h=1;for(l=c(t,u,t.length,e),u=0;u<o;u++)h*=e;this.imuln(h),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},s.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},s.prototype.clone=function(){var t=new s(null);return this.copy(t),t},s.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],s=0|e.words[0],o=i*s,a=67108863&o,l=o/67108864|0;n.words[0]=a;for(var c=1;c<r;c++){for(var u=l>>>26,h=67108863&l,p=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=p;d++){var f=c-d|0;u+=(o=(i=0|t.words[f])*(s=0|e.words[d])+h)/67108864|0,h=67108863&o}n.words[c]=0|h,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}s.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,s=0,o=0;o<this.length;o++){var a=this.words[o],l=(16777215&(a<<i|s)).toString(16);n=0!=(s=a>>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+n:l+n,(i+=2)>=26&&(i-=26,o--)}for(0!==s&&(n=s.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],d=p[t];n="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modn(d).toString(t);n=(f=f.idivn(d)).isZero()?m+n:u[c-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},s.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},s.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),s=n||Math.max(1,i);r(i<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var o,a,l="le"===e,c=new t(s),u=this.clone();if(l){for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),c[a]=o;for(;a<s;a++)c[a]=0}else{for(a=0;a<s-i;a++)c[a]=0;for(a=0;!u.isZero();a++)o=u.andln(255),u.iushrn(8),c[s-a-1]=o}return c},Math.clz32?s.prototype._countBits=function(t){return 32-Math.clz32(t)}:s.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},s.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 8191&e||(n+=13,e>>>=13),127&e||(n+=7,e>>>=7),15&e||(n+=4,e>>>=4),3&e||(n+=2,e>>>=2),1&e||n++,n},s.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},s.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},s.prototype.ior=function(t){return r(!(this.negative|t.negative)),this.iuor(t)},s.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},s.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},s.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},s.prototype.iand=function(t){return r(!(this.negative|t.negative)),this.iuand(t)},s.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},s.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},s.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},s.prototype.ixor=function(t){return r(!(this.negative|t.negative)),this.iuxor(t)},s.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},s.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},s.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},s.prototype.notn=function(t){return this.clone().inotn(t)},s.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},s.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,s=0;s<r.length;s++)e=(0|n.words[s])+(0|r.words[s])+i,this.words[s]=67108863&e,i=e>>>26;for(;0!==i&&s<n.length;s++)e=(0|n.words[s])+i,this.words[s]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;s<n.length;s++)this.words[s]=n.words[s];return this},s.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},s.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var s=0,o=0;o<r.length;o++)s=(e=(0|n.words[o])-(0|r.words[o])+s)>>26,this.words[o]=67108863&e;for(;0!==s&&o<n.length;o++)s=(e=(0|n.words[o])+s)>>26,this.words[o]=67108863&e;if(0===s&&o<n.length&&n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this.length=Math.max(this.length,o),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(t){return this.clone().isub(t)};var f=function(t,e,n){var r,i,s,o=t.words,a=e.words,l=n.words,c=0,u=0|o[0],h=8191&u,p=u>>>13,d=0|o[1],f=8191&d,m=d>>>13,y=0|o[2],g=8191&y,v=y>>>13,b=0|o[3],T=8191&b,x=b>>>13,S=0|o[4],w=8191&S,E=S>>>13,A=0|o[5],P=8191&A,M=A>>>13,C=0|o[6],k=8191&C,I=C>>>13,O=0|o[7],N=8191&O,_=O>>>13,D=0|o[8],L=8191&D,B=D>>>13,R=0|o[9],F=8191&R,j=R>>>13,U=0|a[0],V=8191&U,z=U>>>13,q=0|a[1],$=8191&q,H=q>>>13,K=0|a[2],Y=8191&K,W=K>>>13,J=0|a[3],X=8191&J,G=J>>>13,Z=0|a[4],Q=8191&Z,tt=Z>>>13,et=0|a[5],nt=8191&et,rt=et>>>13,it=0|a[6],st=8191&it,ot=it>>>13,at=0|a[7],lt=8191&at,ct=at>>>13,ut=0|a[8],ht=8191&ut,pt=ut>>>13,dt=0|a[9],ft=8191&dt,mt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(c+(r=Math.imul(h,V))|0)+((8191&(i=(i=Math.imul(h,z))+Math.imul(p,V)|0))<<13)|0;c=((s=Math.imul(p,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(f,V),i=(i=Math.imul(f,z))+Math.imul(m,V)|0,s=Math.imul(m,z);var gt=(c+(r=r+Math.imul(h,$)|0)|0)+((8191&(i=(i=i+Math.imul(h,H)|0)+Math.imul(p,$)|0))<<13)|0;c=((s=s+Math.imul(p,H)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,r=Math.imul(g,V),i=(i=Math.imul(g,z))+Math.imul(v,V)|0,s=Math.imul(v,z),r=r+Math.imul(f,$)|0,i=(i=i+Math.imul(f,H)|0)+Math.imul(m,$)|0,s=s+Math.imul(m,H)|0;var vt=(c+(r=r+Math.imul(h,Y)|0)|0)+((8191&(i=(i=i+Math.imul(h,W)|0)+Math.imul(p,Y)|0))<<13)|0;c=((s=s+Math.imul(p,W)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(T,V),i=(i=Math.imul(T,z))+Math.imul(x,V)|0,s=Math.imul(x,z),r=r+Math.imul(g,$)|0,i=(i=i+Math.imul(g,H)|0)+Math.imul(v,$)|0,s=s+Math.imul(v,H)|0,r=r+Math.imul(f,Y)|0,i=(i=i+Math.imul(f,W)|0)+Math.imul(m,Y)|0,s=s+Math.imul(m,W)|0;var bt=(c+(r=r+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(p,X)|0))<<13)|0;c=((s=s+Math.imul(p,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(w,V),i=(i=Math.imul(w,z))+Math.imul(E,V)|0,s=Math.imul(E,z),r=r+Math.imul(T,$)|0,i=(i=i+Math.imul(T,H)|0)+Math.imul(x,$)|0,s=s+Math.imul(x,H)|0,r=r+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(v,Y)|0,s=s+Math.imul(v,W)|0,r=r+Math.imul(f,X)|0,i=(i=i+Math.imul(f,G)|0)+Math.imul(m,X)|0,s=s+Math.imul(m,G)|0;var Tt=(c+(r=r+Math.imul(h,Q)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(p,Q)|0))<<13)|0;c=((s=s+Math.imul(p,tt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(P,V),i=(i=Math.imul(P,z))+Math.imul(M,V)|0,s=Math.imul(M,z),r=r+Math.imul(w,$)|0,i=(i=i+Math.imul(w,H)|0)+Math.imul(E,$)|0,s=s+Math.imul(E,H)|0,r=r+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(x,Y)|0,s=s+Math.imul(x,W)|0,r=r+Math.imul(g,X)|0,i=(i=i+Math.imul(g,G)|0)+Math.imul(v,X)|0,s=s+Math.imul(v,G)|0,r=r+Math.imul(f,Q)|0,i=(i=i+Math.imul(f,tt)|0)+Math.imul(m,Q)|0,s=s+Math.imul(m,tt)|0;var xt=(c+(r=r+Math.imul(h,nt)|0)|0)+((8191&(i=(i=i+Math.imul(h,rt)|0)+Math.imul(p,nt)|0))<<13)|0;c=((s=s+Math.imul(p,rt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(k,V),i=(i=Math.imul(k,z))+Math.imul(I,V)|0,s=Math.imul(I,z),r=r+Math.imul(P,$)|0,i=(i=i+Math.imul(P,H)|0)+Math.imul(M,$)|0,s=s+Math.imul(M,H)|0,r=r+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,Y)|0,s=s+Math.imul(E,W)|0,r=r+Math.imul(T,X)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,G)|0,r=r+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(v,Q)|0,s=s+Math.imul(v,tt)|0,r=r+Math.imul(f,nt)|0,i=(i=i+Math.imul(f,rt)|0)+Math.imul(m,nt)|0,s=s+Math.imul(m,rt)|0;var St=(c+(r=r+Math.imul(h,st)|0)|0)+((8191&(i=(i=i+Math.imul(h,ot)|0)+Math.imul(p,st)|0))<<13)|0;c=((s=s+Math.imul(p,ot)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(N,V),i=(i=Math.imul(N,z))+Math.imul(_,V)|0,s=Math.imul(_,z),r=r+Math.imul(k,$)|0,i=(i=i+Math.imul(k,H)|0)+Math.imul(I,$)|0,s=s+Math.imul(I,H)|0,r=r+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(M,Y)|0,s=s+Math.imul(M,W)|0,r=r+Math.imul(w,X)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(E,X)|0,s=s+Math.imul(E,G)|0,r=r+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(x,Q)|0,s=s+Math.imul(x,tt)|0,r=r+Math.imul(g,nt)|0,i=(i=i+Math.imul(g,rt)|0)+Math.imul(v,nt)|0,s=s+Math.imul(v,rt)|0,r=r+Math.imul(f,st)|0,i=(i=i+Math.imul(f,ot)|0)+Math.imul(m,st)|0,s=s+Math.imul(m,ot)|0;var wt=(c+(r=r+Math.imul(h,lt)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(p,lt)|0))<<13)|0;c=((s=s+Math.imul(p,ct)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(L,V),i=(i=Math.imul(L,z))+Math.imul(B,V)|0,s=Math.imul(B,z),r=r+Math.imul(N,$)|0,i=(i=i+Math.imul(N,H)|0)+Math.imul(_,$)|0,s=s+Math.imul(_,H)|0,r=r+Math.imul(k,Y)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(I,Y)|0,s=s+Math.imul(I,W)|0,r=r+Math.imul(P,X)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,G)|0,r=r+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(E,Q)|0,s=s+Math.imul(E,tt)|0,r=r+Math.imul(T,nt)|0,i=(i=i+Math.imul(T,rt)|0)+Math.imul(x,nt)|0,s=s+Math.imul(x,rt)|0,r=r+Math.imul(g,st)|0,i=(i=i+Math.imul(g,ot)|0)+Math.imul(v,st)|0,s=s+Math.imul(v,ot)|0,r=r+Math.imul(f,lt)|0,i=(i=i+Math.imul(f,ct)|0)+Math.imul(m,lt)|0,s=s+Math.imul(m,ct)|0;var Et=(c+(r=r+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,pt)|0)+Math.imul(p,ht)|0))<<13)|0;c=((s=s+Math.imul(p,pt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(F,V),i=(i=Math.imul(F,z))+Math.imul(j,V)|0,s=Math.imul(j,z),r=r+Math.imul(L,$)|0,i=(i=i+Math.imul(L,H)|0)+Math.imul(B,$)|0,s=s+Math.imul(B,H)|0,r=r+Math.imul(N,Y)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(_,Y)|0,s=s+Math.imul(_,W)|0,r=r+Math.imul(k,X)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,G)|0,r=r+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(M,Q)|0,s=s+Math.imul(M,tt)|0,r=r+Math.imul(w,nt)|0,i=(i=i+Math.imul(w,rt)|0)+Math.imul(E,nt)|0,s=s+Math.imul(E,rt)|0,r=r+Math.imul(T,st)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(x,st)|0,s=s+Math.imul(x,ot)|0,r=r+Math.imul(g,lt)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(v,lt)|0,s=s+Math.imul(v,ct)|0,r=r+Math.imul(f,ht)|0,i=(i=i+Math.imul(f,pt)|0)+Math.imul(m,ht)|0,s=s+Math.imul(m,pt)|0;var At=(c+(r=r+Math.imul(h,ft)|0)|0)+((8191&(i=(i=i+Math.imul(h,mt)|0)+Math.imul(p,ft)|0))<<13)|0;c=((s=s+Math.imul(p,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(F,$),i=(i=Math.imul(F,H))+Math.imul(j,$)|0,s=Math.imul(j,H),r=r+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(B,Y)|0,s=s+Math.imul(B,W)|0,r=r+Math.imul(N,X)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(_,X)|0,s=s+Math.imul(_,G)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(I,Q)|0,s=s+Math.imul(I,tt)|0,r=r+Math.imul(P,nt)|0,i=(i=i+Math.imul(P,rt)|0)+Math.imul(M,nt)|0,s=s+Math.imul(M,rt)|0,r=r+Math.imul(w,st)|0,i=(i=i+Math.imul(w,ot)|0)+Math.imul(E,st)|0,s=s+Math.imul(E,ot)|0,r=r+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(x,lt)|0,s=s+Math.imul(x,ct)|0,r=r+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,pt)|0)+Math.imul(v,ht)|0,s=s+Math.imul(v,pt)|0;var Pt=(c+(r=r+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(m,ft)|0))<<13)|0;c=((s=s+Math.imul(m,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,r=Math.imul(F,Y),i=(i=Math.imul(F,W))+Math.imul(j,Y)|0,s=Math.imul(j,W),r=r+Math.imul(L,X)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(B,X)|0,s=s+Math.imul(B,G)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(_,Q)|0,s=s+Math.imul(_,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(I,nt)|0,s=s+Math.imul(I,rt)|0,r=r+Math.imul(P,st)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,ot)|0,r=r+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(E,lt)|0,s=s+Math.imul(E,ct)|0,r=r+Math.imul(T,ht)|0,i=(i=i+Math.imul(T,pt)|0)+Math.imul(x,ht)|0,s=s+Math.imul(x,pt)|0;var Mt=(c+(r=r+Math.imul(g,ft)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(v,ft)|0))<<13)|0;c=((s=s+Math.imul(v,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(F,X),i=(i=Math.imul(F,G))+Math.imul(j,X)|0,s=Math.imul(j,G),r=r+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(B,Q)|0,s=s+Math.imul(B,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(_,nt)|0,s=s+Math.imul(_,rt)|0,r=r+Math.imul(k,st)|0,i=(i=i+Math.imul(k,ot)|0)+Math.imul(I,st)|0,s=s+Math.imul(I,ot)|0,r=r+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(M,lt)|0,s=s+Math.imul(M,ct)|0,r=r+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,pt)|0)+Math.imul(E,ht)|0,s=s+Math.imul(E,pt)|0;var Ct=(c+(r=r+Math.imul(T,ft)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(x,ft)|0))<<13)|0;c=((s=s+Math.imul(x,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(F,Q),i=(i=Math.imul(F,tt))+Math.imul(j,Q)|0,s=Math.imul(j,tt),r=r+Math.imul(L,nt)|0,i=(i=i+Math.imul(L,rt)|0)+Math.imul(B,nt)|0,s=s+Math.imul(B,rt)|0,r=r+Math.imul(N,st)|0,i=(i=i+Math.imul(N,ot)|0)+Math.imul(_,st)|0,s=s+Math.imul(_,ot)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(I,lt)|0,s=s+Math.imul(I,ct)|0,r=r+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,pt)|0)+Math.imul(M,ht)|0,s=s+Math.imul(M,pt)|0;var kt=(c+(r=r+Math.imul(w,ft)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(E,ft)|0))<<13)|0;c=((s=s+Math.imul(E,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(F,nt),i=(i=Math.imul(F,rt))+Math.imul(j,nt)|0,s=Math.imul(j,rt),r=r+Math.imul(L,st)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(B,st)|0,s=s+Math.imul(B,ot)|0,r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(_,lt)|0,s=s+Math.imul(_,ct)|0,r=r+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,pt)|0)+Math.imul(I,ht)|0,s=s+Math.imul(I,pt)|0;var It=(c+(r=r+Math.imul(P,ft)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(M,ft)|0))<<13)|0;c=((s=s+Math.imul(M,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,r=Math.imul(F,st),i=(i=Math.imul(F,ot))+Math.imul(j,st)|0,s=Math.imul(j,ot),r=r+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(B,lt)|0,s=s+Math.imul(B,ct)|0,r=r+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,pt)|0)+Math.imul(_,ht)|0,s=s+Math.imul(_,pt)|0;var Ot=(c+(r=r+Math.imul(k,ft)|0)|0)+((8191&(i=(i=i+Math.imul(k,mt)|0)+Math.imul(I,ft)|0))<<13)|0;c=((s=s+Math.imul(I,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(F,lt),i=(i=Math.imul(F,ct))+Math.imul(j,lt)|0,s=Math.imul(j,ct),r=r+Math.imul(L,ht)|0,i=(i=i+Math.imul(L,pt)|0)+Math.imul(B,ht)|0,s=s+Math.imul(B,pt)|0;var Nt=(c+(r=r+Math.imul(N,ft)|0)|0)+((8191&(i=(i=i+Math.imul(N,mt)|0)+Math.imul(_,ft)|0))<<13)|0;c=((s=s+Math.imul(_,mt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(F,ht),i=(i=Math.imul(F,pt))+Math.imul(j,ht)|0,s=Math.imul(j,pt);var _t=(c+(r=r+Math.imul(L,ft)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(B,ft)|0))<<13)|0;c=((s=s+Math.imul(B,mt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863;var Dt=(c+(r=Math.imul(F,ft))|0)+((8191&(i=(i=Math.imul(F,mt))+Math.imul(j,ft)|0))<<13)|0;return c=((s=Math.imul(j,mt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,l[0]=yt,l[1]=gt,l[2]=vt,l[3]=bt,l[4]=Tt,l[5]=xt,l[6]=St,l[7]=wt,l[8]=Et,l[9]=At,l[10]=Pt,l[11]=Mt,l[12]=Ct,l[13]=kt,l[14]=It,l[15]=Ot,l[16]=Nt,l[17]=_t,l[18]=Dt,0!==c&&(l[19]=c,n.length++),n};function m(t,e,n){return(new y).mulp(t,e,n)}function y(t,e){this.x=t,this.y=e}Math.imul||(f=d),s.prototype.mulTo=function(t,e){var n,r=this.length+t.length;return n=10===this.length&&10===t.length?f(this,t,e):r<63?d(this,t,e):r<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,s=0;s<n.length-1;s++){var o=i;i=0;for(var a=67108863&r,l=Math.min(s,e.length-1),c=Math.max(0,s-t.length+1);c<=l;c++){var u=s-c,h=(0|t.words[u])*(0|e.words[c]),p=67108863&h;a=67108863&(p=p+a|0),i+=(o=(o=o+(h/67108864|0)|0)+(p>>>26)|0)>>>26,o&=67108863}n.words[s]=a,r=o,o=i}return 0!==r?n.words[s]=r:n.length--,n.strip()}(this,t,e):m(this,t,e),n},y.prototype.makeRBT=function(t){for(var e=new Array(t),n=s.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},y.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},y.prototype.permute=function(t,e,n,r,i,s){for(var o=0;o<s;o++)r[o]=e[t[o]],i[o]=n[t[o]]},y.prototype.transform=function(t,e,n,r,i,s){this.permute(s,t,e,n,r,i);for(var o=1;o<i;o<<=1)for(var a=o<<1,l=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),u=0;u<i;u+=a)for(var h=l,p=c,d=0;d<o;d++){var f=n[u+d],m=r[u+d],y=n[u+d+o],g=r[u+d+o],v=h*y-p*g;g=h*g+p*y,y=v,n[u+d]=f+y,r[u+d]=m+g,n[u+d+o]=f-y,r[u+d+o]=m-g,d!==a&&(v=l*h-c*p,p=l*p+c*h,h=v)}},y.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},y.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},y.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},y.prototype.convert13b=function(t,e,n,i){for(var s=0,o=0;o<e;o++)s+=0|t[o],n[2*o]=8191&s,s>>>=13,n[2*o+1]=8191&s,s>>>=13;for(o=2*e;o<i;++o)n[o]=0;r(0===s),r(!(-8192&s))},y.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},y.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),s=this.stub(r),o=new Array(r),a=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),h=new Array(r),p=n.words;p.length=r,this.convert13b(t.words,t.length,o,r),this.convert13b(e.words,e.length,c,r),this.transform(o,s,a,l,r,i),this.transform(c,s,u,h,r,i);for(var d=0;d<r;d++){var f=a[d]*u[d]-l[d]*h[d];l[d]=a[d]*h[d]+l[d]*u[d],a[d]=f}return this.conjugate(a,l,r),this.transform(a,l,p,s,r,i),this.conjugate(p,s,r),this.normalize13b(p,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},s.prototype.mul=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},s.prototype.mulf=function(t){var e=new s(null);return e.words=new Array(this.length+t.length),m(this,t,e)},s.prototype.imul=function(t){return this.clone().mulTo(t,this)},s.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,s=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=s>>>26,this.words[n]=67108863&s}return 0!==e&&(this.words[n]=e,this.length++),this},s.prototype.muln=function(t){return this.clone().imuln(t)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new s(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(e=0;e<this.length;e++){var a=this.words[e]&s,l=(0|this.words[e])-a<<n;this.words[e]=l|o,o=a>>>26-n}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},s.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},s.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var s=t%26,o=Math.min((t-s)/26,this.length),a=67108863^67108863>>>s<<s,l=n;if(i-=o,i=Math.max(0,i),l){for(var c=0;c<o;c++)l.words[c]=this.words[c];l.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=i);c--){var h=0|this.words[c];this.words[c]=u<<26-s|h>>>s,u=h&a}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},s.prototype.shln=function(t){return this.clone().ishln(t)},s.prototype.ushln=function(t){return this.clone().iushln(t)},s.prototype.shrn=function(t){return this.clone().ishrn(t)},s.prototype.ushrn=function(t){return this.clone().iushrn(t)},s.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n||!(this.words[n]&i))},s.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},s.prototype.maskn=function(t){return this.clone().imaskn(t)},s.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},s.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},s.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},s.prototype.addn=function(t){return this.clone().iaddn(t)},s.prototype.subn=function(t){return this.clone().isubn(t)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(t,e,n){var i,s,o=t.length+n;this._expand(o);var a=0;for(i=0;i<t.length;i++){s=(0|this.words[i+n])+a;var l=(0|t.words[i])*e;a=((s-=67108863&l)>>26)-(l/67108864|0),this.words[i+n]=67108863&s}for(;i<this.length-n;i++)a=(s=(0|this.words[i+n])+a)>>26,this.words[i+n]=67108863&s;if(0===a)return this.strip();for(r(-1===a),a=0,i=0;i<this.length;i++)a=(s=-(0|this.words[i])+a)>>26,this.words[i]=67108863&s;return this.negative=1,this.strip()},s.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,o=0|i.words[i.length-1];0!=(n=26-this._countBits(o))&&(i=i.ushln(n),r.iushln(n),o=0|i.words[i.length-1]);var a,l=r.length-i.length;if("mod"!==e){(a=new s(null)).length=l+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,a&&(a.words[l]=1));for(var h=l-1;h>=0;h--){var p=67108864*(0|r.words[i.length+h])+(0|r.words[i.length+h-1]);for(p=Math.min(p/o|0,67108863),r._ishlnsubmul(i,p,h);0!==r.negative;)p--,r.negative=0,r._ishlnsubmul(i,1,h),r.isZero()||(r.negative^=1);a&&(a.words[h]=p)}return a&&a.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:a||null,mod:r}},s.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(o=a.mod.neg(),n&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):this.negative&t.negative?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(o=a.mod.neg(),n&&0!==o.negative&&o.isub(t)),{div:a.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new s(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new s(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new s(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,a},s.prototype.div=function(t){return this.divmod(t,"div",!1).div},s.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},s.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},s.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),s=n.cmp(r);return s<0||1===i&&0===s?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},s.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},s.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},s.prototype.divn=function(t){return this.clone().idivn(t)},s.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new s(1),o=new s(0),a=new s(0),l=new s(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var u=n.clone(),h=e.clone();!e.isZero();){for(var p=0,d=1;!(e.words[0]&d)&&p<26;++p,d<<=1);if(p>0)for(e.iushrn(p);p-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var f=0,m=1;!(n.words[0]&m)&&f<26;++f,m<<=1);if(f>0)for(n.iushrn(f);f-- >0;)(a.isOdd()||l.isOdd())&&(a.iadd(u),l.isub(h)),a.iushrn(1),l.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(a),o.isub(l)):(n.isub(e),a.isub(i),l.isub(o))}return{a,b:l,gcd:n.iushln(c)}},s.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new s(1),a=new s(0),l=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;!(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,p=1;!(n.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(n.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);e.cmp(n)>=0?(e.isub(n),o.isub(a)):(n.isub(e),a.isub(o))}return(i=0===e.cmpn(1)?o:a).cmpn(0)<0&&i.iadd(t),i},s.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var s=e;e=n,n=s}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},s.prototype.invm=function(t){return this.egcd(t).a.umod(t)},s.prototype.isEven=function(){return!(1&this.words[0])},s.prototype.isOdd=function(){return!(1&~this.words[0])},s.prototype.andln=function(t){return this.words[0]&t},s.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var s=i,o=n;0!==s&&o<this.length;o++){var a=0|this.words[o];s=(a+=s)>>>26,a&=67108863,this.words[o]=a}return 0!==s&&(this.words[o]=s,this.length++),this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},s.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},s.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},s.prototype.gtn=function(t){return 1===this.cmpn(t)},s.prototype.gt=function(t){return 1===this.cmp(t)},s.prototype.gten=function(t){return this.cmpn(t)>=0},s.prototype.gte=function(t){return this.cmp(t)>=0},s.prototype.ltn=function(t){return-1===this.cmpn(t)},s.prototype.lt=function(t){return-1===this.cmp(t)},s.prototype.lten=function(t){return this.cmpn(t)<=0},s.prototype.lte=function(t){return this.cmp(t)<=0},s.prototype.eqn=function(t){return 0===this.cmpn(t)},s.prototype.eq=function(t){return 0===this.cmp(t)},s.red=function(t){return new w(t)},s.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(t){return this.red=t,this},s.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},s.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},s.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},s.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},s.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},s.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},s.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},s.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new s(e,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function T(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=s._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new s(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(b,v),b.prototype.split=function(t,e){for(var n=4194303,r=Math.min(t.length,9),i=0;i<r;i++)e.words[i]=t.words[i];if(e.length=r,t.length<=9)return t.words[0]=0,void(t.length=1);var s=t.words[9];for(e.words[e.length++]=s&n,i=10;i<t.length;i++){var o=0|t.words[i];t.words[i-10]=(o&n)<<4|s>>>22,s=o}s>>>=22,t.words[i-10]=s,0===s&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(T,v),i(x,v),i(S,v),S.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},s._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new T;else if("p192"===t)e=new x;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return g[t]=e,e},w.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){r(!(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},w.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new s(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);r(!i.isZero());var a=new s(1).toRed(this),l=a.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new s(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var h=this.pow(u,i),p=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),f=o;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();r(y<f);var g=this.pow(h,new s(1).iushln(f-y-1));p=p.redMul(g),h=g.redSqr(),d=d.redMul(h),f=y}return p},w.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},w.prototype.pow=function(t,e){if(e.isZero())return new s(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],o=0,a=0,l=e.bitLength()%26;for(0===l&&(l=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],u=l-1;u>=0;u--){var h=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==h||0!==o?(o<<=1,o|=h,(4==++a||0===r&&0===u)&&(i=this.mul(i,n[o]),a=0,o=0)):a=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},s.mont=function(t){return new E(t)},i(E,w),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new s(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=n.nmd(t),this)},69044:(t,e)=>{function n(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}class r{constructor(t,e,n){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=n}}class i{constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}}function s(t,e){const{line:n,column:i,index:s}=t;return new r(n,i+e,s+e)}const o="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";var a={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:o},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:o}};const l={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},c=t=>"UpdateExpression"===t.type?l.UpdateExpression[`${t.prefix}`]:l[t.type];var u={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:t})=>`Missing initializer in ${t} declaration.`,DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${"ForInStatement"===t?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:({type:t})=>`Unsyntactic ${"BreakStatement"===t?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:({importName:t})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${t}" as foo }\`?`,ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${c(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${c(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${c(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map((t=>JSON.stringify(t))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map((t=>JSON.stringify(t))).join(", ")}.`,MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:({keyword:t})=>`Unexpected keyword '${t}'.`,UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:t})=>`Identifier '${t}' has already been declared.`,VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:({unexpected:t})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(t)}\`.`};const p=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var d=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${c({type:t})}; please wrap it in parentheses.`},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'});const f=["message"];function m(t,e,n){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:n})}function y({toMessage:t,code:e,reasonCode:n,syntaxPlugin:i}){const s="MissingPlugin"===n||"MissingOneOfPlugins"===n,o={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return o[n]&&(n=o[n]),function o(a,l){const c=new SyntaxError;return c.code=e,c.reasonCode=n,c.loc=a,c.pos=a.index,c.syntaxPlugin=i,s&&(c.missingPlugin=l.missingPlugin),m(c,"clone",(function(t={}){var e;const{line:n,column:i,index:s}=null!=(e=t.loc)?e:a;return o(new r(n,i,s),Object.assign({},l,t.details))})),m(c,"details",l),Object.defineProperty(c,"message",{configurable:!0,get(){const e=`${t(l)} (${a.line}:${a.column})`;return this.message=e,e},set(t){Object.defineProperty(this,"message",{value:t,writable:!0})}}),c}}function g(t,e){if(Array.isArray(t))return e=>g(e,t[0]);const r={};for(const i of Object.keys(t)){const s=t[i],o="string"==typeof s?{message:()=>s}:"function"==typeof s?{message:s}:s,{message:a}=o,l=n(o,f),c="string"==typeof a?()=>a:a;r[i]=y(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:c},e?{syntaxPlugin:e}:{},l))}return r}const v=Object.assign({},g(a),g(u),g({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' in strict mode.`,StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."}),g(h),g`pipelineOperator`(d)),{defineProperty:b}=Object,T=(t,e)=>{t&&b(t,e,{enumerable:!1,value:t[e]})};function x(t){return T(t.loc.start,"index"),T(t.loc.end,"index"),t}class S{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}}const w={brace:new S("{"),j_oTag:new S("<tag"),j_cTag:new S("</tag"),j_expr:new S("<tag>...</tag>",!0)};w.template=new S("`",!0);const E=!0,A=!0,P=!0,M=!0,C=!0;class k{constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=null!=e.binop?e.binop:null,this.updateContext=null}}const I=new Map;function O(t,e={}){e.keyword=t;const n=U(t,e);return I.set(t,n),n}function N(t,e){return U(t,{beforeExpr:E,binop:e})}let _=-1;const D=[],L=[],B=[],R=[],F=[],j=[];function U(t,e={}){var n,r,i,s;return++_,L.push(t),B.push(null!=(n=e.binop)?n:-1),R.push(null!=(r=e.beforeExpr)&&r),F.push(null!=(i=e.startsExpr)&&i),j.push(null!=(s=e.prefix)&&s),D.push(new k(t,e)),_}function V(t,e={}){var n,r,i,s;return++_,I.set(t,_),L.push(t),B.push(null!=(n=e.binop)?n:-1),R.push(null!=(r=e.beforeExpr)&&r),F.push(null!=(i=e.startsExpr)&&i),j.push(null!=(s=e.prefix)&&s),D.push(new k("name",e)),_}const z={bracketL:U("[",{beforeExpr:E,startsExpr:A}),bracketHashL:U("#[",{beforeExpr:E,startsExpr:A}),bracketBarL:U("[|",{beforeExpr:E,startsExpr:A}),bracketR:U("]"),bracketBarR:U("|]"),braceL:U("{",{beforeExpr:E,startsExpr:A}),braceBarL:U("{|",{beforeExpr:E,startsExpr:A}),braceHashL:U("#{",{beforeExpr:E,startsExpr:A}),braceR:U("}"),braceBarR:U("|}"),parenL:U("(",{beforeExpr:E,startsExpr:A}),parenR:U(")"),comma:U(",",{beforeExpr:E}),semi:U(";",{beforeExpr:E}),colon:U(":",{beforeExpr:E}),doubleColon:U("::",{beforeExpr:E}),dot:U("."),question:U("?",{beforeExpr:E}),questionDot:U("?."),arrow:U("=>",{beforeExpr:E}),template:U("template"),ellipsis:U("...",{beforeExpr:E}),backQuote:U("`",{startsExpr:A}),dollarBraceL:U("${",{beforeExpr:E,startsExpr:A}),templateTail:U("...`",{startsExpr:A}),templateNonTail:U("...${",{beforeExpr:E,startsExpr:A}),at:U("@"),hash:U("#",{startsExpr:A}),interpreterDirective:U("#!..."),eq:U("=",{beforeExpr:E,isAssign:M}),assign:U("_=",{beforeExpr:E,isAssign:M}),slashAssign:U("_=",{beforeExpr:E,isAssign:M}),xorAssign:U("_=",{beforeExpr:E,isAssign:M}),moduloAssign:U("_=",{beforeExpr:E,isAssign:M}),incDec:U("++/--",{prefix:C,postfix:!0,startsExpr:A}),bang:U("!",{beforeExpr:E,prefix:C,startsExpr:A}),tilde:U("~",{beforeExpr:E,prefix:C,startsExpr:A}),doubleCaret:U("^^",{startsExpr:A}),doubleAt:U("@@",{startsExpr:A}),pipeline:N("|>",0),nullishCoalescing:N("??",1),logicalOR:N("||",1),logicalAND:N("&&",2),bitwiseOR:N("|",3),bitwiseXOR:N("^",4),bitwiseAND:N("&",5),equality:N("==/!=/===/!==",6),lt:N("</>/<=/>=",7),gt:N("</>/<=/>=",7),relational:N("</>/<=/>=",7),bitShift:N("<</>>/>>>",8),bitShiftL:N("<</>>/>>>",8),bitShiftR:N("<</>>/>>>",8),plusMin:U("+/-",{beforeExpr:E,binop:9,prefix:C,startsExpr:A}),modulo:U("%",{binop:10,startsExpr:A}),star:U("*",{binop:10}),slash:N("/",10),exponent:U("**",{beforeExpr:E,binop:11,rightAssociative:!0}),_in:O("in",{beforeExpr:E,binop:7}),_instanceof:O("instanceof",{beforeExpr:E,binop:7}),_break:O("break"),_case:O("case",{beforeExpr:E}),_catch:O("catch"),_continue:O("continue"),_debugger:O("debugger"),_default:O("default",{beforeExpr:E}),_else:O("else",{beforeExpr:E}),_finally:O("finally"),_function:O("function",{startsExpr:A}),_if:O("if"),_return:O("return",{beforeExpr:E}),_switch:O("switch"),_throw:O("throw",{beforeExpr:E,prefix:C,startsExpr:A}),_try:O("try"),_var:O("var"),_const:O("const"),_with:O("with"),_new:O("new",{beforeExpr:E,startsExpr:A}),_this:O("this",{startsExpr:A}),_super:O("super",{startsExpr:A}),_class:O("class",{startsExpr:A}),_extends:O("extends",{beforeExpr:E}),_export:O("export"),_import:O("import",{startsExpr:A}),_null:O("null",{startsExpr:A}),_true:O("true",{startsExpr:A}),_false:O("false",{startsExpr:A}),_typeof:O("typeof",{beforeExpr:E,prefix:C,startsExpr:A}),_void:O("void",{beforeExpr:E,prefix:C,startsExpr:A}),_delete:O("delete",{beforeExpr:E,prefix:C,startsExpr:A}),_do:O("do",{isLoop:P,beforeExpr:E}),_for:O("for",{isLoop:P}),_while:O("while",{isLoop:P}),_as:V("as",{startsExpr:A}),_assert:V("assert",{startsExpr:A}),_async:V("async",{startsExpr:A}),_await:V("await",{startsExpr:A}),_defer:V("defer",{startsExpr:A}),_from:V("from",{startsExpr:A}),_get:V("get",{startsExpr:A}),_let:V("let",{startsExpr:A}),_meta:V("meta",{startsExpr:A}),_of:V("of",{startsExpr:A}),_sent:V("sent",{startsExpr:A}),_set:V("set",{startsExpr:A}),_source:V("source",{startsExpr:A}),_static:V("static",{startsExpr:A}),_using:V("using",{startsExpr:A}),_yield:V("yield",{startsExpr:A}),_asserts:V("asserts",{startsExpr:A}),_checks:V("checks",{startsExpr:A}),_exports:V("exports",{startsExpr:A}),_global:V("global",{startsExpr:A}),_implements:V("implements",{startsExpr:A}),_intrinsic:V("intrinsic",{startsExpr:A}),_infer:V("infer",{startsExpr:A}),_is:V("is",{startsExpr:A}),_mixins:V("mixins",{startsExpr:A}),_proto:V("proto",{startsExpr:A}),_require:V("require",{startsExpr:A}),_satisfies:V("satisfies",{startsExpr:A}),_keyof:V("keyof",{startsExpr:A}),_readonly:V("readonly",{startsExpr:A}),_unique:V("unique",{startsExpr:A}),_abstract:V("abstract",{startsExpr:A}),_declare:V("declare",{startsExpr:A}),_enum:V("enum",{startsExpr:A}),_module:V("module",{startsExpr:A}),_namespace:V("namespace",{startsExpr:A}),_interface:V("interface",{startsExpr:A}),_type:V("type",{startsExpr:A}),_opaque:V("opaque",{startsExpr:A}),name:U("name",{startsExpr:A}),placeholder:U("%%",{startsExpr:A}),string:U("string",{startsExpr:A}),num:U("num",{startsExpr:A}),bigint:U("bigint",{startsExpr:A}),decimal:U("decimal",{startsExpr:A}),regexp:U("regexp",{startsExpr:A}),privateName:U("#name",{startsExpr:A}),eof:U("eof"),jsxName:U("jsxName"),jsxText:U("jsxText",{beforeExpr:E}),jsxTagStart:U("jsxTagStart",{startsExpr:A}),jsxTagEnd:U("jsxTagEnd")};function q(t){return t>=93&&t<=133}function $(t){return t>=58&&t<=133}function H(t){return t>=58&&t<=137}function K(t){return F[t]}function Y(t){return t>=129&&t<=131}function W(t){return t>=58&&t<=92}function J(t){return L[t]}function X(t){return B[t]}function G(t){return t>=24&&t<=25}function Z(t){return D[t]}D[8].updateContext=t=>{t.pop()},D[5].updateContext=D[7].updateContext=D[23].updateContext=t=>{t.push(w.brace)},D[22].updateContext=t=>{t[t.length-1]===w.template?t.pop():t.push(w.template)},D[143].updateContext=t=>{t.push(w.j_expr,w.j_oTag)};let Q="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",tt="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・";const et=new RegExp("["+Q+"]"),nt=new RegExp("["+Q+tt+"]");Q=tt=null;const rt=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],it=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239];function st(t,e){let n=65536;for(let r=0,i=e.length;r<i;r+=2){if(n+=e[r],n>t)return!1;if(n+=e[r+1],n>=t)return!0}return!1}function ot(t){return t<65?36===t:t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&et.test(String.fromCharCode(t)):st(t,rt)))}function at(t){return t<48?36===t:t<58||!(t<65)&&(t<=90||(t<97?95===t:t<=122||(t<=65535?t>=170&&nt.test(String.fromCharCode(t)):st(t,rt)||st(t,it))))}const lt=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),ct=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),ut=new Set(["eval","arguments"]);function ht(t,e){return e&&"await"===t||"enum"===t}function pt(t,e){return ht(t,e)||ct.has(t)}function dt(t){return ut.has(t)}function ft(t,e){return pt(t,e)||dt(t)}const mt=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);class yt{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}}class gt{constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get allowNewTarget(){return(512&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const t=this.currentThisScopeFlags();return(64&t)>0&&!(2&t)}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(128&e)return!0;if(1731&e)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get inBareCaseStatement(){return(256&this.currentScope().flags)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new yt(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(130&t.flags||!this.parser.inModule&&1&t.flags)}declareName(t,e,n){let r=this.currentScope();if(8&e||16&e){this.checkRedeclarationInScope(r,t,e,n);let i=r.names.get(t)||0;16&e?i|=4:(r.firstLexicalName||(r.firstLexicalName=t),i|=2),r.names.set(t,i),8&e&&this.maybeExportDefined(r,t)}else if(4&e)for(let i=this.scopeStack.length-1;i>=0&&(r=this.scopeStack[i],this.checkRedeclarationInScope(r,t,e,n),r.names.set(t,1|(r.names.get(t)||0)),this.maybeExportDefined(r,t),!(1667&r.flags));--i);this.parser.inModule&&1&r.flags&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&1&t.flags&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,n,r){this.isRedeclaredInScope(t,e,n)&&this.parser.raise(v.VarRedeclaration,r,{identifierName:e})}isRedeclaredInScope(t,e,n){if(!(1&n))return!1;if(8&n)return t.names.has(e);const r=t.names.get(e)||0;return 16&n?(2&r)>0||!this.treatFunctionsAsVarInScope(t)&&(1&r)>0:(2&r)>0&&!(8&t.flags&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(4&r)>0}checkLocalExport(t){const{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(1667&e)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){const{flags:e}=this.scopeStack[t];if(1731&e&&!(4&e))return e}}}class vt extends yt{constructor(...t){super(...t),this.declareFunctions=new Set}}class bt extends gt{createScope(t){return new vt(t)}declareName(t,e,n){const r=this.currentScope();if(2048&e)return this.checkRedeclarationInScope(r,t,e,n),this.maybeExportDefined(r,t),void r.declareFunctions.add(t);super.declareName(t,e,n)}isRedeclaredInScope(t,e,n){if(super.isRedeclaredInScope(t,e,n))return!0;if(2048&n&&!t.declareFunctions.has(e)){const n=t.names.get(e);return(4&n)>0||(2&n)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}}const Tt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),xt=g`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:t})=>`Cannot overwrite reserved type ${t}.`,DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:({memberName:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:n})=>`Enum \`${t}\` has type \`${n}\`, so the initializer of \`${e}\` needs to be a ${n} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:n})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${n}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:({reservedType:t})=>`Unexpected reserved type ${t}.`,UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:({unsupportedExportKind:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function St(t){return"type"===t.importKind||"typeof"===t.importKind}const wt={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},Et=/\*?\s*@((?:no)?flow)\b/,At={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},Pt=new RegExp(/\r\n|[\r\n\u2028\u2029]/.source,"g");function Mt(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function Ct(t,e,n){for(let r=e;r<n;r++)if(Mt(t.charCodeAt(r)))return!0;return!1}const kt=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,It=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Ot(t){switch(t){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}const Nt=g`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:({unexpected:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function _t(t){return!!t&&("JSXOpeningFragment"===t.type||"JSXClosingFragment"===t.type)}function Dt(t){if("JSXIdentifier"===t.type)return t.name;if("JSXNamespacedName"===t.type)return t.namespace.name+":"+t.name.name;if("JSXMemberExpression"===t.type)return Dt(t.object)+"."+Dt(t.property);throw new Error("Node had unexpected type: "+t.type)}class Lt extends yt{constructor(...t){super(...t),this.tsNames=new Map}}class Bt extends gt{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new Lt(t)}enter(t){1024===t&&this.importsStack.push(new Set),super.enter(t)}exit(){const t=super.exit();return 1024===t&&this.importsStack.pop(),t}hasImport(t,e){const n=this.importsStack.length;if(this.importsStack[n-1].has(t))return!0;if(!e&&n>1)for(let e=0;e<n-1;e++)if(this.importsStack[e].has(t))return!0;return!1}declareName(t,e,n){if(4096&e)return this.hasImport(t,!0)&&this.parser.raise(v.VarRedeclaration,n,{identifierName:t}),void this.importsStack[this.importsStack.length-1].add(t);const r=this.currentScope();let i=r.tsNames.get(t)||0;if(1024&e)return this.maybeExportDefined(r,t),void r.tsNames.set(t,16|i);super.declareName(t,e,n),2&e&&(1&e||(this.checkRedeclarationInScope(r,t,e,n),this.maybeExportDefined(r,t)),i|=1),256&e&&(i|=2),512&e&&(i|=4),128&e&&(i|=8),i&&r.tsNames.set(t,i)}isRedeclaredInScope(t,e,n){const r=t.tsNames.get(e);return(2&r)>0?!(256&n)||!!(512&n)!=(4&r)>0:128&n&&(8&r)>0?!!(2&t.names.get(e))&&!!(1&n):!!(2&n&&(1&r)>0)||super.isRedeclaredInScope(t,e,n)}checkLocalExport(t){const{name:e}=t;if(!this.hasImport(e)){for(let t=this.scopeStack.length-1;t>=0;t--){const n=this.scopeStack[t].tsNames.get(e);if((1&n)>0||(16&n)>0)return}super.checkLocalExport(t)}}}class Rt{constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function Ft(t,e){return(t?2:0)|(e?1:0)}class jt{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(t){return t+this.startIndex}offsetToSourcePos(t){return t-this.startIndex}hasPlugin(t){if("string"==typeof t)return this.plugins.has(t);{const[e,n]=t;if(!this.hasPlugin(e))return!1;const r=this.plugins.get(e);for(const t of Object.keys(n))if((null==r?void 0:r[t])!==n[t])return!1;return!0}}getPluginOption(t,e){var n;return null==(n=this.plugins.get(t))?void 0:n[e]}}function Ut(t,e){void 0===t.trailingComments?t.trailingComments=e:t.trailingComments.unshift(...e)}function Vt(t,e){void 0===t.innerComments?t.innerComments=e:t.innerComments.unshift(...e)}function zt(t,e,n){let r=null,i=e.length;for(;null===r&&i>0;)r=e[--i];null===r||r.start>n.start?Vt(t,n.comments):Ut(r,n.comments)}class qt extends jt{addComment(t){this.filename&&(t.loc.filename=this.filename);const{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){const{commentStack:e}=this.state,n=e.length;if(0===n)return;let r=n-1;const i=e[r];i.start===t.end&&(i.leadingNode=t,r--);const{start:s}=t;for(;r>=0;r--){const n=e[r],i=n.end;if(!(i>s)){i===s&&(n.trailingNode=t);break}n.containingNode=t,this.finalizeComment(n),e.splice(r,1)}}finalizeComment(t){var e;const{comments:n}=t;if(null!==t.leadingNode||null!==t.trailingNode)null!==t.leadingNode&&Ut(t.leadingNode,n),null!==t.trailingNode&&function(t,e){void 0===t.leadingComments?t.leadingComments=e:t.leadingComments.unshift(...e)}(t.trailingNode,n);else{const r=t.containingNode,i=t.start;if(44===this.input.charCodeAt(this.offsetToSourcePos(i)-1))switch(r.type){case"ObjectExpression":case"ObjectPattern":zt(r,r.properties,t);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":zt(r,r.arguments,t);break;case"ImportExpression":zt(r,[r.source,null!=(e=r.options)?e:null],t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":zt(r,r.params,t);break;case"ArrayExpression":case"ArrayPattern":zt(r,r.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":zt(r,r.specifiers,t);break;case"TSEnumDeclaration":case"TSEnumBody":zt(r,r.members,t);break;case"TSInterfaceBody":zt(r,r.body,t);break;default:if("RecordExpression"===r.type){zt(r,r.properties,t);break}if("TupleExpression"===r.type){zt(r,r.elements,t);break}Vt(r,n)}else Vt(r,n)}}finalizeRemainingComments(){const{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){const{commentStack:e}=this.state,{length:n}=e;if(0===n)return;const r=e[n-1];r.leadingNode===t&&(r.leadingNode=null)}takeSurroundingComments(t,e,n){const{commentStack:r}=this.state,i=r.length;if(0===i)return;let s=i-1;for(;s>=0;s--){const i=r[s],o=i.end;if(i.start===n)i.leadingNode=t;else if(o===e)i.trailingNode=t;else if(o<e)break}}}class $t{constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[w.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(1&this.flags)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startIndex:n,startLine:i,startColumn:s}){this.strict=!1!==t&&(!0===t||"module"===e),this.startIndex=n,this.curLine=i,this.lineStart=-s,this.startLoc=this.endLoc=new r(i,s,n)}get maybeInArrowParameters(){return(2&this.flags)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(4&this.flags)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(8&this.flags)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(16&this.flags)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(32&this.flags)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(64&this.flags)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(128&this.flags)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(256&this.flags)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(512&this.flags)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(1024&this.flags)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(2048&this.flags)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(4096&this.flags)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){const t=new $t;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}}var Ht=function(t){return t>=48&&t<=57};const Kt={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Yt={bin:t=>48===t||49===t,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function Wt(t,e,n,r,i,s){const o=n,a=r,l=i;let c="",u=null,h=n;const{length:p}=e;for(;;){if(n>=p){s.unterminated(o,a,l),c+=e.slice(h,n);break}const d=e.charCodeAt(n);if(Jt(t,d,e,n)){c+=e.slice(h,n);break}if(92===d){c+=e.slice(h,n);const o=Xt(e,n,r,i,"template"===t,s);null!==o.ch||u?c+=o.ch:u={pos:n,lineStart:r,curLine:i},({pos:n,lineStart:r,curLine:i}=o),h=n}else 8232===d||8233===d?(++i,r=++n):10===d||13===d?"template"===t?(c+=e.slice(h,n)+"\n",++n,13===d&&10===e.charCodeAt(n)&&++n,++i,h=r=n):s.unterminated(o,a,l):++n}return{pos:n,str:c,firstInvalidLoc:u,lineStart:r,curLine:i,containsInvalid:!!u}}function Jt(t,e,n,r){return"template"===t?96===e||36===e&&123===n.charCodeAt(r+1):e===("double"===t?34:39)}function Xt(t,e,n,r,i,s){const o=!i;e++;const a=t=>({pos:e,ch:t,lineStart:n,curLine:r}),l=t.charCodeAt(e++);switch(l){case 110:return a("\n");case 114:return a("\r");case 120:{let i;return({code:i,pos:e}=Gt(t,e,n,r,2,!1,o,s)),a(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:e}=Qt(t,e,n,r,o,s)),a(null===i?null:String.fromCodePoint(i))}case 116:return a("\t");case 98:return a("\b");case 118:return a("\v");case 102:return a("\f");case 13:10===t.charCodeAt(e)&&++e;case 10:n=e,++r;case 8232:case 8233:return a("");case 56:case 57:if(i)return a(null);s.strictNumericEscape(e-1,n,r);default:if(l>=48&&l<=55){const o=e-1;let l=/^[0-7]+/.exec(t.slice(o,e+2))[0],c=parseInt(l,8);c>255&&(l=l.slice(0,-1),c=parseInt(l,8)),e+=l.length-1;const u=t.charCodeAt(e);if("0"!==l||56===u||57===u){if(i)return a(null);s.strictNumericEscape(o,n,r)}return a(String.fromCharCode(c))}return a(String.fromCharCode(l))}}function Gt(t,e,n,r,i,s,o,a){const l=e;let c;return({n:c,pos:e}=Zt(t,e,n,r,16,i,s,!1,a,!o)),null===c&&(o?a.invalidEscapeSequence(l,n,r):e=l-1),{code:c,pos:e}}function Zt(t,e,n,r,i,s,o,a,l,c){const u=e,h=16===i?Kt.hex:Kt.decBinOct,p=16===i?Yt.hex:10===i?Yt.dec:8===i?Yt.oct:Yt.bin;let d=!1,f=0;for(let u=0,m=null==s?1/0:s;u<m;++u){const s=t.charCodeAt(e);let u;if(95!==s||"bail"===a){if(u=s>=97?s-97+10:s>=65?s-65+10:Ht(s)?s-48:1/0,u>=i){if(u<=9&&c)return{n:null,pos:e};if(u<=9&&l.invalidDigit(e,n,r,i))u=0;else{if(!o)break;u=0,d=!0}}++e,f=f*i+u}else{const i=t.charCodeAt(e-1),s=t.charCodeAt(e+1);if(a){if(Number.isNaN(s)||!p(s)||h.has(i)||h.has(s)){if(c)return{n:null,pos:e};l.unexpectedNumericSeparator(e,n,r)}}else{if(c)return{n:null,pos:e};l.numericSeparatorInEscapeSequence(e,n,r)}++e}}return e===u||null!=s&&e-u!==s||d?{n:null,pos:e}:{n:f,pos:e}}function Qt(t,e,n,r,i,s){let o;if(123===t.charCodeAt(e)){if(++e,({code:o,pos:e}=Gt(t,e,n,r,t.indexOf("}",e)-e,!0,i,s)),++e,null!==o&&o>1114111){if(!i)return{code:null,pos:e};s.invalidCodePoint(e,n,r)}}else({code:o,pos:e}=Gt(t,e,n,r,4,!1,i,s));return{code:o,pos:e}}function te(t,e,n){return new r(n,t-e,t)}const ee=new Set([103,109,115,105,121,117,100,118]);class ne{constructor(t){const e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new i(t.startLoc,t.endLoc)}}class re extends qt{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(t,e,n,r)=>!!(2048&this.optionFlags)&&(this.raise(v.InvalidDigit,te(t,e,n),{radix:r}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(v.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(v.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(v.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(v.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(t,e,n)=>{this.recordStrictModeErrors(v.StrictNumericEscape,te(t,e,n))},unterminated:(t,e,n)=>{throw this.raise(v.UnterminatedString,te(t-1,e,n))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(t,e,n)=>{throw this.raise(v.UnterminatedTemplate,te(t,e,n))}}),this.state=new $t,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),256&this.optionFlags&&this.pushToken(new ne(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return!!this.match(t)&&(this.next(),!0)}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){const t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return kt.lastIndex=t,kt.test(this.input)?kt.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return It.lastIndex=t,It.test(this.input)?It.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if(55296==(64512&e)&&++t<this.input.length){const n=this.input.charCodeAt(t);56320==(64512&n)&&(e=65536+((1023&e)<<10)+(1023&n))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach((([t,e])=>this.raise(t,e))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(140):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());const n=this.state.pos,r=this.input.indexOf(t,n+2);if(-1===r)throw this.raise(v.UnterminatedComment,this.state.curPosition());for(this.state.pos=r+t.length,Pt.lastIndex=n+2;Pt.test(this.input)&&Pt.lastIndex<=r;)++this.state.curLine,this.state.lineStart=Pt.lastIndex;if(this.isLookahead)return;const s={type:"CommentBlock",value:this.input.slice(n+2,r),start:this.sourceToOffsetPos(n),end:this.sourceToOffsetPos(r+t.length),loc:new i(e,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(s),s}skipLineComment(t){const e=this.state.pos;let n;this.isLookahead||(n=this.state.curPosition());let r=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!Mt(r)&&++this.state.pos<this.length;)r=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const s=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+t,s),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(s),loc:new i(n,this.state.curPosition())};return 256&this.optionFlags&&this.pushToken(o),o}skipSpace(){const t=this.state.pos,e=4096&this.optionFlags?[]:null;t:for(;this.state.pos<this.length;){const n=this.input.charCodeAt(this.state.pos);switch(n){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{const t=this.skipBlockComment("*/");void 0!==t&&(this.addComment(t),null==e||e.push(t));break}case 47:{const t=this.skipLineComment(2);void 0!==t&&(this.addComment(t),null==e||e.push(t));break}default:break t}break;default:if(Ot(n))++this.state.pos;else if(45===n&&!this.inModule&&8192&this.optionFlags){const n=this.state.pos;if(45!==this.input.charCodeAt(n+1)||62!==this.input.charCodeAt(n+2)||!(0===t||this.state.lineStart>t))break t;{const t=this.skipLineComment(3);void 0!==t&&(this.addComment(t),null==e||e.push(t))}}else{if(60!==n||this.inModule||!(8192&this.optionFlags))break t;{const t=this.state.pos;if(33!==this.input.charCodeAt(t+1)||45!==this.input.charCodeAt(t+2)||45!==this.input.charCodeAt(t+3))break t;{const t=this.skipLineComment(4);void 0!==t&&(this.addComment(t),null==e||e.push(t))}}}}}if((null==e?void 0:e.length)>0){const n=this.state.pos,r={start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(n),comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const n=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(n)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(v.UnexpectedDigitAfterHash,this.state.curPosition());if(123===e||91===e&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===e?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,123===e?this.finishToken(7):this.finishToken(1)}else ot(e)?(++this.state.pos,this.finishToken(139,this.readWord1(e))):92===e?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const t=this.input.charCodeAt(this.state.pos+1);t>=48&&t<=57?this.readNumber(!0):46===t&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(33!==t)return!1;const e=this.state.pos;for(this.state.pos+=1;!Mt(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);const n=this.input.slice(e+2,this.state.pos);return this.finishToken(28,n),!0}readToken_mult_modulo(t){let e=42===t?55:54,n=1,r=this.input.charCodeAt(this.state.pos+1);42===t&&42===r&&(n++,r=this.input.charCodeAt(this.state.pos+2),e=57),61!==r||this.state.inType||(n++,e=37===t?33:30),this.finishOp(e,n)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);if(e!==t){if(124===t){if(62===e)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===e){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());return this.state.pos+=2,void this.finishToken(4)}}61!==e?this.finishOp(124===t?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===t?41:42,2)}readToken_caret(){const t=this.input.charCodeAt(this.state.pos+1);61!==t||this.state.inType?94===t&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){const e=this.input.charCodeAt(this.state.pos+1);e!==t?61===e?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){const{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(60===e)return 61===this.input.charCodeAt(t+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==e?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){const{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(62===e){const e=62===this.input.charCodeAt(t+2)?3:2;return 61===this.input.charCodeAt(t+e)?void this.finishOp(30,e+1):void this.finishOp(52,e)}61!==e?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(t){const e=this.input.charCodeAt(this.state.pos+1);if(61!==e)return 61===t&&62===e?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===t?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);63===t?61===e?this.finishOp(30,3):this.finishOp(40,2):46!==t||e>=48&&e<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(t){switch(t){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const t=this.input.charCodeAt(this.state.pos+1);if(120===t||88===t)return void this.readRadixNumber(16);if(111===t||79===t)return void this.readRadixNumber(8);if(98===t||66===t)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(t);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(t);case 124:case 38:return void this.readToken_pipe_amp(t);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(t);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(t);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(ot(t))return void this.readWord(t)}throw this.raise(v.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){const n=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,n)}readRegexp(){const t=this.state.startLoc,e=this.state.start+1;let n,r,{pos:i}=this.state;for(;;++i){if(i>=this.length)throw this.raise(v.UnterminatedRegExp,s(t,1));const e=this.input.charCodeAt(i);if(Mt(e))throw this.raise(v.UnterminatedRegExp,s(t,1));if(n)n=!1;else{if(91===e)r=!0;else if(93===e&&r)r=!1;else if(47===e&&!r)break;n=92===e}}const o=this.input.slice(e,i);++i;let a="";const l=()=>s(t,i+2-e);for(;i<this.length;){const t=this.codePointAtPos(i),e=String.fromCharCode(t);if(ee.has(t))118===t?a.includes("u")&&this.raise(v.IncompatibleRegExpUVFlags,l()):117===t&&a.includes("v")&&this.raise(v.IncompatibleRegExpUVFlags,l()),a.includes(e)&&this.raise(v.DuplicateRegExpFlags,l());else{if(!at(t)&&92!==t)break;this.raise(v.MalformedRegExpFlags,l())}++i,a+=e}this.state.pos=i,this.finishToken(138,{pattern:o,flags:a})}readInt(t,e,n=!1,r=!0){const{n:i,pos:s}=Zt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,e,n,r,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(t){const e=this.state.pos,n=this.state.curPosition();let r=!1;this.state.pos+=2;const i=this.readInt(t);null==i&&this.raise(v.InvalidDigit,s(n,2),{radix:t});const o=this.input.charCodeAt(this.state.pos);if(110===o)++this.state.pos,r=!0;else if(109===o)throw this.raise(v.InvalidDecimal,n);if(ot(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());if(r){const t=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,t)}else this.finishToken(135,i)}readNumber(t){const e=this.state.pos,n=this.state.curPosition();let r=!1,i=!1,o=!1,a=!1;t||null!==this.readInt(10)||this.raise(v.InvalidNumber,this.state.curPosition());const l=this.state.pos-e>=2&&48===this.input.charCodeAt(e);if(l){const t=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,n),!this.state.strict){const e=t.indexOf("_");e>0&&this.raise(v.ZeroDigitNumericSeparator,s(n,e))}a=l&&!/[89]/.test(t)}let c=this.input.charCodeAt(this.state.pos);if(46!==c||a||(++this.state.pos,this.readInt(10),r=!0,c=this.input.charCodeAt(this.state.pos)),69!==c&&101!==c||a||(c=this.input.charCodeAt(++this.state.pos),43!==c&&45!==c||++this.state.pos,null===this.readInt(10)&&this.raise(v.InvalidOrMissingExponent,n),r=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((r||l)&&this.raise(v.InvalidBigIntLiteral,n),++this.state.pos,i=!0),109===c){this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(v.InvalidDecimal,n),++this.state.pos;var u=!0}if(ot(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,this.state.curPosition());const h=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(i)return void this.finishToken(136,h);if(u)return void this.finishToken(137,h);const p=a?parseInt(h,8):parseFloat(h);this.finishToken(135,p)}readCodePoint(t){const{code:e,pos:n}=Qt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=n,e}readString(t){const{str:e,pos:n,curLine:r,lineStart:i}=Wt(34===t?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=n+1,this.state.lineStart=i,this.state.curLine=r,this.finishToken(134,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const t=this.input[this.state.pos],{str:e,firstInvalidLoc:n,pos:i,curLine:s,lineStart:o}=Wt("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=o,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new r(n.curLine,n.pos-n.lineStart,this.sourceToOffsetPos(n.pos))),96===this.input.codePointAt(i)?this.finishToken(24,n?null:t+e+"`"):(this.state.pos++,this.finishToken(25,n?null:t+e+"${"))}recordStrictModeErrors(t,e){const n=e.index;this.state.strict&&!this.state.strictErrors.has(n)?this.raise(t,e):this.state.strictErrors.set(n,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="";const n=this.state.pos;let r=this.state.pos;for(void 0!==t&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){const t=this.codePointAtPos(this.state.pos);if(at(t))this.state.pos+=t<=65535?1:2;else{if(92!==t)break;{this.state.containsEsc=!0,e+=this.input.slice(r,this.state.pos);const t=this.state.curPosition(),i=this.state.pos===n?ot:at;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(v.MissingUnicodeEscape,this.state.curPosition()),r=this.state.pos-1;continue}++this.state.pos;const s=this.readCodePoint(!0);null!==s&&(i(s)||this.raise(v.EscapedCharNotAnIdentifier,t),e+=String.fromCodePoint(s)),r=this.state.pos}}}return e+this.input.slice(r,this.state.pos)}readWord(t){const e=this.readWord1(t),n=I.get(e);void 0!==n?this.finishToken(n,J(n)):this.finishToken(132,e)}checkKeywordEscapes(){const{type:t}=this.state;W(t)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:J(t)})}raise(t,e,n={}){const i=t(e instanceof r?e:e.loc.start,n);if(!(2048&this.optionFlags))throw i;return this.isLookahead||this.state.errors.push(i),i}raiseOverwrite(t,e,n={}){const i=e instanceof r?e:e.loc.start,s=i.index,o=this.state.errors;for(let e=o.length-1;e>=0;e--){const r=o[e];if(r.loc.index===s)return o[e]=t(i,n);if(r.loc.index<s)break}return this.raise(t,e,n)}updateContext(t){}unexpected(t,e){throw this.raise(v.UnexpectedToken,null!=t?t:this.state.startLoc,{expected:e?J(e):null})}expectPlugin(t,e){if(this.hasPlugin(t))return!0;throw this.raise(v.MissingPlugin,null!=e?e:this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some((t=>this.hasPlugin(t))))throw this.raise(v.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,n,r)=>{this.raise(t,te(e,n,r))}}}class ie{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class se{constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new ie)}exit(){const t=this.stack.pop(),e=this.current();for(const[n,r]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(n)||e.undefinedPrivateNames.set(n,r):this.parser.raise(v.InvalidPrivateFieldResolution,r,{identifierName:n})}declarePrivateName(t,e,n){const{privateNames:r,loneAccessors:i,undefinedPrivateNames:s}=this.current();let o=r.has(t);if(3&e){const n=o&&i.get(t);n?(o=(3&n)==(3&e)||(4&n)!=(4&e),o||i.delete(t)):o||i.set(t,e)}o&&this.parser.raise(v.PrivateNameRedeclaration,n,{identifierName:t}),r.add(t),s.delete(t)}usePrivateName(t,e){let n;for(n of this.stack)if(n.privateNames.has(t))return;n?n.undefinedPrivateNames.set(t,e):this.parser.raise(v.InvalidPrivateFieldResolution,e,{identifierName:t})}}class oe{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class ae extends oe{constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){const n=e.index;this.declarationErrors.set(n,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}}class le{constructor(t){this.parser=void 0,this.stack=[new oe],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){const n=e.loc.start,{stack:r}=this;let i=r.length-1,s=r[i];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(t,n),s=r[--i]}this.parser.raise(t,n)}recordArrowParameterBindingError(t,e){const{stack:n}=this,r=n[n.length-1],i=e.loc.start;if(r.isCertainlyParameterDeclaration())this.parser.raise(t,i);else{if(!r.canBeArrowParameterDeclaration())return;r.recordDeclarationError(t,i)}}recordAsyncArrowParametersError(t){const{stack:e}=this;let n=e.length-1,r=e[n];for(;r.canBeArrowParameterDeclaration();)2===r.type&&r.recordDeclarationError(v.AwaitBindingIdentifier,t),r=e[--n]}validateAsPattern(){const{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors((([e,n])=>{this.parser.raise(e,n);let r=t.length-2,i=t[r];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(n.index),i=t[--r]}))}}function ce(){return new oe}class ue extends re{addExtra(t,e,n,r=!0){if(!t)return;let{extra:i}=t;null==i&&(i={},t.extra=i),r?i[e]=n:Object.defineProperty(i,e,{enumerable:r,value:n})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){if(this.input.startsWith(e,t)){const n=this.input.charCodeAt(t+e.length);return!(at(n)||55296==(64512&n))}return!1}isLookaheadContextual(t){const e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return!!this.isContextual(t)&&(this.next(),!0)}expectContextual(t,e){if(!this.eatContextual(t)){if(null!=e)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Ct(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Ct(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){const n={node:null};try{const r=t(((t=null)=>{throw n.node=t,n}));if(this.state.errors.length>e.errors.length){const t=this.state;return this.state=e,this.state.tokensLength=t.tokensLength,{node:r,error:t.errors[e.errors.length],thrown:!1,aborted:!1,failState:t}}return{node:r,error:null,thrown:!1,aborted:!1,failState:null}}catch(t){const r=this.state;if(this.state=e,t instanceof SyntaxError)return{node:null,error:t,thrown:!0,aborted:!1,failState:r};if(t===n)return{node:n.node,error:null,thrown:!1,aborted:!0,failState:r};throw t}}checkExpressionErrors(t,e){if(!t)return!1;const{shorthandAssignLoc:n,doubleProtoLoc:r,privateKeyLoc:i,optionalParametersLoc:s,voidPatternLoc:o}=t;if(!e)return!!(n||r||s||i||o);null!=n&&this.raise(v.InvalidCoverInitializedName,n),null!=r&&this.raise(v.DuplicateProto,r),null!=i&&this.raise(v.UnexpectedPrivateField,i),null!=s&&this.unexpected(s),null!=o&&this.raise(v.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return H(this.state.type)}isPrivateName(t){return"PrivateName"===t.type}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return("MemberExpression"===t.type||"OptionalMemberExpression"===t.type)&&this.isPrivateName(t.property)}isObjectProperty(t){return"ObjectProperty"===t.type}isObjectMethod(t){return"ObjectMethod"===t.type}initializeScopes(t="module"===this.options.sourceType){const e=this.state.labels;this.state.labels=[];const n=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const r=this.inModule;this.inModule=t;const i=this.scope,s=this.getScopeHandler();this.scope=new s(this,t);const o=this.prodParam;this.prodParam=new Rt;const a=this.classScope;this.classScope=new se(this);const l=this.expressionScope;return this.expressionScope=new le(this),()=>{this.state.labels=e,this.exportedIdentifiers=n,this.inModule=r,this.scope=i,this.prodParam=o,this.classScope=a,this.expressionScope=l}}enterInitialScopes(){let t=0;(this.inModule||1&this.optionFlags)&&(t|=2),32&this.optionFlags&&(t|=1);const e=!this.inModule&&"commonjs"===this.options.sourceType;(e||2&this.optionFlags)&&(t|=4),this.prodParam.enter(t);let n=e?514:1;4&this.optionFlags&&(n|=512),this.scope.enter(n)}checkDestructuringPrivate(t){const{privateKeyLoc:e}=t;null!==e&&this.expectPlugin("destructuringPrivate",e)}}class he{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}}class pe{constructor(t,e,n){this.type="",this.start=e,this.end=0,this.loc=new i(n),128&(null==t?void 0:t.optionFlags)&&(this.range=[e,0]),null!=t&&t.filename&&(this.loc.filename=t.filename)}}const de=pe.prototype;de.__clone=function(){const t=new pe(void 0,this.start,this.loc.start),e=Object.keys(this);for(let n=0,r=e.length;n<r;n++){const r=e[n];"leadingComments"!==r&&"trailingComments"!==r&&"innerComments"!==r&&(t[r]=this[r])}return t};class fe extends ue{startNode(){const t=this.state.startLoc;return new pe(this,t.index,t)}startNodeAt(t){return new pe(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEndLoc)}finishNodeAt(t,e,n){return t.type=e,t.end=n.index,t.loc.end=n,128&this.optionFlags&&(t.range[1]=n.index),4096&this.optionFlags&&this.processComment(t),t}resetStartLocation(t,e){t.start=e.index,t.loc.start=e,128&this.optionFlags&&(t.range[0]=e.index)}resetEndLocation(t,e=this.state.lastTokEndLoc){t.end=e.index,t.loc.end=e,128&this.optionFlags&&(t.range[1]=e.index)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.loc.start)}castNodeTo(t,e){return t.type=e,t}cloneIdentifier(t){const{type:e,start:n,end:r,loc:i,range:s,name:o}=t,a=Object.create(de);return a.type=e,a.start=n,a.end=r,a.loc=i,a.range=s,a.name=o,t.extra&&(a.extra=t.extra),a}cloneStringLiteral(t){const{type:e,start:n,end:r,loc:i,range:s,extra:o}=t,a=Object.create(de);return a.type=e,a.start=n,a.end=r,a.loc=i,a.range=s,a.extra=o,a.value=t.value,a}}const me=t=>"ParenthesizedExpression"===t.type?me(t.expression):t;class ye extends fe{toAssignable(t,e=!1){var n,r;let i;switch(("ParenthesizedExpression"===t.type||null!=(n=t.extra)&&n.parenthesized)&&(i=me(t),e?"Identifier"===i.type?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,t):"CallExpression"===i.type||"MemberExpression"===i.type||this.isOptionalMemberExpression(i)||this.raise(v.InvalidParenthesizedAssignment,t):this.raise(v.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(t,"ObjectPattern");for(let n=0,r=t.properties.length,i=r-1;n<r;n++){var s;const r=t.properties[n],o=n===i;this.toAssignableObjectExpressionProp(r,o,e),o&&"RestElement"===r.type&&null!=(s=t.extra)&&s.trailingCommaLoc&&this.raise(v.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{const{key:n,value:r}=t;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,e);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(t,"ArrayPattern"),this.toAssignableList(t.elements,null==(r=t.extra)?void 0:r.trailingCommaLoc,e);break;case"AssignmentExpression":"="!==t.operator&&this.raise(v.MissingEqInAssignment,t.left.loc.end),this.castNodeTo(t,"AssignmentPattern"),delete t.operator,"VoidPattern"===t.left.type&&this.raise(v.VoidPatternInitializer,t.left),this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(i,e)}}toAssignableObjectExpressionProp(t,e,n){if("ObjectMethod"===t.type)this.raise("get"===t.kind||"set"===t.kind?v.PatternHasAccessor:v.PatternHasMethod,t.key);else if("SpreadElement"===t.type){this.castNodeTo(t,"RestElement");const r=t.argument;this.checkToRestConversion(r,!1),this.toAssignable(r,n),e||this.raise(v.RestTrailingComma,t)}else this.toAssignable(t,n)}toAssignableList(t,e,n){const r=t.length-1;for(let i=0;i<=r;i++){const s=t[i];s&&(this.toAssignableListItem(t,i,n),"RestElement"===s.type&&(i<r?this.raise(v.RestTrailingComma,s):e&&this.raise(v.RestTrailingComma,e)))}}toAssignableListItem(t,e,n){const r=t[e];if("SpreadElement"===r.type){this.castNodeTo(r,"RestElement");const t=r.argument;this.checkToRestConversion(t,!0),this.toAssignable(t,n)}else this.toAssignable(r,n)}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{const e=t.properties.length-1;return t.properties.every(((t,n)=>"ObjectMethod"!==t.type&&(n===e||"SpreadElement"!==t.type)&&this.isAssignable(t)))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every((t=>null===t||this.isAssignable(t)));case"AssignmentExpression":return"="===t.operator;case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(const e of t)"ArrayExpression"===(null==e?void 0:e.type)&&this.toReferencedListDeep(e.elements)}parseSpread(t){const e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){const t=this.startNode();this.next();const e=this.parseBindingAtom();return"VoidPattern"===e.type&&this.raise(v.UnexpectedVoidPattern,e),t.argument=e,this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(t,e,n){const r=1&n,i=[];let s=!0;for(;!this.eat(t);)if(s?s=!1:this.expect(12),r&&this.match(12))i.push(null);else{if(this.eat(t))break;if(this.match(21)){let r=this.parseRestBinding();if((this.hasPlugin("flow")||2&n)&&(r=this.parseFunctionParamType(r)),i.push(r),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{const t=[];if(2&n)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)t.push(this.parseDecorator());i.push(this.parseBindingElement(n,t))}}return i}parseBindingRestProperty(t){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(t.argument=this.parseVoidPattern(null),this.raise(v.UnexpectedVoidPattern,t.argument)):t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){const{type:t,startLoc:e}=this.state;if(21===t)return this.parseBindingRestProperty(this.startNode());const n=this.startNode();return 139===t?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),n.key=this.parsePrivateName()):this.parsePropertyName(n),n.method=!1,this.parseObjPropValue(n,e,!1,!1,!0,!1)}parseBindingElement(t,e){const n=this.parseMaybeDefault();return(this.hasPlugin("flow")||2&t)&&this.parseFunctionParamType(n),e.length&&(n.decorators=e,this.resetStartLocationFromNode(n,e[0])),this.parseMaybeDefault(n.loc.start,n)}parseFunctionParamType(t){return t}parseMaybeDefault(t,e){if(null!=t||(t=this.state.startLoc),e=null!=e?e:this.parseBindingAtom(),!this.eat(29))return e;const n=this.startNodeAt(t);return"VoidPattern"===e.type&&this.raise(v.VoidPatternInitializer,e),n.left=e,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(t,e,n,r){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!e&&!this.state.strict&&8192&this.optionFlags)return!0}return!1}isOptionalMemberExpression(t){return"OptionalMemberExpression"===t.type}checkLVal(t,e,n=64,r=!1,i=!1,s=!1,o=!1){var a;const l=t.type;if(this.isObjectMethod(t))return;const c=this.isOptionalMemberExpression(t);if(c||"MemberExpression"===l)return c&&(this.expectPlugin("optionalChainingAssign",t.loc.start),"AssignmentExpression"!==e.type&&this.raise(v.InvalidLhsOptionalChaining,t,{ancestor:e})),void(64!==n&&this.raise(v.InvalidPropertyBindingPattern,t));if("Identifier"===l){this.checkIdentifier(t,n,i);const{name:e}=t;return void(r&&(r.has(e)?this.raise(v.ParamDupe,t):r.add(e)))}"VoidPattern"===l&&"CatchClause"===e.type&&this.raise(v.VoidPatternCatchClauseParam,t);const u=me(t);o||(o="CallExpression"===u.type&&("Import"===u.callee.type||"Super"===u.callee.type));const h=this.isValidLVal(l,o,!(s||null!=(a=t.extra)&&a.parenthesized)&&"AssignmentExpression"===e.type,n);if(!0===h)return;if(!1===h){const r=64===n?v.InvalidLhs:v.InvalidLhsBinding;return void this.raise(r,t,{ancestor:e})}let p,d;"string"==typeof h?(p=h,d="ParenthesizedExpression"===l):[p,d]=h;const f="ArrayPattern"===l||"ObjectPattern"===l?{type:l}:e,m=t[p];if(Array.isArray(m))for(const t of m)t&&this.checkLVal(t,f,n,r,i,d,!0);else m&&this.checkLVal(m,f,n,r,i,d,o)}checkIdentifier(t,e,n=!1){this.state.strict&&(n?ft(t.name,this.inModule):dt(t.name))&&(64===e?this.raise(v.StrictEvalArguments,t,{referenceName:t.name}):this.raise(v.StrictEvalArgumentsBinding,t,{bindingName:t.name})),8192&e&&"let"===t.name&&this.raise(v.LetInLexicalBinding,t),64&e||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(v.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===t?v.RestTrailingComma:v.ElementAfterRest,this.state.startLoc),!0)}}const ge=/in(?:stanceof)?|as|satisfies/y;function ve(t){if(!t)throw new Error("Assert fail")}const be=g`typescript`({AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' cannot have an initializer because it is marked abstract.`,AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:t})=>`Accessibility modifier already seen: '${t}'.`,DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidHeritageClauseType:({token:t})=>`'${t}' list can only include identifiers or qualified-names with optional type arguments.`,InvalidModifierOnAwaitUsingDeclaration:t=>`'${t}' modifier cannot appear on an await using declaration.`,InvalidModifierOnTypeMember:({modifier:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifierOnUsingDeclaration:t=>`'${t}' modifier cannot appear on a using declaration.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifier:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`,UsingDeclarationInAmbientContext:t=>`'${t}' declarations are not allowed in ambient contexts.`});function Te(t){return"private"===t||"public"===t||"protected"===t}function xe(t){return"in"===t||"out"===t}function Se(t){if("MemberExpression"!==t.type)return!1;const{computed:e,property:n}=t;return(!e||"StringLiteral"===n.type||!("TemplateLiteral"!==n.type||n.expressions.length>0))&&Ae(t.object)}function we(t,e){var n;const{type:r}=t;if(null!=(n=t.extra)&&n.parenthesized)return!1;if(e){if("Literal"===r){const{value:e}=t;if("string"==typeof e||"boolean"==typeof e)return!0}}else if("StringLiteral"===r||"BooleanLiteral"===r)return!0;return!(!Ee(t,e)&&!function(t,e){if("UnaryExpression"===t.type){const{operator:n,argument:r}=t;if("-"===n&&Ee(r,e))return!0}return!1}(t,e))||"TemplateLiteral"===r&&0===t.expressions.length||!!Se(t)}function Ee(t,e){return e?"Literal"===t.type&&("number"==typeof t.value||"bigint"in t):"NumericLiteral"===t.type||"BigIntLiteral"===t.type}function Ae(t){return"Identifier"===t.type||"MemberExpression"===t.type&&!t.computed&&Ae(t.object)}const Pe=g`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),Me=["minimal","fsharp","hack","smart"],Ce=["^^","@@","^","%","#"],ke={estree:t=>class extends t{parse(){const t=x(super.parse());return 256&this.optionFlags&&(t.tokens=t.tokens.map(x)),t}parseRegExpLiteral({pattern:t,flags:e}){let n=null;try{n=new RegExp(t,e)}catch(t){}const r=this.estreeParseLiteral(n);return r.regex={pattern:t,flags:e},r}parseBigIntLiteral(t){let e;try{e=BigInt(t)}catch(t){e=null}const n=this.estreeParseLiteral(e);return n.bigint=String(n.value||t),n}parseDecimalLiteral(t){const e=this.estreeParseLiteral(null);return e.decimal=String(e.value||t),e}estreeParseLiteral(t){return this.parseLiteral(t,"Literal")}parseStringLiteral(t){return this.estreeParseLiteral(t)}parseNumericLiteral(t){return this.estreeParseLiteral(t)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(t){return this.estreeParseLiteral(t)}estreeParseChainExpression(t,e){const n=this.startNodeAtNode(t);return n.expression=t,this.finishNodeAt(n,"ChainExpression",e)}directiveToStmt(t){const e=t.value;delete t.value,this.castNodeTo(e,"Literal"),e.raw=e.extra.raw,e.value=e.extra.expressionValue;const n=this.castNodeTo(t,"ExpressionStatement");return n.expression=e,n.directive=e.extra.rawValue,delete e.extra,n}fillOptionalPropertiesForTSESLint(t){}cloneEstreeStringLiteral(t){const{start:e,end:n,loc:r,range:i,raw:s,value:o}=t,a=Object.create(t.constructor.prototype);return a.type="Literal",a.start=e,a.end=n,a.loc=r,a.range=i,a.raw=s,a.value=o,a}initFunction(t,e){super.initFunction(t,e),t.expression=!1}checkDeclaration(t){null!=t&&this.isObjectProperty(t)?this.checkDeclaration(t.value):super.checkDeclaration(t)}getObjectOrClassMethodParams(t){return t.value.params}isValidDirective(t){var e;return"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"string"==typeof t.expression.value&&!(null!=(e=t.expression.extra)&&e.parenthesized)}parseBlockBody(t,e,n,r,i){super.parseBlockBody(t,e,n,r,i);const s=t.directives.map((t=>this.directiveToStmt(t)));t.body=s.concat(t.body),delete t.directives}parsePrivateName(){const t=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(t):t}convertPrivateNameToPrivateIdentifier(t){const e=super.getPrivateNameSV(t);return delete t.id,t.name=e,this.castNodeTo(t,"PrivateIdentifier")}isPrivateName(t){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===t.type:super.isPrivateName(t)}getPrivateNameSV(t){return this.getPluginOption("estree","classFeatures")?t.name:super.getPrivateNameSV(t)}parseLiteral(t,e){const n=super.parseLiteral(t,e);return n.raw=n.extra.raw,delete n.extra,n}parseFunctionBody(t,e,n=!1){super.parseFunctionBody(t,e,n),t.expression="BlockStatement"!==t.body.type}parseMethod(t,e,n,r,i,s,o=!1){let a=this.startNode();a.kind=t.kind,a=super.parseMethod(a,e,n,r,i,s,o),delete a.kind;const{typeParameters:l}=t;l&&(delete t.typeParameters,a.typeParameters=l,this.resetStartLocationFromNode(a,l));const c=this.castNodeTo(a,"FunctionExpression");return t.value=c,"ClassPrivateMethod"===s&&(t.computed=!1),"ObjectMethod"===s?("method"===t.kind&&(t.kind="init"),t.shorthand=!1,this.finishNode(t,"Property")):this.finishNode(t,"MethodDefinition")}nameIsConstructor(t){return"Literal"===t.type?"constructor"===t.value:super.nameIsConstructor(t)}parseClassProperty(...t){const e=super.parseClassProperty(...t);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(e,"PropertyDefinition"),e):e}parseClassPrivateProperty(...t){const e=super.parseClassPrivateProperty(...t);return this.getPluginOption("estree","classFeatures")?(this.castNodeTo(e,"PropertyDefinition"),e.computed=!1,e):e}parseClassAccessorProperty(t){const e=super.parseClassAccessorProperty(t);return this.getPluginOption("estree","classFeatures")?(e.abstract&&this.hasPlugin("typescript")?(delete e.abstract,this.castNodeTo(e,"TSAbstractAccessorProperty")):this.castNodeTo(e,"AccessorProperty"),e):e}parseObjectProperty(t,e,n,r){const i=super.parseObjectProperty(t,e,n,r);return i&&(i.kind="init",this.castNodeTo(i,"Property")),i}finishObjectProperty(t){return t.kind="init",this.finishNode(t,"Property")}isValidLVal(t,e,n,r){return"Property"===t?"value":super.isValidLVal(t,e,n,r)}isAssignable(t,e){return null!=t&&this.isObjectProperty(t)?this.isAssignable(t.value,e):super.isAssignable(t,e)}toAssignable(t,e=!1){if(null!=t&&this.isObjectProperty(t)){const{key:n,value:r}=t;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(r,e)}else super.toAssignable(t,e)}toAssignableObjectExpressionProp(t,e,n){"Property"!==t.type||"get"!==t.kind&&"set"!==t.kind?"Property"===t.type&&t.method?this.raise(v.PatternHasMethod,t.key):super.toAssignableObjectExpressionProp(t,e,n):this.raise(v.PatternHasAccessor,t.key)}finishCallExpression(t,e){const n=super.finishCallExpression(t,e);var r,i;return"Import"===n.callee.type?(this.castNodeTo(n,"ImportExpression"),n.source=n.arguments[0],n.options=null!=(r=n.arguments[1])?r:null,n.attributes=null!=(i=n.arguments[1])?i:null,delete n.arguments,delete n.callee):"OptionalCallExpression"===n.type?this.castNodeTo(n,"CallExpression"):n.optional=!1,n}toReferencedArguments(t){"ImportExpression"!==t.type&&super.toReferencedArguments(t)}parseExport(t,e){const n=this.state.lastTokStartLoc,r=super.parseExport(t,e);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":1===r.specifiers.length&&"ExportNamespaceSpecifier"===r.specifiers[0].type&&(this.castNodeTo(r,"ExportAllDeclaration"),r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var i;const{declaration:t}=r;"ClassDeclaration"===(null==t?void 0:t.type)&&(null==(i=t.decorators)?void 0:i.length)>0&&t.start===r.start&&this.resetStartLocation(r,n)}}return r}stopParseSubscript(t,e){const n=super.stopParseSubscript(t,e);return e.optionalChainMember?this.estreeParseChainExpression(n,t.loc.end):n}parseMember(t,e,n,r,i){const s=super.parseMember(t,e,n,r,i);return"OptionalMemberExpression"===s.type?this.castNodeTo(s,"MemberExpression"):s.optional=!1,s}isOptionalMemberExpression(t){return"ChainExpression"===t.type?"MemberExpression"===t.expression.type:super.isOptionalMemberExpression(t)}hasPropertyAsPrivateName(t){return"ChainExpression"===t.type&&(t=t.expression),super.hasPropertyAsPrivateName(t)}isObjectProperty(t){return"Property"===t.type&&"init"===t.kind&&!t.method}isObjectMethod(t){return"Property"===t.type&&(t.method||"get"===t.kind||"set"===t.kind)}castNodeTo(t,e){const n=super.castNodeTo(t,e);return this.fillOptionalPropertiesForTSESLint(n),n}cloneIdentifier(t){const e=super.cloneIdentifier(t);return this.fillOptionalPropertiesForTSESLint(e),e}cloneStringLiteral(t){return"Literal"===t.type?this.cloneEstreeStringLiteral(t):super.cloneStringLiteral(t)}finishNodeAt(t,e,n){return x(super.finishNodeAt(t,e,n))}finishNode(t,e){const n=super.finishNode(t,e);return this.fillOptionalPropertiesForTSESLint(n),n}resetStartLocation(t,e){super.resetStartLocation(t,e),x(t)}resetEndLocation(t,e=this.state.lastTokEndLoc){super.resetEndLocation(t,e),x(t)}},jsx:t=>class extends t{jsxReadToken(){let t="",e=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Nt.UnterminatedJsxContent,this.state.startLoc);const n=this.input.charCodeAt(this.state.pos);switch(n){case 60:case 123:return this.state.pos===this.state.start?void(60===n&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(n)):(t+=this.input.slice(e,this.state.pos),void this.finishToken(142,t));case 38:t+=this.input.slice(e,this.state.pos),t+=this.jsxReadEntity(),e=this.state.pos;break;default:Mt(n)?(t+=this.input.slice(e,this.state.pos),t+=this.jsxReadNewLine(!0),e=this.state.pos):++this.state.pos}}}jsxReadNewLine(t){const e=this.input.charCodeAt(this.state.pos);let n;return++this.state.pos,13===e&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,n=t?"\n":"\r\n"):n=String.fromCharCode(e),++this.state.curLine,this.state.lineStart=this.state.pos,n}jsxReadString(t){let e="",n=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,this.state.startLoc);const r=this.input.charCodeAt(this.state.pos);if(r===t)break;38===r?(e+=this.input.slice(n,this.state.pos),e+=this.jsxReadEntity(),n=this.state.pos):Mt(r)?(e+=this.input.slice(n,this.state.pos),e+=this.jsxReadNewLine(!1),n=this.state.pos):++this.state.pos}e+=this.input.slice(n,this.state.pos++),this.finishToken(134,e)}jsxReadEntity(){const t=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let t=10;120===this.codePointAtPos(this.state.pos)&&(t=16,++this.state.pos);const e=this.readInt(t,void 0,!1,"bail");if(null!==e&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(e)}else{let e=0,n=!1;for(;e++<10&&this.state.pos<this.length&&!(n=59===this.codePointAtPos(this.state.pos));)++this.state.pos;if(n){const e=this.input.slice(t,this.state.pos),n=At[e];if(++this.state.pos,n)return n}}return this.state.pos=t,"&"}jsxReadWord(){let t;const e=this.state.pos;do{t=this.input.charCodeAt(++this.state.pos)}while(at(t)||45===t);this.finishToken(141,this.input.slice(e,this.state.pos))}jsxParseIdentifier(){const t=this.startNode();return this.match(141)?t.name=this.state.value:W(this.state.type)?t.name=J(this.state.type):this.unexpected(),this.next(),this.finishNode(t,"JSXIdentifier")}jsxParseNamespacedName(){const t=this.state.startLoc,e=this.jsxParseIdentifier();if(!this.eat(14))return e;const n=this.startNodeAt(t);return n.namespace=e,n.name=this.jsxParseIdentifier(),this.finishNode(n,"JSXNamespacedName")}jsxParseElementName(){const t=this.state.startLoc;let e=this.jsxParseNamespacedName();if("JSXNamespacedName"===e.type)return e;for(;this.eat(16);){const n=this.startNodeAt(t);n.object=e,n.property=this.jsxParseIdentifier(),e=this.finishNode(n,"JSXMemberExpression")}return e}jsxParseAttributeValue(){let t;switch(this.state.type){case 5:return t=this.startNode(),this.setContext(w.brace),this.next(),t=this.jsxParseExpressionContainer(t,w.j_oTag),"JSXEmptyExpression"===t.expression.type&&this.raise(Nt.AttributeIsEmpty,t),t;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Nt.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){const t=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(t,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(t){return this.next(),t.expression=this.parseExpression(),this.setContext(w.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadChild")}jsxParseExpressionContainer(t,e){if(this.match(8))t.expression=this.jsxParseEmptyExpression();else{const e=this.parseExpression();t.expression=e}return this.setContext(e),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXExpressionContainer")}jsxParseAttribute(){const t=this.startNode();return this.match(5)?(this.setContext(w.brace),this.next(),this.expect(21),t.argument=this.parseMaybeAssignAllowIn(),this.setContext(w.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(t,"JSXSpreadAttribute")):(t.name=this.jsxParseNamespacedName(),t.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(t,"JSXAttribute"))}jsxParseOpeningElementAt(t){const e=this.startNodeAt(t);return this.eat(144)?this.finishNode(e,"JSXOpeningFragment"):(e.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(e))}jsxParseOpeningElementAfterName(t){const e=[];for(;!this.match(56)&&!this.match(144);)e.push(this.jsxParseAttribute());return t.attributes=e,t.selfClosing=this.eat(56),this.expect(144),this.finishNode(t,"JSXOpeningElement")}jsxParseClosingElementAt(t){const e=this.startNodeAt(t);return this.eat(144)?this.finishNode(e,"JSXClosingFragment"):(e.name=this.jsxParseElementName(),this.expect(144),this.finishNode(e,"JSXClosingElement"))}jsxParseElementAt(t){const e=this.startNodeAt(t),n=[],r=this.jsxParseOpeningElementAt(t);let i=null;if(!r.selfClosing){t:for(;;)switch(this.state.type){case 143:if(t=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(t);break t}n.push(this.jsxParseElementAt(t));break;case 142:n.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{const t=this.startNode();this.setContext(w.brace),this.next(),this.match(21)?n.push(this.jsxParseSpreadChild(t)):n.push(this.jsxParseExpressionContainer(t,w.j_expr));break}default:this.unexpected()}_t(r)&&!_t(i)&&null!==i?this.raise(Nt.MissingClosingTagFragment,i):!_t(r)&&_t(i)?this.raise(Nt.MissingClosingTagElement,i,{openingTagName:Dt(r.name)}):_t(r)||_t(i)||Dt(i.name)!==Dt(r.name)&&this.raise(Nt.MissingClosingTagElement,i,{openingTagName:Dt(r.name)})}if(_t(r)?(e.openingFragment=r,e.closingFragment=i):(e.openingElement=r,e.closingElement=i),e.children=n,this.match(47))throw this.raise(Nt.UnwrappedAdjacentJSXElements,this.state.startLoc);return _t(r)?this.finishNode(e,"JSXFragment"):this.finishNode(e,"JSXElement")}jsxParseElement(){const t=this.state.startLoc;return this.next(),this.jsxParseElementAt(t)}setContext(t){const{context:e}=this.state;e[e.length-1]=t}parseExprAtom(t){return this.match(143)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(t)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(t){const e=this.curContext();if(e!==w.j_expr){if(e===w.j_oTag||e===w.j_cTag){if(ot(t))return void this.jsxReadWord();if(62===t)return++this.state.pos,void this.finishToken(144);if((34===t||39===t)&&e===w.j_oTag)return void this.jsxReadString(t)}if(60===t&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(143);super.getTokenFromCode(t)}else this.jsxReadToken()}updateContext(t){const{context:e,type:n}=this.state;if(56===n&&143===t)e.splice(-2,2,w.j_cTag),this.state.canStartJSXElement=!1;else if(143===n)e.push(w.j_oTag);else if(144===n){const n=e[e.length-1];n===w.j_oTag&&56===t||n===w.j_cTag?(e.pop(),this.state.canStartJSXElement=e[e.length-1]===w.j_expr):(this.setContext(w.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=R[n]}},flow:t=>class extends t{constructor(...t){super(...t),this.flowPragma=void 0}getScopeHandler(){return bt}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}finishToken(t,e){134!==t&&13!==t&&28!==t&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(t,e)}addComment(t){if(void 0===this.flowPragma){const e=Et.exec(t.value);if(e)if("flow"===e[1])this.flowPragma="flow";else{if("noflow"!==e[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(t)}flowParseTypeInitialiser(t){const e=this.state.inType;this.state.inType=!0,this.expect(t||14);const n=this.flowParseType();return this.state.inType=e,n}flowParsePredicate(){const t=this.startNode(),e=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>e.index+1&&this.raise(xt.UnexpectedSpaceBetweenModuloChecks,e),this.eat(10)?(t.value=super.parseExpression(),this.expect(11),this.finishNode(t,"DeclaredPredicate")):this.finishNode(t,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const t=this.state.inType;this.state.inType=!0,this.expect(14);let e=null,n=null;return this.match(54)?(this.state.inType=t,n=this.flowParsePredicate()):(e=this.flowParseType(),this.state.inType=t,this.match(54)&&(n=this.flowParsePredicate())),[e,n]}flowParseDeclareClass(t){return this.next(),this.flowParseInterfaceish(t,!0),this.finishNode(t,"DeclareClass")}flowParseDeclareFunction(t){this.next();const e=t.id=this.parseIdentifier(),n=this.startNode(),r=this.startNode();this.match(47)?n.typeParameters=this.flowParseTypeParameterDeclaration():n.typeParameters=null,this.expect(10);const i=this.flowParseFunctionTypeParams();return n.params=i.params,n.rest=i.rest,n.this=i._this,this.expect(11),[n.returnType,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),r.typeAnnotation=this.finishNode(n,"FunctionTypeAnnotation"),e.typeAnnotation=this.finishNode(r,"TypeAnnotation"),this.resetEndLocation(e),this.semicolon(),this.scope.declareName(t.id.name,2048,t.id.loc.start),this.finishNode(t,"DeclareFunction")}flowParseDeclare(t,e){if(this.match(80))return this.flowParseDeclareClass(t);if(this.match(68))return this.flowParseDeclareFunction(t);if(this.match(74))return this.flowParseDeclareVariable(t);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(t):(e&&this.raise(xt.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(t));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(t);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(t);if(this.isContextual(129))return this.flowParseDeclareInterface(t);if(this.match(82))return this.flowParseDeclareExportDeclaration(t,e);throw this.unexpected()}flowParseDeclareVariable(t){return this.next(),t.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(t.id.name,5,t.id.loc.start),this.semicolon(),this.finishNode(t,"DeclareVariable")}flowParseDeclareModule(t){this.scope.enter(0),this.match(134)?t.id=super.parseExprAtom():t.id=this.parseIdentifier();const e=t.body=this.startNode(),n=e.body=[];for(this.expect(5);!this.match(8);){const t=this.startNode();this.match(83)?(this.next(),this.isContextual(130)||this.match(87)||this.raise(xt.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),n.push(super.parseImport(t))):(this.expectContextual(125,xt.UnsupportedStatementInDeclareModule),n.push(this.flowParseDeclare(t,!0)))}this.scope.exit(),this.expect(8),this.finishNode(e,"BlockStatement");let r=null,i=!1;return n.forEach((t=>{!function(t){return"DeclareExportAllDeclaration"===t.type||"DeclareExportDeclaration"===t.type&&(!t.declaration||"TypeAlias"!==t.declaration.type&&"InterfaceDeclaration"!==t.declaration.type)}(t)?"DeclareModuleExports"===t.type&&(i&&this.raise(xt.DuplicateDeclareModuleExports,t),"ES"===r&&this.raise(xt.AmbiguousDeclareModuleKind,t),r="CommonJS",i=!0):("CommonJS"===r&&this.raise(xt.AmbiguousDeclareModuleKind,t),r="ES")})),t.kind=r||"CommonJS",this.finishNode(t,"DeclareModule")}flowParseDeclareExportDeclaration(t,e){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?t.declaration=this.flowParseDeclare(this.startNode()):(t.declaration=this.flowParseType(),this.semicolon()),t.default=!0,this.finishNode(t,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!e){const t=this.state.value;throw this.raise(xt.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:t,suggestion:wt[t]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return t.declaration=this.flowParseDeclare(this.startNode()),t.default=!1,this.finishNode(t,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return"ExportNamedDeclaration"===(t=this.parseExport(t,null)).type?(t.default=!1,delete t.exportKind,this.castNodeTo(t,"DeclareExportDeclaration")):this.castNodeTo(t,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(t){return this.next(),this.expectContextual(111),t.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(t,"DeclareModuleExports")}flowParseDeclareTypeAlias(t){this.next();const e=this.flowParseTypeAlias(t);return this.castNodeTo(e,"DeclareTypeAlias"),e}flowParseDeclareOpaqueType(t){this.next();const e=this.flowParseOpaqueType(t,!0);return this.castNodeTo(e,"DeclareOpaqueType"),e}flowParseDeclareInterface(t){return this.next(),this.flowParseInterfaceish(t,!1),this.finishNode(t,"DeclareInterface")}flowParseInterfaceish(t,e){if(t.id=this.flowParseRestrictedIdentifier(!e,!0),this.scope.declareName(t.id.name,e?17:8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.extends=[],this.eat(81))do{t.extends.push(this.flowParseInterfaceExtends())}while(!e&&this.eat(12));if(e){if(t.implements=[],t.mixins=[],this.eatContextual(117))do{t.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(113))do{t.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}t.body=this.flowParseObjectType({allowStatic:e,allowExact:!1,allowSpread:!1,allowProto:e,allowInexact:!1})}flowParseInterfaceExtends(){const t=this.startNode();return t.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,this.finishNode(t,"InterfaceExtends")}flowParseInterface(t){return this.flowParseInterfaceish(t,!1),this.finishNode(t,"InterfaceDeclaration")}checkNotUnderscore(t){"_"===t&&this.raise(xt.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(t,e,n){Tt.has(t)&&this.raise(n?xt.AssignReservedType:xt.UnexpectedReservedType,e,{reservedType:t})}flowParseRestrictedIdentifierName(t,e){return this.checkReservedType(this.state.value,this.state.startLoc,e),this.parseIdentifierName(t)}flowParseRestrictedIdentifier(t,e){const n=this.startNode(),r=this.flowParseRestrictedIdentifierName(t,e);return this.createIdentifier(n,r)}flowParseTypeAlias(t){return t.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(t,"TypeAlias")}flowParseOpaqueType(t,e){return this.expectContextual(130),t.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(t.id.name,8201,t.id.loc.start),this.match(47)?t.typeParameters=this.flowParseTypeParameterDeclaration():t.typeParameters=null,t.supertype=null,this.match(14)&&(t.supertype=this.flowParseTypeInitialiser(14)),t.impltype=null,e||(t.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(t,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){const t=this.startNode();return this.next(),t.typeAnnotation=this.flowParseType(),this.finishNode(t,"TypeAnnotation")}}flowParseTypeParameter(t=!1){const e=this.state.startLoc,n=this.startNode(),r=this.flowParseVariance();return n.name=this.flowParseRestrictedIdentifierName(),n.variance=r,n.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),n.default=this.flowParseType()):t&&this.raise(xt.MissingTypeParamDefault,e),this.finishNode(n,"TypeParameter")}flowParseTypeParameterDeclaration(){const t=this.state.inType,e=this.startNode();e.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let n=!1;do{const t=this.flowParseTypeParameter(n);e.params.push(t),t.default&&(n=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterDeclaration")}flowInTopLevelContext(t){if(this.curContext()===w.brace)return t();{const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}}flowParseTypeParameterInstantiationInExpression(){if(47===this.reScan_lt())return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){const t=this.startNode(),e=this.state.inType;return this.state.inType=!0,t.params=[],this.flowInTopLevelContext((()=>{this.expect(47);const e=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)t.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=e})),this.state.inType=e,this.state.inType||this.curContext()!==w.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(47!==this.reScan_lt())return null;const t=this.startNode(),e=this.state.inType;for(t.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)t.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterInstantiation")}flowParseInterfaceType(){const t=this.startNode();if(this.expectContextual(129),t.extends=[],this.eat(81))do{t.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return t.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(t,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(t,e,n){return t.static=e,14===this.lookahead().type?(t.id=this.flowParseObjectPropertyKey(),t.key=this.flowParseTypeInitialiser()):(t.id=null,t.key=this.flowParseType()),this.expect(3),t.value=this.flowParseTypeInitialiser(),t.variance=n,this.finishNode(t,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(t,e){return t.static=e,t.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(t.method=!0,t.optional=!1,t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start))):(t.method=!1,this.eat(17)&&(t.optional=!0),t.value=this.flowParseTypeInitialiser()),this.finishNode(t,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(t){for(t.params=[],t.rest=null,t.typeParameters=null,t.this=null,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(t.this=this.flowParseFunctionTypeParam(!0),t.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),t.returnType=this.flowParseTypeInitialiser(),this.finishNode(t,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(t,e){const n=this.startNode();return t.static=e,t.value=this.flowParseObjectTypeMethodish(n),this.finishNode(t,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:t,allowExact:e,allowSpread:n,allowProto:r,allowInexact:i}){const s=this.state.inType;this.state.inType=!0;const o=this.startNode();let a,l;o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let c=!1;for(e&&this.match(6)?(this.expect(6),a=9,l=!0):(this.expect(5),a=8,l=!1),o.exact=l;!this.match(a);){let e=!1,s=null,a=null;const u=this.startNode();if(r&&this.isContextual(118)){const e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),s=this.state.startLoc,t=!1)}if(t&&this.isContextual(106)){const t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),e=!0)}const h=this.flowParseVariance();if(this.eat(0))null!=s&&this.unexpected(s),this.eat(0)?(h&&this.unexpected(h.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(u,e))):o.indexers.push(this.flowParseObjectTypeIndexer(u,e,h));else if(this.match(10)||this.match(47))null!=s&&this.unexpected(s),h&&this.unexpected(h.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(u,e));else{let t="init";(this.isContextual(99)||this.isContextual(104))&&H(this.lookahead().type)&&(t=this.state.value,this.next());const r=this.flowParseObjectTypeProperty(u,e,s,h,t,n,null!=i?i:!l);null===r?(c=!0,a=this.state.lastTokStartLoc):o.properties.push(r)}this.flowObjectTypeSemicolon(),!a||this.match(8)||this.match(9)||this.raise(xt.UnexpectedExplicitInexactInObject,a)}this.expect(a),n&&(o.inexact=c);const u=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=s,u}flowParseObjectTypeProperty(t,e,n,r,i,s,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(s?o||this.raise(xt.InexactInsideExact,this.state.lastTokStartLoc):this.raise(xt.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(xt.InexactVariance,r),null):(s||this.raise(xt.UnexpectedSpreadType,this.state.lastTokStartLoc),null!=n&&this.unexpected(n),r&&this.raise(xt.SpreadVariance,r),t.argument=this.flowParseType(),this.finishNode(t,"ObjectTypeSpreadProperty"));{t.key=this.flowParseObjectPropertyKey(),t.static=e,t.proto=null!=n,t.kind=i;let o=!1;return this.match(47)||this.match(10)?(t.method=!0,null!=n&&this.unexpected(n),r&&this.unexpected(r.loc.start),t.value=this.flowParseObjectTypeMethodish(this.startNodeAt(t.loc.start)),"get"!==i&&"set"!==i||this.flowCheckGetterSetterParams(t),!s&&"constructor"===t.key.name&&t.value.this&&this.raise(xt.ThisParamBannedInConstructor,t.value.this)):("init"!==i&&this.unexpected(),t.method=!1,this.eat(17)&&(o=!0),t.value=this.flowParseTypeInitialiser(),t.variance=r),t.optional=o,this.finishNode(t,"ObjectTypeProperty")}}flowCheckGetterSetterParams(t){const e="get"===t.kind?0:1,n=t.value.params.length+(t.value.rest?1:0);t.value.this&&this.raise("get"===t.kind?xt.GetterMayNotHaveThisParam:xt.SetterMayNotHaveThisParam,t.value.this),n!==e&&this.raise("get"===t.kind?v.BadGetterArity:v.BadSetterArity,t),"set"===t.kind&&t.value.rest&&this.raise(v.BadSetterRestParameter,t)}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(t,e){null!=t||(t=this.state.startLoc);let n=e||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const e=this.startNodeAt(t);e.qualification=n,e.id=this.flowParseRestrictedIdentifier(!0),n=this.finishNode(e,"QualifiedTypeIdentifier")}return n}flowParseGenericType(t,e){const n=this.startNodeAt(t);return n.typeParameters=null,n.id=this.flowParseQualifiedTypeIdentifier(t,e),this.match(47)&&(n.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(n,"GenericTypeAnnotation")}flowParseTypeofType(){const t=this.startNode();return this.expect(87),t.argument=this.flowParsePrimaryType(),this.finishNode(t,"TypeofTypeAnnotation")}flowParseTupleType(){const t=this.startNode();for(t.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(t.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(t,"TupleTypeAnnotation")}flowParseFunctionTypeParam(t){let e=null,n=!1,r=null;const i=this.startNode(),s=this.lookahead(),o=78===this.state.type;return 14===s.type||17===s.type?(o&&!t&&this.raise(xt.ThisParamMustBeFirst,i),e=this.parseIdentifier(o),this.eat(17)&&(n=!0,o&&this.raise(xt.ThisParamMayNotBeOptional,i)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),i.name=e,i.optional=n,i.typeAnnotation=r,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(t){const e=this.startNodeAt(t.loc.start);return e.name=null,e.optional=!1,e.typeAnnotation=t,this.finishNode(e,"FunctionTypeParam")}flowParseFunctionTypeParams(t=[]){let e=null,n=null;for(this.match(78)&&(n=this.flowParseFunctionTypeParam(!0),n.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)t.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e=this.flowParseFunctionTypeParam(!1)),{params:t,rest:e,_this:n}}flowIdentToTypeAnnotation(t,e,n){switch(n.name){case"any":return this.finishNode(e,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(e,"BooleanTypeAnnotation");case"mixed":return this.finishNode(e,"MixedTypeAnnotation");case"empty":return this.finishNode(e,"EmptyTypeAnnotation");case"number":return this.finishNode(e,"NumberTypeAnnotation");case"string":return this.finishNode(e,"StringTypeAnnotation");case"symbol":return this.finishNode(e,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(n.name),this.flowParseGenericType(t,n)}}flowParsePrimaryType(){const t=this.state.startLoc,e=this.startNode();let n,r,i=!1;const s=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,r=this.flowParseTupleType(),this.state.noAnonFunctionType=s,r;case 47:{const t=this.startNode();return t.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),n=this.flowParseFunctionTypeParams(),t.params=n.params,t.rest=n.rest,t.this=n._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),this.finishNode(t,"FunctionTypeAnnotation")}case 10:{const t=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(q(this.state.type)||this.match(78)){const t=this.lookahead().type;i=17!==t&&14!==t}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=s,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),r;this.eat(12)}return n=r?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):this.flowParseFunctionTypeParams(),t.params=n.params,t.rest=n.rest,t.this=n._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return e.value=this.match(85),this.next(),this.finishNode(e,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",e);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",e);throw this.raise(xt.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(e,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(e,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(e,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(e,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(W(this.state.type)){const t=J(this.state.type);return this.next(),super.createIdentifier(e,t)}if(q(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(t,e,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){const t=this.state.startLoc;let e=this.flowParsePrimaryType(),n=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const r=this.startNodeAt(t),i=this.eat(18);n=n||i,this.expect(0),!i&&this.match(3)?(r.elementType=e,this.next(),e=this.finishNode(r,"ArrayTypeAnnotation")):(r.objectType=e,r.indexType=this.flowParseType(),this.expect(3),n?(r.optional=i,e=this.finishNode(r,"OptionalIndexedAccessType")):e=this.finishNode(r,"IndexedAccessType"))}return e}flowParsePrefixType(){const t=this.startNode();return this.eat(17)?(t.typeAnnotation=this.flowParsePrefixType(),this.finishNode(t,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const t=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const e=this.startNodeAt(t.loc.start);return e.params=[this.reinterpretTypeAsFunctionTypeParam(t)],e.rest=null,e.this=null,e.returnType=this.flowParseType(),e.typeParameters=null,this.finishNode(e,"FunctionTypeAnnotation")}return t}flowParseIntersectionType(){const t=this.startNode();this.eat(45);const e=this.flowParseAnonFunctionWithoutParens();for(t.types=[e];this.eat(45);)t.types.push(this.flowParseAnonFunctionWithoutParens());return 1===t.types.length?e:this.finishNode(t,"IntersectionTypeAnnotation")}flowParseUnionType(){const t=this.startNode();this.eat(43);const e=this.flowParseIntersectionType();for(t.types=[e];this.eat(43);)t.types.push(this.flowParseIntersectionType());return 1===t.types.length?e:this.finishNode(t,"UnionTypeAnnotation")}flowParseType(){const t=this.state.inType;this.state.inType=!0;const e=this.flowParseUnionType();return this.state.inType=t,e}flowParseTypeOrImplicitInstantiation(){if(132===this.state.type&&"_"===this.state.value){const t=this.state.startLoc,e=this.parseIdentifier();return this.flowParseGenericType(t,e)}return this.flowParseType()}flowParseTypeAnnotation(){const t=this.startNode();return t.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(t,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){const t=this.startNode(),e=this.parseIdentifierName();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(t,e)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}flowParseVariance(){let t=null;return this.match(53)?(t=this.startNode(),"+"===this.state.value?t.kind="plus":t.kind="minus",this.next(),this.finishNode(t,"Variance")):t}parseFunctionBody(t,e,n=!1){e?this.forwardNoArrowParamsConversionAt(t,(()=>super.parseFunctionBody(t,!0,n))):super.parseFunctionBody(t,!1,n)}parseFunctionBodyAndFinish(t,e,n=!1){if(this.match(14)){const e=this.startNode();[e.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),t.returnType=e.typeAnnotation?this.finishNode(e,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(t,e,n)}parseStatementLike(t){if(this.state.strict&&this.isContextual(129)){if($(this.lookahead().type)){const t=this.startNode();return this.next(),this.flowParseInterface(t)}}else if(this.isContextual(126)){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}const e=super.parseStatementLike(t);return void 0!==this.flowPragma||this.isValidDirective(e)||(this.flowPragma=null),e}parseExpressionStatement(t,e,n){if("Identifier"===e.type)if("declare"===e.name){if(this.match(80)||q(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(t)}else if(q(this.state.type)){if("interface"===e.name)return this.flowParseInterface(t);if("type"===e.name)return this.flowParseTypeAlias(t);if("opaque"===e.name)return this.flowParseOpaqueType(t,!1)}return super.parseExpressionStatement(t,e,n)}shouldParseExportDeclaration(){const{type:t}=this.state;return 126===t||Y(t)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:t}=this.state;return 126===t||Y(t)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDefaultExpression()}parseConditional(t,e,n){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){const e=this.lookaheadCharCode();if(44===e||61===e||58===e||41===e)return this.setOptionalParametersError(n),t}this.expect(17);const r=this.state.clone(),i=this.state.noArrowAt,s=this.startNodeAt(e);let{consequent:o,failed:a}=this.tryParseConditionalConsequent(),[l,c]=this.getArrowLikeExpressions(o);if(a||c.length>0){const t=[...i];if(c.length>0){this.state=r,this.state.noArrowAt=t;for(let e=0;e<c.length;e++)t.push(c[e].start);({consequent:o,failed:a}=this.tryParseConditionalConsequent()),[l,c]=this.getArrowLikeExpressions(o)}a&&l.length>1&&this.raise(xt.AmbiguousConditionalArrow,r.startLoc),a&&1===l.length&&(this.state=r,t.push(l[0].start),this.state.noArrowAt=t,({consequent:o,failed:a}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=i,this.expect(14),s.test=t,s.consequent=o,s.alternate=this.forwardNoArrowParamsConversionAt(s,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(s,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const t=this.parseMaybeAssignAllowIn(),e=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:t,failed:e}}getArrowLikeExpressions(t,e){const n=[t],r=[];for(;0!==n.length;){const t=n.pop();"ArrowFunctionExpression"===t.type&&"BlockStatement"!==t.body.type?(t.typeParameters||!t.returnType?this.finishArrowValidation(t):r.push(t),n.push(t.body)):"ConditionalExpression"===t.type&&(n.push(t.consequent),n.push(t.alternate))}return e?(r.forEach((t=>this.finishArrowValidation(t))),[r,[]]):function(t,e){const n=[],r=[];for(let i=0;i<t.length;i++)(e(t[i])?n:r).push(t[i]);return[n,r]}(r,(t=>t.params.every((t=>this.isAssignable(t,!0)))))}finishArrowValidation(t){var e;this.toAssignableList(t.params,null==(e=t.extra)?void 0:e.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(t,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(t,e){let n;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),n=e(),this.state.noArrowParamsConversionAt.pop()):n=e(),n}parseParenItem(t,e){const n=super.parseParenItem(t,e);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(t)),this.match(14)){const t=this.startNodeAt(e);return t.expression=n,t.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(t,"TypeCastExpression")}return n}assertModuleNodeAllowed(t){"ImportDeclaration"===t.type&&("type"===t.importKind||"typeof"===t.importKind)||"ExportNamedDeclaration"===t.type&&"type"===t.exportKind||"ExportAllDeclaration"===t.type&&"type"===t.exportKind||super.assertModuleNodeAllowed(t)}parseExportDeclaration(t){if(this.isContextual(130)){t.exportKind="type";const e=this.startNode();return this.next(),this.match(5)?(t.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(t),null):this.flowParseTypeAlias(e)}if(this.isContextual(131)){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseOpaqueType(e,!1)}if(this.isContextual(129)){t.exportKind="type";const e=this.startNode();return this.next(),this.flowParseInterface(e)}if(this.isContextual(126)){t.exportKind="value";const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDeclaration(t)}eatExportStar(t){return!!super.eatExportStar(t)||!(!this.isContextual(130)||55!==this.lookahead().type)&&(t.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(t){const{startLoc:e}=this.state,n=super.maybeParseExportNamespaceSpecifier(t);return n&&"type"===t.exportKind&&this.unexpected(e),n}parseClassId(t,e,n){super.parseClassId(t,e,n),this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(t,e,n){const{startLoc:r}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(t,e))return;e.declare=!0}super.parseClassMember(t,e,n),e.declare&&("ClassProperty"!==e.type&&"ClassPrivateProperty"!==e.type&&"PropertyDefinition"!==e.type?this.raise(xt.DeclareClassElement,r):e.value&&this.raise(xt.DeclareClassFieldInitializer,e.value))}isIterator(t){return"iterator"===t||"asyncIterator"===t}readIterator(){const t=super.readWord1(),e="@@"+t;this.isIterator(t)&&this.state.inType||this.raise(v.InvalidIdentifier,this.state.curPosition(),{identifierName:e}),this.finishToken(132,e)}getTokenFromCode(t){const e=this.input.charCodeAt(this.state.pos+1);123===t&&124===e?this.finishOp(6,2):!this.state.inType||62!==t&&60!==t?this.state.inType&&63===t?46===e?this.finishOp(18,2):this.finishOp(17,1):function(t,e,n){return 64===t&&64===e&&ot(n)}(t,e,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(t):this.finishOp(62===t?48:47,1)}isAssignable(t,e){return"TypeCastExpression"===t.type?this.isAssignable(t.expression,e):super.isAssignable(t,e)}toAssignable(t,e=!1){e||"AssignmentExpression"!==t.type||"TypeCastExpression"!==t.left.type||(t.left=this.typeCastToParameter(t.left)),super.toAssignable(t,e)}toAssignableList(t,e,n){for(let e=0;e<t.length;e++){const n=t[e];"TypeCastExpression"===(null==n?void 0:n.type)&&(t[e]=this.typeCastToParameter(n))}super.toAssignableList(t,e,n)}toReferencedList(t,e){for(let r=0;r<t.length;r++){var n;const i=t[r];!i||"TypeCastExpression"!==i.type||null!=(n=i.extra)&&n.parenthesized||!(t.length>1)&&e||this.raise(xt.TypeCastInPattern,i.typeAnnotation)}return t}parseArrayLike(t,e,n){const r=super.parseArrayLike(t,e,n);return null==n||this.state.maybeInArrowParameters||this.toReferencedList(r.elements),r}isValidLVal(t,e,n,r){return"TypeCastExpression"===t||super.isValidLVal(t,e,n,r)}parseClassProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(t)}parseClassPrivateProperty(t){return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(t){return!this.match(14)&&super.isNonstaticConstructor(t)}pushClassMethod(t,e,n,r,i,s){if(e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(t,e,n,r,i,s),e.params&&i){const t=e.params;t.length>0&&this.isThisParam(t[0])&&this.raise(xt.ThisParamBannedInConstructor,e)}else if("MethodDefinition"===e.type&&i&&e.value.params){const t=e.value.params;t.length>0&&this.isThisParam(t[0])&&this.raise(xt.ThisParamBannedInConstructor,e)}}pushClassPrivateMethod(t,e,n,r){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(t,e,n,r)}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass&&(this.match(47)||this.match(51))&&(t.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();const e=t.implements=[];do{const t=this.startNode();t.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?t.typeParameters=this.flowParseTypeParameterInstantiation():t.typeParameters=null,e.push(this.finishNode(t,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(t){super.checkGetterSetterParams(t);const e=this.getObjectOrClassMethodParams(t);if(e.length>0){const n=e[0];this.isThisParam(n)&&"get"===t.kind?this.raise(xt.GetterMayNotHaveThisParam,n):this.isThisParam(n)&&this.raise(xt.SetterMayNotHaveThisParam,n)}}parsePropertyNamePrefixOperator(t){t.variance=this.flowParseVariance()}parseObjPropValue(t,e,n,r,i,s,o){let a;t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&!s&&(a=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const l=super.parseObjPropValue(t,e,n,r,i,s,o);return a&&((l.value||l).typeParameters=a),l}parseFunctionParamType(t){return this.eat(17)&&("Identifier"!==t.type&&this.raise(xt.PatternIsOptional,t),this.isThisParam(t)&&this.raise(xt.ThisParamMayNotBeOptional,t),t.optional=!0),this.match(14)?t.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(t)&&this.raise(xt.ThisParamAnnotationRequired,t),this.match(29)&&this.isThisParam(t)&&this.raise(xt.ThisParamNoDefault,t),this.resetEndLocation(t),t}parseMaybeDefault(t,e){const n=super.parseMaybeDefault(t,e);return"AssignmentPattern"===n.type&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(xt.TypeBeforeInitializer,n.typeAnnotation),n}checkImportReflection(t){super.checkImportReflection(t),t.module&&"value"!==t.importKind&&this.raise(xt.ImportReflectionHasImportType,t.specifiers[0].loc.start)}parseImportSpecifierLocal(t,e,n){e.local=St(t)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,n))}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){if(!t)return!0;const e=this.lookaheadCharCode();return 123===e||42===e}return!t&&this.isContextual(87)}applyImportPhase(t,e,n,r){if(super.applyImportPhase(t,e,n,r),e){if(!n&&this.match(65))return;t.exportKind="type"===n?n:"value"}else"type"===n&&this.match(55)&&this.unexpected(),t.importKind="type"===n||"typeof"===n?n:"value"}parseImportSpecifier(t,e,n,r,i){const s=t.imported;let o=null;"Identifier"===s.type&&("type"===s.name?o="type":"typeof"===s.name&&(o="typeof"));let a=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const e=this.parseIdentifier(!0);null===o||$(this.state.type)?(t.imported=s,t.importKind=null,t.local=this.parseIdentifier()):(t.imported=e,t.importKind=o,t.local=this.cloneIdentifier(e))}else{if(null!==o&&$(this.state.type))t.imported=this.parseIdentifier(!0),t.importKind=o;else{if(e)throw this.raise(v.ImportBindingIsString,t,{importName:s.value});t.imported=s,t.importKind=null}this.eatContextual(93)?t.local=this.parseIdentifier():(a=!0,t.local=this.cloneIdentifier(t.imported))}const l=St(t);return n&&l&&this.raise(xt.ImportTypeShorthandOnlyInPureImport,t),(n||l)&&this.checkReservedType(t.local.name,t.local.loc.start,!0),!a||n||l||this.checkReservedWord(t.local.name,t.loc.start,!0,!0),this.finishImportSpecifier(t,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(t,e){const n=t.kind;"get"!==n&&"set"!==n&&this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),this.match(14)&&(t.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){if(this.match(14)){const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,t.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=e}return super.parseAsyncArrowFromCallExpression(t,e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(t,e){var n;let r,i=null;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(i=this.state.clone(),r=this.tryParse((()=>super.parseMaybeAssign(t,e)),i),!r.error)return r.node;const{context:n}=this.state,s=n[n.length-1];s!==w.j_oTag&&s!==w.j_expr||n.pop()}if(null!=(n=r)&&n.error||this.match(47)){var s,o;let n;i=i||this.state.clone();const a=this.tryParse((r=>{var i;n=this.flowParseTypeParameterDeclaration();const s=this.forwardNoArrowParamsConversionAt(n,(()=>{const r=super.parseMaybeAssign(t,e);return this.resetStartLocationFromNode(r,n),r}));null!=(i=s.extra)&&i.parenthesized&&r();const o=this.maybeUnwrapTypeCastExpression(s);return"ArrowFunctionExpression"!==o.type&&r(),o.typeParameters=n,this.resetStartLocationFromNode(o,n),s}),i);let l=null;if(a.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(a.node).type){if(!a.error&&!a.aborted)return a.node.async&&this.raise(xt.UnexpectedTypeParameterBeforeAsyncArrowFunction,n),a.node;l=a.node}if(null!=(s=r)&&s.node)return this.state=r.failState,r.node;if(l)return this.state=a.failState,l;if(null!=(o=r)&&o.thrown)throw r.error;if(a.thrown)throw a.error;throw this.raise(xt.UnexpectedTokenAfterTypeParameter,n)}return super.parseMaybeAssign(t,e)}parseArrow(t){if(this.match(14)){const e=this.tryParse((()=>{const e=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const n=this.startNode();return[n.typeAnnotation,t.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=e,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n}));if(e.thrown)return null;e.error&&(this.state=e.failState),t.returnType=e.node.typeAnnotation?this.finishNode(e.node,"TypeAnnotation"):null}return super.parseArrow(t)}shouldParseArrow(t){return this.match(14)||super.shouldParseArrow(t)}setArrowFunctionParameters(t,e){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))?t.params=e:super.setArrowFunctionParameters(t,e)}checkParams(t,e,n,r=!0){if(!n||!this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(t.start))){for(let e=0;e<t.params.length;e++)this.isThisParam(t.params[e])&&e>0&&this.raise(xt.ThisParamMustBeFirst,t.params[e]);super.checkParams(t,e,n,r)}}parseParenAndDistinguishExpression(t){return super.parseParenAndDistinguishExpression(t&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(t,e,n){if("Identifier"===t.type&&"async"===t.name&&this.state.noArrowAt.includes(e.index)){this.next();const n=this.startNodeAt(e);n.callee=t,n.arguments=super.parseCallExpressionArguments(),t=this.finishNode(n,"CallExpression")}else if("Identifier"===t.type&&"async"===t.name&&this.match(47)){const r=this.state.clone(),i=this.tryParse((t=>this.parseAsyncArrowWithTypeParameters(e)||t()),r);if(!i.error&&!i.aborted)return i.node;const s=this.tryParse((()=>super.parseSubscripts(t,e,n)),r);if(s.node&&!s.error)return s.node;if(i.node)return this.state=i.failState,i.node;if(s.node)return this.state=s.failState,s.node;throw i.error||s.error}return super.parseSubscripts(t,e,n)}parseSubscript(t,e,n,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,n)return r.stop=!0,t;this.next();const i=this.startNodeAt(e);return i.callee=t,i.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),i.arguments=this.parseCallExpressionArguments(),i.optional=!0,this.finishCallExpression(i,!0)}if(!n&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){const n=this.startNodeAt(e);n.callee=t;const i=this.tryParse((()=>(n.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),n.arguments=super.parseCallExpressionArguments(),r.optionalChainMember&&(n.optional=!1),this.finishCallExpression(n,r.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(t,e,n,r)}parseNewCallee(t){super.parseNewCallee(t);let e=null;this.shouldParseTypes()&&this.match(47)&&(e=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),t.typeArguments=e}parseAsyncArrowWithTypeParameters(t){const e=this.startNodeAt(t);if(this.parseFunctionParams(e,!1),this.parseArrow(e))return super.parseArrowExpression(e,void 0,!0)}readToken_mult_modulo(t){const e=this.input.charCodeAt(this.state.pos+1);if(42===t&&47===e&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(t)}readToken_pipe_amp(t){const e=this.input.charCodeAt(this.state.pos+1);124!==t||125!==e?super.readToken_pipe_amp(t):this.finishOp(9,2)}parseTopLevel(t,e){const n=super.parseTopLevel(t,e);return this.state.hasFlowComment&&this.raise(xt.UnterminatedFlowComment,this.state.curPosition()),n}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(xt.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();const t=this.skipFlowComment();t&&(this.state.pos+=t,this.state.hasFlowComment=!0)}}skipFlowComment(){const{pos:t}=this.state;let e=2;for(;[32,9].includes(this.input.charCodeAt(t+e));)e++;const n=this.input.charCodeAt(e+t),r=this.input.charCodeAt(e+t+1);return 58===n&&58===r?e+2:"flow-include"===this.input.slice(e+t,e+t+12)?e+12:58===n&&58!==r&&e}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(v.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(t,{enumName:e,memberName:n}){this.raise(xt.EnumBooleanMemberNotInitialized,t,{memberName:n,enumName:e})}flowEnumErrorInvalidMemberInitializer(t,e){return this.raise(e.explicitType?"symbol"===e.explicitType?xt.EnumInvalidMemberInitializerSymbolType:xt.EnumInvalidMemberInitializerPrimaryType:xt.EnumInvalidMemberInitializerUnknownType,t,e)}flowEnumErrorNumberMemberNotInitialized(t,e){this.raise(xt.EnumNumberMemberNotInitialized,t,e)}flowEnumErrorStringMemberInconsistentlyInitialized(t,e){this.raise(xt.EnumStringMemberInconsistentlyInitialized,t,e)}flowEnumMemberInit(){const t=this.state.startLoc,e=()=>this.match(12)||this.match(8);switch(this.state.type){case 135:{const n=this.parseNumericLiteral(this.state.value);return e()?{type:"number",loc:n.loc.start,value:n}:{type:"invalid",loc:t}}case 134:{const n=this.parseStringLiteral(this.state.value);return e()?{type:"string",loc:n.loc.start,value:n}:{type:"invalid",loc:t}}case 85:case 86:{const n=this.parseBooleanLiteral(this.match(85));return e()?{type:"boolean",loc:n.loc.start,value:n}:{type:"invalid",loc:t}}default:return{type:"invalid",loc:t}}}flowEnumMemberRaw(){const t=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:t}}}flowEnumCheckExplicitTypeMismatch(t,e,n){const{explicitType:r}=e;null!==r&&r!==n&&this.flowEnumErrorInvalidMemberInitializer(t,e)}flowEnumMembers({enumName:t,explicitType:e}){const n=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}const s=this.startNode(),{id:o,init:a}=this.flowEnumMemberRaw(),l=o.name;if(""===l)continue;/^[a-z]/.test(l)&&this.raise(xt.EnumInvalidMemberName,o,{memberName:l,suggestion:l[0].toUpperCase()+l.slice(1),enumName:t}),n.has(l)&&this.raise(xt.EnumDuplicateMemberName,o,{memberName:l,enumName:t}),n.add(l);const c={enumName:t,explicitType:e,memberName:l};switch(s.id=o,a.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(a.loc,c,"boolean"),s.init=a.value,r.booleanMembers.push(this.finishNode(s,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(a.loc,c,"number"),s.init=a.value,r.numberMembers.push(this.finishNode(s,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(a.loc,c,"string"),s.init=a.value,r.stringMembers.push(this.finishNode(s,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(a.loc,c);case"none":switch(e){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(a.loc,c);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(a.loc,c);break;default:r.defaultedMembers.push(this.finishNode(s,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,hasUnknownMembers:i}}flowEnumStringMembers(t,e,{enumName:n}){if(0===t.length)return e;if(0===e.length)return t;if(e.length>t.length){for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitialized(e,{enumName:n});return e}for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(t,{enumName:n});return t}flowEnumParseExplicitType({enumName:t}){if(!this.eatContextual(102))return null;if(!q(this.state.type))throw this.raise(xt.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:t});const{value:e}=this.state;return this.next(),"boolean"!==e&&"number"!==e&&"string"!==e&&"symbol"!==e&&this.raise(xt.EnumInvalidExplicitType,this.state.startLoc,{enumName:t,invalidEnumType:e}),e}flowEnumBody(t,e){const n=e.name,r=e.loc.start,i=this.flowEnumParseExplicitType({enumName:n});this.expect(5);const{members:s,hasUnknownMembers:o}=this.flowEnumMembers({enumName:n,explicitType:i});switch(t.hasUnknownMembers=o,i){case"boolean":return t.explicitType=!0,t.members=s.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody");case"number":return t.explicitType=!0,t.members=s.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody");case"string":return t.explicitType=!0,t.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(t,"EnumStringBody");case"symbol":return t.members=s.defaultedMembers,this.expect(8),this.finishNode(t,"EnumSymbolBody");default:{const e=()=>(t.members=[],this.expect(8),this.finishNode(t,"EnumStringBody"));t.explicitType=!1;const i=s.booleanMembers.length,o=s.numberMembers.length,a=s.stringMembers.length,l=s.defaultedMembers.length;if(i||o||a||l){if(i||o){if(!o&&!a&&i>=l){for(const t of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(t.loc.start,{enumName:n,memberName:t.id.name});return t.members=s.booleanMembers,this.expect(8),this.finishNode(t,"EnumBooleanBody")}if(!i&&!a&&o>=l){for(const t of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(t.loc.start,{enumName:n,memberName:t.id.name});return t.members=s.numberMembers,this.expect(8),this.finishNode(t,"EnumNumberBody")}return this.raise(xt.EnumInconsistentMemberValues,r,{enumName:n}),e()}return t.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:n}),this.expect(8),this.finishNode(t,"EnumStringBody")}return e()}}}flowParseEnumDeclaration(t){const e=this.parseIdentifier();return t.id=e,t.body=this.flowEnumBody(this.startNode(),e),this.finishNode(t,"EnumDeclaration")}jsxParseOpeningElementAfterName(t){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(t.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(t)}isLookaheadToken_lt(){const t=this.nextTokenStart();if(60===this.input.charCodeAt(t)){const e=this.input.charCodeAt(t+1);return 60!==e&&61!==e}return!1}reScan_lt_gt(){const{type:t}=this.state;47===t?(this.state.pos-=1,this.readToken_lt()):48===t&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:t}=this.state;return 51===t?(this.state.pos-=2,this.finishOp(47,1),47):t}maybeUnwrapTypeCastExpression(t){return"TypeCastExpression"===t.type?t.expression:t}},typescript:t=>class extends t{constructor(...t){super(...t),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:be.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:be.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:be.InvalidModifierOnTypeParameter})}getScopeHandler(){return Bt}tsIsIdentifier(){return q(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),!this.hasPrecedingLineBreak()&&this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(t,e,n){if(!q(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;const r=this.state.value;if(t.includes(r)){if(n&&this.match(106))return;if(e&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:t,disallowedModifiers:e,stopOnStartOfClassStaticBlock:n,errorTemplate:r=be.InvalidModifierOnTypeMember},i){const s=(t,e,n,r)=>{e===n&&i[r]&&this.raise(be.InvalidModifiersOrder,t,{orderedModifiers:[n,r]})},o=(t,e,n,r)=>{(i[n]&&e===r||i[r]&&e===n)&&this.raise(be.IncompatibleModifiers,t,{modifiers:[n,r]})};for(;;){const{startLoc:a}=this.state,l=this.tsParseModifier(t.concat(null!=e?e:[]),n,i.static);if(!l)break;Te(l)?i.accessibility?this.raise(be.DuplicateAccessibilityModifier,a,{modifier:l}):(s(a,l,l,"override"),s(a,l,l,"static"),s(a,l,l,"readonly"),i.accessibility=l):xe(l)?(i[l]&&this.raise(be.DuplicateModifier,a,{modifier:l}),i[l]=!0,s(a,l,"in","out")):(hasOwnProperty.call(i,l)?this.raise(be.DuplicateModifier,a,{modifier:l}):(s(a,l,"static","readonly"),s(a,l,"static","override"),s(a,l,"override","readonly"),s(a,l,"abstract","override"),o(a,l,"declare","override"),o(a,l,"static","abstract")),i[l]=!0),null!=e&&e.includes(l)&&this.raise(r,a,{modifier:l})}}tsIsListTerminator(t){switch(t){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(t,e){const n=[];for(;!this.tsIsListTerminator(t);)n.push(e());return n}tsParseDelimitedList(t,e,n){return function(t){if(null==t)throw new Error(`Unexpected ${t} value.`);return t}(this.tsParseDelimitedListWorker(t,e,!0,n))}tsParseDelimitedListWorker(t,e,n,r){const i=[];let s=-1;for(;!this.tsIsListTerminator(t);){s=-1;const r=e();if(null==r)return;if(i.push(r),!this.eat(12)){if(this.tsIsListTerminator(t))break;return void(n&&this.expect(12))}s=this.state.lastTokStartLoc.index}return r&&(r.value=s),i}tsParseBracketedList(t,e,n,r,i){r||(n?this.expect(0):this.expect(47));const s=this.tsParseDelimitedList(t,e,i);return n?this.expect(3):this.expect(48),s}tsParseImportType(){const t=this.startNode();return this.expect(83),this.expect(10),this.match(134)?t.argument=this.parseStringLiteral(this.state.value):(this.raise(be.UnsupportedImportTypeArgument,this.state.startLoc),t.argument=super.parseExprAtom()),this.eat(12)?t.options=this.tsParseImportTypeOptions():t.options=null,this.expect(11),this.eat(16)&&(t.qualifier=this.tsParseEntityName(3)),this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSImportType")}tsParseImportTypeOptions(){const t=this.startNode();this.expect(5);const e=this.startNode();return this.isContextual(76)?(e.method=!1,e.key=this.parseIdentifier(!0),e.computed=!1,e.shorthand=!1):this.unexpected(null,76),this.expect(14),e.value=this.tsParseImportTypeWithPropertyValue(),t.properties=[this.finishObjectProperty(e)],this.eat(12),this.expect(8),this.finishNode(t,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){const t=this.startNode(),e=[];for(this.expect(5);!this.match(8);){const t=this.state.type;q(t)||134===t?e.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return t.properties=e,this.next(),this.finishNode(t,"ObjectExpression")}tsParseEntityName(t){let e;if(1&t&&this.match(78))if(2&t)e=this.parseIdentifier(!0);else{const t=this.startNode();this.next(),e=this.finishNode(t,"ThisExpression")}else e=this.parseIdentifier(!!(1&t));for(;this.eat(16);){const n=this.startNodeAtNode(e);n.left=e,n.right=this.parseIdentifier(!!(1&t)),e=this.finishNode(n,"TSQualifiedName")}return e}tsParseTypeReference(){const t=this.startNode();return t.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeReference")}tsParseThisTypePredicate(t){this.next();const e=this.startNodeAtNode(t);return e.parameterName=t,e.typeAnnotation=this.tsParseTypeAnnotation(!1),e.asserts=!1,this.finishNode(e,"TSTypePredicate")}tsParseThisTypeNode(){const t=this.startNode();return this.next(),this.finishNode(t,"TSThisType")}tsParseTypeQuery(){const t=this.startNode();return this.expect(87),this.match(83)?t.exprName=this.tsParseImportType():t.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSTypeQuery")}tsParseTypeParameter(t){const e=this.startNode();return t(e),e.name=this.tsParseTypeParameterName(),e.constraint=this.tsEatThenParseType(81),e.default=this.tsEatThenParseType(29),this.finishNode(e,"TSTypeParameter")}tsTryParseTypeParameters(t){if(this.match(47))return this.tsParseTypeParameters(t)}tsParseTypeParameters(t){const e=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();const n={value:-1};return e.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,t),!1,!0,n),0===e.params.length&&this.raise(be.EmptyTypeParameters,e),-1!==n.value&&this.addExtra(e,"trailingComma",n.value),this.finishNode(e,"TSTypeParameterDeclaration")}tsFillSignature(t,e){const n=19===t;e.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),e.parameters=this.tsParseBindingListForSignature(),(n||this.match(t))&&(e.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(t))}tsParseBindingListForSignature(){const t=super.parseBindingList(11,41,2);for(const e of t){const{type:t}=e;"AssignmentPattern"!==t&&"TSParameterProperty"!==t||this.raise(be.UnsupportedSignatureParameterKind,e,{type:t})}return t}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(t,e){return this.tsFillSignature(14,e),this.tsParseTypeMemberSemicolon(),this.finishNode(e,t)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!q(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(t){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const e=this.parseIdentifier();e.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(e),this.expect(3),t.parameters=[e];const n=this.tsTryParseTypeAnnotation();return n&&(t.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(t,"TSIndexSignature")}tsParsePropertyOrMethodSignature(t,e){if(this.eat(17)&&(t.optional=!0),this.match(10)||this.match(47)){e&&this.raise(be.ReadonlyForMethodSignature,t);const n=t;n.kind&&this.match(47)&&this.raise(be.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();const r="parameters",i="typeAnnotation";if("get"===n.kind)n[r].length>0&&(this.raise(v.BadGetterArity,this.state.curPosition()),this.isThisParam(n[r][0])&&this.raise(be.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if("set"===n.kind){if(1!==n[r].length)this.raise(v.BadSetterArity,this.state.curPosition());else{const t=n[r][0];this.isThisParam(t)&&this.raise(be.AccessorCannotDeclareThisParameter,this.state.curPosition()),"Identifier"===t.type&&t.optional&&this.raise(be.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),"RestElement"===t.type&&this.raise(be.SetAccessorCannotHaveRestParameter,this.state.curPosition())}n[i]&&this.raise(be.SetAccessorCannotHaveReturnType,n[i])}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}{const n=t;e&&(n.readonly=!0);const r=this.tsTryParseTypeAnnotation();return r&&(n.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(n,"TSPropertySignature")}}tsParseTypeMember(){const t=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",t);if(this.match(77)){const e=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",t):(t.key=this.createIdentifier(e,"new"),this.tsParsePropertyOrMethodSignature(t,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},t);return this.tsTryParseIndexSignature(t)||(super.parsePropertyName(t),t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||!this.tsTokenCanFollowModifier()||(t.kind=t.key.name,super.parsePropertyName(t),this.match(10)||this.match(47)||this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(t,!!t.readonly))}tsParseTypeLiteral(){const t=this.startNode();return t.members=this.tsParseObjectTypeMembers(),this.finishNode(t,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const t=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),t}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}tsParseMappedType(){const t=this.startNode();this.expect(5),this.match(53)?(t.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(t.readonly=!0),this.expect(0);const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),t.typeParameter=this.finishNode(e,"TSTypeParameter"),t.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(t.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(t.optional=!0),t.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(t,"TSMappedType")}tsParseTupleType(){const t=this.startNode();t.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let e=!1;return t.elementTypes.forEach((t=>{const{type:n}=t;!e||"TSRestType"===n||"TSOptionalType"===n||"TSNamedTupleMember"===n&&t.optional||this.raise(be.OptionalTypeBeforeRequired,t),e||(e="TSNamedTupleMember"===n&&t.optional||"TSOptionalType"===n)})),this.finishNode(t,"TSTupleType")}tsParseTupleElementType(){const t=this.state.startLoc,e=this.eat(21),{startLoc:n}=this.state;let r,i,s,o;const a=$(this.state.type)?this.lookaheadCharCode():null;if(58===a)r=!0,s=!1,i=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(63===a){s=!0;const t=this.state.value,e=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(r=!0,i=this.createIdentifier(this.startNodeAt(n),t),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=e,this.expect(17))}else o=this.tsParseType(),s=this.eat(17),r=this.eat(14);if(r){let t;i?(t=this.startNodeAt(n),t.optional=s,t.label=i,t.elementType=o,this.eat(17)&&(t.optional=!0,this.raise(be.TupleOptionalAfterType,this.state.lastTokStartLoc))):(t=this.startNodeAt(n),t.optional=s,this.raise(be.InvalidTupleMemberLabel,o),t.label=o,t.elementType=this.tsParseType()),o=this.finishNode(t,"TSNamedTupleMember")}else if(s){const t=this.startNodeAt(n);t.typeAnnotation=o,o=this.finishNode(t,"TSOptionalType")}if(e){const e=this.startNodeAt(t);e.typeAnnotation=o,o=this.finishNode(e,"TSRestType")}return o}tsParseParenthesizedType(){const t=this.startNode();return this.expect(10),t.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(t,"TSParenthesizedType")}tsParseFunctionOrConstructorType(t,e){const n=this.startNode();return"TSConstructorType"===t&&(n.abstract=!!e,e&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,n))),this.finishNode(n,t)}tsParseLiteralTypeNode(){const t=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:t.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(t,"TSLiteralType")}tsParseTemplateLiteralType(){const t=this.startNode();return t.literal=super.parseTemplate(!1),this.finishNode(t,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const t=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(t):t}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){const t=this.startNode(),e=this.lookahead();return 135!==e.type&&136!==e.type&&this.unexpected(),t.literal=this.parseMaybeUnary(),this.finishNode(t,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{const{type:t}=this.state;if(q(t)||88===t||84===t){const e=88===t?"TSVoidKeyword":84===t?"TSNullKeyword":function(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==e&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,e)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){const{startLoc:t}=this.state;let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const n=this.startNodeAt(t);n.elementType=e,this.expect(3),e=this.finishNode(n,"TSArrayType")}else{const n=this.startNodeAt(t);n.objectType=e,n.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(n,"TSIndexedAccessType")}return e}tsParseTypeOperator(){const t=this.startNode(),e=this.state.value;return this.next(),t.operator=e,t.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===e&&this.tsCheckTypeAnnotationForReadOnly(t),this.finishNode(t,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(t){switch(t.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(be.UnexpectedReadonly,t)}}tsParseInferType(){const t=this.startNode();this.expectContextual(115);const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),t.typeParameter=this.finishNode(e,"TSTypeParameter"),this.finishNode(t,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const t=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return t}}tsParseTypeOperatorOrHigher(){var t;return(t=this.state.type)>=121&&t<=123&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(t,e,n){const r=this.startNode(),i=this.eat(n),s=[];do{s.push(e())}while(this.eat(n));return 1!==s.length||i?(r.types=s,this.finishNode(r,t)):s[0]}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return!!this.match(47)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(q(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:t}=this.state,e=t.length;try{return this.parseObjectLike(8,!0),t.length===e}catch(t){return!1}}if(this.match(0)){this.next();const{errors:t}=this.state,e=t.length;try{return super.parseBindingList(3,93,1),t.length===e}catch(t){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(t){return this.tsInType((()=>{const e=this.startNode();this.expect(t);const n=this.startNode(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let t=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===t.type?(n.parameterName=t,n.asserts=!0,n.typeAnnotation=null,t=this.finishNode(n,"TSTypePredicate")):(this.resetStartLocationFromNode(t,n),t.asserts=!0),e.typeAnnotation=t,this.finishNode(e,"TSTypeAnnotation")}const i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return r?(n.parameterName=this.parseIdentifier(),n.asserts=r,n.typeAnnotation=null,e.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,e);const s=this.tsParseTypeAnnotation(!1);return n.parameterName=i,n.typeAnnotation=s,n.asserts=r,e.typeAnnotation=this.finishNode(n,"TSTypePredicate"),this.finishNode(e,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const t=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),t}tsParseTypePredicateAsserts(){if(109!==this.state.type)return!1;const t=this.state.containsEsc;return this.next(),!(!q(this.state.type)&&!this.match(78)||(t&&this.raise(v.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),0))}tsParseTypeAnnotation(t=!0,e=this.startNode()){return this.tsInType((()=>{t&&this.expect(14),e.typeAnnotation=this.tsParseType()})),this.finishNode(e,"TSTypeAnnotation")}tsParseType(){ve(this.state.inType);const t=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return t;const e=this.startNodeAtNode(t);return e.checkType=t,e.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),e.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),e.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(e,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(be.ReservedTypeAssertion,this.state.startLoc);const t=this.startNode();return t.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),t.expression=this.parseMaybeUnary(),this.finishNode(t,"TSTypeAssertion")}tsParseHeritageClause(t){const e=this.state.startLoc,n=this.tsParseDelimitedList("HeritageClauseElement",(()=>{const t=this.startNode();return t.expression=this.tsParseEntityName(3),this.match(47)&&(t.typeParameters=this.tsParseTypeArguments()),this.finishNode(t,"TSExpressionWithTypeArguments")}));return n.length||this.raise(be.EmptyHeritageClauseType,e,{token:t}),n}tsParseInterfaceDeclaration(t,e={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),e.declare&&(t.declare=!0),q(this.state.type)?(t.id=this.parseIdentifier(),this.checkIdentifier(t.id,130)):(t.id=null,this.raise(be.MissingInterfaceName,this.state.startLoc)),t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(t.extends=this.tsParseHeritageClause("extends"));const n=this.startNode();return n.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),t.body=this.finishNode(n,"TSInterfaceBody"),this.finishNode(t,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(t){return t.id=this.parseIdentifier(),this.checkIdentifier(t.id,2),t.typeAnnotation=this.tsInType((()=>{if(t.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&46!==this.lookaheadCharCode()){const t=this.startNode();return this.next(),this.finishNode(t,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(t,"TSTypeAliasDeclaration")}tsInTopLevelContext(t){if(this.curContext()===w.brace)return t();{const e=this.state.context;this.state.context=[e[0]];try{return t()}finally{this.state.context=e}}}tsInType(t){const e=this.state.inType;this.state.inType=!0;try{return t()}finally{this.state.inType=e}}tsInDisallowConditionalTypesContext(t){const e=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return t()}finally{this.state.inDisallowConditionalTypesContext=e}}tsInAllowConditionalTypesContext(t){const e=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return t()}finally{this.state.inDisallowConditionalTypesContext=e}}tsEatThenParseType(t){if(this.match(t))return this.tsNextThenParseType()}tsExpectThenParseType(t){return this.tsInType((()=>(this.expect(t),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){const t=this.startNode();return t.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(t.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(t,"TSEnumMember")}tsParseEnumDeclaration(t,e={}){return e.const&&(t.const=!0),e.declare&&(t.declare=!0),this.expectContextual(126),t.id=this.parseIdentifier(),this.checkIdentifier(t.id,t.const?8971:8459),this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumDeclaration")}tsParseEnumBody(){const t=this.startNode();return this.expect(5),t.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(t,"TSEnumBody")}tsParseModuleBlock(){const t=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(t.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(t,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(t,e=!1){if(t.id=this.parseIdentifier(),e||this.checkIdentifier(t.id,1024),this.eat(16)){const e=this.startNode();this.tsParseModuleOrNamespaceDeclaration(e,!0),t.body=e}else this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(t,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(t){return this.isContextual(112)?(t.kind="global",t.global=!0,t.id=this.parseIdentifier()):this.match(134)?(t.kind="module",t.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),t.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(t,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(t,e,n){t.isExport=n||!1,t.id=e||this.parseIdentifier(),this.checkIdentifier(t.id,4096),this.expect(29);const r=this.tsParseModuleReference();return"type"===t.importKind&&"TSExternalModuleReference"!==r.type&&this.raise(be.ImportAliasHasImportType,r),t.moduleReference=r,this.semicolon(),this.finishNode(t,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){const t=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),t.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExternalModuleReference")}tsLookAhead(t){const e=this.state.clone(),n=t();return this.state=e,n}tsTryParseAndCatch(t){const e=this.tryParse((e=>t()||e()));if(!e.aborted&&e.node)return e.error&&(this.state=e.failState),e.node}tsTryParse(t){const e=this.state.clone(),n=t();if(void 0!==n&&!1!==n)return n;this.state=e}tsTryParseDeclare(t){if(this.isLineTerminator())return;const e=this.state.type;return this.tsInAmbientContext((()=>{switch(e){case 68:return t.declare=!0,super.parseFunctionStatement(t,!1,!1);case 80:return t.declare=!0,this.parseClass(t,!0,!1);case 126:return this.tsParseEnumDeclaration(t,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(t);case 100:if(this.state.containsEsc)return;case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(t,{const:!0,declare:!0})):(t.declare=!0,this.parseVarStatement(t,this.state.value,!0));case 107:if(this.isUsing())return this.raise(be.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.parseVarStatement(t,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(be.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),t.declare=!0,this.next(),this.parseVarStatement(t,"await using",!0);break;case 129:{const e=this.tsParseInterfaceDeclaration(t,{declare:!0});if(e)return e}default:if(q(e))return this.tsParseDeclaration(t,this.state.type,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(t,e,n,r){switch(e){case 124:if(this.tsCheckLineTerminator(n)&&(this.match(80)||q(this.state.type)))return this.tsParseAbstractDeclaration(t,r);break;case 127:if(this.tsCheckLineTerminator(n)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(t);if(q(this.state.type))return t.kind="module",this.tsParseModuleOrNamespaceDeclaration(t)}break;case 128:if(this.tsCheckLineTerminator(n)&&q(this.state.type))return t.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(t);break;case 130:if(this.tsCheckLineTerminator(n)&&q(this.state.type))return this.tsParseTypeAliasDeclaration(t)}}tsCheckLineTerminator(t){return t?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(t){if(!this.match(47))return;const e=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const n=this.tsTryParseAndCatch((()=>{const e=this.startNodeAt(t);return e.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(e),e.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),e}));return this.state.maybeInArrowParameters=e,n?super.parseArrowExpression(n,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const t=this.startNode();return t.params=this.tsInType((()=>this.tsInTopLevelContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===t.params.length?this.raise(be.EmptyTypeArguments,t):this.state.inType||this.curContext()!==w.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(t,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(t=this.state.type)>=124&&t<=130;var t}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseBindingElement(t,e){const n=e.length?e[0].loc.start:this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);const i=r.accessibility,s=r.override,o=r.readonly;4&t||!(i||o||s)||this.raise(be.UnexpectedParameterModifier,n);const a=this.parseMaybeDefault();2&t&&this.parseFunctionParamType(a);const l=this.parseMaybeDefault(a.loc.start,a);if(i||o||s){const t=this.startNodeAt(n);return e.length&&(t.decorators=e),i&&(t.accessibility=i),o&&(t.readonly=o),s&&(t.override=s),"Identifier"!==l.type&&"AssignmentPattern"!==l.type&&this.raise(be.UnsupportedParameterPropertyKind,t),t.parameter=l,this.finishNode(t,"TSParameterProperty")}return e.length&&(a.decorators=e),l}isSimpleParameter(t){return"TSParameterProperty"===t.type&&super.isSimpleParameter(t.parameter)||super.isSimpleParameter(t)}tsDisallowOptionalPattern(t){for(const e of t.params)"Identifier"!==e.type&&e.optional&&!this.state.isAmbientContext&&this.raise(be.PatternIsOptional,e)}setArrowFunctionParameters(t,e,n){super.setArrowFunctionParameters(t,e,n),this.tsDisallowOptionalPattern(t)}parseFunctionBodyAndFinish(t,e,n=!1){this.match(14)&&(t.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const r="FunctionDeclaration"===e?"TSDeclareFunction":"ClassMethod"===e||"ClassPrivateMethod"===e?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(t,r):"TSDeclareFunction"===r&&this.state.isAmbientContext&&(this.raise(be.DeclareFunctionHasImplementation,t),t.declare)?super.parseFunctionBodyAndFinish(t,r,n):(this.tsDisallowOptionalPattern(t),super.parseFunctionBodyAndFinish(t,e,n))}registerFunctionStatementId(t){!t.body&&t.id?this.checkIdentifier(t.id,1024):super.registerFunctionStatementId(t)}tsCheckForInvalidTypeCasts(t){t.forEach((t=>{"TSTypeCastExpression"===(null==t?void 0:t.type)&&this.raise(be.UnexpectedTypeAnnotation,t.typeAnnotation)}))}toReferencedList(t,e){return this.tsCheckForInvalidTypeCasts(t),t}parseArrayLike(t,e,n){const r=super.parseArrayLike(t,e,n);return"ArrayExpression"===r.type&&this.tsCheckForInvalidTypeCasts(r.elements),r}parseSubscript(t,e,n,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const n=this.startNodeAt(e);return n.expression=t,this.finishNode(n,"TSNonNullExpression")}let i=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(n)return r.stop=!0,t;r.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let s;const o=this.tsTryParseAndCatch((()=>{if(!n&&this.atPossibleAsyncArrow(t)){const t=this.tsTryParseGenericAsyncArrowFunction(e);if(t)return r.stop=!0,t}const o=this.tsParseTypeArgumentsInExpression();if(!o)return;if(i&&!this.match(10))return void(s=this.state.curPosition());if(G(this.state.type)){const n=super.parseTaggedTemplateExpression(t,e,r);return n.typeParameters=o,n}if(!n&&this.eat(10)){const n=this.startNodeAt(e);return n.callee=t,n.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(n.arguments),n.typeParameters=o,r.optionalChainMember&&(n.optional=i),this.finishCallExpression(n,r.optionalChainMember)}const a=this.state.type;if(48===a||52===a||10!==a&&93!==a&&120!==a&&K(a)&&!this.hasPrecedingLineBreak())return;const l=this.startNodeAt(e);return l.expression=t,l.typeParameters=o,this.finishNode(l,"TSInstantiationExpression")}));if(s&&this.unexpected(s,10),o)return"TSInstantiationExpression"===o.type&&((this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(be.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),this.match(16)||this.match(18)||(o.expression=super.stopParseSubscript(t,r))),o}return super.parseSubscript(t,e,n,r)}parseNewCallee(t){var e;super.parseNewCallee(t);const{callee:n}=t;"TSInstantiationExpression"!==n.type||null!=(e=n.extra)&&e.parenthesized||(t.typeParameters=n.typeParameters,t.callee=n.expression)}parseExprOp(t,e,n){let r;if(X(58)>n&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){const i=this.startNodeAt(e);return i.expression=t,i.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(r&&this.raise(v.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(i,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,e,n)}return super.parseExprOp(t,e,n)}checkReservedWord(t,e,n,r){this.state.isAmbientContext||super.checkReservedWord(t,e,n,r)}checkImportReflection(t){super.checkImportReflection(t),t.module&&"value"!==t.importKind&&this.raise(be.ImportReflectionHasImportType,t.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(t){if(super.isPotentialImportPhase(t))return!0;if(this.isContextual(130)){const e=this.lookaheadCharCode();return t?123===e||42===e:61!==e}return!t&&this.isContextual(87)}applyImportPhase(t,e,n,r){super.applyImportPhase(t,e,n,r),e?t.exportKind="type"===n?"type":"value":t.importKind="type"===n||"typeof"===n?n:"value"}parseImport(t){if(this.match(134))return t.importKind="value",super.parseImport(t);let e;if(q(this.state.type)&&61===this.lookaheadCharCode())return t.importKind="value",this.tsParseImportEqualsDeclaration(t);if(this.isContextual(130)){const n=this.parseMaybeImportPhase(t,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(t,n);e=super.parseImportSpecifiersAndAfter(t,n)}else e=super.parseImport(t);return"type"===e.importKind&&e.specifiers.length>1&&"ImportDefaultSpecifier"===e.specifiers[0].type&&this.raise(be.TypeImportCannotSpecifyDefaultAndNamed,e),e}parseExport(t,e){if(this.match(83)){const e=t;this.next();let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,n,!0)}if(this.eat(29)){const e=t;return e.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExportAssignment")}if(this.eatContextual(93)){const e=t;return this.expectContextual(128),e.id=this.parseIdentifier(),this.semicolon(),this.finishNode(e,"TSNamespaceExportDeclaration")}return super.parseExport(t,e)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){const t=this.startNode();return this.next(),t.abstract=!0,this.parseClass(t,!0,!0)}if(this.match(129)){const t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t}return super.parseExportDefaultExpression()}parseVarStatement(t,e,n=!1){const{isAmbientContext:r}=this.state,i=super.parseVarStatement(t,e,n||r);if(!r)return i;if(!t.declare&&("using"===e||"await using"===e))return this.raiseOverwrite(be.UsingDeclarationInAmbientContext,t,e),i;for(const{id:t,init:n}of i.declarations)n&&("var"===e||"let"===e||t.typeAnnotation?this.raise(be.InitializerNotAllowedInAmbientContext,n):we(n,this.hasPlugin("estree"))||this.raise(be.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,n));return i}parseStatementContent(t,e){if(!this.state.containsEsc)switch(this.state.type){case 75:if(this.isLookaheadContextual("enum")){const t=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(t,{const:!0})}break;case 124:case 125:if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){const t=this.state.type,n=this.startNode();this.next();const r=125===t?this.tsTryParseDeclare(n):this.tsParseAbstractDeclaration(n,e);return r?(125===t&&(r.declare=!0),r):(n.expression=this.createIdentifier(this.startNodeAt(n.loc.start),125===t?"declare":"abstract"),this.semicolon(!1),this.finishNode(n,"ExpressionStatement"))}break;case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:if(123===this.lookaheadCharCode()){const t=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(t)}break;case 129:{const t=this.tsParseInterfaceDeclaration(this.startNode());if(t)return t;break}case 127:if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){const t=this.startNode();return this.next(),this.tsParseDeclaration(t,127,!1,e)}break;case 128:if(this.nextTokenIsIdentifierOnSameLine()){const t=this.startNode();return this.next(),this.tsParseDeclaration(t,128,!1,e)}break;case 130:if(this.nextTokenIsIdentifierOnSameLine()){const t=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(t)}}return super.parseStatementContent(t,e)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(t,e){return e.some((e=>Te(e)?t.accessibility===e:!!t[e]))}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&123===this.lookaheadCharCode()}parseClassMember(t,e,n){const r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:be.InvalidModifierOnTypeParameterPositions},e);const i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(e,r)&&this.raise(be.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(t,e)):this.parseClassMemberWithIsStatic(t,e,n,!!e.static)};e.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(t,e,n,r){const i=this.tsTryParseIndexSignature(e);if(i)return t.body.push(i),e.abstract&&this.raise(be.IndexSignatureHasAbstract,e),e.accessibility&&this.raise(be.IndexSignatureHasAccessibility,e,{modifier:e.accessibility}),e.declare&&this.raise(be.IndexSignatureHasDeclare,e),void(e.override&&this.raise(be.IndexSignatureHasOverride,e));!this.state.inAbstractClass&&e.abstract&&this.raise(be.NonAbstractClassHasAbstractMethod,e),e.override&&(n.hadSuperClass||this.raise(be.OverrideNotInSubClass,e)),super.parseClassMemberWithIsStatic(t,e,n,r)}parsePostMemberNameModifiers(t){this.eat(17)&&(t.optional=!0),t.readonly&&this.match(10)&&this.raise(be.ClassMethodHasReadonly,t),t.declare&&this.match(10)&&this.raise(be.ClassMethodHasDeclare,t)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(t,e,n){if(!this.match(17))return t;if(this.state.maybeInArrowParameters){const e=this.lookaheadCharCode();if(44===e||61===e||58===e||41===e)return this.setOptionalParametersError(n),t}return super.parseConditional(t,e,n)}parseParenItem(t,e){const n=super.parseParenItem(t,e);if(this.eat(17)&&(n.optional=!0,this.resetEndLocation(t)),this.match(14)){const n=this.startNodeAt(e);return n.expression=t,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return t}parseExportDeclaration(t){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext((()=>this.parseExportDeclaration(t)));const e=this.state.startLoc,n=this.eatContextual(125);if(n&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(be.ExpectedAmbientAfterExportDeclare,this.state.startLoc);const r=q(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(t);return r?(("TSInterfaceDeclaration"===r.type||"TSTypeAliasDeclaration"===r.type||n)&&(t.exportKind="type"),n&&"TSImportEqualsDeclaration"!==r.type&&(this.resetStartLocation(r,e),r.declare=!0),r):null}parseClassId(t,e,n,r){if((!e||n)&&this.isContextual(113))return;super.parseClassId(t,e,n,t.declare?1024:8331);const i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(t.typeParameters=i)}parseClassPropertyAnnotation(t){t.optional||(this.eat(35)?t.definite=!0:this.eat(17)&&(t.optional=!0));const e=this.tsTryParseTypeAnnotation();e&&(t.typeAnnotation=e)}parseClassProperty(t){if(this.parseClassPropertyAnnotation(t),this.state.isAmbientContext&&(!t.readonly||t.typeAnnotation)&&this.match(29)&&this.raise(be.DeclareClassFieldHasInitializer,this.state.startLoc),t.abstract&&this.match(29)){const{key:e}=t;this.raise(be.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:"Identifier"!==e.type||t.computed?`[${this.input.slice(this.offsetToSourcePos(e.start),this.offsetToSourcePos(e.end))}]`:e.name})}return super.parseClassProperty(t)}parseClassPrivateProperty(t){return t.abstract&&this.raise(be.PrivateElementHasAbstract,t),t.accessibility&&this.raise(be.PrivateElementHasAccessibility,t,{modifier:t.accessibility}),this.parseClassPropertyAnnotation(t),super.parseClassPrivateProperty(t)}parseClassAccessorProperty(t){return this.parseClassPropertyAnnotation(t),t.optional&&this.raise(be.AccessorCannotBeOptional,t),super.parseClassAccessorProperty(t)}pushClassMethod(t,e,n,r,i,s){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&i&&this.raise(be.ConstructorHasTypeParameters,o);const{declare:a=!1,kind:l}=e;!a||"get"!==l&&"set"!==l||this.raise(be.DeclareAccessor,e,{kind:l}),o&&(e.typeParameters=o),super.pushClassMethod(t,e,n,r,i,s)}pushClassPrivateMethod(t,e,n,r){const i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(e.typeParameters=i),super.pushClassPrivateMethod(t,e,n,r)}declareClassPrivateMethodInScope(t,e){"TSDeclareMethod"!==t.type&&("MethodDefinition"===t.type&&null==t.value.body||super.declareClassPrivateMethodInScope(t,e))}parseClassSuper(t){if(super.parseClassSuper(t),t.superClass)if("TSInstantiationExpression"===t.superClass.type){const e=t.superClass,n=e.expression;this.takeSurroundingComments(n,n.start,n.end);const r=e.typeParameters;this.takeSurroundingComments(r,r.start,r.end),t.superClass=n,t.superTypeParameters=r}else(this.match(47)||this.match(51))&&(t.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(t.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(t,e,n,r,i,s,o){const a=this.tsTryParseTypeParameters(this.tsParseConstModifier);return a&&(t.typeParameters=a),super.parseObjPropValue(t,e,n,r,i,s,o)}parseFunctionParams(t,e){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&(t.typeParameters=n),super.parseFunctionParams(t,e)}parseVarId(t,e){super.parseVarId(t,e),"Identifier"===t.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(t.definite=!0);const n=this.tsTryParseTypeAnnotation();n&&(t.id.typeAnnotation=n,this.resetEndLocation(t.id))}parseAsyncArrowFromCallExpression(t,e){return this.match(14)&&(t.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(t,e)}parseMaybeAssign(t,e){var n,r,i,s,o;let a,l,c,u;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(a=this.state.clone(),l=this.tryParse((()=>super.parseMaybeAssign(t,e)),a),!l.error)return l.node;const{context:n}=this.state,r=n[n.length-1];r!==w.j_oTag&&r!==w.j_expr||n.pop()}if(!(null!=(n=l)&&n.error||this.match(47)))return super.parseMaybeAssign(t,e);a&&a!==this.state||(a=this.state.clone());const h=this.tryParse((n=>{var r,i;u=this.tsParseTypeParameters(this.tsParseConstModifier);const s=super.parseMaybeAssign(t,e);return("ArrowFunctionExpression"!==s.type||null!=(r=s.extra)&&r.parenthesized)&&n(),0!==(null==(i=u)?void 0:i.params.length)&&this.resetStartLocationFromNode(s,u),s.typeParameters=u,s}),a);if(!h.error&&!h.aborted)return u&&this.reportReservedArrowTypeParam(u),h.node;if(!l&&(ve(!this.hasPlugin("jsx")),c=this.tryParse((()=>super.parseMaybeAssign(t,e)),a),!c.error))return c.node;if(null!=(r=l)&&r.node)return this.state=l.failState,l.node;if(h.node)return this.state=h.failState,u&&this.reportReservedArrowTypeParam(u),h.node;if(null!=(i=c)&&i.node)return this.state=c.failState,c.node;throw(null==(s=l)?void 0:s.error)||h.error||(null==(o=c)?void 0:o.error)}reportReservedArrowTypeParam(t){var e;1!==t.params.length||t.params[0].constraint||null!=(e=t.extra)&&e.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(be.ReservedArrowTypeParam,t)}parseMaybeUnary(t,e){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(t,e)}parseArrow(t){if(this.match(14)){const e=this.tryParse((t=>{const e=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||t(),e}));if(e.aborted)return;e.thrown||(e.error&&(this.state=e.failState),t.returnType=e.node)}return super.parseArrow(t)}parseFunctionParamType(t){this.eat(17)&&(t.optional=!0);const e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e),this.resetEndLocation(t),t}isAssignable(t,e){switch(t.type){case"TSTypeCastExpression":return this.isAssignable(t.expression,e);case"TSParameterProperty":return!0;default:return super.isAssignable(t,e)}}toAssignable(t,e=!1){switch(t.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(t,e);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":e?this.expressionScope.recordArrowParameterBindingError(be.UnexpectedTypeCastInParameter,t):this.raise(be.UnexpectedTypeCastInParameter,t),this.toAssignable(t.expression,e);break;case"AssignmentExpression":e||"TSTypeCastExpression"!==t.left.type||(t.left=this.typeCastToParameter(t.left));default:super.toAssignable(t,e)}}toAssignableParenthesizedExpression(t,e){switch(t.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(t.expression,e);break;default:super.toAssignable(t,e)}}checkToRestConversion(t,e){switch(t.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(t.expression,!1);break;default:super.checkToRestConversion(t,e)}}isValidLVal(t,e,n,r){switch(t){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(64!==r||!n)&&["expression",!0];default:return super.isValidLVal(t,e,n,r)}}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(t,e){if(this.match(47)||this.match(51)){const n=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const r=super.parseMaybeDecoratorArguments(t,e);return r.typeParameters=n,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(t,e)}checkCommaAfterRest(t){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===t?(this.next(),!1):super.checkCommaAfterRest(t)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(t,e){const n=super.parseMaybeDefault(t,e);return"AssignmentPattern"===n.type&&n.typeAnnotation&&n.right.start<n.typeAnnotation.start&&this.raise(be.TypeAnnotationAfterAssign,n.typeAnnotation),n}getTokenFromCode(t){if(this.state.inType){if(62===t)return void this.finishOp(48,1);if(60===t)return void this.finishOp(47,1)}super.getTokenFromCode(t)}reScan_lt_gt(){const{type:t}=this.state;47===t?(this.state.pos-=1,this.readToken_lt()):48===t&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:t}=this.state;return 51===t?(this.state.pos-=2,this.finishOp(47,1),47):t}toAssignableListItem(t,e,n){const r=t[e];"TSTypeCastExpression"===r.type&&(t[e]=this.typeCastToParameter(r)),super.toAssignableListItem(t,e,n)}typeCastToParameter(t){return t.expression.typeAnnotation=t.typeAnnotation,this.resetEndLocation(t.expression,t.typeAnnotation.loc.end),t.expression}shouldParseArrow(t){return this.match(14)?t.every((t=>this.isAssignable(t,!0))):super.shouldParseArrow(t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(t){if(this.match(47)||this.match(51)){const e=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));e&&(t.typeParameters=e)}return super.jsxParseOpeningElementAfterName(t)}getGetterSetterExpectedParamCount(t){const e=super.getGetterSetterExpectedParamCount(t),n=this.getObjectOrClassMethodParams(t)[0];return n&&this.isThisParam(n)?e+1:e}parseCatchClauseParam(){const t=super.parseCatchClauseParam(),e=this.tsTryParseTypeAnnotation();return e&&(t.typeAnnotation=e,this.resetEndLocation(t)),t}tsInAmbientContext(t){const{isAmbientContext:e,strict:n}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return t()}finally{this.state.isAmbientContext=e,this.state.strict=n}}parseClass(t,e,n){const r=this.state.inAbstractClass;this.state.inAbstractClass=!!t.abstract;try{return super.parseClass(t,e,n)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(t,e){if(this.match(80))return t.abstract=!0,this.maybeTakeDecorators(e,this.parseClass(t,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(t.abstract=!0,this.raise(be.NonClassMethodPropertyHasAbstractModifier,t),this.tsParseInterfaceDeclaration(t));throw this.unexpected(null,80)}parseMethod(t,e,n,r,i,s,o){const a=super.parseMethod(t,e,n,r,i,s,o);if((a.abstract||"TSAbstractMethodDefinition"===a.type)&&(this.hasPlugin("estree")?a.value:a).body){const{key:t}=a;this.raise(be.AbstractMethodHasImplementation,a,{methodName:"Identifier"!==t.type||a.computed?`[${this.input.slice(this.offsetToSourcePos(t.start),this.offsetToSourcePos(t.end))}]`:t.name})}return a}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(t,e,n,r){return!e&&r?(this.parseTypeOnlyImportExportSpecifier(t,!1,n),this.finishNode(t,"ExportSpecifier")):(t.exportKind="value",super.parseExportSpecifier(t,e,n,r))}parseImportSpecifier(t,e,n,r,i){return!e&&r?(this.parseTypeOnlyImportExportSpecifier(t,!0,n),this.finishNode(t,"ImportSpecifier")):(t.importKind="value",super.parseImportSpecifier(t,e,n,r,n?4098:4096))}parseTypeOnlyImportExportSpecifier(t,e,n){const r=e?"imported":"local",i=e?"local":"exported";let s,o=t[r],a=!1,l=!0;const c=o.loc.start;if(this.isContextual(93)){const t=this.parseIdentifier();if(this.isContextual(93)){const n=this.parseIdentifier();$(this.state.type)?(a=!0,o=t,s=e?this.parseIdentifier():this.parseModuleExportName(),l=!1):(s=n,l=!1)}else $(this.state.type)?(l=!1,s=e?this.parseIdentifier():this.parseModuleExportName()):(a=!0,o=t)}else $(this.state.type)&&(a=!0,e?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());a&&n&&this.raise(e?be.TypeModifierIsUsedInTypeImports:be.TypeModifierIsUsedInTypeExports,c),t[r]=o,t[i]=s,t[e?"importKind":"exportKind"]=a?"type":"value",l&&this.eatContextual(93)&&(t[i]=e?this.parseIdentifier():this.parseModuleExportName()),t[i]||(t[i]=this.cloneIdentifier(t[r])),e&&this.checkIdentifier(t[i],a?4098:4096)}fillOptionalPropertiesForTSESLint(t){switch(t.type){case"ExpressionStatement":return void(null!=t.directive||(t.directive=void 0));case"RestElement":t.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":return null!=t.decorators||(t.decorators=[]),null!=t.optional||(t.optional=!1),void(null!=t.typeAnnotation||(t.typeAnnotation=void 0));case"TSParameterProperty":return null!=t.accessibility||(t.accessibility=void 0),null!=t.decorators||(t.decorators=[]),null!=t.override||(t.override=!1),null!=t.readonly||(t.readonly=!1),void(null!=t.static||(t.static=!1));case"TSEmptyBodyFunctionExpression":t.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":return null!=t.declare||(t.declare=!1),null!=t.returnType||(t.returnType=void 0),void(null!=t.typeParameters||(t.typeParameters=void 0));case"Property":return void(null!=t.optional||(t.optional=!1));case"TSMethodSignature":case"TSPropertySignature":null!=t.optional||(t.optional=!1);case"TSIndexSignature":return null!=t.accessibility||(t.accessibility=void 0),null!=t.readonly||(t.readonly=!1),void(null!=t.static||(t.static=!1));case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":null!=t.declare||(t.declare=!1),null!=t.definite||(t.definite=!1),null!=t.readonly||(t.readonly=!1),null!=t.typeAnnotation||(t.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":return null!=t.accessibility||(t.accessibility=void 0),null!=t.decorators||(t.decorators=[]),null!=t.override||(t.override=!1),void(null!=t.optional||(t.optional=!1));case"ClassExpression":null!=t.id||(t.id=null);case"ClassDeclaration":return null!=t.abstract||(t.abstract=!1),null!=t.declare||(t.declare=!1),null!=t.decorators||(t.decorators=[]),null!=t.implements||(t.implements=[]),null!=t.superTypeArguments||(t.superTypeArguments=void 0),void(null!=t.typeParameters||(t.typeParameters=void 0));case"TSTypeAliasDeclaration":case"VariableDeclaration":return void(null!=t.declare||(t.declare=!1));case"VariableDeclarator":return void(null!=t.definite||(t.definite=!1));case"TSEnumDeclaration":return null!=t.const||(t.const=!1),void(null!=t.declare||(t.declare=!1));case"TSEnumMember":return void(null!=t.computed||(t.computed=!1));case"TSImportType":return null!=t.qualifier||(t.qualifier=null),void(null!=t.options||(t.options=null));case"TSInterfaceDeclaration":return null!=t.declare||(t.declare=!1),void(null!=t.extends||(t.extends=[]));case"TSMappedType":return null!=t.optional||(t.optional=!1),void(null!=t.readonly||(t.readonly=void 0));case"TSModuleDeclaration":return null!=t.declare||(t.declare=!1),void(null!=t.global||(t.global="global"===t.kind));case"TSTypeParameter":return null!=t.const||(t.const=!1),null!=t.in||(t.in=!1),void(null!=t.out||(t.out=!1))}}chStartsBindingIdentifierAndNotRelationalOperator(t,e){if(ot(t)){if(ge.lastIndex=e,ge.test(this.input)){const t=this.codePointAtPos(ge.lastIndex);if(!at(t)&&92!==t)return!1}return!0}return 92===t}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifierAndNotRelationalOperator(e,t)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)||34===e||39===e}},v8intrinsic:t=>class extends t{parseV8Intrinsic(){if(this.match(54)){const t=this.state.startLoc,e=this.startNode();if(this.next(),q(this.state.type)){const t=this.parseIdentifierName(),n=this.createIdentifier(e,t);if(this.castNodeTo(n,"V8IntrinsicIdentifier"),this.match(10))return n}this.unexpected(t)}}parseExprAtom(t){return this.parseV8Intrinsic()||super.parseExprAtom(t)}},placeholders:t=>class extends t{parsePlaceholder(t){if(this.match(133)){const e=this.startNode();return this.next(),this.assertNoSpace(),e.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(e,t)}}finishPlaceholder(t,e){let n=t;return n.expectedNode&&n.type||(n=this.finishNode(n,"Placeholder")),n.expectedNode=e,n}getTokenFromCode(t){37===t&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(133,2):super.getTokenFromCode(t)}parseExprAtom(t){return this.parsePlaceholder("Expression")||super.parseExprAtom(t)}parseIdentifier(t){return this.parsePlaceholder("Identifier")||super.parseIdentifier(t)}checkReservedWord(t,e,n,r){void 0!==t&&super.checkReservedWord(t,e,n,r)}cloneIdentifier(t){const e=super.cloneIdentifier(t);return"Placeholder"===e.type&&(e.expectedNode=t.expectedNode),e}cloneStringLiteral(t){return"Placeholder"===t.type?this.cloneIdentifier(t):super.cloneStringLiteral(t)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(t,e,n,r){return"Placeholder"===t||super.isValidLVal(t,e,n,r)}toAssignable(t,e){t&&"Placeholder"===t.type&&"Expression"===t.expectedNode?t.expectedNode="Pattern":super.toAssignable(t,e)}chStartsBindingIdentifier(t,e){if(super.chStartsBindingIdentifier(t,e))return!0;const n=this.nextTokenStart();return 37===this.input.charCodeAt(n)&&37===this.input.charCodeAt(n+1)}verifyBreakContinue(t,e){var n;"Placeholder"!==(null==(n=t.label)?void 0:n.type)&&super.verifyBreakContinue(t,e)}parseExpressionStatement(t,e){var n;if("Placeholder"!==e.type||null!=(n=e.extra)&&n.parenthesized)return super.parseExpressionStatement(t,e);if(this.match(14)){const n=t;return n.label=this.finishPlaceholder(e,"Identifier"),this.next(),n.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(n,"LabeledStatement")}this.semicolon();const r=t;return r.name=e.name,this.finishPlaceholder(r,"Statement")}parseBlock(t,e,n){return this.parsePlaceholder("BlockStatement")||super.parseBlock(t,e,n)}parseFunctionId(t){return this.parsePlaceholder("Identifier")||super.parseFunctionId(t)}parseClass(t,e,n){const r=e?"ClassDeclaration":"ClassExpression";this.next();const i=this.state.strict,s=this.parsePlaceholder("Identifier");if(s){if(!(this.match(81)||this.match(133)||this.match(5))){if(n||!e)return t.id=null,t.body=this.finishPlaceholder(s,"ClassBody"),this.finishNode(t,r);throw this.raise(Pe.ClassNameIsRequired,this.state.startLoc)}t.id=s}else this.parseClassId(t,e,n);return super.parseClassSuper(t),t.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!t.superClass,i),this.finishNode(t,r)}parseExport(t,e){const n=this.parsePlaceholder("Identifier");if(!n)return super.parseExport(t,e);const r=t;if(!this.isContextual(98)&&!this.match(12))return r.specifiers=[],r.source=null,r.declaration=this.finishPlaceholder(n,"Declaration"),this.finishNode(r,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const i=this.startNode();return i.exported=n,r.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(r,e)}isExportDefaultSpecifier(){if(this.match(65)){const t=this.nextTokenStart();if(this.isUnparsedContextual(t,"from")&&this.input.startsWith(J(133),this.nextTokenStartSince(t+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(t,e){var n;return!(null==(n=t.specifiers)||!n.length)||super.maybeParseExportDefaultSpecifier(t,e)}checkExport(t){const{specifiers:e}=t;null!=e&&e.length&&(t.specifiers=e.filter((t=>"Placeholder"===t.exported.type))),super.checkExport(t),t.specifiers=e}parseImport(t){const e=this.parsePlaceholder("Identifier");if(!e)return super.parseImport(t);if(t.specifiers=[],!this.isContextual(98)&&!this.match(12))return t.source=this.finishPlaceholder(e,"StringLiteral"),this.semicolon(),this.finishNode(t,"ImportDeclaration");const n=this.startNodeAtNode(e);return n.local=e,t.specifiers.push(this.finishNode(n,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(t)||this.parseNamedImportSpecifiers(t)),this.expectContextual(98),t.source=this.parseImportSource(),this.semicolon(),this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Pe.UnexpectedSpace,this.state.lastTokEndLoc)}}},Ie=Object.keys(ke);class Oe extends ye{checkProto(t,e,n,r){if("SpreadElement"===t.type||this.isObjectMethod(t)||t.computed||t.shorthand)return n;const i=t.key;return"__proto__"===("Identifier"===i.type?i.name:i.value)?e?(this.raise(v.RecordNoProto,i),!0):(n&&(r?null===r.doubleProtoLoc&&(r.doubleProtoLoc=i.loc.start):this.raise(v.DuplicateProto,i)),!0):n}shouldExitDescending(t,e){return"ArrowFunctionExpression"===t.type&&this.offsetToSourcePos(t.start)===e}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(v.ParseExpressionEmptyInput,this.state.startLoc);const t=this.parseExpression();if(!this.match(140))throw this.raise(v.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,256&this.optionFlags&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd((()=>this.parseExpressionBase(e))):this.allowInAnd((()=>this.parseExpressionBase(e)))}parseExpressionBase(t){const e=this.state.startLoc,n=this.parseMaybeAssign(t);if(this.match(12)){const r=this.startNodeAt(e);for(r.expressions=[n];this.eat(12);)r.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(r.expressions),this.finishNode(r,"SequenceExpression")}return n}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd((()=>this.parseMaybeAssign(t,e)))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd((()=>this.parseMaybeAssign(t,e)))}setOptionalParametersError(t){t.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(t,e){const n=this.state.startLoc,r=this.isContextual(108);if(r&&this.prodParam.hasYield){this.next();let t=this.parseYield(n);return e&&(t=e.call(this,t,n)),t}let i;t?i=!1:(t=new he,i=!0);const{type:s}=this.state;(10===s||q(s))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(e&&(o=e.call(this,o,n)),(a=this.state.type)>=29&&a<=33){const e=this.startNodeAt(n),r=this.state.value;if(e.operator=r,this.match(29)){this.toAssignable(o,!0),e.left=o;const r=n.index;null!=t.doubleProtoLoc&&t.doubleProtoLoc.index>=r&&(t.doubleProtoLoc=null),null!=t.shorthandAssignLoc&&t.shorthandAssignLoc.index>=r&&(t.shorthandAssignLoc=null),null!=t.privateKeyLoc&&t.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null),null!=t.voidPatternLoc&&t.voidPatternLoc.index>=r&&(t.voidPatternLoc=null)}else e.left=o;return this.next(),e.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(e,"AssignmentExpression"),void 0,void 0,void 0,void 0,"||="===r||"&&="===r||"??="===r),e}var a;if(i&&this.checkExpressionErrors(t,!0),r){const{type:t}=this.state;if((this.hasPlugin("v8intrinsic")?K(t):K(t)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.YieldNotInGeneratorFunction,n),this.parseYield(n)}return o}parseMaybeConditional(t){const e=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprOps(t);return this.shouldExitDescending(r,n)?r:this.parseConditional(r,e,t)}parseConditional(t,e,n){if(this.eat(17)){const n=this.startNodeAt(e);return n.test=t,n.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),n.alternate=this.parseMaybeAssign(),this.finishNode(n,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){const e=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(r,n)?r:this.parseExprOp(r,e,-1)}parseExprOp(t,e,n){if(this.isPrivateName(t)){const e=this.getPrivateNameSV(t);(n>=X(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,t,{identifierName:e}),this.classScope.usePrivateName(e,t.loc.start)}const r=this.state.type;if((i=r)>=39&&i<=59&&(this.prodParam.hasIn||!this.match(58))){let i=X(r);if(i>n){if(39===r){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}const s=this.startNodeAt(e);s.left=t,s.operator=this.state.value;const o=41===r||42===r,a=40===r;if(a&&(i=X(42)),this.next(),39===r&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);s.right=this.parseExprOpRightExpr(r,i);const l=this.finishNode(s,o||a?"LogicalExpression":"BinaryExpression"),c=this.state.type;if(a&&(41===c||42===c)||o&&40===c)throw this.raise(v.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(l,e,n)}}var i;return t}parseExprOpRightExpr(t,e){const n=this.state.startLoc;if(39===t){switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(e)))}if("smart"===this.getPluginOption("pipelineOperator","proposal"))return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(v.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),n)}))}return this.parseExprOpBaseRightExpr(t,e)}parseExprOpBaseRightExpr(t,e){const n=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),n,57===t?e-1:e)}parseHackPipeBody(){var t;const{startLoc:e}=this.state,n=this.parseMaybeAssign();return!p.has(n.type)||null!=(t=n.extra)&&t.parenthesized||this.raise(v.PipeUnparenthesizedBody,e,{type:n.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,e),n}checkExponentialAfterUnary(t){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){const n=this.state.startLoc,r=this.isContextual(96);if(r&&this.recordAwaitIfAllowed()){this.next();const t=this.parseAwait(n);return e||this.checkExponentialAfterUnary(t),t}const i=this.match(34),s=this.startNode();if(o=this.state.type,j[o]){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const n=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&n){const t=s.argument;"Identifier"===t.type?this.raise(v.StrictDelete,s):this.hasPropertyAsPrivateName(t)&&this.raise(v.DeletePrivateField,s)}if(!i)return e||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}var o;const a=this.parseUpdate(s,i,t);if(r){const{type:t}=this.state;if((this.hasPlugin("v8intrinsic")?K(t):K(t)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(v.AwaitNotInAsyncContext,n),this.parseAwait(n)}return a}parseUpdate(t,e,n){if(e){const e=t;return this.checkLVal(e.argument,this.finishNode(e,"UpdateExpression")),t}const r=this.state.startLoc;let i=this.parseExprSubscripts(n);if(this.checkExpressionErrors(n,!1))return i;for(;34===this.state.type&&!this.canInsertSemicolon();){const t=this.startNodeAt(r);t.operator=this.state.value,t.prefix=!1,t.argument=i,this.next(),this.checkLVal(i,i=this.finishNode(t,"UpdateExpression"))}return i}parseExprSubscripts(t){const e=this.state.startLoc,n=this.state.potentialArrowAt,r=this.parseExprAtom(t);return this.shouldExitDescending(r,n)?r:this.parseSubscripts(r,e)}parseSubscripts(t,e,n){const r={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do{t=this.parseSubscript(t,e,n,r),r.maybeAsyncArrow=!1}while(!r.stop);return t}parseSubscript(t,e,n,r){const{type:i}=this.state;if(!n&&15===i)return this.parseBind(t,e,n,r);if(G(i))return this.parseTaggedTemplateExpression(t,e,r);let s=!1;if(18===i){if(n&&(this.raise(v.OptionalChainingNoNew,this.state.startLoc),40===this.lookaheadCharCode()))return this.stopParseSubscript(t,r);r.optionalChainMember=s=!0,this.next()}if(!n&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,r,s);{const n=this.eat(0);return n||s||this.eat(16)?this.parseMember(t,e,r,n,s):this.stopParseSubscript(t,r)}}stopParseSubscript(t,e){return e.stop=!0,t}parseMember(t,e,n,r,i){const s=this.startNodeAt(e);return s.object=t,s.computed=r,r?(s.property=this.parseExpression(),this.expect(3)):this.match(139)?("Super"===t.type&&this.raise(v.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),n.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(t,e,n,r){const i=this.startNodeAt(e);return i.object=t,this.next(),i.callee=this.parseNoCallExpr(),r.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),e,n)}parseCoverCallAndAsyncArrowHead(t,e,n,r){const i=this.state.maybeInArrowParameters;let s=null;this.state.maybeInArrowParameters=!0,this.next();const o=this.startNodeAt(e);o.callee=t;const{maybeAsyncArrow:a,optionalChainMember:l}=n;a&&(this.expressionScope.enter(new ae(2)),s=new he),l&&(o.optional=r),o.arguments=r?this.parseCallExpressionArguments():this.parseCallExpressionArguments("Super"!==t.type,o,s);let c=this.finishCallExpression(o,l);return a&&this.shouldParseAsyncArrow()&&!r?(n.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),c=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),c)):(a&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(c)),this.state.maybeInArrowParameters=i,c}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,n){const r=this.startNodeAt(e);return r.tag=t,r.quasi=this.parseTemplate(!0),n.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,e),this.finishNode(r,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return"Identifier"===t.type&&"async"===t.name&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start==5&&this.offsetToSourcePos(t.start)===this.state.potentialArrowAt}finishCallExpression(t,e){if("Import"===t.callee.type)if(0===t.arguments.length||t.arguments.length>2)this.raise(v.ImportCallArity,t);else for(const e of t.arguments)"SpreadElement"===e.type&&this.raise(v.ImportCallSpreadArgument,e);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,n){const r=[];let i=!0;const s=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(i)i=!1;else if(this.expect(12),this.match(11)){e&&this.addTrailingCommaExtraToNode(e),this.next();break}r.push(this.parseExprListItem(11,!1,n,t))}return this.state.inFSharpPipelineDirectBody=s,r}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var n;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,null==(n=e.extra)?void 0:n.trailingCommaLoc),e.innerComments&&Vt(t,e.innerComments),e.callee.trailingComments&&Vt(t,e.callee.trailingComments),t}parseNoCallExpr(){const t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,n=null;const{type:r}=this.state;switch(r){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(e):this.match(10)?512&this.optionFlags?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(v.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{const t=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(t)}case 0:return this.parseArrayLike(3,!1,t);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:n=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(n,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;const t=e.callee=this.parseNoCallExpr();if("MemberExpression"===t.type)return this.finishNode(e,"BindExpression");throw this.raise(v.UnsupportedBind,t)}case 139:return this.raise(v.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{const t=this.getPluginOption("pipelineOperator","proposal");if(t)return this.parseTopicReference(t);throw this.unexpected()}case 47:{const t=this.input.codePointAt(this.nextTokenStart());if(ot(t)||62===t)throw this.expectOnePlugin(["jsx","flow","typescript"]);throw this.unexpected()}default:if(137===r)return this.parseDecimalLiteral(this.state.value);if(2===r||1===r)return this.parseArrayLike(2===this.state.type?4:3,!0);if(6===r||7===r)return this.parseObjectLike(6===this.state.type?9:8,!1,!0);if(q(r)){if(this.isContextual(127)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const t=this.state.potentialArrowAt===this.state.start,e=this.state.containsEsc,n=this.parseIdentifier();if(!e&&"async"===n.name&&!this.canInsertSemicolon()){const{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(q(e))return t&&61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(90===e)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return t&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}throw this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){const n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=s(this.state.endLoc,-1),this.parseTopicReference(n);throw this.unexpected()}parseTopicReference(t){const e=this.startNode(),n=this.state.startLoc,r=this.state.type;return this.next(),this.finishTopicReference(e,n,t,r)}finishTopicReference(t,e,n,r){if(this.testTopicReferenceConfiguration(n,e,r))return"hack"===n?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(v.PrimaryTopicNotAllowed,e),this.registerTopicReference(),this.finishNode(t,"PipelinePrimaryTopicReference"));throw this.raise(v.PipeTopicUnconfiguredToken,e,{token:J(r)})}testTopicReferenceConfiguration(t,e,n){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:J(n)}]);case"smart":return 27===n;default:throw this.raise(v.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Ft(!0,this.prodParam.hasYield));const e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();const n=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=n,this.finishNode(t,"DoExpression")}parseSuper(){const t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?16&this.optionFlags||this.raise(v.SuperNotAllowed,t):this.scope.allowSuper||16&this.optionFlags||this.raise(v.UnexpectedSuper,t),this.match(10)||this.match(0)||this.match(16)||this.raise(v.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){const t=this.startNode(),e=this.startNodeAt(s(this.state.startLoc,1)),n=this.state.value;return this.next(),t.id=this.createIdentifier(e,n),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){const t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,n){t.meta=e;const r=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==n||r)&&this.raise(v.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:n}),this.finishNode(t,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(t){if(this.next(),this.isContextual(105)||this.isContextual(97)){const e=this.isContextual(105);return this.expectPlugin(e?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),t.phase=e?"source":"defer",this.parseImportCall(t)}{const e=this.createIdentifierAt(this.startNodeAtNode(t),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,e,"meta")}}parseLiteralAtNode(t,e,n){return this.addExtra(n,"rawValue",t),this.addExtra(n,"raw",this.input.slice(this.offsetToSourcePos(n.start),this.state.end)),n.value=t,this.next(),this.finishNode(n,e)}parseLiteral(t,e){const n=this.startNode();return this.parseLiteralAtNode(t,e,n)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){const e=this.startNode();return this.addExtra(e,"raw",this.input.slice(this.offsetToSourcePos(e.start),this.state.end)),e.pattern=t.pattern,e.flags=t.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(t){const e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){const t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){const e=this.state.startLoc;let n;this.next(),this.expressionScope.enter(new ae(1));const r=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const s=this.state.startLoc,o=[],a=new he;let l,c,u=!0;for(;!this.match(11);){if(u)u=!1;else if(this.expect(12,null===a.optionalParametersLoc?null:a.optionalParametersLoc),this.match(11)){c=this.state.startLoc;break}if(this.match(21)){const t=this.state.startLoc;if(l=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),t)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,a,this.parseParenItem))}const h=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=r,this.state.inFSharpPipelineDirectBody=i;let p=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(p=this.parseArrow(p))?(this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(p,o,!1),p):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),c&&this.unexpected(c),l&&this.unexpected(l),this.checkExpressionErrors(a,!0),this.toReferencedListDeep(o,!0),o.length>1?(n=this.startNodeAt(s),n.expressions=o,this.finishNode(n,"SequenceExpression"),this.resetEndLocation(n,h)):n=o[0],this.wrapParenthesis(e,n))}wrapParenthesis(t,e){if(!(1024&this.optionFlags))return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;const n=this.startNodeAt(t);return n.expression=e,this.finishNode(n,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){const t=this.startNode();if(this.next(),this.match(16)){const e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();const n=this.parseMetaProperty(t,e,"target");return this.scope.allowNewTarget||this.raise(v.UnexpectedNewTarget,n),n}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){const e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){const e=this.match(83),n=this.parseNoCallExpr();t.callee=n,!e||"Import"!==n.type&&"ImportExpression"!==n.type||this.raise(v.ImportCallNotNewExpression,n)}parseTemplateElement(t){const{start:e,startLoc:n,end:r,value:i}=this.state,o=e+1,a=this.startNodeAt(s(n,1));null===i&&(t||this.raise(v.InvalidEscapeSequenceTemplate,s(this.state.firstInvalidTemplateEscapePos,1)));const l=this.match(24),c=l?-1:-2,u=r+c;a.value={raw:this.input.slice(o,u).replace(/\r\n?/g,"\n"),cooked:null===i?null:i.slice(1,c)},a.tail=l,this.next();const h=this.finishNode(a,"TemplateElement");return this.resetEndLocation(h,s(this.state.lastTokEndLoc,c)),h}parseTemplate(t){const e=this.startNode();let n=this.parseTemplateElement(t);const r=[n],i=[];for(;!n.tail;)i.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),r.push(n=this.parseTemplateElement(t));return e.expressions=i,e.quasis=r,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,n,r){n&&this.expectPlugin("recordAndTuple");const i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=!1,o=!0;const a=this.startNode();for(a.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(a);break}let i;e?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(r),s=this.checkProto(i,n,s,r)),n&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(v.InvalidRecordProperty,i),i.shorthand&&this.addExtra(i,"shorthand",!0),a.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let l="ObjectExpression";return e?l="ObjectPattern":n&&(l="RecordExpression"),this.finishNode(a,l)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&"Identifier"===t.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());const n=this.startNode();let r,i=!1,s=!1;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(n.decorators=e,e=[]),n.method=!1,t&&(r=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(n);const a=this.state.containsEsc;if(this.parsePropertyName(n,t),!o&&!a&&this.maybeAsyncOrAccessorProp(n)){const{key:t}=n,e=t.name;"async"!==e||this.hasPrecedingLineBreak()||(i=!0,this.resetPreviousNodeTrailingComments(t),o=this.eat(55),this.parsePropertyName(n)),"get"!==e&&"set"!==e||(s=!0,this.resetPreviousNodeTrailingComments(t),n.kind=e,this.match(55)&&(o=!0,this.raise(v.AccessorIsGenerator,this.state.curPosition(),{kind:e}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,r,o,i,!1,s,t)}getGetterSetterExpectedParamCount(t){return"get"===t.kind?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;const n=this.getGetterSetterExpectedParamCount(t),r=this.getObjectOrClassMethodParams(t);r.length!==n&&this.raise("get"===t.kind?v.BadGetterArity:v.BadSetterArity,t),"set"===t.kind&&"RestElement"===(null==(e=r[r.length-1])?void 0:e.type)&&this.raise(v.BadSetterRestParameter,t)}parseObjectMethod(t,e,n,r,i){if(i){const n=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(n),n}if(n||e||this.match(10))return r&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,n,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,n,r){if(t.shorthand=!1,this.eat(14))return t.value=n?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,r),this.finishObjectProperty(t);if(!t.computed&&"Identifier"===t.key.type){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),n)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){const n=this.state.startLoc;null!=r?null===r.shorthandAssignLoc&&(r.shorthandAssignLoc=n):this.raise(v.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,n,r,i,s,o){const a=this.parseObjectMethod(t,n,r,i,s)||this.parseObjectProperty(t,e,i,o);return a||this.unexpected(),a}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:n,value:r}=this.state;let i;if($(n))i=this.parseIdentifier(!0);else switch(n){case 135:i=this.parseNumericLiteral(r);break;case 134:i=this.parseStringLiteral(r);break;case 136:i=this.parseBigIntLiteral(r);break;case 139:{const t=this.state.startLoc;null!=e?null===e.privateKeyLoc&&(e.privateKeyLoc=t):this.raise(v.UnexpectedPrivateField,t),i=this.parsePrivateName();break}default:if(137===n){i=this.parseDecimalLiteral(r);break}this.unexpected()}t.key=i,139!==n&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,n,r,i,s,o=!1){this.initFunction(t,n),t.generator=e,this.scope.enter(530|(o?576:0)|(i?32:0)),this.prodParam.enter(Ft(n,t.generator)),this.parseFunctionParams(t,r);const a=this.parseFunctionBodyAndFinish(t,s,!0);return this.prodParam.exit(),this.scope.exit(),a}parseArrayLike(t,e,n){e&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const i=this.startNode();return this.next(),i.elements=this.parseExprList(t,!e,n,i),this.state.inFSharpPipelineDirectBody=r,this.finishNode(i,e?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,n,r){this.scope.enter(518);let i=Ft(n,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(t,n);const s=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,r)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,n){this.toAssignableList(e,n,!1),t.params=e}parseFunctionBodyAndFinish(t,e,n=!1){return this.parseFunctionBody(t,!1,n),this.finishNode(t,e)}parseFunctionBody(t,e,n=!1){const r=e&&!this.match(5);if(this.expressionScope.enter(ce()),r)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{const r=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),t.body=this.parseBlock(!0,!1,(i=>{const s=!this.isSimpleParamList(t.params);i&&s&&this.raise(v.IllegalLanguageModeDirective,"method"!==t.kind&&"constructor"!==t.kind||!t.key?t:t.key.loc.end);const o=!r&&this.state.strict;this.checkParams(t,!(this.state.strict||e||n||s),e,o),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,o)})),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(t){return"Identifier"===t.type}isSimpleParamList(t){for(let e=0,n=t.length;e<n;e++)if(!this.isSimpleParameter(t[e]))return!1;return!0}checkParams(t,e,n,r=!0){const i=!e&&new Set,s={type:"FormalParameters"};for(const e of t.params)this.checkLVal(e,s,5,i,r)}parseExprList(t,e,n,r){const i=[];let s=!0;for(;!this.eat(t);){if(s)s=!1;else if(this.expect(12),this.match(t)){r&&this.addTrailingCommaExtraToNode(r),this.next();break}i.push(this.parseExprListItem(t,e,n))}return i}parseExprListItem(t,e,n,r){let i;if(this.match(12))e||this.raise(v.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){const t=this.state.startLoc;i=this.parseParenItem(this.parseSpread(n),t)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(v.UnexpectedArgumentPlaceholder,this.state.startLoc);const t=this.startNode();this.next(),i=this.finishNode(t,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowInOrVoidPattern(t,n,this.parseParenItem);return i}parseIdentifier(t){const e=this.startNode(),n=this.parseIdentifierName(t);return this.createIdentifier(e,n)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}createIdentifierAt(t,e,n){return t.name=e,t.loc.identifierName=e,this.finishNodeAt(t,"Identifier",n)}parseIdentifierName(t){let e;const{startLoc:n,type:r}=this.state;$(r)?e=this.state.value:this.unexpected();const i=r<=92;return t?i&&this.replaceToken(132):this.checkReservedWord(e,n,i,!1),this.next(),e}checkReservedWord(t,e,n,r){if(!(t.length>10)&&function(t){return mt.has(t)}(t))if(n&&function(t){return lt.has(t)}(t))this.raise(v.UnexpectedKeyword,e,{keyword:t});else if((this.state.strict?r?ft:pt:ht)(t,this.inModule))this.raise(v.UnexpectedReservedWord,e,{reservedWord:t});else if("yield"===t){if(this.prodParam.hasYield)return void this.raise(v.YieldBindingIdentifier,e)}else if("await"===t){if(this.prodParam.hasAwait)return void this.raise(v.AwaitBindingIdentifier,e);if(this.scope.inStaticBlock)return void this.raise(v.AwaitBindingIdentifierInStaticBlock,e);this.expressionScope.recordAsyncArrowParametersError(e)}else if("arguments"===t&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(v.ArgumentsInClass,e)}recordAwaitIfAllowed(){const t=this.prodParam.hasAwait;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){const e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,e),this.scope.inFunction||1&this.optionFlags||(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;const{type:t}=this.state;return 53===t||10===t||0===t||G(t)||102===t&&!this.state.containsEsc||138===t||56===t||this.hasPlugin("v8intrinsic")&&54===t}parseYield(t){const e=this.startNodeAt(t);this.expressionScope.recordParameterInitializerError(v.YieldInParameter,e);let n=!1,r=null;if(!this.hasPrecedingLineBreak())switch(n=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!n)break;default:r=this.parseMaybeAssign()}return e.delegate=n,e.argument=r,this.finishNode(e,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12))if(this.match(11))this.addTrailingCommaExtraToNode(t.source);else if(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(t.options),!this.match(11))){do{this.parseMaybeAssignAllowIn()}while(this.eat(12)&&!this.match(11));this.raise(v.ImportCallArity,t)}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===t.type&&this.raise(v.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){const n=this.startNodeAt(e);return n.callee=t,this.finishNode(n,"PipelineBareFunction")}{const n=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),n.expression=t,this.finishNode(n,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,t)}withTopicBindingContext(t){const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return t();{const e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}}withSoloAwaitPermittingContext(t){const e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){const e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(8|e);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){const e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(-9&e);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){const e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const r=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=n,r}parseModuleExpression(){this.expectPlugin("moduleBlocks");const t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const e=this.startNodeAt(this.state.endLoc);this.next();const n=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{n()}return this.finishNode(t,"ModuleExpression")}parseVoidPattern(t){this.expectPlugin("discardBinding");const e=this.startNode();return null!=t&&(t.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(e,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(t,e,n){if(null!=e&&this.match(88)){const n=this.lookaheadCharCode();if(44===n||n===(3===t?93:8===t?125:41)||61===n)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(e))}return this.parseMaybeAssignAllowIn(e,n)}parsePropertyNamePrefixOperator(t){}}const Ne={kind:1},_e={kind:2},De=/[\uD800-\uDFFF]/u,Le=/in(?:stanceof)?/y;class Be extends Oe{parseTopLevel(t,e){return t.program=this.parseProgram(e,140,"module"===this.options.sourceType?"module":"script"),t.comments=this.comments,256&this.optionFlags&&(t.tokens=function(t,e,n){for(let r=0;r<t.length;r++){const i=t[r],{type:o}=i;if("number"==typeof o){if(139===o){const{loc:e,start:n,value:o,end:a}=i,l=n+1,c=s(e.start,1);t.splice(r,1,new ne({type:Z(27),value:"#",start:n,end:l,startLoc:e.start,endLoc:c}),new ne({type:Z(132),value:o,start:l,end:a,startLoc:c,endLoc:e.end})),r++;continue}if(G(o)){const{loc:a,start:l,value:c,end:u}=i,h=l+1,p=s(a.start,1);let d,f,m,y,g;d=96===e.charCodeAt(l-n)?new ne({type:Z(22),value:"`",start:l,end:h,startLoc:a.start,endLoc:p}):new ne({type:Z(8),value:"}",start:l,end:h,startLoc:a.start,endLoc:p}),24===o?(m=u-1,y=s(a.end,-1),f=null===c?null:c.slice(1,-1),g=new ne({type:Z(22),value:"`",start:m,end:u,startLoc:y,endLoc:a.end})):(m=u-2,y=s(a.end,-2),f=null===c?null:c.slice(1,-2),g=new ne({type:Z(23),value:"${",start:m,end:u,startLoc:y,endLoc:a.end})),t.splice(r,1,d,new ne({type:Z(20),value:f,start:h,end:m,startLoc:p,endLoc:y}),g),r+=2;continue}i.type=Z(o)}}return t}(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,e,n){if(t.sourceType=n,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule){if(!(64&this.optionFlags)&&this.scope.undefinedExports.size>0)for(const[t,e]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,e,{localName:t});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let r;return r=140===e?this.finishNode(t,"Program"):this.finishNodeAt(t,"Program",s(this.state.startLoc,-1)),r}stmtToDirective(t){const e=this.castNodeTo(t,"Directive"),n=this.castNodeTo(t.expression,"DirectiveLiteral"),r=n.value,i=this.input.slice(this.offsetToSourcePos(n.start),this.offsetToSourcePos(n.end)),s=n.value=i.slice(1,-1);return this.addExtra(n,"raw",i),this.addExtra(n,"rawValue",s),this.addExtra(n,"expressionValue",r),e.value=n,delete t.expression,e}parseInterpreterDirective(){if(!this.match(28))return null;const t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return!!this.isContextual(100)&&this.hasFollowingBindingAtom()}isUsing(){return!!this.isContextual(107)&&this.nextTokenIsIdentifierOnSameLine()}isForUsing(){if(!this.isContextual(107))return!1;const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);if(this.isUnparsedContextual(t,"of")){const e=this.lookaheadCharCodeSince(t+2);if(61!==e&&58!==e&&59!==e)return!1}return!(!this.chStartsBindingIdentifier(e,t)&&!this.isUnparsedContextual(t,"void"))}nextTokenIsIdentifierOnSameLine(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}isAwaitUsing(){if(!this.isContextual(96))return!1;let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);const e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return!0}return!1}chStartsBindingIdentifier(t,e){if(ot(t)){if(Le.lastIndex=e,Le.test(this.input)){const t=this.codePointAtPos(Le.lastIndex);if(!at(t)&&92!==t)return!1}return!0}return 92===t}chStartsBindingPattern(t){return 91===t||123===t}hasFollowingBindingAtom(){const t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){const t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return 123===e||this.chStartsBindingIdentifier(e,t)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){const n=this.state.type,r=this.startNode(),i=!!(2&t),s=!!(4&t),o=1&t;switch(n){case 60:return this.parseBreakContinueStatement(r,!0);case 63:return this.parseBreakContinueStatement(r,!1);case 64:return this.parseDebuggerStatement(r);case 90:return this.parseDoWhileStatement(r);case 91:return this.parseForStatement(r);case 68:if(46===this.lookaheadCharCode())break;return s||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(r,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,r),!0);case 69:return this.parseIfStatement(r);case 70:return this.parseReturnStatement(r);case 71:return this.parseSwitchStatement(r);case 72:return this.parseThrowStatement(r);case 73:return this.parseTryStatement(r);case 96:if(this.isAwaitUsing())return this.allowsUsing()?i?this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,r):this.raise(v.UnexpectedLexicalDeclaration,r):this.raise(v.UnexpectedUsingDeclaration,r),this.next(),this.parseVarStatement(r,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?i||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(v.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(r,"using");case 100:{if(this.state.containsEsc)break;const t=this.nextTokenStart(),e=this.codePointAtPos(t);if(91!==e){if(!i&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(e,t)&&123!==e)break}}case 75:i||this.raise(v.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{const t=this.state.value;return this.parseVarStatement(r,t)}case 92:return this.parseWhileStatement(r);case 76:return this.parseWithStatement(r);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(r);case 83:{const t=this.lookaheadCharCode();if(40===t||46===t)break}case 82:{let t;return 8&this.optionFlags||o||this.raise(v.UnexpectedImportExport,this.state.startLoc),this.next(),t=83===n?this.parseImport(r):this.parseExport(r,e),this.assertModuleNodeAllowed(t),t}default:if(this.isAsyncFunction())return i||this.raise(v.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(r,!0,!i&&s)}const a=this.state.value,l=this.parseExpression();return q(n)&&"Identifier"===l.type&&this.eat(14)?this.parseLabeledStatement(r,a,l,t):this.parseExpressionStatement(r,l,e)}assertModuleNodeAllowed(t){8&this.optionFlags||this.inModule||this.raise(v.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(t,e,n){var r;return t&&(null!=(r=e.decorators)&&r.length?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),n&&this.resetStartLocationFromNode(n,e)),e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){const e=[];do{e.push(this.parseDecorator())}while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const t=this.startNode();if(this.next(),this.hasPlugin("decorators")){const e=this.state.startLoc;let n;if(this.match(10)){const e=this.state.startLoc;this.next(),n=this.parseExpression(),this.expect(11),n=this.wrapParenthesis(e,n);const r=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(n,e),!1===this.getPluginOption("decorators","allowCallParenthesized")&&t.expression!==n&&this.raise(v.DecoratorArgumentsOutsideParentheses,r)}else{for(n=this.parseIdentifier(!1);this.eat(16);){const t=this.startNodeAt(e);t.object=n,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),t.property=this.parsePrivateName()):t.property=this.parseIdentifier(!0),t.computed=!1,n=this.finishNode(t,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(n,e)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t,e){if(this.eat(10)){const n=this.startNodeAt(e);return n.callee=t,n.arguments=this.parseCallExpressionArguments(),this.toReferencedList(n.arguments),this.finishNode(n,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let n;for(n=0;n<this.state.labels.length;++n){const r=this.state.labels[n];if(null==t.label||r.name===t.label.name){if(null!=r.kind&&(e||1===r.kind))break;if(t.label&&e)break}}if(n===this.state.labels.length){const n=e?"BreakStatement":"ContinueStatement";this.raise(v.IllegalBreakContinue,t,{type:n})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(Ne),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(Ne);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return null!==e&&this.unexpected(e),this.parseFor(t,null);const n=this.isContextual(100);{const r=this.isAwaitUsing(),i=r||this.isForUsing(),s=n&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||s){const n=this.startNode();let s;r?(s="await using",this.recordAwaitIfAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):s=this.state.value,this.next(),this.parseVar(n,!0,s);const o=this.finishNode(n,"VariableDeclaration"),a=this.match(58);return a&&i&&this.raise(v.ForInUsing,o),(a||this.isContextual(102))&&1===o.declarations.length?this.parseForIn(t,o,e):(null!==e&&this.unexpected(e),this.parseFor(t,o))}}const r=this.isContextual(95),i=new he,s=this.parseExpression(!0,i),o=this.isContextual(102);if(o&&(n&&this.raise(v.ForOfLet,s),null===e&&r&&"Identifier"===s.type&&this.raise(v.ForOfAsync,s)),o||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);const n=o?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{type:n}),this.parseForIn(t,s,e)}return this.checkExpressionErrors(i,!0),null!==e&&this.unexpected(e),this.parseFor(t,s)}parseFunctionStatement(t,e,n){return this.next(),this.parseFunction(t,1|(n?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.prodParam.hasReturn||this.raise(v.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();const e=t.cases=[];let n;this.expect(5),this.state.labels.push(_e),this.scope.enter(256);for(let t;!this.match(8);)if(this.match(61)||this.match(65)){const r=this.match(61);n&&this.finishNode(n,"SwitchCase"),e.push(n=this.startNode()),n.consequent=[],this.next(),r?n.test=this.parseExpression():(t&&this.raise(v.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),t=!0,n.test=null),this.expect(14)}else n?n.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),n&&this.finishNode(n,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){const t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===t.type?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){const e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,t.handler||t.finalizer||this.raise(v.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,n=!1){return this.next(),this.parseVar(t,!1,e,n),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(Ne),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(v.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,n,r){for(const t of this.state.labels)t.name===e&&this.raise(v.LabelRedeclaration,n,{labelName:e});const i=(s=this.state.type)>=90&&s<=92?1:this.match(71)?2:null;var s;for(let e=this.state.labels.length-1;e>=0;e--){const n=this.state.labels[e];if(n.statementStart!==t.start)break;n.statementStart=this.sourceToOffsetPos(this.state.start),n.kind=i}return this.state.labels.push({name:e,kind:i,statementStart:this.sourceToOffsetPos(this.state.start)}),t.body=8&r?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=n,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,n){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,n){const r=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(r,t,!1,8,n),e&&this.scope.exit(),this.finishNode(r,"BlockStatement")}isValidDirective(t){return"ExpressionStatement"===t.type&&"StringLiteral"===t.expression.type&&!t.expression.extra.parenthesized}parseBlockBody(t,e,n,r,i){const s=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(s,e?o:void 0,n,r,i)}parseBlockOrModuleBlockBody(t,e,n,r,i){const s=this.state.strict;let o=!1,a=!1;for(;!this.match(r);){const r=n?this.parseModuleItem():this.parseStatementListItem();if(e&&!a){if(this.isValidDirective(r)){const t=this.stmtToDirective(r);e.push(t),o||"use strict"!==t.value.value||(o=!0,this.setStrict(!0));continue}a=!0,this.state.strictErrors.clear()}t.push(r)}null==i||i.call(this,o),s||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,n){const r=this.match(58);return this.next(),r?null!==n&&this.unexpected(n):t.await=null!==n,"VariableDeclaration"!==e.type||null==e.declarations[0].init||r&&this.options.annexB&&!this.state.strict&&"var"===e.kind&&"Identifier"===e.declarations[0].id.type||this.raise(v.ForInOfLoopInitializer,e,{type:r?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===e.type&&this.raise(v.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=r?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,r?"ForInStatement":"ForOfStatement")}parseVar(t,e,n,r=!1){const i=t.declarations=[];for(t.kind=n;;){const t=this.startNode();if(this.parseVarId(t,n),t.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==t.init||r||("Identifier"===t.id.type||e&&(this.match(58)||this.isContextual(102))?"const"!==n&&"using"!==n&&"await using"!==n||this.match(58)||this.isContextual(102)||this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:n}):this.raise(v.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"})),i.push(this.finishNode(t,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){const n=this.parseBindingAtom();"using"===e||"await using"===e?"ArrayPattern"!==n.type&&"ObjectPattern"!==n.type||this.raise(v.UsingDeclarationHasBindingPattern,n.loc.start):"VoidPattern"===n.type&&this.raise(v.UnexpectedVoidPattern,n.loc.start),this.checkLVal(n,{type:"VariableDeclarator"},"var"===e?5:8201),t.id=n}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){const n=2&e,r=!!(1&e),i=r&&!(4&e),s=!!(8&e);this.initFunction(t,s),this.match(55)&&(n&&this.raise(v.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),r&&(t.id=this.parseFunctionId(i));const o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(Ft(s,t.generator)),r||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(t,r?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),r&&!n&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||q(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(new oe(3)),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,n){this.next();const r=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,n),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,r),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return"Identifier"===t.type&&"constructor"===t.name||"StringLiteral"===t.type&&"constructor"===t.value}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();const n={hadConstructor:!1,hadSuperClass:t};let r=[];const i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(r.length>0)throw this.raise(v.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){r.push(this.parseDecorator());continue}const t=this.startNode();r.length&&(t.decorators=r,this.resetStartLocationFromNode(t,r[0]),r=[]),this.parseClassMember(i,t,n),"constructor"===t.kind&&t.decorators&&t.decorators.length>0&&this.raise(v.DecoratorConstructor,t)}})),this.state.strict=e,this.next(),r.length)throw this.raise(v.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(t,e){const n=this.parseIdentifier(!0);if(this.isClassMethod()){const r=e;return r.kind="method",r.computed=!1,r.key=n,r.static=!1,this.pushClassMethod(t,r,!1,!1,!1,!1),!0}if(this.isClassProperty()){const r=e;return r.computed=!1,r.key=n,r.static=!1,t.body.push(this.parseClassProperty(r)),!0}return this.resetPreviousNodeTrailingComments(n),!1}parseClassMember(t,e,n){const r=this.isContextual(106);if(r){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5))return void this.parseClassStaticBlock(t,e)}this.parseClassMemberWithIsStatic(t,e,n,r)}parseClassMemberWithIsStatic(t,e,n,r){const i=e,s=e,o=e,a=e,l=e,c=i,u=i;if(e.static=r,this.parsePropertyNamePrefixOperator(e),this.eat(55)){c.kind="method";const e=this.match(139);return this.parseClassElementName(c),this.parsePostMemberNameModifiers(c),e?void this.pushClassPrivateMethod(t,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsGenerator,i.key),void this.pushClassMethod(t,i,!0,!1,!1,!1))}const h=!this.state.containsEsc&&q(this.state.type),p=this.parseClassElementName(e),d=h?p.name:null,f=this.isPrivateName(p),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(u),this.isClassMethod()){if(c.kind="method",f)return void this.pushClassPrivateMethod(t,s,!1,!1);const r=this.isNonstaticConstructor(i);let o=!1;r&&(i.kind="constructor",n.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,p),r&&this.hasPlugin("typescript")&&e.override&&this.raise(v.OverrideOnConstructor,p),n.hadConstructor=!0,o=n.hadSuperClass),this.pushClassMethod(t,i,!1,!1,r,o)}else if(this.isClassProperty())f?this.pushClassPrivateProperty(t,a):this.pushClassProperty(t,o);else if("async"!==d||this.isLineTerminator())if("get"!==d&&"set"!==d||this.match(55)&&this.isLineTerminator())if("accessor"!==d||this.isLineTerminator())this.isLineTerminator()?f?this.pushClassPrivateProperty(t,a):this.pushClassProperty(t,o):this.unexpected();else{this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(p);const e=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(t,l,e)}else{this.resetPreviousNodeTrailingComments(p),c.kind=d;const e=this.match(139);this.parseClassElementName(i),e?this.pushClassPrivateMethod(t,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAccessor,i.key),this.pushClassMethod(t,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}else{this.resetPreviousNodeTrailingComments(p);const e=this.eat(55);u.optional&&this.unexpected(m),c.kind="method";const n=this.match(139);this.parseClassElementName(c),this.parsePostMemberNameModifiers(u),n?this.pushClassPrivateMethod(t,s,e,!0):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAsync,i.key),this.pushClassMethod(t,i,e,!0,!1,!1))}}parseClassElementName(t){const{type:e,value:n}=this.state;if(132!==e&&134!==e||!t.static||"prototype"!==n||this.raise(v.StaticPrototype,this.state.startLoc),139===e){"constructor"===n&&this.raise(v.ConstructorClassPrivateField,this.state.startLoc);const e=this.parsePrivateName();return t.key=e,e}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var n;this.scope.enter(720);const r=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const i=e.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=r,t.body.push(this.finishNode(e,"StaticBlock")),null!=(n=e.decorators)&&n.length&&this.raise(v.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(v.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){const n=this.parseClassPrivateProperty(e);t.body.push(n),this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassAccessorProperty(t,e,n){n||e.computed||!this.nameIsConstructor(e.key)||this.raise(v.ConstructorClassField,e.key);const r=this.parseClassAccessorProperty(e);t.body.push(r),n&&this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassMethod(t,e,n,r,i,s){t.body.push(this.parseMethod(e,n,r,i,s,"ClassMethod",!0))}pushClassPrivateMethod(t,e,n,r){const i=this.parseMethod(e,n,r,!1,!1,"ClassPrivateMethod",!0);t.body.push(i);const s="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(592),this.expressionScope.enter(ce()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,n,r=8331){if(q(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,r);else{if(!n&&e)throw this.raise(v.MissingClassName,this.state.startLoc);t.id=null}}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){const n=this.parseMaybeImportPhase(t,!0),r=this.maybeParseExportDefaultSpecifier(t,n),i=!r||this.eat(12),s=i&&this.eatExportStar(t),o=s&&this.maybeParseExportNamespaceSpecifier(t),a=i&&(!o||this.eat(12)),l=r||s;if(s&&!o){if(r&&this.unexpected(),e)throw this.raise(v.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.sawUnambiguousESM=!0,this.finishNode(t,"ExportAllDeclaration")}const c=this.maybeParseExportNamedSpecifiers(t);let u;if(r&&i&&!s&&!c&&this.unexpected(null,5),o&&a&&this.unexpected(null,98),l||c){if(u=!1,e)throw this.raise(v.UnsupportedDecoratorExport,t);this.parseExportFrom(t,l)}else u=this.maybeParseExportDeclaration(t);if(l||c||u){var h;const n=t;if(this.checkExport(n,!0,!1,!!n.source),"ClassDeclaration"===(null==(h=n.declaration)?void 0:h.type))this.maybeTakeDecorators(e,n.declaration,n);else if(e)throw this.raise(v.UnsupportedDecoratorExport,t);return this.sawUnambiguousESM=!0,this.finishNode(n,"ExportNamedDeclaration")}if(this.eat(65)){const n=t,r=this.parseExportDefaultExpression();if(n.declaration=r,"ClassDeclaration"===r.type)this.maybeTakeDecorators(e,r,n);else if(e)throw this.raise(v.UnsupportedDecoratorExport,t);return this.checkExport(n,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(n,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==e?void 0:e.loc.start);const n=e||this.parseIdentifier(!0),r=this.startNodeAtNode(n);return r.exported=n,t.specifiers=[this.finishNode(r,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e;null!=(e=t).specifiers||(e.specifiers=[]);const n=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),n.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(n,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){const e=t;e.specifiers||(e.specifiers=[]);const n="type"===e.exportKind;return e.specifiers.push(...this.parseExportSpecifiers(n)),e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=null,!0}return!1}maybeParseExportDeclaration(t){return!!this.shouldParseExportDeclaration()&&(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=this.parseExportDeclaration(t),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;const t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){const t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(v.UnsupportedDefaultExport,this.state.startLoc);const e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:t}=this.state;if(q(t)){if(95===t&&!this.state.containsEsc||100===t)return!1;if((130===t||129===t)&&!this.state.containsEsc){const t=this.nextTokenStart(),e=this.input.charCodeAt(t);if(123===e||this.chStartsBindingIdentifier(e,t)&&!this.input.startsWith("from",t))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const e=this.nextTokenStart(),n=this.isUnparsedContextual(e,"from");if(44===this.input.charCodeAt(e)||q(this.state.type)&&n)return!0;if(this.match(65)&&n){const t=this.input.charCodeAt(this.nextTokenStartSince(e+4));return 34===t||39===t}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){const{type:t}=this.state;return 26===t&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()||this.isAwaitUsing()?(this.raise(v.UsingDeclarationExport,this.state.startLoc),!0):74===t||75===t||68===t||80===t||this.isLet()||this.isAsyncFunction()}checkExport(t,e,n,r){var i;if(e)if(n){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var s;const e=t.declaration;"Identifier"!==e.type||"from"!==e.name||e.end-e.start!=4||null!=(s=e.extra)&&s.parenthesized||this.raise(v.ExportDefaultFromAsIdentifier,e)}}else if(null!=(i=t.specifiers)&&i.length)for(const e of t.specifiers){const{exported:t}=e,n="Identifier"===t.type?t.name:t.value;if(this.checkDuplicateExports(e,n),!r&&e.local){const{local:t}=e;"Identifier"!==t.type?this.raise(v.ExportBindingIsString,e,{localName:t.value,exportName:n}):(this.checkReservedWord(t.name,t.loc.start,!0,!1),this.scope.checkLocalExport(t))}}else if(t.declaration){const e=t.declaration;if("FunctionDeclaration"===e.type||"ClassDeclaration"===e.type){const{id:n}=e;if(!n)throw new Error("Assertion failure");this.checkDuplicateExports(t,n.name)}else if("VariableDeclaration"===e.type)for(const t of e.declarations)this.checkDeclaration(t.id)}}checkDeclaration(t){if("Identifier"===t.type)this.checkDuplicateExports(t,t.name);else if("ObjectPattern"===t.type)for(const e of t.properties)this.checkDeclaration(e);else if("ArrayPattern"===t.type)for(const e of t.elements)e&&this.checkDeclaration(e);else"ObjectProperty"===t.type?this.checkDeclaration(t.value):"RestElement"===t.type?this.checkDeclaration(t.argument):"AssignmentPattern"===t.type&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&("default"===e?this.raise(v.DuplicateDefaultExport,t):this.raise(v.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){const e=[];let n=!0;for(this.expect(5);!this.eat(8);){if(n)n=!1;else if(this.expect(12),this.eat(8))break;const r=this.isContextual(130),i=this.match(134),s=this.startNode();s.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(s,i,t,r))}return e}parseExportSpecifier(t,e,n,r){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=this.cloneStringLiteral(t.local):t.exported||(t.exported=this.cloneIdentifier(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){const t=this.parseStringLiteral(this.state.value),e=De.exec(t.value);return e&&this.raise(v.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return null!=t.assertions&&t.assertions.some((({key:t,value:e})=>"json"===e.value&&("Identifier"===t.type?"type"===t.name:"type"===t.value)))}checkImportReflection(t){const{specifiers:e}=t,n=1===e.length?e[0].type:null;if("source"===t.phase)"ImportDefaultSpecifier"!==n&&this.raise(v.SourcePhaseImportRequiresDefault,e[0].loc.start);else if("defer"===t.phase)"ImportNamespaceSpecifier"!==n&&this.raise(v.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var r;"ImportDefaultSpecifier"!==n&&this.raise(v.ImportReflectionNotBinding,e[0].loc.start),(null==(r=t.assertions)?void 0:r.length)>0&&this.raise(v.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&"ExportAllDeclaration"!==t.type){const{specifiers:e}=t;if(null!=e){const t=e.find((t=>{let e;if("ExportSpecifier"===t.type?e=t.local:"ImportSpecifier"===t.type&&(e=t.imported),void 0!==e)return"Identifier"===e.type?"default"!==e.name:"default"!==e.value}));void 0!==t&&this.raise(v.ImportJSONBindingNotDefault,t.loc.start)}}}isPotentialImportPhase(t){return!t&&(this.isContextual(105)||this.isContextual(97)||this.isContextual(127))}applyImportPhase(t,e,n,r){e||("module"===n?(this.expectPlugin("importReflection",r),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),"source"===n?(this.expectPlugin("sourcePhaseImports",r),t.phase="source"):"defer"===n?(this.expectPlugin("deferredImportEvaluation",r),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;const n=this.startNode(),r=this.parseIdentifierName(!0),{type:i}=this.state;return($(i)?98!==i||102===this.lookaheadCharCode():12!==i)?(this.applyImportPhase(t,e,r,n.loc.start),null):(this.applyImportPhase(t,e,null),this.createIdentifier(n,r))}isPrecedingIdImportPhase(t){const{type:e}=this.state;return q(e)?98!==e||102===this.lookaheadCharCode():12!==e}parseImport(t){return this.match(134)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];const n=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),r=n&&this.maybeParseStarImportSpecifier(t);return n&&!r&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){return null!=t.specifiers||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,n){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,n))}finishImportSpecifier(t,e,n=8201){return this.checkLVal(t.local,{type:e},n),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);const t=[],e=new Set;do{if(this.match(8))break;const n=this.startNode(),r=this.state.value;if(e.has(r)&&this.raise(v.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:r}),e.add(r),this.match(134)?n.key=this.parseStringLiteral(r):n.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){const t=[],e=new Set;do{const n=this.startNode();if(n.key=this.parseIdentifier(!0),"type"!==n.key.name&&this.raise(v.ModuleAttributeDifferentFromType,n.key),e.has(n.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,n.key,{key:n.key.name}),e.add(n.key.name),this.expect(14),!this.match(134))throw this.raise(v.ModuleAttributeInvalidValue,this.state.startLoc);n.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(n,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var n=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?(e=this.parseModuleAttributes(),this.addExtra(t,"deprecatedWithLegacySyntax",!0)):e=this.parseImportAttributes(),n=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(this.hasPlugin("deprecatedImportAssert")||this.hasPlugin("importAssertions")||this.raise(v.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(t,"deprecatedAssertSyntax",!0),this.next(),e=this.parseImportAttributes()):e=[];!n&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){const n=this.startNodeAtNode(e);return n.local=e,t.specifiers.push(this.finishImportSpecifier(n,"ImportDefaultSpecifier")),!0}return!!$(this.state.type)&&(this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(t){if(this.match(55)){const e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}const n=this.startNode(),r=this.match(134),i=this.isContextual(130);n.imported=this.parseModuleExportName();const s=this.parseImportSpecifier(n,r,"type"===t.importKind||"typeof"===t.importKind,i,void 0);t.specifiers.push(s)}}parseImportSpecifier(t,e,n,r,i){if(this.eatContextual(93))t.local=this.parseIdentifier();else{const{imported:n}=t;if(e)throw this.raise(v.ImportBindingIsString,t,{importName:n.value});this.checkReservedWord(n.name,t.loc.start,!0,!0),t.local||(t.local=this.cloneIdentifier(n))}return this.finishImportSpecifier(t,"ImportSpecifier",i)}isThisParam(t){return"Identifier"===t.type&&"this"===t.name}}class Re extends Be{constructor(t,e,n){const r=function(t){const e={sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};if(null==t)return e;if(null!=t.annexB&&!1!==t.annexB)throw new Error("The `annexB` option can only be set to `false`.");for(const n of Object.keys(e))null!=t[n]&&(e[n]=t[n]);if(1===e.startLine)null==t.startIndex&&e.startColumn>0?e.startIndex=e.startColumn:null==t.startColumn&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((null==t.startColumn||null==t.startIndex)&&null!=t.startIndex)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if("commonjs"===e.sourceType){if(null!=t.allowAwaitOutsideFunction)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(null!=t.allowReturnOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(null!=t.allowNewTargetOutsideFunction)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return e}(t);super(r,e),this.options=r,this.initializeScopes(),this.plugins=n,this.filename=r.sourceFilename,this.startIndex=r.startIndex;let i=0;r.allowAwaitOutsideFunction&&(i|=1),r.allowReturnOutsideFunction&&(i|=2),r.allowImportExportEverywhere&&(i|=8),r.allowSuperOutsideMethod&&(i|=16),r.allowUndeclaredExports&&(i|=64),r.allowNewTargetOutsideFunction&&(i|=4),r.allowYieldOutsideFunction&&(i|=32),r.ranges&&(i|=128),r.tokens&&(i|=256),r.createImportExpressions&&(i|=512),r.createParenthesizedExpressions&&(i|=1024),r.errorRecovery&&(i|=2048),r.attachComment&&(i|=4096),r.annexB&&(i|=8192),this.optionFlags=i}getScopeHandler(){return gt}parse(){this.enterInitialScopes();const t=this.startNode(),e=this.startNode();this.nextToken(),t.errors=null;const n=this.parseTopLevel(t,e);return n.errors=this.state.errors,n.comments.length=this.state.commentsLen,n}}!function(t){const e={};for(const n of Object.keys(t))e[n]=Z(t[n])}(z);const Fe=new Map;e.YK=function(t,e){const n=function(t,e){let n=Re;const r=new Map;if(null!=t&&t.plugins){for(const e of t.plugins){let t,n;"string"==typeof e?t=e:[t,n]=e,r.has(t)||r.set(t,n||{})}!function(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const e=t.get("decorators").decoratorsBeforeExport;if(null!=e&&"boolean"!=typeof e)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const n=t.get("decorators").allowCallParenthesized;if(null!=n&&"boolean"!=typeof n)throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){var e;const r=t.get("pipelineOperator").proposal;if(!Me.includes(r)){const t=Me.map((t=>`"${t}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${t}.`)}if("hack"===r){var n;if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const e=t.get("pipelineOperator").topicToken;if(!Ce.includes(e)){const t=Ce.map((t=>`"${t}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${t}.`)}if("#"===e&&"hash"===(null==(n=t.get("recordAndTuple"))?void 0:n.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}else if("smart"===r&&"hash"===(null==(e=t.get("recordAndTuple"))?void 0:e.syntaxType))throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}if(t.has("moduleAttributes")){if(t.has("deprecatedImportAssert")||t.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if("may-2020"!==t.get("moduleAttributes").version)throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(t.has("importAssertions")&&t.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(t.has("deprecatedImportAssert")||t.has("importAttributes")&&t.get("importAttributes").deprecatedAssertSyntax&&t.set("deprecatedImportAssert",{}),t.has("recordAndTuple")){const e=t.get("recordAndTuple").syntaxType;if(null!=e){const t=["hash","bar"];if(!t.includes(e))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+t.map((t=>`'${t}'`)).join(", "))}}if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){const t=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw t.missingPlugins="doExpressions",t}if(t.has("optionalChainingAssign")&&"2023-07"!==t.get("optionalChainingAssign").version)throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(t.has("discardBinding")&&"void"!==t.get("discardBinding").syntaxType)throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}(r),n=function(t){const e=[];for(const n of Ie)t.has(n)&&e.push(n);const n=e.join("|");let r=Fe.get(n);if(!r){r=Re;for(const t of e)r=ke[t](r);Fe.set(n,r)}return r}(r)}return new n(t,e,r)}(e,t);return n.options.strictMode&&(n.state.strict=!0),n.getExpression()}},69442:(t,e,n)=>{var r=n(6708),i=n(15166),s=n(93308);const o=(0,r.defineAliasedType)("TypeScript"),a=(0,r.assertValueType)("boolean"),l=()=>({returnType:{validate:(0,r.assertNodeType)("TSTypeAnnotation","Noop"),optional:!0},typeParameters:{validate:(0,r.assertNodeType)("TSTypeParameterDeclaration","Noop"),optional:!0}});o("TSParameterProperty",{aliases:["LVal"],visitor:["parameter"],fields:{accessibility:{validate:(0,r.assertOneOf)("public","private","protected"),optional:!0},readonly:{validate:(0,r.assertValueType)("boolean"),optional:!0},parameter:{validate:(0,r.assertNodeType)("Identifier","AssignmentPattern")},override:{validate:(0,r.assertValueType)("boolean"),optional:!0},decorators:{validate:(0,r.arrayOfType)("Decorator"),optional:!0}}}),o("TSDeclareFunction",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","params","returnType"],fields:Object.assign({},(0,i.functionDeclarationCommon)(),l())}),o("TSDeclareMethod",Object.assign({visitor:["decorators","key","typeParameters","params","returnType"]},(0,i.classMethodOrPropertyUnionShapeCommon)(),{fields:Object.assign({},(0,i.classMethodOrDeclareMethodCommon)(),l())})),o("TSQualifiedName",{aliases:["TSEntityName"],visitor:["left","right"],fields:{left:(0,r.validateType)("TSEntityName"),right:(0,r.validateType)("Identifier")}});const c=()=>({typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),parameters:(0,r.validateArrayOfType)("ArrayPattern","Identifier","ObjectPattern","RestElement"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")}),u={aliases:["TSTypeElement"],visitor:["typeParameters","parameters","typeAnnotation"],fields:c()};o("TSCallSignatureDeclaration",u),o("TSConstructSignatureDeclaration",u);const h=()=>({key:(0,r.validateType)("Expression"),computed:{default:!1},optional:(0,r.validateOptional)(a)});o("TSPropertySignature",{aliases:["TSTypeElement"],visitor:["key","typeAnnotation"],fields:Object.assign({},h(),{readonly:(0,r.validateOptional)(a),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),kind:{optional:!0,validate:(0,r.assertOneOf)("get","set")}})}),o("TSMethodSignature",{aliases:["TSTypeElement"],visitor:["key","typeParameters","parameters","typeAnnotation"],fields:Object.assign({},c(),h(),{kind:{validate:(0,r.assertOneOf)("method","get","set")}})}),o("TSIndexSignature",{aliases:["TSTypeElement"],visitor:["parameters","typeAnnotation"],fields:{readonly:(0,r.validateOptional)(a),static:(0,r.validateOptional)(a),parameters:(0,r.validateArrayOfType)("Identifier"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation")}});const p=["TSAnyKeyword","TSBooleanKeyword","TSBigIntKeyword","TSIntrinsicKeyword","TSNeverKeyword","TSNullKeyword","TSNumberKeyword","TSObjectKeyword","TSStringKeyword","TSSymbolKeyword","TSUndefinedKeyword","TSUnknownKeyword","TSVoidKeyword"];for(const t of p)o(t,{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});o("TSThisType",{aliases:["TSType","TSBaseType"],visitor:[],fields:{}});const d={aliases:["TSType"],visitor:["typeParameters","parameters","typeAnnotation"]};o("TSFunctionType",Object.assign({},d,{fields:c()})),o("TSConstructorType",Object.assign({},d,{fields:Object.assign({},c(),{abstract:(0,r.validateOptional)(a)})})),o("TSTypeReference",{aliases:["TSType"],visitor:["typeName","typeParameters"],fields:{typeName:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSTypePredicate",{aliases:["TSType"],visitor:["parameterName","typeAnnotation"],builder:["parameterName","typeAnnotation","asserts"],fields:{parameterName:(0,r.validateType)("Identifier","TSThisType"),typeAnnotation:(0,r.validateOptionalType)("TSTypeAnnotation"),asserts:(0,r.validateOptional)(a)}}),o("TSTypeQuery",{aliases:["TSType"],visitor:["exprName","typeParameters"],fields:{exprName:(0,r.validateType)("TSEntityName","TSImportType"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSTypeLiteral",{aliases:["TSType"],visitor:["members"],fields:{members:(0,r.validateArrayOfType)("TSTypeElement")}}),o("TSArrayType",{aliases:["TSType"],visitor:["elementType"],fields:{elementType:(0,r.validateType)("TSType")}}),o("TSTupleType",{aliases:["TSType"],visitor:["elementTypes"],fields:{elementTypes:(0,r.validateArrayOfType)("TSType","TSNamedTupleMember")}}),o("TSOptionalType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSRestType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSNamedTupleMember",{visitor:["label","elementType"],builder:["label","elementType","optional"],fields:{label:(0,r.validateType)("Identifier"),optional:{validate:a,default:!1},elementType:(0,r.validateType)("TSType")}});const f={aliases:["TSType"],visitor:["types"],fields:{types:(0,r.validateArrayOfType)("TSType")}};o("TSUnionType",f),o("TSIntersectionType",f),o("TSConditionalType",{aliases:["TSType"],visitor:["checkType","extendsType","trueType","falseType"],fields:{checkType:(0,r.validateType)("TSType"),extendsType:(0,r.validateType)("TSType"),trueType:(0,r.validateType)("TSType"),falseType:(0,r.validateType)("TSType")}}),o("TSInferType",{aliases:["TSType"],visitor:["typeParameter"],fields:{typeParameter:(0,r.validateType)("TSTypeParameter")}}),o("TSParenthesizedType",{aliases:["TSType"],visitor:["typeAnnotation"],fields:{typeAnnotation:(0,r.validateType)("TSType")}}),o("TSTypeOperator",{aliases:["TSType"],visitor:["typeAnnotation"],builder:["typeAnnotation","operator"],fields:{operator:{validate:(0,r.assertValueType)("string"),default:"keyof"},typeAnnotation:(0,r.validateType)("TSType")}}),o("TSIndexedAccessType",{aliases:["TSType"],visitor:["objectType","indexType"],fields:{objectType:(0,r.validateType)("TSType"),indexType:(0,r.validateType)("TSType")}}),o("TSMappedType",{aliases:["TSType"],visitor:["typeParameter","nameType","typeAnnotation"],builder:["typeParameter","typeAnnotation","nameType"],fields:Object.assign({},{typeParameter:(0,r.validateType)("TSTypeParameter")},{readonly:(0,r.validateOptional)((0,r.assertOneOf)(!0,!1,"+","-")),optional:(0,r.validateOptional)((0,r.assertOneOf)(!0,!1,"+","-")),typeAnnotation:(0,r.validateOptionalType)("TSType"),nameType:(0,r.validateOptionalType)("TSType")})}),o("TSTemplateLiteralType",{aliases:["TSType","TSBaseType"],visitor:["quasis","types"],fields:{quasis:(0,r.validateArrayOfType)("TemplateElement"),types:{validate:(0,r.chain)((0,r.assertValueType)("array"),(0,r.assertEach)((0,r.assertNodeType)("TSType")),(function(t,e,n){if(t.quasis.length!==n.length+1)throw new TypeError(`Number of ${t.type} quasis should be exactly one more than the number of types.\nExpected ${n.length+1} quasis but got ${t.quasis.length}`)}))}}}),o("TSLiteralType",{aliases:["TSType","TSBaseType"],visitor:["literal"],fields:{literal:{validate:function(){const t=(0,r.assertNodeType)("NumericLiteral","BigIntLiteral"),e=(0,r.assertOneOf)("-"),n=(0,r.assertNodeType)("NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral"),i=function(r,i,o){(0,s.default)("UnaryExpression",o)?(e(o,"operator",o.operator),t(o,"argument",o.argument)):n(r,i,o)};return i.oneOfNodeTypes=["NumericLiteral","StringLiteral","BooleanLiteral","BigIntLiteral","TemplateLiteral","UnaryExpression"],i}()}}}),o("TSExpressionWithTypeArguments",{aliases:["TSType"],visitor:["expression","typeParameters"],fields:{expression:(0,r.validateType)("TSEntityName"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}}),o("TSInterfaceDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","extends","body"],fields:{declare:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),extends:(0,r.validateOptional)((0,r.arrayOfType)("TSExpressionWithTypeArguments")),body:(0,r.validateType)("TSInterfaceBody")}}),o("TSInterfaceBody",{visitor:["body"],fields:{body:(0,r.validateArrayOfType)("TSTypeElement")}}),o("TSTypeAliasDeclaration",{aliases:["Statement","Declaration"],visitor:["id","typeParameters","typeAnnotation"],fields:{declare:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterDeclaration"),typeAnnotation:(0,r.validateType)("TSType")}}),o("TSInstantiationExpression",{aliases:["Expression"],visitor:["expression","typeParameters"],fields:{expression:(0,r.validateType)("Expression"),typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")}});const m={aliases:["Expression","LVal","PatternLike"],visitor:["expression","typeAnnotation"],fields:{expression:(0,r.validateType)("Expression"),typeAnnotation:(0,r.validateType)("TSType")}};o("TSAsExpression",m),o("TSSatisfiesExpression",m),o("TSTypeAssertion",{aliases:["Expression","LVal","PatternLike"],visitor:["typeAnnotation","expression"],fields:{typeAnnotation:(0,r.validateType)("TSType"),expression:(0,r.validateType)("Expression")}}),o("TSEnumBody",{visitor:["members"],fields:{members:(0,r.validateArrayOfType)("TSEnumMember")}}),o("TSEnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","members"],fields:{declare:(0,r.validateOptional)(a),const:(0,r.validateOptional)(a),id:(0,r.validateType)("Identifier"),members:(0,r.validateArrayOfType)("TSEnumMember"),initializer:(0,r.validateOptionalType)("Expression"),body:(0,r.validateOptionalType)("TSEnumBody")}}),o("TSEnumMember",{visitor:["id","initializer"],fields:{id:(0,r.validateType)("Identifier","StringLiteral"),initializer:(0,r.validateOptionalType)("Expression")}}),o("TSModuleDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:Object.assign({kind:{validate:(0,r.assertOneOf)("global","module","namespace")},declare:(0,r.validateOptional)(a)},{global:(0,r.validateOptional)(a)},{id:(0,r.validateType)("Identifier","StringLiteral"),body:(0,r.validateType)("TSModuleBlock","TSModuleDeclaration")})}),o("TSModuleBlock",{aliases:["Scopable","Block","BlockParent","FunctionParent"],visitor:["body"],fields:{body:(0,r.validateArrayOfType)("Statement")}}),o("TSImportType",{aliases:["TSType"],builder:["argument","qualifier","typeParameters"],visitor:["argument","options","qualifier","typeParameters"],fields:Object.assign({},{argument:(0,r.validateType)("StringLiteral")},{qualifier:(0,r.validateOptionalType)("TSEntityName")},{typeParameters:(0,r.validateOptionalType)("TSTypeParameterInstantiation")},{options:{validate:(0,r.assertNodeType)("ObjectExpression"),optional:!0}})}),o("TSImportEqualsDeclaration",{aliases:["Statement","Declaration"],visitor:["id","moduleReference"],fields:Object.assign({},{isExport:(0,r.validate)(a)},{id:(0,r.validateType)("Identifier"),moduleReference:(0,r.validateType)("TSEntityName","TSExternalModuleReference"),importKind:{validate:(0,r.assertOneOf)("type","value"),optional:!0}})}),o("TSExternalModuleReference",{visitor:["expression"],fields:{expression:(0,r.validateType)("StringLiteral")}}),o("TSNonNullExpression",{aliases:["Expression","LVal","PatternLike"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),o("TSExportAssignment",{aliases:["Statement"],visitor:["expression"],fields:{expression:(0,r.validateType)("Expression")}}),o("TSNamespaceExportDeclaration",{aliases:["Statement"],visitor:["id"],fields:{id:(0,r.validateType)("Identifier")}}),o("TSTypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:{validate:(0,r.assertNodeType)("TSType")}}}),o("TSTypeParameterInstantiation",{visitor:["params"],fields:{params:(0,r.validateArrayOfType)("TSType")}}),o("TSTypeParameterDeclaration",{visitor:["params"],fields:{params:(0,r.validateArrayOfType)("TSTypeParameter")}}),o("TSTypeParameter",{builder:["constraint","default","name"],visitor:["constraint","default"],fields:{name:{validate:(0,r.assertValueType)("string")},in:{validate:(0,r.assertValueType)("boolean"),optional:!0},out:{validate:(0,r.assertValueType)("boolean"),optional:!0},const:{validate:(0,r.assertValueType)("boolean"),optional:!0},constraint:{validate:(0,r.assertNodeType)("TSType"),optional:!0},default:{validate:(0,r.assertNodeType)("TSType"),optional:!0}}})},69517:(t,e,n)=>{var r=n(23486),i=n(9106),s=n(84538),o=n(71856),a=TypeError,l=o.get,c=o.has,u=o.set;r({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var n=s(this),r=arguments.length;i(e);var o=c(n,t);if(!o&&r<3)throw new a("Updating absent value");var h=o?l(n,t):i(r>2?arguments[2]:void 0)(t,n);return u(n,t,e(h,t,n)),n}})},69551:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LogicalExpression=e.AssignmentExpression=function(t){this.print(t.left),this.space(),this.token(t.operator,!1,0,!0),this.space(),this.print(t.right)},e.AssignmentPattern=function(t){this.print(t.left),("Identifier"===t.left.type||c(t.left))&&(t.left.optional&&this.tokenChar(63),this.print(t.left.typeAnnotation)),this.space(),this.tokenChar(61),this.space(),this.print(t.right)},e.AwaitExpression=function(t){this.word("await"),this.space(),this.print(t.argument)},e.BinaryExpression=function(t){this.print(t.left),this.space();const{operator:e}=t;105===e.charCodeAt(0)?this.word(e):(this.token(e,!1,0,!0),this.setLastChar(e.charCodeAt(e.length-1))),this.space(),this.print(t.right)},e.BindExpression=function(t){this.print(t.object),this.token("::"),this.print(t.callee)},e.CallExpression=function(t){this.print(t.callee),this.print(t.typeArguments),this.print(t.typeParameters),this.tokenChar(40);const e=this.enterDelimited();this.printList(t.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=e,this.rightParens(t)},e.ConditionalExpression=function(t){this.print(t.test),this.space(),this.tokenChar(63),this.space(),this.print(t.consequent),this.space(),this.tokenChar(58),this.space(),this.print(t.alternate)},e.Decorator=function(t){this.tokenChar(64);const{expression:e}=t;this.print(e),this.newline()},e.DoExpression=function(t){t.async&&(this.word("async",!0),this.space()),this.word("do"),this.space(),this.print(t.body)},e.EmptyStatement=function(){this.semicolon(!0)},e.ExpressionStatement=function(t){this.tokenContext|=i.TokenContext.expressionStatement,this.print(t.expression),this.semicolon()},e.Import=function(){this.word("import")},e.MemberExpression=function(t){if(this.print(t.object),!t.computed&&a(t.property))throw new TypeError("Got a MemberExpression for MemberExpression property");let e=t.computed;if(o(t.property)&&"number"==typeof t.property.value&&(e=!0),e){const e=this.enterDelimited();this.tokenChar(91),this.print(t.property,void 0,!0),this.tokenChar(93),this._noLineTerminatorAfterNode=e}else this.tokenChar(46),this.print(t.property)},e.MetaProperty=function(t){this.print(t.meta),this.tokenChar(46),this.print(t.property)},e.ModuleExpression=function(t){this.word("module",!0),this.space(),this.tokenChar(123),this.indent();const{body:e}=t;(e.body.length||e.directives.length)&&this.newline(),this.print(e),this.dedent(),this.rightBrace(t)},e.NewExpression=function(t,e){if(this.word("new"),this.space(),this.print(t.callee),this.format.minified&&0===t.arguments.length&&!t.optional&&!s(e,{callee:t})&&!a(e)&&!l(e))return;if(this.print(t.typeArguments),this.print(t.typeParameters),t.optional&&this.token("?."),0===t.arguments.length&&this.tokenMap&&!this.tokenMap.endMatches(t,")"))return;this.tokenChar(40);const n=this.enterDelimited();this.printList(t.arguments,this.shouldPrintTrailingComma(")"),void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=n,this.rightParens(t)},e.OptionalCallExpression=function(t){this.print(t.callee),this.print(t.typeParameters),t.optional&&this.token("?."),this.print(t.typeArguments),this.tokenChar(40);const e=this.enterDelimited();this.printList(t.arguments,void 0,void 0,void 0,void 0,!0),this._noLineTerminatorAfterNode=e,this.rightParens(t)},e.OptionalMemberExpression=function(t){let{computed:e}=t;const{optional:n,property:r}=t;if(this.print(t.object),!e&&a(r))throw new TypeError("Got a MemberExpression for MemberExpression property");o(r)&&"number"==typeof r.value&&(e=!0),n&&this.token("?."),e?(this.tokenChar(91),this.print(r),this.tokenChar(93)):(n||this.tokenChar(46),this.print(r))},e.ParenthesizedExpression=function(t){this.tokenChar(40);const e=this.enterDelimited();this.print(t.expression,void 0,!0),this._noLineTerminatorAfterNode=e,this.rightParens(t)},e.PrivateName=function(t){this.tokenChar(35),this.print(t.id)},e.SequenceExpression=function(t){this.printList(t.expressions)},e.Super=function(){this.word("super")},e.ThisExpression=function(){this.word("this")},e.UnaryExpression=function(t){const{operator:e}=t,n=e.charCodeAt(0);n>=97&&n<=122?(this.word(e),this.space()):this.tokenChar(n),this.print(t.argument)},e.UpdateExpression=function(t){t.prefix?(this.token(t.operator,!1,0,!0),this.print(t.argument)):(this.print(t.argument,!0),this.token(t.operator,!1,0,!0))},e.V8IntrinsicIdentifier=function(t){this.tokenChar(37),this.word(t.name)},e.YieldExpression=function(t){t.delegate?(this.word("yield",!0),this.tokenChar(42),t.argument&&(this.space(),this.print(t.argument))):t.argument?(this.word("yield",!0),this.space(),this.print(t.argument)):this.word("yield")},e._shouldPrintDecoratorsBeforeExport=function(t){return"boolean"==typeof this.format.decoratorsBeforeExport?this.format.decoratorsBeforeExport:"number"==typeof t.start&&t.start===t.declaration.start};var r=n(56872),i=n(91317);const{isCallExpression:s,isLiteral:o,isMemberExpression:a,isNewExpression:l,isPattern:c}=r},69959:(t,e,n)=>{var r,i,s=n(51192),o=n(83983),a=s.process,l=s.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(i=(r=u.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(!(r=o.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},70140:(t,e,n)=>{var r=n(23486),i=n(62837),s=n(71755).remove;r({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),n=!0,r=0,o=arguments.length;r<o;r++)t=s(e,arguments[r]),n=n&&t;return!!n}})},71147:(t,e,n)=>{var r=n(17267),i=n(23878),s=n(64813),o=n(55317),a=n(83115)("iterator");t.exports=function(t){if(!s(t))return i(t,a)||i(t,"@@iterator")||o[r(t)]}},71437:(t,e,n)=>{n.d(e,{A:()=>s});var r=n(14526);const i={global:"g",ignoreCase:"i",multiline:"m",dotAll:"s",sticky:"y",unicode:"u"};function s(t,e={}){if(!(0,r.A)(t))throw new TypeError("Expected a RegExp instance");const n=Object.keys(i).map((n=>("boolean"==typeof e[n]?e[n]:t[n])?i[n]:"")).join(""),s=new RegExp(e.source||t.source,n);return s.lastIndex="number"==typeof e.lastIndex?e.lastIndex:t.lastIndex,s}},71464:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(67583),i=n(53287);e.default=function t(e){if(void 0===e)return(0,i.identifier)("undefined");if(!0===e||!1===e)return(0,i.booleanLiteral)(e);if(null===e)return(0,i.nullLiteral)();if("string"==typeof e)return(0,i.stringLiteral)(e);if("number"==typeof e){let t;if(Number.isFinite(e))t=(0,i.numericLiteral)(Math.abs(e));else{let n;n=Number.isNaN(e)?(0,i.numericLiteral)(0):(0,i.numericLiteral)(1),t=(0,i.binaryExpression)("/",n,(0,i.numericLiteral)(0))}return(e<0||Object.is(e,-0))&&(t=(0,i.unaryExpression)("-",t)),t}if("bigint"==typeof e)return e<0?(0,i.unaryExpression)("-",(0,i.bigIntLiteral)(-e)):(0,i.bigIntLiteral)(e);if(function(t){return"[object RegExp]"===s(t)}(e)){const t=e.source,n=/\/([a-z]*)$/.exec(e.toString())[1];return(0,i.regExpLiteral)(t,n)}if(Array.isArray(e))return(0,i.arrayExpression)(e.map(t));if(function(t){if("object"!=typeof t||null===t||"[object Object]"!==Object.prototype.toString.call(t))return!1;const e=Object.getPrototypeOf(t);return null===e||null===Object.getPrototypeOf(e)}(e)){const n=[];for(const s of Object.keys(e)){let o,a=!1;(0,r.default)(s)?"__proto__"===s?(a=!0,o=(0,i.stringLiteral)(s)):o=(0,i.identifier)(s):o=(0,i.stringLiteral)(s),n.push((0,i.objectProperty)(o,t(e[s]),a))}return(0,i.objectExpression)(n)}throw new Error("don't know how to turn this value into a node")};const s=Function.call.bind(Object.prototype.toString)},71520:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,r,i,s=t[1]||"",o=t[3];if(!o)return s;if(e&&"function"==typeof btoa){var a=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(t){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(t," */")}));return[s].concat(l).concat([a]).join("\n")}return[s].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"==typeof t&&(t=[[null,t,""]]);var i={};if(r)for(var s=0;s<this.length;s++){var o=this[s][0];null!=o&&(i[o]=!0)}for(var a=0;a<t.length;a++){var l=[].concat(t[a]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},71581:(t,e,n)=>{var r=n(6708),i=n(81883),s=n(15166);const o=(0,r.defineAliasedType)("Miscellaneous");o("Noop",{visitor:[]}),o("Placeholder",{visitor:[],builder:["expectedNode","name"],fields:Object.assign({name:{validate:(0,r.assertNodeType)("Identifier")},expectedNode:{validate:(0,r.assertOneOf)(...i.PLACEHOLDERS)}},(0,s.patternLikeCommon)())}),o("V8IntrinsicIdentifier",{builder:["name"],fields:{name:{validate:(0,r.assertValueType)("string")}}})},71725:t=>{var e=RangeError;t.exports=function(t){if(t==t)return t;throw new e("NaN is not allowed")}},71747:(t,e,n)=>{var r=n(52069).has;t.exports=function(t){return r(t),t}},71755:(t,e,n)=>{var r=n(26600),i=WeakMap.prototype;t.exports={WeakMap,set:r(i.set),get:r(i.get),has:r(i.has),remove:r(i.delete)}},71853:(t,e,n)=>{var r=n(37400),i=n(26600),s=n(24215),o=n(49421),a=n(55953),l=n(5550),c=n(76128),u=n(7890),h=Array,p=i([].push);t.exports=function(t,e,n,i){for(var d,f,m,y=o(t),g=s(y),v=r(e,n),b=c(null),T=l(g),x=0;T>x;x++)m=g[x],(f=a(v(m,x,y)))in b?p(b[f],m):b[f]=[m];if(i&&(d=i(y))!==h)for(f in b)b[f]=u(d,b[f]);return b}},71856:(t,e,n)=>{var r=n(26600),i=Map.prototype;t.exports={Map,set:r(i.set),get:r(i.get),has:r(i.has),remove:r(i.delete),proto:i}},72219:(t,e,n)=>{var r=n(23486),i=n(51192),s=n(52479),o=n(21804),a=n(24377).f,l=n(22521),c=n(99071),u=n(61143),h=n(75763),p=n(30914),d=n(32457),f=n(14852),m=n(86115),y="DOMException",g=s("Error"),v=s(y),b=function(){c(this,T);var t=arguments.length,e=h(t<1?void 0:arguments[0]),n=h(t<2?void 0:arguments[1],"Error"),r=new v(e,n),i=new g(e);return i.name=y,a(r,"stack",o(1,d(i.stack,1))),u(r,this,b),r},T=b.prototype=v.prototype,x="stack"in new g(y),S="stack"in new v(1,2),w=v&&f&&Object.getOwnPropertyDescriptor(i,y),E=!(!w||w.writable&&w.configurable),A=x&&!E&&!S;r({global:!0,constructor:!0,forced:m||A},{DOMException:A?b:v});var P=s(y),M=P.prototype;if(M.constructor!==P)for(var C in m||a(M,"constructor",o(1,P)),p)if(l(p,C)){var k=p[C],I=k.s;l(P,I)||a(P,I,o(6,k.c))}},72341:(t,e,n)=>{var r=n(51192),i=n(59767),s=r.RegExp,o=!i((function(){var t=!0;try{s(".","d")}catch(e){t=!1}var e={},n="",r=t?"dgimsy":"gimsy",i=function(t,r){Object.defineProperty(e,t,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in t&&(o.hasIndices="d"),o)i(a,o[a]);return Object.getOwnPropertyDescriptor(s.prototype,"flags").get.call(e)!==r||n!==r}));t.exports={correct:o}},72468:(t,e,n)=>{var r=n(51192),i=n(9671),s=n(24377).f,o=n(1483).f,a=r.Symbol;if(i("dispose"),a){var l=o(a,"dispose");l.enumerable&&l.configurable&&l.writable&&s(a,"dispose",{value:l.value,enumerable:!1,configurable:!1,writable:!1})}},72673:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(45632),o=n(27293);r({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=o(e,(function(t){if(n(t,t,e))return{value:t}}),!0);return r&&r.value}})},73035:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(77802);r({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return i(o,this,s(t))}})},73357:(t,e,n)=>{var r=n(83115),i=n(76128),s=n(24377).f,o=r("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:i(null)}),t.exports=function(t){a[o][t]=!0}},73421:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var r=+t;return(r>0?n:e)(r)}},73968:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.default)(t)&&!i.has(t)};var r=n(67583);const i=new Set(["abstract","boolean","byte","char","double","enum","final","float","goto","implements","int","interface","long","native","package","private","protected","public","short","static","synchronized","throws","transient","volatile"])},74278:(t,e,n)=>{var r=n(45632),i=n(86058),s=n(27293),o=n(35525);t.exports=function(t){var e=r(this),n=o(t);return!(i(e)>n.size)&&!1!==s(e,(function(t){if(!n.includes(t))return!1}),!0)}},74325:(t,e,n)=>{var r=n(46324),i=n(87478),s=n(82402),o=n(3527).Buffer,a=n(91586),l=n(725),c=n(67432),u=o.alloc(128);function h(t,e){s.call(this,"digest"),"string"==typeof e&&(e=o.from(e));var n="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>n?e=("rmd160"===t?new l:c(t)).update(e).digest():e.length<n&&(e=o.concat([e,u],n));for(var r=this._ipad=o.allocUnsafe(n),i=this._opad=o.allocUnsafe(n),a=0;a<n;a++)r[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new l:c(t),this._hash.update(r)}r(h,s),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new l:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(a,e):new h(t,e)}},74454:(t,e,n)=>{var r=n(3527).Buffer,i=r.alloc(16,0);function s(t){var e=r.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function o(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}o.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},o.prototype._multiply=function(){for(var t,e,n,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],o=-1;++o<128;){for(!!(this.state[~~(o/8)]&1<<7-o%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=!!(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=s(i)},o.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},o.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(s([0,t,0,e])),this.state},t.exports=o},75272:(t,e,n)=>{function r(t,e){const n=String(t);if("string"!=typeof e)throw new TypeError("Expected character");let r=0,i=n.indexOf(e);for(;-1!==i;)r++,i=n.indexOf(e,i+e.length);return r}n.d(e,{D:()=>r})},75518:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.anyTypeAnnotation=function(){return{type:"AnyTypeAnnotation"}},e.argumentPlaceholder=function(){return{type:"ArgumentPlaceholder"}},e.arrayExpression=function(t=[]){const e={type:"ArrayExpression",elements:t},n=a.ArrayExpression;return o(n.elements,e,"elements",t,1),e},e.arrayPattern=function(t){const e={type:"ArrayPattern",elements:t},n=a.ArrayPattern;return o(n.elements,e,"elements",t,1),e},e.arrayTypeAnnotation=function(t){const e={type:"ArrayTypeAnnotation",elementType:t},n=a.ArrayTypeAnnotation;return o(n.elementType,e,"elementType",t,1),e},e.arrowFunctionExpression=function(t,e,n=!1){const r={type:"ArrowFunctionExpression",params:t,body:e,async:n,expression:null},i=a.ArrowFunctionExpression;return o(i.params,r,"params",t,1),o(i.body,r,"body",e,1),o(i.async,r,"async",n),r},e.assignmentExpression=function(t,e,n){const r={type:"AssignmentExpression",operator:t,left:e,right:n},i=a.AssignmentExpression;return o(i.operator,r,"operator",t),o(i.left,r,"left",e,1),o(i.right,r,"right",n,1),r},e.assignmentPattern=function(t,e){const n={type:"AssignmentPattern",left:t,right:e},r=a.AssignmentPattern;return o(r.left,n,"left",t,1),o(r.right,n,"right",e,1),n},e.awaitExpression=function(t){const e={type:"AwaitExpression",argument:t},n=a.AwaitExpression;return o(n.argument,e,"argument",t,1),e},e.bigIntLiteral=function(t){"bigint"==typeof t&&(t=t.toString());const e={type:"BigIntLiteral",value:t},n=a.BigIntLiteral;return o(n.value,e,"value",t),e},e.binaryExpression=function(t,e,n){const r={type:"BinaryExpression",operator:t,left:e,right:n},i=a.BinaryExpression;return o(i.operator,r,"operator",t),o(i.left,r,"left",e,1),o(i.right,r,"right",n,1),r},e.bindExpression=function(t,e){const n={type:"BindExpression",object:t,callee:e},r=a.BindExpression;return o(r.object,n,"object",t,1),o(r.callee,n,"callee",e,1),n},e.blockStatement=function(t,e=[]){const n={type:"BlockStatement",body:t,directives:e},r=a.BlockStatement;return o(r.body,n,"body",t,1),o(r.directives,n,"directives",e,1),n},e.booleanLiteral=function(t){const e={type:"BooleanLiteral",value:t},n=a.BooleanLiteral;return o(n.value,e,"value",t),e},e.booleanLiteralTypeAnnotation=function(t){const e={type:"BooleanLiteralTypeAnnotation",value:t},n=a.BooleanLiteralTypeAnnotation;return o(n.value,e,"value",t),e},e.booleanTypeAnnotation=function(){return{type:"BooleanTypeAnnotation"}},e.breakStatement=function(t=null){const e={type:"BreakStatement",label:t},n=a.BreakStatement;return o(n.label,e,"label",t,1),e},e.callExpression=function(t,e){const n={type:"CallExpression",callee:t,arguments:e},r=a.CallExpression;return o(r.callee,n,"callee",t,1),o(r.arguments,n,"arguments",e,1),n},e.catchClause=function(t=null,e){const n={type:"CatchClause",param:t,body:e},r=a.CatchClause;return o(r.param,n,"param",t,1),o(r.body,n,"body",e,1),n},e.classAccessorProperty=function(t,e=null,n=null,r=null,i=!1,s=!1){const l={type:"ClassAccessorProperty",key:t,value:e,typeAnnotation:n,decorators:r,computed:i,static:s},c=a.ClassAccessorProperty;return o(c.key,l,"key",t,1),o(c.value,l,"value",e,1),o(c.typeAnnotation,l,"typeAnnotation",n,1),o(c.decorators,l,"decorators",r,1),o(c.computed,l,"computed",i),o(c.static,l,"static",s),l},e.classBody=function(t){const e={type:"ClassBody",body:t},n=a.ClassBody;return o(n.body,e,"body",t,1),e},e.classDeclaration=function(t=null,e=null,n,r=null){const i={type:"ClassDeclaration",id:t,superClass:e,body:n,decorators:r},s=a.ClassDeclaration;return o(s.id,i,"id",t,1),o(s.superClass,i,"superClass",e,1),o(s.body,i,"body",n,1),o(s.decorators,i,"decorators",r,1),i},e.classExpression=function(t=null,e=null,n,r=null){const i={type:"ClassExpression",id:t,superClass:e,body:n,decorators:r},s=a.ClassExpression;return o(s.id,i,"id",t,1),o(s.superClass,i,"superClass",e,1),o(s.body,i,"body",n,1),o(s.decorators,i,"decorators",r,1),i},e.classImplements=function(t,e=null){const n={type:"ClassImplements",id:t,typeParameters:e},r=a.ClassImplements;return o(r.id,n,"id",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.classMethod=function(t="method",e,n,r,i=!1,s=!1,l=!1,c=!1){const u={type:"ClassMethod",kind:t,key:e,params:n,body:r,computed:i,static:s,generator:l,async:c},h=a.ClassMethod;return o(h.kind,u,"kind",t),o(h.key,u,"key",e,1),o(h.params,u,"params",n,1),o(h.body,u,"body",r,1),o(h.computed,u,"computed",i),o(h.static,u,"static",s),o(h.generator,u,"generator",l),o(h.async,u,"async",c),u},e.classPrivateMethod=function(t="method",e,n,r,i=!1){const s={type:"ClassPrivateMethod",kind:t,key:e,params:n,body:r,static:i},l=a.ClassPrivateMethod;return o(l.kind,s,"kind",t),o(l.key,s,"key",e,1),o(l.params,s,"params",n,1),o(l.body,s,"body",r,1),o(l.static,s,"static",i),s},e.classPrivateProperty=function(t,e=null,n=null,r=!1){const i={type:"ClassPrivateProperty",key:t,value:e,decorators:n,static:r},s=a.ClassPrivateProperty;return o(s.key,i,"key",t,1),o(s.value,i,"value",e,1),o(s.decorators,i,"decorators",n,1),o(s.static,i,"static",r),i},e.classProperty=function(t,e=null,n=null,r=null,i=!1,s=!1){const l={type:"ClassProperty",key:t,value:e,typeAnnotation:n,decorators:r,computed:i,static:s},c=a.ClassProperty;return o(c.key,l,"key",t,1),o(c.value,l,"value",e,1),o(c.typeAnnotation,l,"typeAnnotation",n,1),o(c.decorators,l,"decorators",r,1),o(c.computed,l,"computed",i),o(c.static,l,"static",s),l},e.conditionalExpression=function(t,e,n){const r={type:"ConditionalExpression",test:t,consequent:e,alternate:n},i=a.ConditionalExpression;return o(i.test,r,"test",t,1),o(i.consequent,r,"consequent",e,1),o(i.alternate,r,"alternate",n,1),r},e.continueStatement=function(t=null){const e={type:"ContinueStatement",label:t},n=a.ContinueStatement;return o(n.label,e,"label",t,1),e},e.debuggerStatement=function(){return{type:"DebuggerStatement"}},e.decimalLiteral=function(t){const e={type:"DecimalLiteral",value:t},n=a.DecimalLiteral;return o(n.value,e,"value",t),e},e.declareClass=function(t,e=null,n=null,r){const i={type:"DeclareClass",id:t,typeParameters:e,extends:n,body:r},s=a.DeclareClass;return o(s.id,i,"id",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.extends,i,"extends",n,1),o(s.body,i,"body",r,1),i},e.declareExportAllDeclaration=function(t,e=null){const n={type:"DeclareExportAllDeclaration",source:t,attributes:e},r=a.DeclareExportAllDeclaration;return o(r.source,n,"source",t,1),o(r.attributes,n,"attributes",e,1),n},e.declareExportDeclaration=function(t=null,e=null,n=null,r=null){const i={type:"DeclareExportDeclaration",declaration:t,specifiers:e,source:n,attributes:r},s=a.DeclareExportDeclaration;return o(s.declaration,i,"declaration",t,1),o(s.specifiers,i,"specifiers",e,1),o(s.source,i,"source",n,1),o(s.attributes,i,"attributes",r,1),i},e.declareFunction=function(t){const e={type:"DeclareFunction",id:t},n=a.DeclareFunction;return o(n.id,e,"id",t,1),e},e.declareInterface=function(t,e=null,n=null,r){const i={type:"DeclareInterface",id:t,typeParameters:e,extends:n,body:r},s=a.DeclareInterface;return o(s.id,i,"id",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.extends,i,"extends",n,1),o(s.body,i,"body",r,1),i},e.declareModule=function(t,e,n=null){const r={type:"DeclareModule",id:t,body:e,kind:n},i=a.DeclareModule;return o(i.id,r,"id",t,1),o(i.body,r,"body",e,1),o(i.kind,r,"kind",n),r},e.declareModuleExports=function(t){const e={type:"DeclareModuleExports",typeAnnotation:t},n=a.DeclareModuleExports;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.declareOpaqueType=function(t,e=null,n=null){const r={type:"DeclareOpaqueType",id:t,typeParameters:e,supertype:n},i=a.DeclareOpaqueType;return o(i.id,r,"id",t,1),o(i.typeParameters,r,"typeParameters",e,1),o(i.supertype,r,"supertype",n,1),r},e.declareTypeAlias=function(t,e=null,n){const r={type:"DeclareTypeAlias",id:t,typeParameters:e,right:n},i=a.DeclareTypeAlias;return o(i.id,r,"id",t,1),o(i.typeParameters,r,"typeParameters",e,1),o(i.right,r,"right",n,1),r},e.declareVariable=function(t){const e={type:"DeclareVariable",id:t},n=a.DeclareVariable;return o(n.id,e,"id",t,1),e},e.declaredPredicate=function(t){const e={type:"DeclaredPredicate",value:t},n=a.DeclaredPredicate;return o(n.value,e,"value",t,1),e},e.decorator=function(t){const e={type:"Decorator",expression:t},n=a.Decorator;return o(n.expression,e,"expression",t,1),e},e.directive=function(t){const e={type:"Directive",value:t},n=a.Directive;return o(n.value,e,"value",t,1),e},e.directiveLiteral=function(t){const e={type:"DirectiveLiteral",value:t},n=a.DirectiveLiteral;return o(n.value,e,"value",t),e},e.doExpression=function(t,e=!1){const n={type:"DoExpression",body:t,async:e},r=a.DoExpression;return o(r.body,n,"body",t,1),o(r.async,n,"async",e),n},e.doWhileStatement=function(t,e){const n={type:"DoWhileStatement",test:t,body:e},r=a.DoWhileStatement;return o(r.test,n,"test",t,1),o(r.body,n,"body",e,1),n},e.emptyStatement=function(){return{type:"EmptyStatement"}},e.emptyTypeAnnotation=function(){return{type:"EmptyTypeAnnotation"}},e.enumBooleanBody=function(t){const e={type:"EnumBooleanBody",members:t,explicitType:null,hasUnknownMembers:null},n=a.EnumBooleanBody;return o(n.members,e,"members",t,1),e},e.enumBooleanMember=function(t){const e={type:"EnumBooleanMember",id:t,init:null},n=a.EnumBooleanMember;return o(n.id,e,"id",t,1),e},e.enumDeclaration=function(t,e){const n={type:"EnumDeclaration",id:t,body:e},r=a.EnumDeclaration;return o(r.id,n,"id",t,1),o(r.body,n,"body",e,1),n},e.enumDefaultedMember=function(t){const e={type:"EnumDefaultedMember",id:t},n=a.EnumDefaultedMember;return o(n.id,e,"id",t,1),e},e.enumNumberBody=function(t){const e={type:"EnumNumberBody",members:t,explicitType:null,hasUnknownMembers:null},n=a.EnumNumberBody;return o(n.members,e,"members",t,1),e},e.enumNumberMember=function(t,e){const n={type:"EnumNumberMember",id:t,init:e},r=a.EnumNumberMember;return o(r.id,n,"id",t,1),o(r.init,n,"init",e,1),n},e.enumStringBody=function(t){const e={type:"EnumStringBody",members:t,explicitType:null,hasUnknownMembers:null},n=a.EnumStringBody;return o(n.members,e,"members",t,1),e},e.enumStringMember=function(t,e){const n={type:"EnumStringMember",id:t,init:e},r=a.EnumStringMember;return o(r.id,n,"id",t,1),o(r.init,n,"init",e,1),n},e.enumSymbolBody=function(t){const e={type:"EnumSymbolBody",members:t,hasUnknownMembers:null},n=a.EnumSymbolBody;return o(n.members,e,"members",t,1),e},e.existsTypeAnnotation=function(){return{type:"ExistsTypeAnnotation"}},e.exportAllDeclaration=function(t,e=null){const n={type:"ExportAllDeclaration",source:t,attributes:e},r=a.ExportAllDeclaration;return o(r.source,n,"source",t,1),o(r.attributes,n,"attributes",e,1),n},e.exportDefaultDeclaration=function(t){const e={type:"ExportDefaultDeclaration",declaration:t},n=a.ExportDefaultDeclaration;return o(n.declaration,e,"declaration",t,1),e},e.exportDefaultSpecifier=function(t){const e={type:"ExportDefaultSpecifier",exported:t},n=a.ExportDefaultSpecifier;return o(n.exported,e,"exported",t,1),e},e.exportNamedDeclaration=function(t=null,e=[],n=null,r=null){const i={type:"ExportNamedDeclaration",declaration:t,specifiers:e,source:n,attributes:r},s=a.ExportNamedDeclaration;return o(s.declaration,i,"declaration",t,1),o(s.specifiers,i,"specifiers",e,1),o(s.source,i,"source",n,1),o(s.attributes,i,"attributes",r,1),i},e.exportNamespaceSpecifier=function(t){const e={type:"ExportNamespaceSpecifier",exported:t},n=a.ExportNamespaceSpecifier;return o(n.exported,e,"exported",t,1),e},e.exportSpecifier=function(t,e){const n={type:"ExportSpecifier",local:t,exported:e},r=a.ExportSpecifier;return o(r.local,n,"local",t,1),o(r.exported,n,"exported",e,1),n},e.expressionStatement=function(t){const e={type:"ExpressionStatement",expression:t},n=a.ExpressionStatement;return o(n.expression,e,"expression",t,1),e},e.file=function(t,e=null,n=null){const r={type:"File",program:t,comments:e,tokens:n},i=a.File;return o(i.program,r,"program",t,1),o(i.comments,r,"comments",e,1),o(i.tokens,r,"tokens",n),r},e.forInStatement=function(t,e,n){const r={type:"ForInStatement",left:t,right:e,body:n},i=a.ForInStatement;return o(i.left,r,"left",t,1),o(i.right,r,"right",e,1),o(i.body,r,"body",n,1),r},e.forOfStatement=function(t,e,n,r=!1){const i={type:"ForOfStatement",left:t,right:e,body:n,await:r},s=a.ForOfStatement;return o(s.left,i,"left",t,1),o(s.right,i,"right",e,1),o(s.body,i,"body",n,1),o(s.await,i,"await",r),i},e.forStatement=function(t=null,e=null,n=null,r){const i={type:"ForStatement",init:t,test:e,update:n,body:r},s=a.ForStatement;return o(s.init,i,"init",t,1),o(s.test,i,"test",e,1),o(s.update,i,"update",n,1),o(s.body,i,"body",r,1),i},e.functionDeclaration=function(t=null,e,n,r=!1,i=!1){const s={type:"FunctionDeclaration",id:t,params:e,body:n,generator:r,async:i},l=a.FunctionDeclaration;return o(l.id,s,"id",t,1),o(l.params,s,"params",e,1),o(l.body,s,"body",n,1),o(l.generator,s,"generator",r),o(l.async,s,"async",i),s},e.functionExpression=function(t=null,e,n,r=!1,i=!1){const s={type:"FunctionExpression",id:t,params:e,body:n,generator:r,async:i},l=a.FunctionExpression;return o(l.id,s,"id",t,1),o(l.params,s,"params",e,1),o(l.body,s,"body",n,1),o(l.generator,s,"generator",r),o(l.async,s,"async",i),s},e.functionTypeAnnotation=function(t=null,e,n=null,r){const i={type:"FunctionTypeAnnotation",typeParameters:t,params:e,rest:n,returnType:r},s=a.FunctionTypeAnnotation;return o(s.typeParameters,i,"typeParameters",t,1),o(s.params,i,"params",e,1),o(s.rest,i,"rest",n,1),o(s.returnType,i,"returnType",r,1),i},e.functionTypeParam=function(t=null,e){const n={type:"FunctionTypeParam",name:t,typeAnnotation:e},r=a.FunctionTypeParam;return o(r.name,n,"name",t,1),o(r.typeAnnotation,n,"typeAnnotation",e,1),n},e.genericTypeAnnotation=function(t,e=null){const n={type:"GenericTypeAnnotation",id:t,typeParameters:e},r=a.GenericTypeAnnotation;return o(r.id,n,"id",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.identifier=function(t){const e={type:"Identifier",name:t},n=a.Identifier;return o(n.name,e,"name",t),e},e.ifStatement=function(t,e,n=null){const r={type:"IfStatement",test:t,consequent:e,alternate:n},i=a.IfStatement;return o(i.test,r,"test",t,1),o(i.consequent,r,"consequent",e,1),o(i.alternate,r,"alternate",n,1),r},e.import=function(){return{type:"Import"}},e.importAttribute=function(t,e){const n={type:"ImportAttribute",key:t,value:e},r=a.ImportAttribute;return o(r.key,n,"key",t,1),o(r.value,n,"value",e,1),n},e.importDeclaration=function(t,e,n=null){const r={type:"ImportDeclaration",specifiers:t,source:e,attributes:n},i=a.ImportDeclaration;return o(i.specifiers,r,"specifiers",t,1),o(i.source,r,"source",e,1),o(i.attributes,r,"attributes",n,1),r},e.importDefaultSpecifier=function(t){const e={type:"ImportDefaultSpecifier",local:t},n=a.ImportDefaultSpecifier;return o(n.local,e,"local",t,1),e},e.importExpression=function(t,e=null){const n={type:"ImportExpression",source:t,options:e},r=a.ImportExpression;return o(r.source,n,"source",t,1),o(r.options,n,"options",e,1),n},e.importNamespaceSpecifier=function(t){const e={type:"ImportNamespaceSpecifier",local:t},n=a.ImportNamespaceSpecifier;return o(n.local,e,"local",t,1),e},e.importSpecifier=function(t,e){const n={type:"ImportSpecifier",local:t,imported:e},r=a.ImportSpecifier;return o(r.local,n,"local",t,1),o(r.imported,n,"imported",e,1),n},e.indexedAccessType=function(t,e){const n={type:"IndexedAccessType",objectType:t,indexType:e},r=a.IndexedAccessType;return o(r.objectType,n,"objectType",t,1),o(r.indexType,n,"indexType",e,1),n},e.inferredPredicate=function(){return{type:"InferredPredicate"}},e.interfaceDeclaration=function(t,e=null,n=null,r){const i={type:"InterfaceDeclaration",id:t,typeParameters:e,extends:n,body:r},s=a.InterfaceDeclaration;return o(s.id,i,"id",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.extends,i,"extends",n,1),o(s.body,i,"body",r,1),i},e.interfaceExtends=function(t,e=null){const n={type:"InterfaceExtends",id:t,typeParameters:e},r=a.InterfaceExtends;return o(r.id,n,"id",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.interfaceTypeAnnotation=function(t=null,e){const n={type:"InterfaceTypeAnnotation",extends:t,body:e},r=a.InterfaceTypeAnnotation;return o(r.extends,n,"extends",t,1),o(r.body,n,"body",e,1),n},e.interpreterDirective=function(t){const e={type:"InterpreterDirective",value:t},n=a.InterpreterDirective;return o(n.value,e,"value",t),e},e.intersectionTypeAnnotation=function(t){const e={type:"IntersectionTypeAnnotation",types:t},n=a.IntersectionTypeAnnotation;return o(n.types,e,"types",t,1),e},e.jSXAttribute=e.jsxAttribute=function(t,e=null){const n={type:"JSXAttribute",name:t,value:e},r=a.JSXAttribute;return o(r.name,n,"name",t,1),o(r.value,n,"value",e,1),n},e.jSXClosingElement=e.jsxClosingElement=function(t){const e={type:"JSXClosingElement",name:t},n=a.JSXClosingElement;return o(n.name,e,"name",t,1),e},e.jSXClosingFragment=e.jsxClosingFragment=function(){return{type:"JSXClosingFragment"}},e.jSXElement=e.jsxElement=function(t,e=null,n,r=null){const i={type:"JSXElement",openingElement:t,closingElement:e,children:n,selfClosing:r},s=a.JSXElement;return o(s.openingElement,i,"openingElement",t,1),o(s.closingElement,i,"closingElement",e,1),o(s.children,i,"children",n,1),o(s.selfClosing,i,"selfClosing",r),i},e.jSXEmptyExpression=e.jsxEmptyExpression=function(){return{type:"JSXEmptyExpression"}},e.jSXExpressionContainer=e.jsxExpressionContainer=function(t){const e={type:"JSXExpressionContainer",expression:t},n=a.JSXExpressionContainer;return o(n.expression,e,"expression",t,1),e},e.jSXFragment=e.jsxFragment=function(t,e,n){const r={type:"JSXFragment",openingFragment:t,closingFragment:e,children:n},i=a.JSXFragment;return o(i.openingFragment,r,"openingFragment",t,1),o(i.closingFragment,r,"closingFragment",e,1),o(i.children,r,"children",n,1),r},e.jSXIdentifier=e.jsxIdentifier=function(t){const e={type:"JSXIdentifier",name:t},n=a.JSXIdentifier;return o(n.name,e,"name",t),e},e.jSXMemberExpression=e.jsxMemberExpression=function(t,e){const n={type:"JSXMemberExpression",object:t,property:e},r=a.JSXMemberExpression;return o(r.object,n,"object",t,1),o(r.property,n,"property",e,1),n},e.jSXNamespacedName=e.jsxNamespacedName=function(t,e){const n={type:"JSXNamespacedName",namespace:t,name:e},r=a.JSXNamespacedName;return o(r.namespace,n,"namespace",t,1),o(r.name,n,"name",e,1),n},e.jSXOpeningElement=e.jsxOpeningElement=function(t,e,n=!1){const r={type:"JSXOpeningElement",name:t,attributes:e,selfClosing:n},i=a.JSXOpeningElement;return o(i.name,r,"name",t,1),o(i.attributes,r,"attributes",e,1),o(i.selfClosing,r,"selfClosing",n),r},e.jSXOpeningFragment=e.jsxOpeningFragment=function(){return{type:"JSXOpeningFragment"}},e.jSXSpreadAttribute=e.jsxSpreadAttribute=function(t){const e={type:"JSXSpreadAttribute",argument:t},n=a.JSXSpreadAttribute;return o(n.argument,e,"argument",t,1),e},e.jSXSpreadChild=e.jsxSpreadChild=function(t){const e={type:"JSXSpreadChild",expression:t},n=a.JSXSpreadChild;return o(n.expression,e,"expression",t,1),e},e.jSXText=e.jsxText=function(t){const e={type:"JSXText",value:t},n=a.JSXText;return o(n.value,e,"value",t),e},e.labeledStatement=function(t,e){const n={type:"LabeledStatement",label:t,body:e},r=a.LabeledStatement;return o(r.label,n,"label",t,1),o(r.body,n,"body",e,1),n},e.logicalExpression=function(t,e,n){const r={type:"LogicalExpression",operator:t,left:e,right:n},i=a.LogicalExpression;return o(i.operator,r,"operator",t),o(i.left,r,"left",e,1),o(i.right,r,"right",n,1),r},e.memberExpression=function(t,e,n=!1,r=null){const i={type:"MemberExpression",object:t,property:e,computed:n,optional:r},s=a.MemberExpression;return o(s.object,i,"object",t,1),o(s.property,i,"property",e,1),o(s.computed,i,"computed",n),o(s.optional,i,"optional",r),i},e.metaProperty=function(t,e){const n={type:"MetaProperty",meta:t,property:e},r=a.MetaProperty;return o(r.meta,n,"meta",t,1),o(r.property,n,"property",e,1),n},e.mixedTypeAnnotation=function(){return{type:"MixedTypeAnnotation"}},e.moduleExpression=function(t){const e={type:"ModuleExpression",body:t},n=a.ModuleExpression;return o(n.body,e,"body",t,1),e},e.newExpression=function(t,e){const n={type:"NewExpression",callee:t,arguments:e},r=a.NewExpression;return o(r.callee,n,"callee",t,1),o(r.arguments,n,"arguments",e,1),n},e.noop=function(){return{type:"Noop"}},e.nullLiteral=function(){return{type:"NullLiteral"}},e.nullLiteralTypeAnnotation=function(){return{type:"NullLiteralTypeAnnotation"}},e.nullableTypeAnnotation=function(t){const e={type:"NullableTypeAnnotation",typeAnnotation:t},n=a.NullableTypeAnnotation;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.numberLiteral=function(t){return(0,i.default)("NumberLiteral","NumericLiteral","The node type "),l(t)},e.numberLiteralTypeAnnotation=function(t){const e={type:"NumberLiteralTypeAnnotation",value:t},n=a.NumberLiteralTypeAnnotation;return o(n.value,e,"value",t),e},e.numberTypeAnnotation=function(){return{type:"NumberTypeAnnotation"}},e.numericLiteral=l,e.objectExpression=function(t){const e={type:"ObjectExpression",properties:t},n=a.ObjectExpression;return o(n.properties,e,"properties",t,1),e},e.objectMethod=function(t="method",e,n,r,i=!1,s=!1,l=!1){const c={type:"ObjectMethod",kind:t,key:e,params:n,body:r,computed:i,generator:s,async:l},u=a.ObjectMethod;return o(u.kind,c,"kind",t),o(u.key,c,"key",e,1),o(u.params,c,"params",n,1),o(u.body,c,"body",r,1),o(u.computed,c,"computed",i),o(u.generator,c,"generator",s),o(u.async,c,"async",l),c},e.objectPattern=function(t){const e={type:"ObjectPattern",properties:t},n=a.ObjectPattern;return o(n.properties,e,"properties",t,1),e},e.objectProperty=function(t,e,n=!1,r=!1,i=null){const s={type:"ObjectProperty",key:t,value:e,computed:n,shorthand:r,decorators:i},l=a.ObjectProperty;return o(l.key,s,"key",t,1),o(l.value,s,"value",e,1),o(l.computed,s,"computed",n),o(l.shorthand,s,"shorthand",r),o(l.decorators,s,"decorators",i,1),s},e.objectTypeAnnotation=function(t,e=[],n=[],r=[],i=!1){const s={type:"ObjectTypeAnnotation",properties:t,indexers:e,callProperties:n,internalSlots:r,exact:i},l=a.ObjectTypeAnnotation;return o(l.properties,s,"properties",t,1),o(l.indexers,s,"indexers",e,1),o(l.callProperties,s,"callProperties",n,1),o(l.internalSlots,s,"internalSlots",r,1),o(l.exact,s,"exact",i),s},e.objectTypeCallProperty=function(t){const e={type:"ObjectTypeCallProperty",value:t,static:null},n=a.ObjectTypeCallProperty;return o(n.value,e,"value",t,1),e},e.objectTypeIndexer=function(t=null,e,n,r=null){const i={type:"ObjectTypeIndexer",id:t,key:e,value:n,variance:r,static:null},s=a.ObjectTypeIndexer;return o(s.id,i,"id",t,1),o(s.key,i,"key",e,1),o(s.value,i,"value",n,1),o(s.variance,i,"variance",r,1),i},e.objectTypeInternalSlot=function(t,e,n,r,i){const s={type:"ObjectTypeInternalSlot",id:t,value:e,optional:n,static:r,method:i},l=a.ObjectTypeInternalSlot;return o(l.id,s,"id",t,1),o(l.value,s,"value",e,1),o(l.optional,s,"optional",n),o(l.static,s,"static",r),o(l.method,s,"method",i),s},e.objectTypeProperty=function(t,e,n=null){const r={type:"ObjectTypeProperty",key:t,value:e,variance:n,kind:null,method:null,optional:null,proto:null,static:null},i=a.ObjectTypeProperty;return o(i.key,r,"key",t,1),o(i.value,r,"value",e,1),o(i.variance,r,"variance",n,1),r},e.objectTypeSpreadProperty=function(t){const e={type:"ObjectTypeSpreadProperty",argument:t},n=a.ObjectTypeSpreadProperty;return o(n.argument,e,"argument",t,1),e},e.opaqueType=function(t,e=null,n=null,r){const i={type:"OpaqueType",id:t,typeParameters:e,supertype:n,impltype:r},s=a.OpaqueType;return o(s.id,i,"id",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.supertype,i,"supertype",n,1),o(s.impltype,i,"impltype",r,1),i},e.optionalCallExpression=function(t,e,n){const r={type:"OptionalCallExpression",callee:t,arguments:e,optional:n},i=a.OptionalCallExpression;return o(i.callee,r,"callee",t,1),o(i.arguments,r,"arguments",e,1),o(i.optional,r,"optional",n),r},e.optionalIndexedAccessType=function(t,e){const n={type:"OptionalIndexedAccessType",objectType:t,indexType:e,optional:null},r=a.OptionalIndexedAccessType;return o(r.objectType,n,"objectType",t,1),o(r.indexType,n,"indexType",e,1),n},e.optionalMemberExpression=function(t,e,n=!1,r){const i={type:"OptionalMemberExpression",object:t,property:e,computed:n,optional:r},s=a.OptionalMemberExpression;return o(s.object,i,"object",t,1),o(s.property,i,"property",e,1),o(s.computed,i,"computed",n),o(s.optional,i,"optional",r),i},e.parenthesizedExpression=function(t){const e={type:"ParenthesizedExpression",expression:t},n=a.ParenthesizedExpression;return o(n.expression,e,"expression",t,1),e},e.pipelineBareFunction=function(t){const e={type:"PipelineBareFunction",callee:t},n=a.PipelineBareFunction;return o(n.callee,e,"callee",t,1),e},e.pipelinePrimaryTopicReference=function(){return{type:"PipelinePrimaryTopicReference"}},e.pipelineTopicExpression=function(t){const e={type:"PipelineTopicExpression",expression:t},n=a.PipelineTopicExpression;return o(n.expression,e,"expression",t,1),e},e.placeholder=function(t,e){const n={type:"Placeholder",expectedNode:t,name:e},r=a.Placeholder;return o(r.expectedNode,n,"expectedNode",t),o(r.name,n,"name",e,1),n},e.privateName=function(t){const e={type:"PrivateName",id:t},n=a.PrivateName;return o(n.id,e,"id",t,1),e},e.program=function(t,e=[],n="script",r=null){const i={type:"Program",body:t,directives:e,sourceType:n,interpreter:r},s=a.Program;return o(s.body,i,"body",t,1),o(s.directives,i,"directives",e,1),o(s.sourceType,i,"sourceType",n),o(s.interpreter,i,"interpreter",r,1),i},e.qualifiedTypeIdentifier=function(t,e){const n={type:"QualifiedTypeIdentifier",id:t,qualification:e},r=a.QualifiedTypeIdentifier;return o(r.id,n,"id",t,1),o(r.qualification,n,"qualification",e,1),n},e.recordExpression=function(t){const e={type:"RecordExpression",properties:t},n=a.RecordExpression;return o(n.properties,e,"properties",t,1),e},e.regExpLiteral=c,e.regexLiteral=function(t,e=""){return(0,i.default)("RegexLiteral","RegExpLiteral","The node type "),c(t,e)},e.restElement=u,e.restProperty=function(t){return(0,i.default)("RestProperty","RestElement","The node type "),u(t)},e.returnStatement=function(t=null){const e={type:"ReturnStatement",argument:t},n=a.ReturnStatement;return o(n.argument,e,"argument",t,1),e},e.sequenceExpression=function(t){const e={type:"SequenceExpression",expressions:t},n=a.SequenceExpression;return o(n.expressions,e,"expressions",t,1),e},e.spreadElement=h,e.spreadProperty=function(t){return(0,i.default)("SpreadProperty","SpreadElement","The node type "),h(t)},e.staticBlock=function(t){const e={type:"StaticBlock",body:t},n=a.StaticBlock;return o(n.body,e,"body",t,1),e},e.stringLiteral=function(t){const e={type:"StringLiteral",value:t},n=a.StringLiteral;return o(n.value,e,"value",t),e},e.stringLiteralTypeAnnotation=function(t){const e={type:"StringLiteralTypeAnnotation",value:t},n=a.StringLiteralTypeAnnotation;return o(n.value,e,"value",t),e},e.stringTypeAnnotation=function(){return{type:"StringTypeAnnotation"}},e.super=function(){return{type:"Super"}},e.switchCase=function(t=null,e){const n={type:"SwitchCase",test:t,consequent:e},r=a.SwitchCase;return o(r.test,n,"test",t,1),o(r.consequent,n,"consequent",e,1),n},e.switchStatement=function(t,e){const n={type:"SwitchStatement",discriminant:t,cases:e},r=a.SwitchStatement;return o(r.discriminant,n,"discriminant",t,1),o(r.cases,n,"cases",e,1),n},e.symbolTypeAnnotation=function(){return{type:"SymbolTypeAnnotation"}},e.taggedTemplateExpression=function(t,e){const n={type:"TaggedTemplateExpression",tag:t,quasi:e},r=a.TaggedTemplateExpression;return o(r.tag,n,"tag",t,1),o(r.quasi,n,"quasi",e,1),n},e.templateElement=function(t,e=!1){const n={type:"TemplateElement",value:t,tail:e},r=a.TemplateElement;return o(r.value,n,"value",t),o(r.tail,n,"tail",e),n},e.templateLiteral=function(t,e){const n={type:"TemplateLiteral",quasis:t,expressions:e},r=a.TemplateLiteral;return o(r.quasis,n,"quasis",t,1),o(r.expressions,n,"expressions",e,1),n},e.thisExpression=function(){return{type:"ThisExpression"}},e.thisTypeAnnotation=function(){return{type:"ThisTypeAnnotation"}},e.throwStatement=function(t){const e={type:"ThrowStatement",argument:t},n=a.ThrowStatement;return o(n.argument,e,"argument",t,1),e},e.topicReference=function(){return{type:"TopicReference"}},e.tryStatement=function(t,e=null,n=null){const r={type:"TryStatement",block:t,handler:e,finalizer:n},i=a.TryStatement;return o(i.block,r,"block",t,1),o(i.handler,r,"handler",e,1),o(i.finalizer,r,"finalizer",n,1),r},e.tSAnyKeyword=e.tsAnyKeyword=function(){return{type:"TSAnyKeyword"}},e.tSArrayType=e.tsArrayType=function(t){const e={type:"TSArrayType",elementType:t},n=a.TSArrayType;return o(n.elementType,e,"elementType",t,1),e},e.tSAsExpression=e.tsAsExpression=function(t,e){const n={type:"TSAsExpression",expression:t,typeAnnotation:e},r=a.TSAsExpression;return o(r.expression,n,"expression",t,1),o(r.typeAnnotation,n,"typeAnnotation",e,1),n},e.tSBigIntKeyword=e.tsBigIntKeyword=function(){return{type:"TSBigIntKeyword"}},e.tSBooleanKeyword=e.tsBooleanKeyword=function(){return{type:"TSBooleanKeyword"}},e.tSCallSignatureDeclaration=e.tsCallSignatureDeclaration=function(t=null,e,n=null){const r={type:"TSCallSignatureDeclaration",typeParameters:t,parameters:e,typeAnnotation:n},i=a.TSCallSignatureDeclaration;return o(i.typeParameters,r,"typeParameters",t,1),o(i.parameters,r,"parameters",e,1),o(i.typeAnnotation,r,"typeAnnotation",n,1),r},e.tSConditionalType=e.tsConditionalType=function(t,e,n,r){const i={type:"TSConditionalType",checkType:t,extendsType:e,trueType:n,falseType:r},s=a.TSConditionalType;return o(s.checkType,i,"checkType",t,1),o(s.extendsType,i,"extendsType",e,1),o(s.trueType,i,"trueType",n,1),o(s.falseType,i,"falseType",r,1),i},e.tSConstructSignatureDeclaration=e.tsConstructSignatureDeclaration=function(t=null,e,n=null){const r={type:"TSConstructSignatureDeclaration",typeParameters:t,parameters:e,typeAnnotation:n},i=a.TSConstructSignatureDeclaration;return o(i.typeParameters,r,"typeParameters",t,1),o(i.parameters,r,"parameters",e,1),o(i.typeAnnotation,r,"typeAnnotation",n,1),r},e.tSConstructorType=e.tsConstructorType=function(t=null,e,n=null){const r={type:"TSConstructorType",typeParameters:t,parameters:e,typeAnnotation:n},i=a.TSConstructorType;return o(i.typeParameters,r,"typeParameters",t,1),o(i.parameters,r,"parameters",e,1),o(i.typeAnnotation,r,"typeAnnotation",n,1),r},e.tSDeclareFunction=e.tsDeclareFunction=function(t=null,e=null,n,r=null){const i={type:"TSDeclareFunction",id:t,typeParameters:e,params:n,returnType:r},s=a.TSDeclareFunction;return o(s.id,i,"id",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.params,i,"params",n,1),o(s.returnType,i,"returnType",r,1),i},e.tSDeclareMethod=e.tsDeclareMethod=function(t=null,e,n=null,r,i=null){const s={type:"TSDeclareMethod",decorators:t,key:e,typeParameters:n,params:r,returnType:i},l=a.TSDeclareMethod;return o(l.decorators,s,"decorators",t,1),o(l.key,s,"key",e,1),o(l.typeParameters,s,"typeParameters",n,1),o(l.params,s,"params",r,1),o(l.returnType,s,"returnType",i,1),s},e.tSEnumBody=e.tsEnumBody=function(t){const e={type:"TSEnumBody",members:t},n=a.TSEnumBody;return o(n.members,e,"members",t,1),e},e.tSEnumDeclaration=e.tsEnumDeclaration=function(t,e){const n={type:"TSEnumDeclaration",id:t,members:e},r=a.TSEnumDeclaration;return o(r.id,n,"id",t,1),o(r.members,n,"members",e,1),n},e.tSEnumMember=e.tsEnumMember=function(t,e=null){const n={type:"TSEnumMember",id:t,initializer:e},r=a.TSEnumMember;return o(r.id,n,"id",t,1),o(r.initializer,n,"initializer",e,1),n},e.tSExportAssignment=e.tsExportAssignment=function(t){const e={type:"TSExportAssignment",expression:t},n=a.TSExportAssignment;return o(n.expression,e,"expression",t,1),e},e.tSExpressionWithTypeArguments=e.tsExpressionWithTypeArguments=function(t,e=null){const n={type:"TSExpressionWithTypeArguments",expression:t,typeParameters:e},r=a.TSExpressionWithTypeArguments;return o(r.expression,n,"expression",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.tSExternalModuleReference=e.tsExternalModuleReference=function(t){const e={type:"TSExternalModuleReference",expression:t},n=a.TSExternalModuleReference;return o(n.expression,e,"expression",t,1),e},e.tSFunctionType=e.tsFunctionType=function(t=null,e,n=null){const r={type:"TSFunctionType",typeParameters:t,parameters:e,typeAnnotation:n},i=a.TSFunctionType;return o(i.typeParameters,r,"typeParameters",t,1),o(i.parameters,r,"parameters",e,1),o(i.typeAnnotation,r,"typeAnnotation",n,1),r},e.tSImportEqualsDeclaration=e.tsImportEqualsDeclaration=function(t,e){const n={type:"TSImportEqualsDeclaration",id:t,moduleReference:e,isExport:null},r=a.TSImportEqualsDeclaration;return o(r.id,n,"id",t,1),o(r.moduleReference,n,"moduleReference",e,1),n},e.tSImportType=e.tsImportType=function(t,e=null,n=null){const r={type:"TSImportType",argument:t,qualifier:e,typeParameters:n},i=a.TSImportType;return o(i.argument,r,"argument",t,1),o(i.qualifier,r,"qualifier",e,1),o(i.typeParameters,r,"typeParameters",n,1),r},e.tSIndexSignature=e.tsIndexSignature=function(t,e=null){const n={type:"TSIndexSignature",parameters:t,typeAnnotation:e},r=a.TSIndexSignature;return o(r.parameters,n,"parameters",t,1),o(r.typeAnnotation,n,"typeAnnotation",e,1),n},e.tSIndexedAccessType=e.tsIndexedAccessType=function(t,e){const n={type:"TSIndexedAccessType",objectType:t,indexType:e},r=a.TSIndexedAccessType;return o(r.objectType,n,"objectType",t,1),o(r.indexType,n,"indexType",e,1),n},e.tSInferType=e.tsInferType=function(t){const e={type:"TSInferType",typeParameter:t},n=a.TSInferType;return o(n.typeParameter,e,"typeParameter",t,1),e},e.tSInstantiationExpression=e.tsInstantiationExpression=function(t,e=null){const n={type:"TSInstantiationExpression",expression:t,typeParameters:e},r=a.TSInstantiationExpression;return o(r.expression,n,"expression",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.tSInterfaceBody=e.tsInterfaceBody=function(t){const e={type:"TSInterfaceBody",body:t},n=a.TSInterfaceBody;return o(n.body,e,"body",t,1),e},e.tSInterfaceDeclaration=e.tsInterfaceDeclaration=function(t,e=null,n=null,r){const i={type:"TSInterfaceDeclaration",id:t,typeParameters:e,extends:n,body:r},s=a.TSInterfaceDeclaration;return o(s.id,i,"id",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.extends,i,"extends",n,1),o(s.body,i,"body",r,1),i},e.tSIntersectionType=e.tsIntersectionType=function(t){const e={type:"TSIntersectionType",types:t},n=a.TSIntersectionType;return o(n.types,e,"types",t,1),e},e.tSIntrinsicKeyword=e.tsIntrinsicKeyword=function(){return{type:"TSIntrinsicKeyword"}},e.tSLiteralType=e.tsLiteralType=function(t){const e={type:"TSLiteralType",literal:t},n=a.TSLiteralType;return o(n.literal,e,"literal",t,1),e},e.tSMappedType=e.tsMappedType=function(t,e=null,n=null){const r={type:"TSMappedType",typeParameter:t,typeAnnotation:e,nameType:n},i=a.TSMappedType;return o(i.typeParameter,r,"typeParameter",t,1),o(i.typeAnnotation,r,"typeAnnotation",e,1),o(i.nameType,r,"nameType",n,1),r},e.tSMethodSignature=e.tsMethodSignature=function(t,e=null,n,r=null){const i={type:"TSMethodSignature",key:t,typeParameters:e,parameters:n,typeAnnotation:r,kind:null},s=a.TSMethodSignature;return o(s.key,i,"key",t,1),o(s.typeParameters,i,"typeParameters",e,1),o(s.parameters,i,"parameters",n,1),o(s.typeAnnotation,i,"typeAnnotation",r,1),i},e.tSModuleBlock=e.tsModuleBlock=function(t){const e={type:"TSModuleBlock",body:t},n=a.TSModuleBlock;return o(n.body,e,"body",t,1),e},e.tSModuleDeclaration=e.tsModuleDeclaration=function(t,e){const n={type:"TSModuleDeclaration",id:t,body:e,kind:null},r=a.TSModuleDeclaration;return o(r.id,n,"id",t,1),o(r.body,n,"body",e,1),n},e.tSNamedTupleMember=e.tsNamedTupleMember=function(t,e,n=!1){const r={type:"TSNamedTupleMember",label:t,elementType:e,optional:n},i=a.TSNamedTupleMember;return o(i.label,r,"label",t,1),o(i.elementType,r,"elementType",e,1),o(i.optional,r,"optional",n),r},e.tSNamespaceExportDeclaration=e.tsNamespaceExportDeclaration=function(t){const e={type:"TSNamespaceExportDeclaration",id:t},n=a.TSNamespaceExportDeclaration;return o(n.id,e,"id",t,1),e},e.tSNeverKeyword=e.tsNeverKeyword=function(){return{type:"TSNeverKeyword"}},e.tSNonNullExpression=e.tsNonNullExpression=function(t){const e={type:"TSNonNullExpression",expression:t},n=a.TSNonNullExpression;return o(n.expression,e,"expression",t,1),e},e.tSNullKeyword=e.tsNullKeyword=function(){return{type:"TSNullKeyword"}},e.tSNumberKeyword=e.tsNumberKeyword=function(){return{type:"TSNumberKeyword"}},e.tSObjectKeyword=e.tsObjectKeyword=function(){return{type:"TSObjectKeyword"}},e.tSOptionalType=e.tsOptionalType=function(t){const e={type:"TSOptionalType",typeAnnotation:t},n=a.TSOptionalType;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.tSParameterProperty=e.tsParameterProperty=function(t){const e={type:"TSParameterProperty",parameter:t},n=a.TSParameterProperty;return o(n.parameter,e,"parameter",t,1),e},e.tSParenthesizedType=e.tsParenthesizedType=function(t){const e={type:"TSParenthesizedType",typeAnnotation:t},n=a.TSParenthesizedType;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.tSPropertySignature=e.tsPropertySignature=function(t,e=null){const n={type:"TSPropertySignature",key:t,typeAnnotation:e},r=a.TSPropertySignature;return o(r.key,n,"key",t,1),o(r.typeAnnotation,n,"typeAnnotation",e,1),n},e.tSQualifiedName=e.tsQualifiedName=function(t,e){const n={type:"TSQualifiedName",left:t,right:e},r=a.TSQualifiedName;return o(r.left,n,"left",t,1),o(r.right,n,"right",e,1),n},e.tSRestType=e.tsRestType=function(t){const e={type:"TSRestType",typeAnnotation:t},n=a.TSRestType;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.tSSatisfiesExpression=e.tsSatisfiesExpression=function(t,e){const n={type:"TSSatisfiesExpression",expression:t,typeAnnotation:e},r=a.TSSatisfiesExpression;return o(r.expression,n,"expression",t,1),o(r.typeAnnotation,n,"typeAnnotation",e,1),n},e.tSStringKeyword=e.tsStringKeyword=function(){return{type:"TSStringKeyword"}},e.tSSymbolKeyword=e.tsSymbolKeyword=function(){return{type:"TSSymbolKeyword"}},e.tSTemplateLiteralType=e.tsTemplateLiteralType=function(t,e){const n={type:"TSTemplateLiteralType",quasis:t,types:e},r=a.TSTemplateLiteralType;return o(r.quasis,n,"quasis",t,1),o(r.types,n,"types",e,1),n},e.tSThisType=e.tsThisType=function(){return{type:"TSThisType"}},e.tSTupleType=e.tsTupleType=function(t){const e={type:"TSTupleType",elementTypes:t},n=a.TSTupleType;return o(n.elementTypes,e,"elementTypes",t,1),e},e.tSTypeAliasDeclaration=e.tsTypeAliasDeclaration=function(t,e=null,n){const r={type:"TSTypeAliasDeclaration",id:t,typeParameters:e,typeAnnotation:n},i=a.TSTypeAliasDeclaration;return o(i.id,r,"id",t,1),o(i.typeParameters,r,"typeParameters",e,1),o(i.typeAnnotation,r,"typeAnnotation",n,1),r},e.tSTypeAnnotation=e.tsTypeAnnotation=function(t){const e={type:"TSTypeAnnotation",typeAnnotation:t},n=a.TSTypeAnnotation;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.tSTypeAssertion=e.tsTypeAssertion=function(t,e){const n={type:"TSTypeAssertion",typeAnnotation:t,expression:e},r=a.TSTypeAssertion;return o(r.typeAnnotation,n,"typeAnnotation",t,1),o(r.expression,n,"expression",e,1),n},e.tSTypeLiteral=e.tsTypeLiteral=function(t){const e={type:"TSTypeLiteral",members:t},n=a.TSTypeLiteral;return o(n.members,e,"members",t,1),e},e.tSTypeOperator=e.tsTypeOperator=function(t,e="keyof"){const n={type:"TSTypeOperator",typeAnnotation:t,operator:e},r=a.TSTypeOperator;return o(r.typeAnnotation,n,"typeAnnotation",t,1),o(r.operator,n,"operator",e),n},e.tSTypeParameter=e.tsTypeParameter=function(t=null,e=null,n){const r={type:"TSTypeParameter",constraint:t,default:e,name:n},i=a.TSTypeParameter;return o(i.constraint,r,"constraint",t,1),o(i.default,r,"default",e,1),o(i.name,r,"name",n),r},e.tSTypeParameterDeclaration=e.tsTypeParameterDeclaration=function(t){const e={type:"TSTypeParameterDeclaration",params:t},n=a.TSTypeParameterDeclaration;return o(n.params,e,"params",t,1),e},e.tSTypeParameterInstantiation=e.tsTypeParameterInstantiation=function(t){const e={type:"TSTypeParameterInstantiation",params:t},n=a.TSTypeParameterInstantiation;return o(n.params,e,"params",t,1),e},e.tSTypePredicate=e.tsTypePredicate=function(t,e=null,n=null){const r={type:"TSTypePredicate",parameterName:t,typeAnnotation:e,asserts:n},i=a.TSTypePredicate;return o(i.parameterName,r,"parameterName",t,1),o(i.typeAnnotation,r,"typeAnnotation",e,1),o(i.asserts,r,"asserts",n),r},e.tSTypeQuery=e.tsTypeQuery=function(t,e=null){const n={type:"TSTypeQuery",exprName:t,typeParameters:e},r=a.TSTypeQuery;return o(r.exprName,n,"exprName",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.tSTypeReference=e.tsTypeReference=function(t,e=null){const n={type:"TSTypeReference",typeName:t,typeParameters:e},r=a.TSTypeReference;return o(r.typeName,n,"typeName",t,1),o(r.typeParameters,n,"typeParameters",e,1),n},e.tSUndefinedKeyword=e.tsUndefinedKeyword=function(){return{type:"TSUndefinedKeyword"}},e.tSUnionType=e.tsUnionType=function(t){const e={type:"TSUnionType",types:t},n=a.TSUnionType;return o(n.types,e,"types",t,1),e},e.tSUnknownKeyword=e.tsUnknownKeyword=function(){return{type:"TSUnknownKeyword"}},e.tSVoidKeyword=e.tsVoidKeyword=function(){return{type:"TSVoidKeyword"}},e.tupleExpression=function(t=[]){const e={type:"TupleExpression",elements:t},n=a.TupleExpression;return o(n.elements,e,"elements",t,1),e},e.tupleTypeAnnotation=function(t){const e={type:"TupleTypeAnnotation",types:t},n=a.TupleTypeAnnotation;return o(n.types,e,"types",t,1),e},e.typeAlias=function(t,e=null,n){const r={type:"TypeAlias",id:t,typeParameters:e,right:n},i=a.TypeAlias;return o(i.id,r,"id",t,1),o(i.typeParameters,r,"typeParameters",e,1),o(i.right,r,"right",n,1),r},e.typeAnnotation=function(t){const e={type:"TypeAnnotation",typeAnnotation:t},n=a.TypeAnnotation;return o(n.typeAnnotation,e,"typeAnnotation",t,1),e},e.typeCastExpression=function(t,e){const n={type:"TypeCastExpression",expression:t,typeAnnotation:e},r=a.TypeCastExpression;return o(r.expression,n,"expression",t,1),o(r.typeAnnotation,n,"typeAnnotation",e,1),n},e.typeParameter=function(t=null,e=null,n=null){const r={type:"TypeParameter",bound:t,default:e,variance:n,name:null},i=a.TypeParameter;return o(i.bound,r,"bound",t,1),o(i.default,r,"default",e,1),o(i.variance,r,"variance",n,1),r},e.typeParameterDeclaration=function(t){const e={type:"TypeParameterDeclaration",params:t},n=a.TypeParameterDeclaration;return o(n.params,e,"params",t,1),e},e.typeParameterInstantiation=function(t){const e={type:"TypeParameterInstantiation",params:t},n=a.TypeParameterInstantiation;return o(n.params,e,"params",t,1),e},e.typeofTypeAnnotation=function(t){const e={type:"TypeofTypeAnnotation",argument:t},n=a.TypeofTypeAnnotation;return o(n.argument,e,"argument",t,1),e},e.unaryExpression=function(t,e,n=!0){const r={type:"UnaryExpression",operator:t,argument:e,prefix:n},i=a.UnaryExpression;return o(i.operator,r,"operator",t),o(i.argument,r,"argument",e,1),o(i.prefix,r,"prefix",n),r},e.unionTypeAnnotation=function(t){const e={type:"UnionTypeAnnotation",types:t},n=a.UnionTypeAnnotation;return o(n.types,e,"types",t,1),e},e.updateExpression=function(t,e,n=!1){const r={type:"UpdateExpression",operator:t,argument:e,prefix:n},i=a.UpdateExpression;return o(i.operator,r,"operator",t),o(i.argument,r,"argument",e,1),o(i.prefix,r,"prefix",n),r},e.v8IntrinsicIdentifier=function(t){const e={type:"V8IntrinsicIdentifier",name:t},n=a.V8IntrinsicIdentifier;return o(n.name,e,"name",t),e},e.variableDeclaration=function(t,e){const n={type:"VariableDeclaration",kind:t,declarations:e},r=a.VariableDeclaration;return o(r.kind,n,"kind",t),o(r.declarations,n,"declarations",e,1),n},e.variableDeclarator=function(t,e=null){const n={type:"VariableDeclarator",id:t,init:e},r=a.VariableDeclarator;return o(r.id,n,"id",t,1),o(r.init,n,"init",e,1),n},e.variance=function(t){const e={type:"Variance",kind:t},n=a.Variance;return o(n.kind,e,"kind",t),e},e.voidPattern=function(){return{type:"VoidPattern"}},e.voidTypeAnnotation=function(){return{type:"VoidTypeAnnotation"}},e.whileStatement=function(t,e){const n={type:"WhileStatement",test:t,body:e},r=a.WhileStatement;return o(r.test,n,"test",t,1),o(r.body,n,"body",e,1),n},e.withStatement=function(t,e){const n={type:"WithStatement",object:t,body:e},r=a.WithStatement;return o(r.object,n,"object",t,1),o(r.body,n,"body",e,1),n},e.yieldExpression=function(t=null,e=!1){const n={type:"YieldExpression",argument:t,delegate:e},r=a.YieldExpression;return o(r.argument,n,"argument",t,1),o(r.delegate,n,"delegate",e),n};var r=n(36142),i=n(56826),s=n(6708);const{validateInternal:o}=r,{NODE_FIELDS:a}=s;function l(t){const e={type:"NumericLiteral",value:t},n=a.NumericLiteral;return o(n.value,e,"value",t),e}function c(t,e=""){const n={type:"RegExpLiteral",pattern:t,flags:e},r=a.RegExpLiteral;return o(r.pattern,n,"pattern",t),o(r.flags,n,"flags",e),n}function u(t){const e={type:"RestElement",argument:t},n=a.RestElement;return o(n.argument,e,"argument",t,1),e}function h(t){const e={type:"SpreadElement",argument:t},n=a.SpreadElement;return o(n.argument,e,"argument",t,1),e}},75754:function(t){var e;e=function(){return function(){var t={686:function(t,e,n){n.d(e,{default:function(){return b}});var r=n(279),i=n.n(r),s=n(370),o=n.n(s),a=n(817),l=n.n(a);function c(t){try{return document.execCommand(t)}catch(t){return!1}}var u=function(t){var e=l()(t);return c("cut"),e},h=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";if("string"==typeof t){var r=function(t){var e="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[e?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=t,n}(t);e.container.appendChild(r),n=l()(r),c("copy"),r.remove()}else n=l()(t),c("copy");return n};function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function f(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function m(t,e){return m=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},m(t,e)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function g(t,e){var n="data-clipboard-".concat(t);if(e.hasAttribute(n))return e.getAttribute(n)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&m(t,e)}(l,t);var e,n,r,i,s,a=(i=l,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=y(i);if(s){var n=y(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,t)});function l(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(n=a.call(this)).resolveOptions(e),n.listenClick(t),n}return e=l,n=[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=o()(t,"click",(function(t){return e.onClick(t)}))}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",r=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,r=t.container,i=t.target,s=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==i){if(!i||"object"!==p(i)||1!==i.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&i.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(i.hasAttribute("readonly")||i.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return s?h(s,{container:r}):i?"cut"===n?u(i):h(i,{container:r}):void 0}({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(r?"success":"error",{action:n,text:r,trigger:e,clearSelection:function(){e&&e.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(t){return g("action",t)}},{key:"defaultTarget",value:function(t){var e=g("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return g("text",t)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return h(t,e)}},{key:"cut",value:function(t){return u(t)}},{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach((function(t){n=n&&!!document.queryCommandSupported(t)})),n}}],n&&f(e.prototype,n),r&&f(e,r),l}(i()),b=v},828:function(t){if("undefined"!=typeof Element&&!Element.prototype.matches){var e=Element.prototype;e.matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector}t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}},438:function(t,e,n){var r=n(828);function i(t,e,n,r,i){var o=s.apply(this,arguments);return t.addEventListener(n,o,i),{destroy:function(){t.removeEventListener(n,o,i)}}}function s(t,e,n,i){return function(n){n.delegateTarget=r(n.target,e),n.delegateTarget&&i.call(t,n)}}t.exports=function(t,e,n,r,s){return"function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,(function(t){return i(t,e,n,r,s)})))}},879:function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},370:function(t,e,n){var r=n(879),i=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!r.string(e))throw new TypeError("Second argument must be a String");if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(t))return function(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}(t,e,n);if(r.nodeList(t))return function(t,e,n){return Array.prototype.forEach.call(t,(function(t){t.addEventListener(e,n)})),{destroy:function(){Array.prototype.forEach.call(t,(function(t){t.removeEventListener(e,n)}))}}}(t,e,n);if(r.string(t))return function(t,e,n){return i(document.body,t,e,n)}(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(t){t.exports=function(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var r=window.getSelection(),i=document.createRange();i.selectNodeContents(t),r.removeAllRanges(),r.addRange(i),e=r.toString()}return e}},279:function(t){function e(){}e.prototype={on:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var r=this;function i(){r.off(t,i),e.apply(n,arguments)}return i._=e,this.on(t,i,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),r=n[t],i=[];if(r&&e)for(var s=0,o=r.length;s<o;s++)r[s].fn!==e&&r[s].fn._!==e&&i.push(r[s]);return i.length?n[t]=i:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e}},e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}return n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n(686)}().default},t.exports=e()},75763:(t,e,n)=>{var r=n(22503);t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:r(t)}},76128:(t,e,n)=>{var r,i=n(95167),s=n(45385),o=n(93263),a=n(25965),l=n(57573),c=n(37903),u=n(53743),h="prototype",p="script",d=u("IE_PROTO"),f=function(){},m=function(t){return"<"+p+">"+t+"</"+p+">"},y=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},g=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;g="undefined"!=typeof document?document.domain&&r?y(r):(e=c("iframe"),n="java"+p+":",e.style.display="none",l.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):y(r);for(var i=o.length;i--;)delete g[h][o[i]];return g()};a[d]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f[h]=i(t),n=new f,f[h]=null,n[d]=t):n=g(),void 0===e?n:s.f(n,e)}},76145:t=>{t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},76504:(t,e,n)=>{function r(t){if(t)throw t}n.d(e,{V:()=>r})},76507:t=>{t.exports=function(t,e){return e||(e={}),"string"!=typeof(t=t&&t.__esModule?t.default:t)?t:(/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t)}},76659:(t,e,n)=>{function r(t,e){if(null==t)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(-1!==e.indexOf(r))continue;n[r]=t[r]}return n}n.d(e,{A:()=>r})},77227:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){const n=t.value.split(/\r\n|\n|\r/);let s=0;for(let t=0;t<n.length;t++)/[^ \t]/.exec(n[t])&&(s=t);let o="";for(let t=0;t<n.length;t++){const e=n[t],r=0===t,i=t===n.length-1,a=t===s;let l=e.replace(/\t/g," ");r||(l=l.replace(/^ +/,"")),i||(l=l.replace(/ +$/,"")),l&&(a||(l+=" "),o+=l)}o&&e.push((0,i.inherits)((0,r.stringLiteral)(o),t))};var r=n(53287),i=n(56872)},77290:(t,e,n)=>{var r=n(66599),i=n(13196),s=i([r("%String.prototype.indexOf%")]);t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&s(t,".prototype.")>-1?i([n]):n}},77767:(t,e,n)=>{var r=n(26600),i=n(38460),s=n(7890),o=n(9573),a=i.aTypedArray,l=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,u=r(o);c("uniqueBy",(function(t){return a(this),s(l(this),u(this,t))}),!0)},77802:(t,e,n)=>{var r=n(45632),i=n(38378),s=n(54430),o=n(35525),a=n(52307),l=i.add,c=i.has,u=i.remove;t.exports=function(t){var e=r(this),n=o(t).getIterator(),i=s(e);return a(n,(function(t){c(e,t)?u(i,t):l(i,t)})),i}},78861:(t,e)=>{e.f=Object.getOwnPropertySymbols},79467:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n,i){return(0,r.default)(t,e,[{type:i?"CommentLine":"CommentBlock",value:n}])};var r=n(4478)},79567:(t,e,n)=>{var r=n(51192),i=n(83983),s=n(26792),o=function(t){return i.slice(0,t.length)===t};t.exports=o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},79889:(t,e,n)=>{var r=n(9824),i=n(64997),s=n(25178),o=n(83115)("species"),a=Array;t.exports=function(t){var e;return r(t)&&(e=t.constructor,(i(e)&&(e===a||r(e.prototype))||s(e)&&null===(e=e[o]))&&(e=void 0)),void 0===e?a:e}},80312:(t,e,n)=>{var r=n(82402),i=n(69598),s=n(46324),o=n(3527).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function l(t){r.call(this);var e,n=t.mode.toLowerCase(),i=a[n];e=t.decrypt?"decrypt":"encrypt";var s=t.key;o.isBuffer(s)||(s=o.from(s)),"des-ede"!==n&&"des-ede-cbc"!==n||(s=o.concat([s,s.slice(0,8)]));var l=t.iv;o.isBuffer(l)||(l=o.from(l)),this._des=i.create({key:s,iv:l,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=l,s(l,r),l.prototype._update=function(t){return o.from(this._des.update(t))},l.prototype._final=function(){return o.from(this._des.final())}},80421:(t,e,n)=>{var r=n(18832),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},80905:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){const n=t.split(".");return t=>(0,r.default)(t,n,e)};var r=n(58125)},81085:(t,e,n)=>{t.exports=n(4580).EventEmitter},81287:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},81443:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isKeyword=function(t){return n.has(t)},e.isReservedWord=s,e.isStrictBindOnlyReservedWord=a,e.isStrictBindReservedWord=function(t,e){return o(t,e)||a(t)},e.isStrictReservedWord=o;const n=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"]),r=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),i=new Set(["eval","arguments"]);function s(t,e){return e&&"await"===t||"enum"===t}function o(t,e){return s(t,e)||r.has(t)}function a(t){return i.has(t)}},81546:(t,e,n)=>{var r=n(23486),i=n(45487).charAt,s=n(10638),o=n(1811),a=n(22503);r({target:"String",proto:!0,forced:!0},{at:function(t){var e=a(s(this)),n=e.length,r=o(t),l=r>=0?r:n+r;return l<0||l>=n?void 0:i(e,l)}})},81673:(t,e,n)=>{var r=n(13250),i=n(3527).Buffer,s=n(81847),o=n(3416),a=n(82402),l=n(23492),c=n(5076);function u(t,e,n){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new l.AES(e),this._prev=i.from(n),this._mode=t,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function p(t,e,n){var a=s[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==a.mode&&n.length!==a.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new o(a.module,e,n,!0):"auth"===a.type?new r(a.module,e,n,!0):new u(a.module,e,n)}n(46324)(u,a),u.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),r.push(n);return i.concat(r)},u.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var n=-1;++n<e;)if(t[n+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},u.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=i.concat([this.cache,t])},h.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=s[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(e,!1,n.key,n.iv);return p(t,r.key,r.iv)},e.createDecipheriv=p},81847:(t,e,n)=>{var r={ECB:n(22510),CBC:n(42582),CFB:n(42417),CFB8:n(32005),CFB1:n(16718),OFB:n(39661),CTR:n(26499),GCM:n(26499)},i=n(50006);for(var s in i)i[s].module=r[i[s].mode];t.exports=i},81883:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PLACEHOLDERS_FLIPPED_ALIAS=e.PLACEHOLDERS_ALIAS=e.PLACEHOLDERS=void 0;var r=n(6708);const i=e.PLACEHOLDERS=["Identifier","StringLiteral","Expression","Statement","Declaration","BlockStatement","ClassBody","Pattern"],s=e.PLACEHOLDERS_ALIAS={Declaration:["Statement"],Pattern:["PatternLike","LVal"]};for(const t of i){const e=r.ALIAS_KEYS[t];null!=e&&e.length&&(s[t]=e)}const o=e.PLACEHOLDERS_FLIPPED_ALIAS={};Object.keys(s).forEach((t=>{s[t].forEach((e=>{hasOwnProperty.call(o,e)||(o[e]=[]),o[e].push(t)}))}))},82186:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){(0,r.default)("trailingComments",t,e)};var r=n(34349)},82390:(t,e,n)=>{var r=n(51192),i=n(2269),s=r.WeakMap;t.exports=i(s)&&/native code/.test(String(s))},82402:(t,e,n)=>{var r=n(3527).Buffer,i=n(64371).Transform,s=n(99347).StringDecoder;function o(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(46324)(o,i),o.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},o.prototype.setAutoPadding=function(){},o.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},o.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},o.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},o.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},o.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},o.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},o.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new s(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=o},82421:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return r.COMMENT_KEYS.forEach((e=>{t[e]=null})),t};var r=n(19910)},82820:t=>{var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},83115:(t,e,n)=>{var r=n(51192),i=n(42665),s=n(22521),o=n(43960),a=n(64983),l=n(15256),c=r.Symbol,u=i("wks"),h=l?c.for||c:c&&c.withoutSetter||o;t.exports=function(t){return s(u,t)||(u[t]=a&&s(c,t)?c[t]:h("Symbol."+t)),u[t]}},83478:(t,e,n)=>{var r=n(23486),i=n(26600),s=n(45632),o=n(27293),a=n(22503),l=i([].join),c=i([].push);r({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=s(this),n=void 0===t?",":a(t),r=[];return o(e,(function(t){c(r,t)})),l(r,n)}})},83607:(t,e,n)=>{var r=n(31733),i=n(8520),s=n(27134);t.exports=function(){return s(r,i,arguments)}},83895:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ClassAccessorProperty=function(t){var e;this.printJoin(t.decorators);const n=null==(e=t.key.loc)||null==(e=e.end)?void 0:e.line;n&&this.catchUp(n),s._tsPrintClassMemberModifiers.call(this,t),this.word("accessor",!0),this.space(),t.computed?(this.tokenChar(91),this.print(t.key),this.tokenChar(93)):(o._variance.call(this,t),this.print(t.key)),t.optional&&this.tokenChar(63),t.definite&&this.tokenChar(33),this.print(t.typeAnnotation),t.value&&(this.space(),this.tokenChar(61),this.space(),this.print(t.value)),this.semicolon()},e.ClassBody=function(t){if(this.tokenChar(123),0===t.body.length)this.tokenChar(125);else{const e=function(t,e){if(!t.tokenMap||null==e.start||null==e.end)return null;const n=t.tokenMap.getIndexes(e);if(!n)return null;let r=1,i=0,s=0;const o=()=>{for(;s<e.body.length&&null==e.body[s].start;)s++};return o(),a=>{s<=a&&(s=a+1,o());const l=s===e.body.length?e.end:e.body[s].start;let c;for(;r<n.length&&t.tokenMap.matchesOriginal(c=t._tokens[n[r]],";")&&c.start<l;)t.tokenChar(59,i++),r++}}(this,t);null==e||e(-1);const n=this.enterDelimited();this.printJoin(t.body,!0,!0,e,!0,!0),this._noLineTerminatorAfterNode=n,this.endsWith(10)||this.newline(),this.rightBrace(t)}},e.ClassExpression=e.ClassDeclaration=function(t,e){(l(e)||c(e))&&i._shouldPrintDecoratorsBeforeExport.call(this,e)||this.printJoin(t.decorators),t.declare&&(this.word("declare"),this.space()),t.abstract&&(this.word("abstract"),this.space()),this.word("class"),t.id&&(this.space(),this.print(t.id)),this.print(t.typeParameters),t.superClass&&(this.space(),this.word("extends"),this.space(),this.print(t.superClass),this.print(t.superTypeParameters)),t.implements&&(this.space(),this.word("implements"),this.space(),this.printList(t.implements)),this.space(),this.print(t.body)},e.ClassMethod=function(t){u.call(this,t),this.space(),this.print(t.body)},e.ClassPrivateMethod=function(t){u.call(this,t),this.space(),this.print(t.body)},e.ClassPrivateProperty=function(t){this.printJoin(t.decorators),s._tsPrintClassMemberModifiers.call(this,t),this.print(t.key),t.optional&&this.tokenChar(63),t.definite&&this.tokenChar(33),this.print(t.typeAnnotation),t.value&&(this.space(),this.tokenChar(61),this.space(),this.print(t.value)),this.semicolon()},e.ClassProperty=function(t){if(this.printJoin(t.decorators),!t.static&&!this.format.preserveFormat){var e;const n=null==(e=t.key.loc)||null==(e=e.end)?void 0:e.line;n&&this.catchUp(n)}s._tsPrintClassMemberModifiers.call(this,t),t.computed?(this.tokenChar(91),this.print(t.key),this.tokenChar(93)):(o._variance.call(this,t),this.print(t.key)),t.optional&&this.tokenChar(63),t.definite&&this.tokenChar(33),this.print(t.typeAnnotation),t.value&&(this.space(),this.tokenChar(61),this.space(),this.print(t.value)),this.semicolon()},e.StaticBlock=function(t){this.word("static"),this.space(),this.tokenChar(123),0===t.body.length?this.tokenChar(125):(this.newline(),this.printSequence(t.body,!0),this.rightBrace(t))},e._classMethodHead=u;var r=n(56872),i=n(69551),s=n(43748),o=n(38155),a=n(32917);const{isExportDefaultDeclaration:l,isExportNamedDeclaration:c}=r;function u(t){if(this.printJoin(t.decorators),!this.format.preserveFormat){var e;const n=null==(e=t.key.loc)||null==(e=e.end)?void 0:e.line;n&&this.catchUp(n)}s._tsPrintClassMemberModifiers.call(this,t),a._methodHead.call(this,t)}},83973:(t,e,n)=>{var r=n(53611),i=n(84541),s=n(13196),o=n(83607);t.exports=function(t){var e=s(arguments),n=t.length-(arguments.length-1);return r(e,1+(n>0?n:0),!0)},i?i(t.exports,"apply",{value:o}):t.exports.apply=o},83983:(t,e,n)=>{var r=n(51192).navigator,i=r&&r.userAgent;t.exports=i?String(i):""},84069:(t,e,n)=>{var r,i,s,o=n(82390),a=n(51192),l=n(25178),c=n(26531),u=n(22521),h=n(149),p=n(53743),d=n(25965),f="Object already initialized",m=a.TypeError,y=a.WeakMap;if(o||h.state){var g=h.state||(h.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(t,e){if(g.has(t))throw new m(f);return e.facade=t,g.set(t,e),e},i=function(t){return g.get(t)||{}},s=function(t){return g.has(t)}}else{var v=p("state");d[v]=!0,r=function(t,e){if(u(t,v))throw new m(f);return e.facade=t,c(t,v,e),e},i=function(t){return u(t,v)?t[v]:{}},s=function(t){return u(t,v)}}t.exports={set:r,get:i,has:s,enforce:function(t){return s(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return n}}}},84217:(t,e,n)=>{var r=n(23486),i=n(37400),s=n(84538),o=n(88087);r({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=s(this),n=i(t,arguments.length>1?arguments[1]:void 0),r=o(e,(function(t,r){if(n(t,r,e))return{key:r}}),!0);return r&&r.key}})},84538:(t,e,n)=>{var r=n(71856).has;t.exports=function(t){return r(t),t}},84542:(t,e,n)=>{var r=n(23486),i=n(9106),s=n(84538),o=n(88087),a=TypeError;r({target:"Map",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=s(this),n=arguments.length<2,r=n?void 0:arguments[1];if(i(t),o(e,(function(i,s){n?(n=!1,r=i):r=t(r,i,s,e)})),n)throw new a("Reduce of empty map with no initial value");return r}})},84665:(t,e,n)=>{var r=n(45632),i=n(38378).has,s=n(86058),o=n(35525),a=n(27293),l=n(52307),c=n(11867);t.exports=function(t){var e=r(this),n=o(t);if(s(e)<=n.size)return!1!==a(e,(function(t){if(n.includes(t))return!1}),!0);var u=n.getIterator();return!1!==l(u,(function(t){if(i(e,t))return c(u.iterator,"normal",!1)}))}},84708:(t,e,n)=>{t.exports=s;var r=n(42190),i=Object.create(n(22956));function s(t){if(!(this instanceof s))return new s(t);r.call(this,t)}i.inherits=n(46324),i.inherits(s,r),s.prototype._transform=function(t,e,n){n(null,t)}},85302:(t,e,n)=>{var r=n(14852),i=n(22521),s=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=i(s,"name"),l=a&&"something"===function(){}.name,c=a&&(!r||r&&o(s,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},85734:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){const e=(0,i.default)(t);return 1===e.length?e[0]:(0,r.unionTypeAnnotation)(e)};var r=n(53287),i=n(25869)},86058:(t,e,n)=>{var r=n(42426),i=n(38378);t.exports=r(i.proto,"size","get")||function(t){return t.size}},86115:t=>{t.exports=!1},86707:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.JSXIdentifier=e.JSXFragment=e.JSXExpressionContainer=e.JSXEmptyExpression=e.JSXElement=e.JSXClosingFragment=e.JSXClosingElement=e.JSXAttribute=e.IntersectionTypeAnnotation=e.InterpreterDirective=e.InterfaceTypeAnnotation=e.InterfaceExtends=e.InterfaceDeclaration=e.InferredPredicate=e.IndexedAccessType=e.ImportSpecifier=e.ImportNamespaceSpecifier=e.ImportExpression=e.ImportDefaultSpecifier=e.ImportDeclaration=e.ImportAttribute=e.Import=e.IfStatement=e.Identifier=e.GenericTypeAnnotation=e.FunctionTypeParam=e.FunctionTypeAnnotation=e.FunctionExpression=e.FunctionDeclaration=e.ForStatement=e.ForOfStatement=e.ForInStatement=e.File=e.ExpressionStatement=e.ExportSpecifier=e.ExportNamespaceSpecifier=e.ExportNamedDeclaration=e.ExportDefaultSpecifier=e.ExportDefaultDeclaration=e.ExportAllDeclaration=e.ExistsTypeAnnotation=e.EnumSymbolBody=e.EnumStringMember=e.EnumStringBody=e.EnumNumberMember=e.EnumNumberBody=e.EnumDefaultedMember=e.EnumDeclaration=e.EnumBooleanMember=e.EnumBooleanBody=e.EmptyTypeAnnotation=e.EmptyStatement=e.DoWhileStatement=e.DoExpression=e.DirectiveLiteral=e.Directive=e.Decorator=e.DeclaredPredicate=e.DeclareVariable=e.DeclareTypeAlias=e.DeclareOpaqueType=e.DeclareModuleExports=e.DeclareModule=e.DeclareInterface=e.DeclareFunction=e.DeclareExportDeclaration=e.DeclareExportAllDeclaration=e.DeclareClass=e.DecimalLiteral=e.DebuggerStatement=e.ContinueStatement=e.ConditionalExpression=e.ClassProperty=e.ClassPrivateProperty=e.ClassPrivateMethod=e.ClassMethod=e.ClassImplements=e.ClassExpression=e.ClassDeclaration=e.ClassBody=e.ClassAccessorProperty=e.CatchClause=e.CallExpression=e.BreakStatement=e.BooleanTypeAnnotation=e.BooleanLiteralTypeAnnotation=e.BooleanLiteral=e.BlockStatement=e.BindExpression=e.BinaryExpression=e.BigIntLiteral=e.AwaitExpression=e.AssignmentPattern=e.AssignmentExpression=e.ArrowFunctionExpression=e.ArrayTypeAnnotation=e.ArrayPattern=e.ArrayExpression=e.ArgumentPlaceholder=e.AnyTypeAnnotation=void 0,e.TSNumberKeyword=e.TSNullKeyword=e.TSNonNullExpression=e.TSNeverKeyword=e.TSNamespaceExportDeclaration=e.TSNamedTupleMember=e.TSModuleDeclaration=e.TSModuleBlock=e.TSMethodSignature=e.TSMappedType=e.TSLiteralType=e.TSIntrinsicKeyword=e.TSIntersectionType=e.TSInterfaceDeclaration=e.TSInterfaceBody=e.TSInstantiationExpression=e.TSInferType=e.TSIndexedAccessType=e.TSIndexSignature=e.TSImportType=e.TSImportEqualsDeclaration=e.TSFunctionType=e.TSExternalModuleReference=e.TSExpressionWithTypeArguments=e.TSExportAssignment=e.TSEnumMember=e.TSEnumDeclaration=e.TSEnumBody=e.TSDeclareMethod=e.TSDeclareFunction=e.TSConstructorType=e.TSConstructSignatureDeclaration=e.TSConditionalType=e.TSCallSignatureDeclaration=e.TSBooleanKeyword=e.TSBigIntKeyword=e.TSAsExpression=e.TSArrayType=e.TSAnyKeyword=e.SymbolTypeAnnotation=e.SwitchStatement=e.SwitchCase=e.Super=e.StringTypeAnnotation=e.StringLiteralTypeAnnotation=e.StringLiteral=e.StaticBlock=e.SpreadProperty=e.SpreadElement=e.SequenceExpression=e.ReturnStatement=e.RestProperty=e.RestElement=e.RegexLiteral=e.RegExpLiteral=e.RecordExpression=e.QualifiedTypeIdentifier=e.Program=e.PrivateName=e.Placeholder=e.PipelineTopicExpression=e.PipelinePrimaryTopicReference=e.PipelineBareFunction=e.ParenthesizedExpression=e.OptionalMemberExpression=e.OptionalIndexedAccessType=e.OptionalCallExpression=e.OpaqueType=e.ObjectTypeSpreadProperty=e.ObjectTypeProperty=e.ObjectTypeInternalSlot=e.ObjectTypeIndexer=e.ObjectTypeCallProperty=e.ObjectTypeAnnotation=e.ObjectProperty=e.ObjectPattern=e.ObjectMethod=e.ObjectExpression=e.NumericLiteral=e.NumberTypeAnnotation=e.NumberLiteralTypeAnnotation=e.NumberLiteral=e.NullableTypeAnnotation=e.NullLiteralTypeAnnotation=e.NullLiteral=e.Noop=e.NewExpression=e.ModuleExpression=e.MixedTypeAnnotation=e.MetaProperty=e.MemberExpression=e.LogicalExpression=e.LabeledStatement=e.JSXText=e.JSXSpreadChild=e.JSXSpreadAttribute=e.JSXOpeningFragment=e.JSXOpeningElement=e.JSXNamespacedName=e.JSXMemberExpression=void 0,e.YieldExpression=e.WithStatement=e.WhileStatement=e.VoidTypeAnnotation=e.VoidPattern=e.Variance=e.VariableDeclarator=e.VariableDeclaration=e.V8IntrinsicIdentifier=e.UpdateExpression=e.UnionTypeAnnotation=e.UnaryExpression=e.TypeofTypeAnnotation=e.TypeParameterInstantiation=e.TypeParameterDeclaration=e.TypeParameter=e.TypeCastExpression=e.TypeAnnotation=e.TypeAlias=e.TupleTypeAnnotation=e.TupleExpression=e.TryStatement=e.TopicReference=e.ThrowStatement=e.ThisTypeAnnotation=e.ThisExpression=e.TemplateLiteral=e.TemplateElement=e.TaggedTemplateExpression=e.TSVoidKeyword=e.TSUnknownKeyword=e.TSUnionType=e.TSUndefinedKeyword=e.TSTypeReference=e.TSTypeQuery=e.TSTypePredicate=e.TSTypeParameterInstantiation=e.TSTypeParameterDeclaration=e.TSTypeParameter=e.TSTypeOperator=e.TSTypeLiteral=e.TSTypeAssertion=e.TSTypeAnnotation=e.TSTypeAliasDeclaration=e.TSTupleType=e.TSThisType=e.TSTemplateLiteralType=e.TSSymbolKeyword=e.TSStringKeyword=e.TSSatisfiesExpression=e.TSRestType=e.TSQualifiedName=e.TSPropertySignature=e.TSParenthesizedType=e.TSParameterProperty=e.TSOptionalType=e.TSObjectKeyword=void 0;var r=n(75518);function i(t){return r[t]}n(56826),e.ArrayExpression=i("arrayExpression"),e.AssignmentExpression=i("assignmentExpression"),e.BinaryExpression=i("binaryExpression"),e.InterpreterDirective=i("interpreterDirective"),e.Directive=i("directive"),e.DirectiveLiteral=i("directiveLiteral"),e.BlockStatement=i("blockStatement"),e.BreakStatement=i("breakStatement"),e.CallExpression=i("callExpression"),e.CatchClause=i("catchClause"),e.ConditionalExpression=i("conditionalExpression"),e.ContinueStatement=i("continueStatement"),e.DebuggerStatement=i("debuggerStatement"),e.DoWhileStatement=i("doWhileStatement"),e.EmptyStatement=i("emptyStatement"),e.ExpressionStatement=i("expressionStatement"),e.File=i("file"),e.ForInStatement=i("forInStatement"),e.ForStatement=i("forStatement"),e.FunctionDeclaration=i("functionDeclaration"),e.FunctionExpression=i("functionExpression"),e.Identifier=i("identifier"),e.IfStatement=i("ifStatement"),e.LabeledStatement=i("labeledStatement"),e.StringLiteral=i("stringLiteral"),e.NumericLiteral=i("numericLiteral"),e.NullLiteral=i("nullLiteral"),e.BooleanLiteral=i("booleanLiteral"),e.RegExpLiteral=i("regExpLiteral"),e.LogicalExpression=i("logicalExpression"),e.MemberExpression=i("memberExpression"),e.NewExpression=i("newExpression"),e.Program=i("program"),e.ObjectExpression=i("objectExpression"),e.ObjectMethod=i("objectMethod"),e.ObjectProperty=i("objectProperty"),e.RestElement=i("restElement"),e.ReturnStatement=i("returnStatement"),e.SequenceExpression=i("sequenceExpression"),e.ParenthesizedExpression=i("parenthesizedExpression"),e.SwitchCase=i("switchCase"),e.SwitchStatement=i("switchStatement"),e.ThisExpression=i("thisExpression"),e.ThrowStatement=i("throwStatement"),e.TryStatement=i("tryStatement"),e.UnaryExpression=i("unaryExpression"),e.UpdateExpression=i("updateExpression"),e.VariableDeclaration=i("variableDeclaration"),e.VariableDeclarator=i("variableDeclarator"),e.WhileStatement=i("whileStatement"),e.WithStatement=i("withStatement"),e.AssignmentPattern=i("assignmentPattern"),e.ArrayPattern=i("arrayPattern"),e.ArrowFunctionExpression=i("arrowFunctionExpression"),e.ClassBody=i("classBody"),e.ClassExpression=i("classExpression"),e.ClassDeclaration=i("classDeclaration"),e.ExportAllDeclaration=i("exportAllDeclaration"),e.ExportDefaultDeclaration=i("exportDefaultDeclaration"),e.ExportNamedDeclaration=i("exportNamedDeclaration"),e.ExportSpecifier=i("exportSpecifier"),e.ForOfStatement=i("forOfStatement"),e.ImportDeclaration=i("importDeclaration"),e.ImportDefaultSpecifier=i("importDefaultSpecifier"),e.ImportNamespaceSpecifier=i("importNamespaceSpecifier"),e.ImportSpecifier=i("importSpecifier"),e.ImportExpression=i("importExpression"),e.MetaProperty=i("metaProperty"),e.ClassMethod=i("classMethod"),e.ObjectPattern=i("objectPattern"),e.SpreadElement=i("spreadElement"),e.Super=i("super"),e.TaggedTemplateExpression=i("taggedTemplateExpression"),e.TemplateElement=i("templateElement"),e.TemplateLiteral=i("templateLiteral"),e.YieldExpression=i("yieldExpression"),e.AwaitExpression=i("awaitExpression"),e.Import=i("import"),e.BigIntLiteral=i("bigIntLiteral"),e.ExportNamespaceSpecifier=i("exportNamespaceSpecifier"),e.OptionalMemberExpression=i("optionalMemberExpression"),e.OptionalCallExpression=i("optionalCallExpression"),e.ClassProperty=i("classProperty"),e.ClassAccessorProperty=i("classAccessorProperty"),e.ClassPrivateProperty=i("classPrivateProperty"),e.ClassPrivateMethod=i("classPrivateMethod"),e.PrivateName=i("privateName"),e.StaticBlock=i("staticBlock"),e.ImportAttribute=i("importAttribute"),e.AnyTypeAnnotation=i("anyTypeAnnotation"),e.ArrayTypeAnnotation=i("arrayTypeAnnotation"),e.BooleanTypeAnnotation=i("booleanTypeAnnotation"),e.BooleanLiteralTypeAnnotation=i("booleanLiteralTypeAnnotation"),e.NullLiteralTypeAnnotation=i("nullLiteralTypeAnnotation"),e.ClassImplements=i("classImplements"),e.DeclareClass=i("declareClass"),e.DeclareFunction=i("declareFunction"),e.DeclareInterface=i("declareInterface"),e.DeclareModule=i("declareModule"),e.DeclareModuleExports=i("declareModuleExports"),e.DeclareTypeAlias=i("declareTypeAlias"),e.DeclareOpaqueType=i("declareOpaqueType"),e.DeclareVariable=i("declareVariable"),e.DeclareExportDeclaration=i("declareExportDeclaration"),e.DeclareExportAllDeclaration=i("declareExportAllDeclaration"),e.DeclaredPredicate=i("declaredPredicate"),e.ExistsTypeAnnotation=i("existsTypeAnnotation"),e.FunctionTypeAnnotation=i("functionTypeAnnotation"),e.FunctionTypeParam=i("functionTypeParam"),e.GenericTypeAnnotation=i("genericTypeAnnotation"),e.InferredPredicate=i("inferredPredicate"),e.InterfaceExtends=i("interfaceExtends"),e.InterfaceDeclaration=i("interfaceDeclaration"),e.InterfaceTypeAnnotation=i("interfaceTypeAnnotation"),e.IntersectionTypeAnnotation=i("intersectionTypeAnnotation"),e.MixedTypeAnnotation=i("mixedTypeAnnotation"),e.EmptyTypeAnnotation=i("emptyTypeAnnotation"),e.NullableTypeAnnotation=i("nullableTypeAnnotation"),e.NumberLiteralTypeAnnotation=i("numberLiteralTypeAnnotation"),e.NumberTypeAnnotation=i("numberTypeAnnotation"),e.ObjectTypeAnnotation=i("objectTypeAnnotation"),e.ObjectTypeInternalSlot=i("objectTypeInternalSlot"),e.ObjectTypeCallProperty=i("objectTypeCallProperty"),e.ObjectTypeIndexer=i("objectTypeIndexer"),e.ObjectTypeProperty=i("objectTypeProperty"),e.ObjectTypeSpreadProperty=i("objectTypeSpreadProperty"),e.OpaqueType=i("opaqueType"),e.QualifiedTypeIdentifier=i("qualifiedTypeIdentifier"),e.StringLiteralTypeAnnotation=i("stringLiteralTypeAnnotation"),e.StringTypeAnnotation=i("stringTypeAnnotation"),e.SymbolTypeAnnotation=i("symbolTypeAnnotation"),e.ThisTypeAnnotation=i("thisTypeAnnotation"),e.TupleTypeAnnotation=i("tupleTypeAnnotation"),e.TypeofTypeAnnotation=i("typeofTypeAnnotation"),e.TypeAlias=i("typeAlias"),e.TypeAnnotation=i("typeAnnotation"),e.TypeCastExpression=i("typeCastExpression"),e.TypeParameter=i("typeParameter"),e.TypeParameterDeclaration=i("typeParameterDeclaration"),e.TypeParameterInstantiation=i("typeParameterInstantiation"),e.UnionTypeAnnotation=i("unionTypeAnnotation"),e.Variance=i("variance"),e.VoidTypeAnnotation=i("voidTypeAnnotation"),e.EnumDeclaration=i("enumDeclaration"),e.EnumBooleanBody=i("enumBooleanBody"),e.EnumNumberBody=i("enumNumberBody"),e.EnumStringBody=i("enumStringBody"),e.EnumSymbolBody=i("enumSymbolBody"),e.EnumBooleanMember=i("enumBooleanMember"),e.EnumNumberMember=i("enumNumberMember"),e.EnumStringMember=i("enumStringMember"),e.EnumDefaultedMember=i("enumDefaultedMember"),e.IndexedAccessType=i("indexedAccessType"),e.OptionalIndexedAccessType=i("optionalIndexedAccessType"),e.JSXAttribute=i("jsxAttribute"),e.JSXClosingElement=i("jsxClosingElement"),e.JSXElement=i("jsxElement"),e.JSXEmptyExpression=i("jsxEmptyExpression"),e.JSXExpressionContainer=i("jsxExpressionContainer"),e.JSXSpreadChild=i("jsxSpreadChild"),e.JSXIdentifier=i("jsxIdentifier"),e.JSXMemberExpression=i("jsxMemberExpression"),e.JSXNamespacedName=i("jsxNamespacedName"),e.JSXOpeningElement=i("jsxOpeningElement"),e.JSXSpreadAttribute=i("jsxSpreadAttribute"),e.JSXText=i("jsxText"),e.JSXFragment=i("jsxFragment"),e.JSXOpeningFragment=i("jsxOpeningFragment"),e.JSXClosingFragment=i("jsxClosingFragment"),e.Noop=i("noop"),e.Placeholder=i("placeholder"),e.V8IntrinsicIdentifier=i("v8IntrinsicIdentifier"),e.ArgumentPlaceholder=i("argumentPlaceholder"),e.BindExpression=i("bindExpression"),e.Decorator=i("decorator"),e.DoExpression=i("doExpression"),e.ExportDefaultSpecifier=i("exportDefaultSpecifier"),e.RecordExpression=i("recordExpression"),e.TupleExpression=i("tupleExpression"),e.DecimalLiteral=i("decimalLiteral"),e.ModuleExpression=i("moduleExpression"),e.TopicReference=i("topicReference"),e.PipelineTopicExpression=i("pipelineTopicExpression"),e.PipelineBareFunction=i("pipelineBareFunction"),e.PipelinePrimaryTopicReference=i("pipelinePrimaryTopicReference"),e.VoidPattern=i("voidPattern"),e.TSParameterProperty=i("tsParameterProperty"),e.TSDeclareFunction=i("tsDeclareFunction"),e.TSDeclareMethod=i("tsDeclareMethod"),e.TSQualifiedName=i("tsQualifiedName"),e.TSCallSignatureDeclaration=i("tsCallSignatureDeclaration"),e.TSConstructSignatureDeclaration=i("tsConstructSignatureDeclaration"),e.TSPropertySignature=i("tsPropertySignature"),e.TSMethodSignature=i("tsMethodSignature"),e.TSIndexSignature=i("tsIndexSignature"),e.TSAnyKeyword=i("tsAnyKeyword"),e.TSBooleanKeyword=i("tsBooleanKeyword"),e.TSBigIntKeyword=i("tsBigIntKeyword"),e.TSIntrinsicKeyword=i("tsIntrinsicKeyword"),e.TSNeverKeyword=i("tsNeverKeyword"),e.TSNullKeyword=i("tsNullKeyword"),e.TSNumberKeyword=i("tsNumberKeyword"),e.TSObjectKeyword=i("tsObjectKeyword"),e.TSStringKeyword=i("tsStringKeyword"),e.TSSymbolKeyword=i("tsSymbolKeyword"),e.TSUndefinedKeyword=i("tsUndefinedKeyword"),e.TSUnknownKeyword=i("tsUnknownKeyword"),e.TSVoidKeyword=i("tsVoidKeyword"),e.TSThisType=i("tsThisType"),e.TSFunctionType=i("tsFunctionType"),e.TSConstructorType=i("tsConstructorType"),e.TSTypeReference=i("tsTypeReference"),e.TSTypePredicate=i("tsTypePredicate"),e.TSTypeQuery=i("tsTypeQuery"),e.TSTypeLiteral=i("tsTypeLiteral"),e.TSArrayType=i("tsArrayType"),e.TSTupleType=i("tsTupleType"),e.TSOptionalType=i("tsOptionalType"),e.TSRestType=i("tsRestType"),e.TSNamedTupleMember=i("tsNamedTupleMember"),e.TSUnionType=i("tsUnionType"),e.TSIntersectionType=i("tsIntersectionType"),e.TSConditionalType=i("tsConditionalType"),e.TSInferType=i("tsInferType"),e.TSParenthesizedType=i("tsParenthesizedType"),e.TSTypeOperator=i("tsTypeOperator"),e.TSIndexedAccessType=i("tsIndexedAccessType"),e.TSMappedType=i("tsMappedType"),e.TSTemplateLiteralType=i("tsTemplateLiteralType"),e.TSLiteralType=i("tsLiteralType"),e.TSExpressionWithTypeArguments=i("tsExpressionWithTypeArguments"),e.TSInterfaceDeclaration=i("tsInterfaceDeclaration"),e.TSInterfaceBody=i("tsInterfaceBody"),e.TSTypeAliasDeclaration=i("tsTypeAliasDeclaration"),e.TSInstantiationExpression=i("tsInstantiationExpression"),e.TSAsExpression=i("tsAsExpression"),e.TSSatisfiesExpression=i("tsSatisfiesExpression"),e.TSTypeAssertion=i("tsTypeAssertion"),e.TSEnumBody=i("tsEnumBody"),e.TSEnumDeclaration=i("tsEnumDeclaration"),e.TSEnumMember=i("tsEnumMember"),e.TSModuleDeclaration=i("tsModuleDeclaration"),e.TSModuleBlock=i("tsModuleBlock"),e.TSImportType=i("tsImportType"),e.TSImportEqualsDeclaration=i("tsImportEqualsDeclaration"),e.TSExternalModuleReference=i("tsExternalModuleReference"),e.TSNonNullExpression=i("tsNonNullExpression"),e.TSExportAssignment=i("tsExportAssignment"),e.TSNamespaceExportDeclaration=i("tsNamespaceExportDeclaration"),e.TSTypeAnnotation=i("tsTypeAnnotation"),e.TSTypeParameterInstantiation=i("tsTypeParameterInstantiation"),e.TSTypeParameterDeclaration=i("tsTypeParameterDeclaration"),e.TSTypeParameter=i("tsTypeParameter"),e.NumberLiteral=r.numberLiteral,e.RegexLiteral=r.regexLiteral,e.RestProperty=r.restProperty,e.SpreadProperty=r.spreadProperty},87478:(t,e,n)=>{var r=n(46324),i=n(3527).Buffer,s=n(82402),o=i.alloc(128),a=64;function l(t,e){s.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,o],a));for(var n=this._ipad=i.allocUnsafe(a),r=this._opad=i.allocUnsafe(a),l=0;l<a;l++)n[l]=54^e[l],r[l]=92^e[l];this._hash=[n]}r(l,s),l.prototype._update=function(t){this._hash.push(t)},l.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=l},87649:(t,e,n)=>{var r=n(15166),i=n(6708);const s=(0,i.defineAliasedType)("Flow"),o=t=>{const e="DeclareClass"===t;s(t,{builder:["id","typeParameters","extends","body"],visitor:["id","typeParameters","extends",...e?["mixins","implements"]:[],"body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),extends:(0,i.validateOptional)((0,i.arrayOfType)("InterfaceExtends"))},e?{mixins:(0,i.validateOptional)((0,i.arrayOfType)("InterfaceExtends")),implements:(0,i.validateOptional)((0,i.arrayOfType)("ClassImplements"))}:{},{body:(0,i.validateType)("ObjectTypeAnnotation")})})};s("AnyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("ArrayTypeAnnotation",{visitor:["elementType"],aliases:["FlowType"],fields:{elementType:(0,i.validateType)("FlowType")}}),s("BooleanTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("BooleanLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("NullLiteralTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("ClassImplements",{visitor:["id","typeParameters"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterInstantiation")}}),o("DeclareClass"),s("DeclareFunction",{builder:["id"],visitor:["id","predicate"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),predicate:(0,i.validateOptionalType)("DeclaredPredicate")}}),o("DeclareInterface"),s("DeclareModule",{builder:["id","body","kind"],visitor:["id","body"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier","StringLiteral"),body:(0,i.validateType)("BlockStatement"),kind:(0,i.validateOptional)((0,i.assertOneOf)("CommonJS","ES"))}}),s("DeclareModuleExports",{visitor:["typeAnnotation"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{typeAnnotation:(0,i.validateType)("TypeAnnotation")}}),s("DeclareTypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),right:(0,i.validateType)("FlowType")}}),s("DeclareOpaqueType",{visitor:["id","typeParameters","supertype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,i.validateOptionalType)("FlowType"),impltype:(0,i.validateOptionalType)("FlowType")}}),s("DeclareVariable",{visitor:["id"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier")}}),s("DeclareExportDeclaration",{visitor:["declaration","specifiers","source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({declaration:(0,i.validateOptionalType)("Flow"),specifiers:(0,i.validateOptional)((0,i.arrayOfType)("ExportSpecifier","ExportNamespaceSpecifier")),source:(0,i.validateOptionalType)("StringLiteral"),default:(0,i.validateOptional)((0,i.assertValueType)("boolean"))},r.importAttributes)}),s("DeclareExportAllDeclaration",{visitor:["source","attributes"],aliases:["FlowDeclaration","Statement","Declaration"],fields:Object.assign({source:(0,i.validateType)("StringLiteral"),exportKind:(0,i.validateOptional)((0,i.assertOneOf)("type","value"))},r.importAttributes)}),s("DeclaredPredicate",{visitor:["value"],aliases:["FlowPredicate"],fields:{value:(0,i.validateType)("Flow")}}),s("ExistsTypeAnnotation",{aliases:["FlowType"]}),s("FunctionTypeAnnotation",{builder:["typeParameters","params","rest","returnType"],visitor:["typeParameters","this","params","rest","returnType"],aliases:["FlowType"],fields:{typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),params:(0,i.validateArrayOfType)("FunctionTypeParam"),rest:(0,i.validateOptionalType)("FunctionTypeParam"),this:(0,i.validateOptionalType)("FunctionTypeParam"),returnType:(0,i.validateType)("FlowType")}}),s("FunctionTypeParam",{visitor:["name","typeAnnotation"],fields:{name:(0,i.validateOptionalType)("Identifier"),typeAnnotation:(0,i.validateType)("FlowType"),optional:(0,i.validateOptional)((0,i.assertValueType)("boolean"))}}),s("GenericTypeAnnotation",{visitor:["id","typeParameters"],aliases:["FlowType"],fields:{id:(0,i.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterInstantiation")}}),s("InferredPredicate",{aliases:["FlowPredicate"]}),s("InterfaceExtends",{visitor:["id","typeParameters"],fields:{id:(0,i.validateType)("Identifier","QualifiedTypeIdentifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterInstantiation")}}),o("InterfaceDeclaration"),s("InterfaceTypeAnnotation",{visitor:["extends","body"],aliases:["FlowType"],fields:{extends:(0,i.validateOptional)((0,i.arrayOfType)("InterfaceExtends")),body:(0,i.validateType)("ObjectTypeAnnotation")}}),s("IntersectionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("MixedTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("EmptyTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("NullableTypeAnnotation",{visitor:["typeAnnotation"],aliases:["FlowType"],fields:{typeAnnotation:(0,i.validateType)("FlowType")}}),s("NumberLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,i.validate)((0,i.assertValueType)("number"))}}),s("NumberTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("ObjectTypeAnnotation",{visitor:["properties","indexers","callProperties","internalSlots"],aliases:["FlowType"],builder:["properties","indexers","callProperties","internalSlots","exact"],fields:{properties:(0,i.validate)((0,i.arrayOfType)("ObjectTypeProperty","ObjectTypeSpreadProperty")),indexers:{validate:(0,i.arrayOfType)("ObjectTypeIndexer"),optional:!0,default:[]},callProperties:{validate:(0,i.arrayOfType)("ObjectTypeCallProperty"),optional:!0,default:[]},internalSlots:{validate:(0,i.arrayOfType)("ObjectTypeInternalSlot"),optional:!0,default:[]},exact:{validate:(0,i.assertValueType)("boolean"),default:!1},inexact:(0,i.validateOptional)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeInternalSlot",{visitor:["id","value"],builder:["id","value","optional","static","method"],aliases:["UserWhitespacable"],fields:{id:(0,i.validateType)("Identifier"),value:(0,i.validateType)("FlowType"),optional:(0,i.validate)((0,i.assertValueType)("boolean")),static:(0,i.validate)((0,i.assertValueType)("boolean")),method:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeCallProperty",{visitor:["value"],aliases:["UserWhitespacable"],fields:{value:(0,i.validateType)("FlowType"),static:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeIndexer",{visitor:["variance","id","key","value"],builder:["id","key","value","variance"],aliases:["UserWhitespacable"],fields:{id:(0,i.validateOptionalType)("Identifier"),key:(0,i.validateType)("FlowType"),value:(0,i.validateType)("FlowType"),static:(0,i.validate)((0,i.assertValueType)("boolean")),variance:(0,i.validateOptionalType)("Variance")}}),s("ObjectTypeProperty",{visitor:["key","value","variance"],aliases:["UserWhitespacable"],fields:{key:(0,i.validateType)("Identifier","StringLiteral"),value:(0,i.validateType)("FlowType"),kind:(0,i.validate)((0,i.assertOneOf)("init","get","set")),static:(0,i.validate)((0,i.assertValueType)("boolean")),proto:(0,i.validate)((0,i.assertValueType)("boolean")),optional:(0,i.validate)((0,i.assertValueType)("boolean")),variance:(0,i.validateOptionalType)("Variance"),method:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("ObjectTypeSpreadProperty",{visitor:["argument"],aliases:["UserWhitespacable"],fields:{argument:(0,i.validateType)("FlowType")}}),s("OpaqueType",{visitor:["id","typeParameters","supertype","impltype"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),supertype:(0,i.validateOptionalType)("FlowType"),impltype:(0,i.validateType)("FlowType")}}),s("QualifiedTypeIdentifier",{visitor:["qualification","id"],builder:["id","qualification"],fields:{id:(0,i.validateType)("Identifier"),qualification:(0,i.validateType)("Identifier","QualifiedTypeIdentifier")}}),s("StringLiteralTypeAnnotation",{builder:["value"],aliases:["FlowType"],fields:{value:(0,i.validate)((0,i.assertValueType)("string"))}}),s("StringTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("SymbolTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("ThisTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("TupleTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("TypeofTypeAnnotation",{visitor:["argument"],aliases:["FlowType"],fields:{argument:(0,i.validateType)("FlowType")}}),s("TypeAlias",{visitor:["id","typeParameters","right"],aliases:["FlowDeclaration","Statement","Declaration"],fields:{id:(0,i.validateType)("Identifier"),typeParameters:(0,i.validateOptionalType)("TypeParameterDeclaration"),right:(0,i.validateType)("FlowType")}}),s("TypeAnnotation",{visitor:["typeAnnotation"],fields:{typeAnnotation:(0,i.validateType)("FlowType")}}),s("TypeCastExpression",{visitor:["expression","typeAnnotation"],aliases:["ExpressionWrapper","Expression"],fields:{expression:(0,i.validateType)("Expression"),typeAnnotation:(0,i.validateType)("TypeAnnotation")}}),s("TypeParameter",{visitor:["bound","default","variance"],fields:{name:(0,i.validate)((0,i.assertValueType)("string")),bound:(0,i.validateOptionalType)("TypeAnnotation"),default:(0,i.validateOptionalType)("FlowType"),variance:(0,i.validateOptionalType)("Variance")}}),s("TypeParameterDeclaration",{visitor:["params"],fields:{params:(0,i.validate)((0,i.arrayOfType)("TypeParameter"))}}),s("TypeParameterInstantiation",{visitor:["params"],fields:{params:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("UnionTypeAnnotation",{visitor:["types"],aliases:["FlowType"],fields:{types:(0,i.validate)((0,i.arrayOfType)("FlowType"))}}),s("Variance",{builder:["kind"],fields:{kind:(0,i.validate)((0,i.assertOneOf)("minus","plus"))}}),s("VoidTypeAnnotation",{aliases:["FlowType","FlowBaseAnnotation"]}),s("EnumDeclaration",{aliases:["Statement","Declaration"],visitor:["id","body"],fields:{id:(0,i.validateType)("Identifier"),body:(0,i.validateType)("EnumBooleanBody","EnumNumberBody","EnumStringBody","EnumSymbolBody")}}),s("EnumBooleanBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,i.validate)((0,i.assertValueType)("boolean")),members:(0,i.validateArrayOfType)("EnumBooleanMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumNumberBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,i.validate)((0,i.assertValueType)("boolean")),members:(0,i.validateArrayOfType)("EnumNumberMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumStringBody",{aliases:["EnumBody"],visitor:["members"],fields:{explicitType:(0,i.validate)((0,i.assertValueType)("boolean")),members:(0,i.validateArrayOfType)("EnumStringMember","EnumDefaultedMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumSymbolBody",{aliases:["EnumBody"],visitor:["members"],fields:{members:(0,i.validateArrayOfType)("EnumDefaultedMember"),hasUnknownMembers:(0,i.validate)((0,i.assertValueType)("boolean"))}}),s("EnumBooleanMember",{aliases:["EnumMember"],builder:["id"],visitor:["id","init"],fields:{id:(0,i.validateType)("Identifier"),init:(0,i.validateType)("BooleanLiteral")}}),s("EnumNumberMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,i.validateType)("Identifier"),init:(0,i.validateType)("NumericLiteral")}}),s("EnumStringMember",{aliases:["EnumMember"],visitor:["id","init"],fields:{id:(0,i.validateType)("Identifier"),init:(0,i.validateType)("StringLiteral")}}),s("EnumDefaultedMember",{aliases:["EnumMember"],visitor:["id"],fields:{id:(0,i.validateType)("Identifier")}}),s("IndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,i.validateType)("FlowType"),indexType:(0,i.validateType)("FlowType")}}),s("OptionalIndexedAccessType",{visitor:["objectType","indexType"],aliases:["FlowType"],fields:{objectType:(0,i.validateType)("FlowType"),indexType:(0,i.validateType)("FlowType"),optional:(0,i.validate)((0,i.assertValueType)("boolean"))}})},88087:(t,e,n)=>{var r=n(26600),i=n(52307),s=n(71856),o=s.Map,a=s.proto,l=r(a.forEach),c=r(a.entries),u=c(new o).next;t.exports=function(t,e,n){return n?i({iterator:c(t),next:u},(function(t){return e(t[1],t[0])})):l(t,e)}},88420:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(t===e)return!0;if(null==t)return!1;if(r.ALIAS_KEYS[e])return!1;const n=r.FLIPPED_ALIAS_KEYS[e];return!(null==n||!n.includes(t))};var r=n(49625)},88619:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.default)(t,!0,!0)};var r=n(19415)},89491:(t,e,n)=>{var r=n(80421),i=n(81287),s=n(95167),o=n(76128),a=n(26531),l=n(42399),c=n(83115),u=n(84069),h=n(52479),p=n(23878),d=n(22198),f=n(28009),m=h("Promise"),y=c("toStringTag"),g="AsyncIteratorHelper",v="WrapForValidAsyncIterator",b=u.set,T=function(t){var e=!t,n=u.getterFor(t?v:g),a=function(t){var r=i((function(){return n(t)})),s=r.error,o=r.value;return s||e&&o.done?{exit:!0,value:s?m.reject(o):m.resolve(f(void 0,!0))}:{exit:!1,value:o}};return l(o(d),{next:function(){var t=a(this),e=t.value;if(t.exit)return e;var n=i((function(){return s(e.nextHandler(m))})),r=n.error,o=n.value;return r&&(e.done=!0),r?m.reject(o):m.resolve(o)},return:function(){var e=a(this),n=e.value;if(e.exit)return n;n.done=!0;var o,l,c=n.iterator,u=n.inner,h=function(){var e=i((function(){return p(c,"return")}));return o=l=e.value,e.error?m.reject(l):void 0===o?m.resolve(f(void 0,!0)):(e=i((function(){return r(o,c)})),l=e.value,e.error?m.reject(l):t?m.resolve(l):m.resolve(l).then((function(t){return s(t),f(void 0,!0)})))},d=function(t){return h().then((function(){throw t}),(function(){throw t}))};if(u){var y,g=u.iterator,v=i((function(){if(y=p(g,"return"))return r(y,g)}));if(v.error)return d(v.value);if(y)return m.resolve(v.value).then((function(t){try{s(t)}catch(t){return d(t)}return h()}),d)}return h()}})},x=T(!0),S=T(!1);a(S,y,"Async Iterator Helper"),t.exports=function(t,e){var n=function(n,r){r?(r.iterator=n.iterator,r.next=n.next):r=n,r.type=e?v:g,r.nextHandler=t,r.counter=0,r.done=!1,b(this,r)};return n.prototype=e?x:S,n}},89666:(t,e)=>{function n(){this.space()}Object.defineProperty(e,"__esModule",{value:!0}),e.JSXAttribute=function(t){this.print(t.name),t.value&&(this.tokenChar(61),this.print(t.value))},e.JSXClosingElement=function(t){this.tokenChar(60),this.tokenChar(47),this.print(t.name),this.tokenChar(62)},e.JSXClosingFragment=function(){this.token("</"),this.tokenChar(62)},e.JSXElement=function(t){const e=t.openingElement;if(this.print(e),!e.selfClosing){this.indent();for(const e of t.children)this.print(e);this.dedent(),this.print(t.closingElement)}},e.JSXEmptyExpression=function(){this.printInnerComments()},e.JSXExpressionContainer=function(t){this.tokenChar(123),this.print(t.expression),this.rightBrace(t)},e.JSXFragment=function(t){this.print(t.openingFragment),this.indent();for(const e of t.children)this.print(e);this.dedent(),this.print(t.closingFragment)},e.JSXIdentifier=function(t){this.word(t.name)},e.JSXMemberExpression=function(t){this.print(t.object),this.tokenChar(46),this.print(t.property)},e.JSXNamespacedName=function(t){this.print(t.namespace),this.tokenChar(58),this.print(t.name)},e.JSXOpeningElement=function(t){this.tokenChar(60),this.print(t.name),t.typeArguments&&this.print(t.typeArguments),this.print(t.typeParameters),t.attributes.length>0&&(this.space(),this.printJoin(t.attributes,void 0,void 0,n)),t.selfClosing&&(this.space(),this.tokenChar(47)),this.tokenChar(62)},e.JSXOpeningFragment=function(){this.tokenChar(60),this.tokenChar(62)},e.JSXSpreadAttribute=function(t){this.tokenChar(123),this.token("..."),this.print(t.argument),this.rightBrace(t)},e.JSXSpreadChild=function(t){this.tokenChar(123),this.token("..."),this.print(t.expression),this.rightBrace(t)},e.JSXText=function(t){const e=this.getPossibleRaw(t);void 0!==e?this.token(e,!0):this.token(t.value,!0)}},89699:(t,e,n)=>{var r=n(15088).process;t.exports=r.hrtime||function(t){var e=.001*s.call(i),n=Math.floor(e),r=Math.floor(e%1*1e9);return t&&(n-=t[0],(r-=t[1])<0&&(n--,r+=1e9)),[n,r]};var i=n.g.performance||{},s=i.now||i.mozNow||i.msNow||i.oNow||i.webkitNow||function(){return(new Date).getTime()}},89985:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BreakStatement=function(t){this.word("break"),c(this,t.label)},e.CatchClause=function(t){this.word("catch"),this.space(),t.param&&(this.tokenChar(40),this.print(t.param),this.print(t.param.typeAnnotation),this.tokenChar(41),this.space()),this.print(t.body)},e.ContinueStatement=function(t){this.word("continue"),c(this,t.label)},e.DebuggerStatement=function(){this.word("debugger"),this.semicolon()},e.DoWhileStatement=function(t){this.word("do"),this.space(),this.print(t.body),this.space(),this.word("while"),this.space(),this.tokenChar(40),this.print(t.test),this.tokenChar(41),this.semicolon()},e.ForInStatement=function(t){this.word("for"),this.space(),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=i.TokenContext.forInHead|i.TokenContext.forInOrInitHeadAccumulate,this.print(t.left),this.tokenContext=i.TokenContext.normal,this.space(),this.word("in"),this.space(),this.print(t.right),this.tokenChar(41),this.printBlock(t.body)},e.ForOfStatement=function(t){this.word("for"),this.space(),t.await&&(this.word("await"),this.space()),this.noIndentInnerCommentsHere(),this.tokenChar(40),this.tokenContext|=i.TokenContext.forOfHead,this.print(t.left),this.space(),this.word("of"),this.space(),this.print(t.right),this.tokenChar(41),this.printBlock(t.body)},e.ForStatement=function(t){this.word("for"),this.space(),this.tokenChar(40),this.tokenContext|=i.TokenContext.forInitHead|i.TokenContext.forInOrInitHeadAccumulate,this.print(t.init),this.tokenContext=i.TokenContext.normal,this.tokenChar(59),t.test&&(this.space(),this.print(t.test)),this.tokenChar(59,1),t.update&&(this.space(),this.print(t.update)),this.tokenChar(41),this.printBlock(t.body)},e.IfStatement=function(t){this.word("if"),this.space(),this.tokenChar(40),this.print(t.test),this.tokenChar(41),this.space();const e=t.alternate&&o(l(t.consequent));e&&(this.tokenChar(123),this.newline(),this.indent()),this.printAndIndentOnComments(t.consequent),e&&(this.dedent(),this.newline(),this.tokenChar(125)),t.alternate&&(this.endsWith(125)&&this.space(),this.word("else"),this.space(),this.printAndIndentOnComments(t.alternate))},e.LabeledStatement=function(t){this.print(t.label),this.tokenChar(58),this.space(),this.print(t.body)},e.ReturnStatement=function(t){this.word("return"),c(this,t.argument)},e.SwitchCase=function(t){t.test?(this.word("case"),this.space(),this.print(t.test),this.tokenChar(58)):(this.word("default"),this.tokenChar(58)),t.consequent.length&&(this.newline(),this.printSequence(t.consequent,!0))},e.SwitchStatement=function(t){this.word("switch"),this.space(),this.tokenChar(40),this.print(t.discriminant),this.tokenChar(41),this.space(),this.tokenChar(123),this.printSequence(t.cases,!0),this.rightBrace(t)},e.ThrowStatement=function(t){this.word("throw"),c(this,t.argument)},e.TryStatement=function(t){this.word("try"),this.space(),this.print(t.block),this.space(),t.handlers?this.print(t.handlers[0]):this.print(t.handler),t.finalizer&&(this.space(),this.word("finally"),this.space(),this.print(t.finalizer))},e.VariableDeclaration=function(t,e){t.declare&&(this.word("declare"),this.space());const{kind:n}=t;switch(n){case"await using":this.word("await"),this.space();case"using":this.word("using",!0);break;default:this.word(n)}this.space();let r=!1;if(!s(e))for(const e of t.declarations)if(e.init){r=!0;break}if(this.printList(t.declarations,void 0,void 0,t.declarations.length>1,r?u:void 0),null!=e)switch(e.type){case"ForStatement":if(e.init===t)return;break;case"ForInStatement":case"ForOfStatement":if(e.left===t)return}this.semicolon()},e.VariableDeclarator=function(t){this.print(t.id),t.definite&&this.tokenChar(33),this.print(t.id.typeAnnotation),t.init&&(this.space(),this.tokenChar(61),this.space(),this.print(t.init))},e.WhileStatement=function(t){this.word("while"),this.space(),this.tokenChar(40),this.print(t.test),this.tokenChar(41),this.printBlock(t.body)},e.WithStatement=function(t){this.word("with"),this.space(),this.tokenChar(40),this.print(t.object),this.tokenChar(41),this.printBlock(t.body)};var r=n(56872),i=n(91317);const{isFor:s,isIfStatement:o,isStatement:a}=r;function l(t){const{body:e}=t;return!1===a(e)?t:l(e)}function c(t,e){e&&(t.space(),t.printTerminatorless(e)),t.semicolon()}function u(t){this.tokenChar(44,t),this.newline()}},90345:(t,e,n)=>{n.d(e,{Pq:()=>o});var r=n(8176),i=n(10906);const s=i.bj.define({name:"json",parser:r.K.configure({props:[i.Oh.add({Object:(0,i.mz)({except:/^\s*\}/}),Array:(0,i.mz)({except:/^\s*\]/})}),i.b_.add({"Object Array":i.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function o(){return new i.Yy(s)}},90475:(t,e,n)=>{var r=n(22521),i=n(2269),s=n(49421),o=n(53743),a=n(38875),l=o("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=s(t);if(r(e,l))return e[l];var n=e.constructor;return i(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},90801:(t,e,n)=>{var r=n(38460),i=n(71853),s=r.aTypedArray,o=r.getTypedArrayConstructor;(0,r.exportTypedArrayMethod)("groupBy",(function(t){var e=arguments.length>1?arguments[1]:void 0;return i(s(this),t,e,o)}),!0)},91317:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TokenContext=void 0,e.isLastChild=function(t,e){const n=o[t.type];for(let r=n.length-1;r>=0;r--){const i=t[n[r]];if(i===e)return!0;if(Array.isArray(i)){let t=i.length-1;for(;t>=0&&null===i[t];)t--;return t>=0&&i[t]===e}if(i)return!1}return!1},e.parentNeedsParens=function(t,e,n){switch(n){case 112:if(e.callee===t&&a(t))return!0;break;case 42:return!(l(t)||"CallExpression"===t.type&&l(t.callee)||"ParenthesizedExpression"===t.type)}return!1};var r=n(93269),i=n(56872),s=n(621);const{VISITOR_KEYS:o}=i;e.TokenContext={normal:0,expressionStatement:1,arrowBody:2,exportDefault:4,arrowFlowReturnType:8,forInitHead:16,forInHead:32,forOfHead:64,forInOrInitHeadAccumulate:128,forInOrInitHeadAccumulatePassThroughMask:128};for(const t of Object.keys(r)){const e=r[t];s.generatorInfosMap.has(t)&&(s.generatorInfosMap.get(t)[2]=e)}function a(t){switch(t.type){case"CallExpression":return!0;case"MemberExpression":return a(t.object)}return!1}function l(t){switch(t.type){case"Identifier":return!0;case"MemberExpression":return!t.computed&&"Identifier"===t.property.type&&l(t.object);default:return!1}}},91418:(t,e)=>{function n(t,e){const n=t.quasis;let r="`";for(let i=0;i<n.length-1;i++)if(r+=n[i].value.raw,this.token(r+"${",!0),this.print(e[i]),r="}",this.tokenMap){const e=this.tokenMap.findMatching(t,"}",i);e&&this._catchUpTo(e.loc.start)}r+=n[n.length-1].value.raw,this.token(r+"`",!0)}Object.defineProperty(e,"__esModule",{value:!0}),e.TaggedTemplateExpression=function(t){this.print(t.tag),this.print(t.typeParameters),this.print(t.quasi)},e.TemplateElement=function(){throw new Error("TemplateElement printing is handled in TemplateLiteral")},e.TemplateLiteral=function(t){n.call(this,t,t.expressions)},e._printTemplate=n},91586:(t,e,n)=>{var r=n(96662);t.exports=function(t){return(new r).update(t).digest()}},92010:(t,e,n)=>{var r=n(64525),i=String,s=TypeError;t.exports=function(t){if(r(t))return t;throw new s("Can't set "+i(t)+" as a prototype")}},92442:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if((0,r.isBlockStatement)(t))return t;let n=[];return(0,r.isEmptyStatement)(t)?n=[]:((0,r.isStatement)(t)||(t=(0,r.isFunction)(e)?(0,i.returnStatement)(t):(0,i.expressionStatement)(t)),n=[t]),(0,i.blockStatement)(n)};var r=n(66360),i=n(53287)},92658:(t,e,n)=>{var r=n(1811),i=Math.max,s=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):s(n,e)}},92879:(t,e,n)=>{var r=n(23486),i=n(45632),s=n(38378).remove;r({target:"Set",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=i(this),n=!0,r=0,o=arguments.length;r<o;r++)t=s(e,arguments[r]),n=n&&t;return!!n}})},93263:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},93269:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.AssignmentExpression=function(t,e,n,r){return!(!d(r)||"ObjectPattern"!==t.left.type)||v(t,e,n)},e.BinaryExpression=function(t,e,n,r){return!!f(t,e,n,0)||(r&i.TokenContext.forInOrInitHeadAccumulate)>0&&"in"===t.operator},e.ClassExpression=function(t,e,n,r){return(r&(i.TokenContext.expressionStatement|i.TokenContext.exportDefault))>0},e.ArrowFunctionExpression=e.ConditionalExpression=v,e.DoExpression=function(t,e,n,r){return(r&i.TokenContext.expressionStatement)>0&&!t.async},e.FunctionExpression=function(t,e,n,r){return(r&(i.TokenContext.expressionStatement|i.TokenContext.exportDefault))>0},e.FunctionTypeAnnotation=function(t,e,n,r){return 239===n||90===n||4===n||(r&i.TokenContext.arrowFlowReturnType)>0},e.Identifier=function(t,e,n,r,a){var l;if(a&&a(t)!==t.name)return!1;if(6===n&&null!=(l=t.extra)&&l.parenthesized&&e.left===t){const t=e.right.type;if(("FunctionExpression"===t||"ClassExpression"===t)&&null==e.right.id)return!0}return(r&i.TokenContext.forOfHead||(108===n||132===n)&&r&(i.TokenContext.expressionStatement|i.TokenContext.forInitHead|i.TokenContext.forInHead))&&"let"===t.name?!!((s(e,{object:t,computed:!0})||o(e,{object:t,computed:!0,optional:!1}))&&r&(i.TokenContext.expressionStatement|i.TokenContext.forInitHead|i.TokenContext.forInHead))||(r&i.TokenContext.forOfHead)>0:68===n&&e.left===t&&"async"===t.name&&!e.await},e.LogicalExpression=function(t,e,n){return f(t,e,n,1)},e.NullableTypeAnnotation=function(t,e,n){return 4===n},e.ObjectExpression=function(t,e,n,r){return d(r)},e.OptionalIndexedAccessType=function(t,e,n){return 84===n&&e.objectType===t},e.OptionalCallExpression=e.OptionalMemberExpression=function(t,e,n){switch(n){case 17:return e.callee===t;case 108:return e.object===t}return!1},e.SequenceExpression=function(t,e,n){return!(144===n||133===n||108===n&&e.property===t||132===n&&e.property===t||224===n)&&(21===n||(68===n?e.right===t:60===n||!l(e)))},e.TSSatisfiesExpression=e.TSAsExpression=function(t,e,n){return(6===n||7===n)&&e.left===t||(10===n&&("|"===e.operator||"&"===e.operator)&&t===e.left||f(t,e,n,2))},e.TSConditionalType=function(t,e,n){switch(n){case 155:case 195:case 211:case 212:return!0;case 175:return e.objectType===t;case 181:case 219:return e.types[0]===t;case 161:return e.checkType===t||e.extendsType===t}return!1},e.TSConstructorType=e.TSFunctionType=function(t,e,n){return!!m(t,e,n)||219===n||161===n&&(e.checkType===t||e.extendsType===t)},e.TSInferType=function(t,e,n){return!!y(t,e,n)||!(181!==n&&219!==n||!t.typeParameter.constraint||e.types[0]!==t)},e.TSInstantiationExpression=function(t,e,n){switch(n){case 17:case 130:case 112:case 177:return null!=e.typeParameters}return!1},e.TSIntersectionType=function(t,e,n){return 211===n||y(t,e,n)},e.SpreadElement=e.UnaryExpression=e.TSTypeAssertion=g,e.TSTypeOperator=y,e.TSUnionType=m,e.IntersectionTypeAnnotation=e.UnionTypeAnnotation=function(t,e,n){switch(n){case 4:case 115:case 90:case 239:return!0}return!1},e.UpdateExpression=function(t,e,n){return p(t,e,n)||h(t,e,n)},e.AwaitExpression=e.YieldExpression=function(t,e,n){return 10===n||107===n||238===n||145===n||p(t,e,n)||8===n&&a(t)||28===n&&t===e.test||h(t,e,n)||u(n)};var r=n(56872),i=n(91317);const{isMemberExpression:s,isOptionalMemberExpression:o,isYieldExpression:a,isStatement:l}=r,c=new Map([["||",0],["??",1],["&&",2],["|",3],["^",4],["&",5],["==",6],["===",6],["!=",6],["!==",6],["<",7],[">",7],["<=",7],[">=",7],["in",7],["instanceof",7],[">>",8],["<<",8],[">>>",8],["+",9],["-",9],["*",10],["/",10],["%",10],["**",11]]);function u(t){return 156===t||201===t||209===t}const h=(t,e,n)=>(21===n||22===n)&&e.superClass===t,p=(t,e,n)=>{switch(n){case 108:case 132:return e.object===t;case 17:case 130:case 112:return e.callee===t;case 222:return e.tag===t;case 191:return!0}return!1};function d(t){return(t&(i.TokenContext.expressionStatement|i.TokenContext.arrowBody))>0}function f(t,e,n,r){if(h(t,e,n))return!0;if(p(t,e,n)||238===n||145===n||8===n)return!0;let i;switch(n){case 10:case 107:i=c.get(e.operator);break;case 156:case 201:i=7}if(void 0!==i){const s=2===r?7:c.get(t.operator);if(i>s)return!0;if(i===s&&10===n&&(11===s?e.left===t:e.right===t))return!0;if(1===r&&107===n&&(1===s&&1!==i||1===i&&1!==s))return!0}return!1}function m(t,e,n){switch(n){case 181:case 211:case 155:case 195:return!0;case 175:return e.objectType===t}return!1}function y(t,e,n){switch(n){case 155:case 195:return!0;case 175:if(e.objectType===t)return!0}return!1}function g(t,e,n){return p(t,e,n)||10===n&&"**"===e.operator&&e.left===t||h(t,e,n)}function v(t,e,n){switch(n){case 238:case 145:case 10:case 107:case 8:return!0;case 28:if(e.test===t)return!0}return!!u(n)||g(t,e,n)}},93308:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){return!!e&&((0,i.default)(e.type,t)?void 0===n||(0,r.default)(e,n):!n&&"Placeholder"===e.type&&t in o.FLIPPED_ALIAS_KEYS&&(0,s.default)(e.expectedNode,t))};var r=n(1440),i=n(88420),s=n(99496),o=n(49625)},93709:(t,e)=>{var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},93732:(t,e,n)=>{n.d(e,{pJ:()=>z,bu:()=>S,_k:()=>p});var r=n(9283),i=n(38273);function s(){var t=arguments[0];"string"==typeof t&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?t.setAttribute(r,i):null!=i&&(t[r]=i)}e++}for(;e<arguments.length;e++)o(t,arguments[e]);return t}function o(t,e){if("string"==typeof e)t.appendChild(document.createTextNode(e));else if(null==e);else if(null!=e.nodeType)t.appendChild(e);else{if(!Array.isArray(e))throw new RangeError("Unsupported child node: "+e);for(var n=0;n<e.length;n++)o(t,e[n])}}class a{constructor(t,e,n){this.from=t,this.to=e,this.diagnostic=n}}class l{constructor(t,e,n){this.diagnostics=t,this.panel=e,this.selected=n}static init(t,e,n){let s=n.facet(x).markerFilter;s&&(t=s(t,n));let o=t.slice().sort(((t,e)=>t.from-e.from||t.to-e.to)),a=new i.vB,u=[],h=0;for(let t=0;;){let e,i,s=t==o.length?null:o[t];if(!s&&!u.length)break;for(u.length?(e=h,i=u.reduce(((t,e)=>Math.min(t,e.to)),s&&s.from>e?s.from:1e8)):(e=s.from,i=s.to,u.push(s),t++);t<o.length;){let n=o[t];if(n.from!=e||!(n.to>n.from||n.to==e)){i=Math.min(n.from,i);break}u.push(n),t++,i=Math.min(n.to,i)}let l=N(u);if(u.some((t=>t.from==t.to||t.from==t.to-1&&n.doc.lineAt(t.from).to==t.from)))a.add(e,e,r.NZ.widget({widget:new A(l),diagnostics:u.slice()}));else{let t=u.reduce(((t,e)=>e.markClass?t+" "+e.markClass:t),"");a.add(e,i,r.NZ.mark({class:"cm-lintRange cm-lintRange-"+l+t,diagnostics:u.slice(),inclusiveEnd:u.some((t=>t.to>i))}))}h=i;for(let t=0;t<u.length;t++)u[t].to<=h&&u.splice(t--,1)}let p=a.finish();return new l(p,e,c(p))}}function c(t,e=null,n=0){let r=null;return t.between(n,1e9,((t,n,{spec:i})=>{if(!(e&&i.diagnostics.indexOf(e)<0))if(r){if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new a(r.from,n,r.diagnostic)}else r=new a(t,n,e||i.diagnostics[0])})),r}function u(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(x).hideOn(t,n,r);if(null!=i)return i;let s=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(p)))&&!t.changes.touchesRange(s.from,Math.max(s.to,r)))}function h(t,e){return t.field(m,!1)?e:e.concat(i.Pe.appendConfig.of(U))}const p=i.Pe.define(),d=i.Pe.define(),f=i.Pe.define(),m=i.sU.define({create:()=>new l(r.NZ.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let i=e.changes.mapPos(t.selected.from,1);r=c(n,t.selected.diagnostic,i)||c(n,null,i)}!n.size&&i&&e.state.facet(x).autoPanel&&(i=null),t=new l(n,i,r)}for(let n of e.effects)if(n.is(p)){let r=e.state.facet(x).autoPanel?n.value.length?M.open:null:t.panel;t=l.init(n.value,r,e.state)}else n.is(d)?t=new l(t.diagnostics,n.value?M.open:null,t.selected):n.is(f)&&(t=new l(t.diagnostics,t.panel,n.value));return t},provide:t=>[r.S7.from(t,(t=>t.panel)),r.Lz.decorations.from(t,(t=>t.diagnostics))]}),y=r.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function g(t,e,n){let r,{diagnostics:i}=t.state.field(m),s=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),((t,i,{spec:a})=>{if(e>=t&&e<=i&&(t==i||(e>t||n>0)&&(e<i||n<0)))return r=a.diagnostics,s=t,o=i,!1}));let a=t.state.facet(x).tooltipFilter;return r&&a&&(r=a(r,t.state)),r?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create:()=>({dom:v(t,r)})}:null}function v(t,e){return s("ul",{class:"cm-tooltip-lint"},e.map((e=>E(t,e,!1))))}const b=t=>{let e=t.state.field(m,!1);return!(!e||!e.panel||(t.dispatch({effects:d.of(!1)}),0))},T=r.Z9.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(x);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t<this.lintTime-10)this.timeout=setTimeout(this.run,this.lintTime-t);else{this.set=!1;let{state:t}=this.view,{sources:e}=t.facet(x);e.length&&function(t,e,n){let r=[],i=-1;for(let s of t)s.then((n=>{r.push(n),clearTimeout(i),r.length==t.length?e(r):i=setTimeout((()=>e(r)),200)}),n)}(e.map((t=>Promise.resolve(t(this.view)))),(e=>{this.view.state.doc==t.doc&&this.view.dispatch(function(t,e){return{effects:h(t,[p.of(e)])}}(this.view.state,e.reduce(((t,e)=>t.concat(e)))))}),(t=>{(0,r.c_)(this.view.state,t)}))}}update(t){let e=t.state.facet(x);(t.docChanged||e!=t.startState.facet(x)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),x=i.sj.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},(0,i.QR)(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?n=>t(n)||e(n):t:e}))});function S(t,e={}){return[x.of({source:t,config:e}),T,U]}function w(t){let e=[];if(t)t:for(let{name:n}of t){for(let t=0;t<n.length;t++){let r=n[t];if(/[a-zA-Z]/.test(r)&&!e.some((t=>t.toLowerCase()==r.toLowerCase()))){e.push(r);continue t}}e.push("")}return e}function E(t,e,n){var r;let i=n?w(e.actions):[];return s("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},s("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(r=e.actions)||void 0===r?void 0:r.map(((n,r)=>{let o=!1,a=r=>{if(r.preventDefault(),o)return;o=!0;let i=c(t.state.field(m).diagnostics,e);i&&n.apply(t,i.from,i.to)},{name:l}=n,u=i[r]?l.indexOf(i[r]):-1,h=u<0?l:[l.slice(0,u),s("u",l.slice(u,u+1)),l.slice(u+1)];return s("button",{type:"button",class:"cm-diagnosticAction",onclick:a,onmousedown:a,"aria-label":` Action: ${l}${u<0?"":` (access key "${i[r]})"`}.`},h)})),e.source&&s("div",{class:"cm-diagnosticSource"},e.source))}class A extends r.xO{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return s("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class P{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=E(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class M{constructor(t){this.view=t,this.items=[],this.list=s("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)b(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=w(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==e.keyCode){let e=c(this.view.state.field(m).diagnostics,n);e&&n.actions[i].apply(t,e.from,e.to)}}}e.preventDefault()},onclick:t=>{for(let e=0;e<this.items.length;e++)this.items[e].dom.contains(t.target)&&this.moveSelection(e)}}),this.dom=s("div",{class:"cm-panel-lint"},this.list,s("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>b(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(m).selected;if(!t)return-1;for(let e=0;e<this.items.length;e++)if(this.items[e].diagnostic==t.diagnostic)return e;return-1}update(){let{diagnostics:t,selected:e}=this.view.state.field(m),n=0,r=!1,i=null,s=new Set;for(t.between(0,this.view.state.doc.length,((t,o,{spec:a})=>{for(let t of a.diagnostics){if(s.has(t))continue;s.add(t);let o,a=-1;for(let e=n;e<this.items.length;e++)if(this.items[e].diagnostic==t){a=e;break}a<0?(o=new P(this.view,t),this.items.splice(n,0,o),r=!0):(o=this.items[a],a>n&&(this.items.splice(n,a-n),r=!0)),e&&o.diagnostic==e.diagnostic?o.dom.hasAttribute("aria-selected")||(o.dom.setAttribute("aria-selected","true"),i=o):o.dom.hasAttribute("aria-selected")&&o.dom.removeAttribute("aria-selected"),n++}}));n<this.items.length&&!(1==this.items.length&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();0==this.items.length&&(this.items.push(new P(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),i?(this.list.setAttribute("aria-activedescendant",i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let n=e.height/this.list.offsetHeight;t.top<e.top?this.list.scrollTop-=(e.top-t.top)/n:t.bottom>e.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)e();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=c(this.view.state.field(m).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:f.of(e)})}static open(t){return new M(t)}}function C(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function k(t){return C(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const I=r.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:k("#d11")},".cm-lintRange-warning":{backgroundImage:k("orange")},".cm-lintRange-info":{backgroundImage:k("#999")},".cm-lintRange-hint":{backgroundImage:k("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function O(t){return"error"==t?4:"warning"==t?3:"info"==t?2:1}function N(t){let e="hint",n=1;for(let r of t){let t=O(r.severity);t>n&&(n=t,e=r.severity)}return e}class _ extends r.wJ{constructor(t){super(),this.diagnostics=t,this.severity=N(t)}toDOM(t){let e=document.createElement("div");e.className="cm-lint-marker cm-lint-marker-"+this.severity;let n=this.diagnostics,r=t.state.facet(V).tooltipFilter;return r&&(n=r(n,t.state)),n.length&&(e.onmouseover=()=>function(t,e,n){function r(){let r=t.elementAtHeight(e.getBoundingClientRect().top+5-t.documentTop);t.coordsAtPos(r.from)&&t.dispatch({effects:R.of({pos:r.from,above:!1,clip:!1,create:()=>({dom:v(t,n),getCoords:()=>e.getBoundingClientRect()})})}),e.onmouseout=e.onmousemove=null,function(t,e){let n=r=>{let i=e.getBoundingClientRect();if(!(r.clientX>i.left-10&&r.clientX<i.right+10&&r.clientY>i.top-10&&r.clientY<i.bottom+10)){for(let t=r.target;t;t=t.parentNode)if(1==t.nodeType&&t.classList.contains("cm-tooltip-lint"))return;window.removeEventListener("mousemove",n),t.state.field(F)&&t.dispatch({effects:R.of(null)})}};window.addEventListener("mousemove",n)}(t,e)}let{hoverTime:i}=t.state.facet(V),s=setTimeout(r,i);e.onmouseout=()=>{clearTimeout(s),e.onmouseout=e.onmousemove=null},e.onmousemove=()=>{clearTimeout(s),s=setTimeout(r,i)}}(t,e,n)),e}}function D(t,e){let n=Object.create(null);for(let r of e){let e=t.lineAt(r.from);(n[e.from]||(n[e.from]=[])).push(r)}let r=[];for(let t in n)r.push(new _(n[t]).range(+t));return i.om.of(r,!0)}const L=(0,r.cU)({class:"cm-gutter-lint",markers:t=>t.state.field(B),widgetMarker:(t,e,n)=>{let r=[];return t.state.field(B).between(n.from,n.to,((t,e,i)=>{t>n.from&&t<n.to&&r.push(...i.diagnostics)})),r.length?new _(r):null}}),B=i.sU.define({create:()=>i.om.empty,update(t,e){t=t.map(e.changes);let n=e.state.facet(V).markerFilter;for(let r of e.effects)if(r.is(p)){let i=r.value;n&&(i=n(i||[],e.state)),t=D(e.state.doc,i.slice(0))}return t}}),R=i.Pe.define(),F=i.sU.define({create:()=>null,update:(t,e)=>(t&&e.docChanged&&(t=u(e,t)?null:Object.assign(Object.assign({},t),{pos:e.changes.mapPos(t.pos)})),e.effects.reduce(((t,e)=>e.is(R)?e.value:t),t)),provide:t=>r.DK.from(t)}),j=r.Lz.baseTheme({".cm-gutter-lint":{width:"1.4em","& .cm-gutterElement":{padding:".2em"}},".cm-lint-marker":{width:"1em",height:"1em"},".cm-lint-marker-info":{content:C('<path fill="#aaf" stroke="#77e" stroke-width="6" stroke-linejoin="round" d="M5 5L35 5L35 35L5 35Z"/>')},".cm-lint-marker-warning":{content:C('<path fill="#fe8" stroke="#fd7" stroke-width="6" stroke-linejoin="round" d="M20 6L37 35L3 35Z"/>')},".cm-lint-marker-error":{content:C('<circle cx="20" cy="20" r="15" fill="#f87" stroke="#f43" stroke-width="6"/>')}}),U=[m,r.Lz.decorations.compute([m],(t=>{let{selected:e,panel:n}=t.field(m);return e&&n&&e.from!=e.to?r.NZ.set([y.range(e.from,e.to)]):r.NZ.none})),(0,r.Ux)(g,{hideOn:u}),I],V=i.sj.define({combine:t=>(0,i.QR)(t,{hoverTime:300,markerFilter:null,tooltipFilter:null})});function z(t={}){return[V.of(t),B,L,j,F]}},93859:(t,e,n)=>{var r=n(26531),i=n(32457),s=n(38203),o=Error.captureStackTrace;t.exports=function(t,e,n,a){s&&(o?o(t,e):r(t,"stack",i(n,a)))}},94476:(t,e,n)=>{var r=n(23486),i=n(80421),s=n(31610),o=n(84665);r({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return i(o,this,s(t))}})},94665:(t,e,n)=>{function r(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function i(t,e){var n,r,i,o,c,u=new l(t),h=+t.value&&(u.value=t.value),p=[u];for(null==e&&(e=s);n=p.pop();)if(h&&(n.value=+n.data.value),(i=e(n.data))&&(c=i.length))for(n.children=new Array(c),o=c-1;o>=0;--o)p.push(r=n.children[o]=new l(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(a)}function s(t){return t.children}function o(t){t.data=t.data.data}function a(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function l(t){this.data=t,this.depth=this.height=0,this.parent=null}n.d(e,{u:()=>h}),l.prototype=i.prototype={constructor:l,count:function(){return this.eachAfter(r)},each:function(t){var e,n,r,i,s=this,o=[s];do{for(e=o.reverse(),o=[];s=e.pop();)if(t(s),n=s.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,s=[i],o=[];i=s.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)s.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return i(this).eachBefore(o)}};const{rE:c}={rE:"2.1.2"},u=Object.freeze({children:t=>t.children,nodeSize:t=>t.data.size,spacing:0});function h(t){const e=Object.assign({},u,t);function n(t){const n=e[t];return"function"==typeof n?n:()=>n}function r(t){const e=o(function(){const t=s(),e=n("nodeSize"),r=n("spacing");return class extends t{constructor(t){super(t),Object.assign(this,{x:0,y:0,relX:0,prelim:0,shift:0,change:0,lExt:this,lExtRelX:0,lThr:null,rExt:this,rExtRelX:0,rThr:null})}get size(){return e(this.data)}spacing(t){return r(this.data,t.data)}get x(){return this.data.x}set x(t){this.data.x=t}get y(){return this.data.y}set y(t){this.data.y=t}update(){return p(this),d(this),this}}}(),t,(t=>t.children));return e.update(),e.data}function s(){const t=n("nodeSize"),e=n("spacing");return class n extends i.prototype.constructor{constructor(t){super(t)}copy(){const t=o(this.constructor,this,(t=>t.children));return t.each((t=>t.data=t.data.data)),t}get size(){return t(this)}spacing(t){return e(this,t)}get nodes(){return this.descendants()}get xSize(){return this.size[0]}get ySize(){return this.size[1]}get top(){return this.y}get bottom(){return this.y+this.ySize}get left(){return this.x-this.xSize/2}get right(){return this.x+this.xSize/2}get root(){const t=this.ancestors();return t[t.length-1]}get numChildren(){return this.hasChildren?this.children.length:0}get hasChildren(){return!this.noChildren}get noChildren(){return null===this.children}get firstChild(){return this.hasChildren?this.children[0]:null}get lastChild(){return this.hasChildren?this.children[this.numChildren-1]:null}get extents(){return(this.children||[]).reduce(((t,e)=>n.maxExtents(t,e.extents)),this.nodeExtents)}get nodeExtents(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}static maxExtents(t,e){return{top:Math.min(t.top,e.top),bottom:Math.max(t.bottom,e.bottom),left:Math.min(t.left,e.left),right:Math.max(t.right,e.right)}}}}function o(t,e,n){const r=(e,i)=>{const s=new t(e);Object.assign(s,{parent:i,depth:null===i?0:i.depth+1,height:0,length:1});const o=n(e)||[];return s.children=0===o.length?null:o.map((t=>r(t,s))),s.children&&Object.assign(s,s.children.reduce(((t,e)=>({height:Math.max(t.height,e.height+1),length:t.length+e.length})),s)),s};return r(e,null)}return Object.assign(r,{nodeSize(t){return arguments.length?(e.nodeSize=t,r):e.nodeSize},spacing(t){return arguments.length?(e.spacing=t,r):e.spacing},children(t){return arguments.length?(e.children=t,r):e.children},hierarchy(t,n){const r=void 0===n?e.children:n;return o(s(),t,r)},dump(t){const e=n("nodeSize"),r=t=>n=>{const i=t+" ",s=t+" ",{x:o,y:a}=n,l=e(n),c=n.children||[],u=0===c.length?" ":`,${i}children: [${s}${c.map(r(s)).join(s)}${i}],${t}`;return`{ size: [${l.join(", ")}],${i}x: ${o}, y: ${a}${u}},`};return r("\n")(t)}}),r}h.version=c;const p=(t,e=0)=>(t.y=e,(t.children||[]).reduce(((e,n)=>{const[r,i]=e;p(n,t.y+t.ySize);const s=(0===r?n.lExt:n.rExt).bottom;return 0!==r&&m(t,r,i),[r+1,w(s,r,i)]}),[0,null]),f(t),S(t),t),d=(t,e,n)=>{void 0===e&&(e=-t.relX-t.prelim,n=0);const r=e+t.relX;return t.relX=r+t.prelim-n,t.prelim=0,t.x=n+t.relX,(t.children||[]).forEach((e=>d(e,r,t.x))),t},f=t=>{(t.children||[]).reduce(((t,e)=>{const[n,r]=t,i=n+e.shift,s=r+i+e.change;return e.relX+=s,[i,s]}),[0,0])},m=(t,e,n)=>{const r=t.children[e-1],i=t.children[e];let s=r,o=r.relX,a=i,l=i.relX,c=!0;for(;s&&a;){s.bottom>n.lowY&&(n=n.next);const r=o+s.prelim-(l+a.prelim)+s.xSize/2+a.xSize/2+s.spacing(a);(r>0||r<0&&c)&&(l+=r,y(i,r),g(t,e,n.index,r)),c=!1;const u=s.bottom,h=a.bottom;u<=h&&(s=b(s),s&&(o+=s.relX)),u>=h&&(a=v(a),a&&(l+=a.relX))}!s&&a?T(t,e,a,l):s&&!a&&x(t,e,s,o)},y=(t,e)=>{t.relX+=e,t.lExtRelX+=e,t.rExtRelX+=e},g=(t,e,n,r)=>{const i=t.children[e],s=e-n;if(s>1){const e=r/s;t.children[n+1].shift+=e,i.shift-=e,i.change-=r-e}},v=t=>t.hasChildren?t.firstChild:t.lThr,b=t=>t.hasChildren?t.lastChild:t.rThr,T=(t,e,n,r)=>{const i=t.firstChild,s=i.lExt,o=t.children[e];s.lThr=n;const a=r-n.relX-i.lExtRelX;s.relX+=a,s.prelim-=a,i.lExt=o.lExt,i.lExtRelX=o.lExtRelX},x=(t,e,n,r)=>{const i=t.children[e],s=i.rExt,o=t.children[e-1];s.rThr=n;const a=r-n.relX-i.rExtRelX;s.relX+=a,s.prelim-=a,i.rExt=o.rExt,i.rExtRelX=o.rExtRelX},S=t=>{if(t.hasChildren){const e=t.firstChild,n=t.lastChild,r=(e.prelim+e.relX-e.xSize/2+n.relX+n.prelim+n.xSize/2)/2;Object.assign(t,{prelim:r,lExt:e.lExt,lExtRelX:e.lExtRelX,rExt:n.rExt,rExtRelX:n.rExtRelX})}},w=(t,e,n)=>{for(;null!==n&&t>=n.lowY;)n=n.next;return{lowY:t,index:e,next:n}}},94811:(t,e,n)=>{var r=n(23486),i=n(99071),s=n(90475),o=n(26531),a=n(22521),l=n(83115),c=n(22198),u=n(86115),h=l("toStringTag"),p=TypeError,d=function(){if(i(this,c),s(this)===c)throw new p("Abstract class AsyncIterator not directly constructable")};d.prototype=c,a(c,h)||o(c,h,"AsyncIterator"),!u&&a(c,"constructor")&&c.constructor!==Object||o(c,"constructor",d),r({global:!0,constructor:!0,forced:u},{AsyncIterator:d})},95039:(t,e,n)=>{var r=n(23486),i=n(29113).includes,s=n(59767),o=n(73357),a=s((function(){return!Array(1).includes()})),l=s((function(){return[,1].includes(void 0,1)}));r({target:"Array",proto:!0,forced:a||l},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},95167:(t,e,n)=>{var r=n(25178),i=String,s=TypeError;t.exports=function(t){if(r(t))return t;throw new s(i(t)+" is not an object")}},95210:(t,e,n)=>{var r=n(23486),i=n(11879).toArray;r({target:"AsyncIterator",proto:!0,real:!0,forced:!0},{toArray:function(){return i(this,void 0,[])}})},95774:(t,e,n)=>{var r=n(38460),i=n(5550),s=n(42191),o=n(92658),a=n(20054),l=n(1811),c=r.aTypedArray,u=r.getTypedArrayConstructor,h=r.exportTypedArrayMethod,p=Math.max,d=Math.min;h("toSpliced",(function(t,e){var n,r,h,f,m,y,g,v=c(this),b=u(v),T=i(v),x=o(t,T),S=arguments.length,w=0;if(0===S)n=r=0;else if(1===S)n=0,r=T-x;else if(r=d(p(l(e),0),T-x),n=S-2){f=new b(n),h=s(f);for(var E=2;E<S;E++)m=arguments[E],f[E-2]=h?a(m):+m}for(g=new b(y=T+n-r);w<x;w++)g[w]=v[w];for(;w<x+n;w++)g[w]=f[w-x];for(;w<y;w++)g[w]=v[w+r-n];return g}),!0)},95935:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,n){switch(e.type){case"MemberExpression":case"OptionalMemberExpression":return e.property===t?!!e.computed:e.object===t;case"JSXMemberExpression":return e.object===t;case"VariableDeclarator":return e.init===t;case"ArrowFunctionExpression":return e.body===t;case"PrivateName":case"LabeledStatement":case"CatchClause":case"RestElement":case"BreakStatement":case"ContinueStatement":case"FunctionDeclaration":case"FunctionExpression":case"ExportNamespaceSpecifier":case"ExportDefaultSpecifier":case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":case"ImportAttribute":case"JSXAttribute":case"ObjectPattern":case"ArrayPattern":case"MetaProperty":return!1;case"ClassMethod":case"ClassPrivateMethod":case"ObjectMethod":return e.key===t&&!!e.computed;case"ObjectProperty":return e.key===t?!!e.computed:"ObjectPattern"!==(null==n?void 0:n.type);case"ClassProperty":case"ClassAccessorProperty":case"TSPropertySignature":return e.key!==t||!!e.computed;case"ClassPrivateProperty":case"ObjectTypeProperty":return e.key!==t;case"ClassDeclaration":case"ClassExpression":return e.superClass===t;case"AssignmentExpression":case"AssignmentPattern":return e.right===t;case"ExportSpecifier":return(null==n||!n.source)&&e.local===t;case"TSEnumMember":return e.id!==t}return!0}},96045:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e={}){const n=e.preserveComments?i:s;for(const e of n)null!=t[e]&&(t[e]=void 0);for(const e of Object.keys(t))e.startsWith("_")&&null!=t[e]&&(t[e]=void 0);const r=Object.getOwnPropertySymbols(t);for(const e of r)t[e]=null};var r=n(19910);const i=["tokens","start","end","loc","raw","rawValue"],s=[...r.COMMENT_KEYS,"comments",...i]},96918:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(66360),i=n(53287);e.default=function(t,e){if((0,r.isStatement)(t))return t;let n,s=!1;if((0,r.isClass)(t))s=!0,n="ClassDeclaration";else if((0,r.isFunction)(t))s=!0,n="FunctionDeclaration";else if((0,r.isAssignmentExpression)(t))return(0,i.expressionStatement)(t);if(s&&!t.id&&(n=!1),!n){if(e)return!1;throw new Error(`cannot turn ${t.type} to a statement`)}return t.type=n,t}},97344:(t,e,n)=>{var r=n(15088).process,i=n(83843);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e){var n=t.entry;for(t.entry=null;n;){var r=n.callback;e.pendingcb--,r(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=g;var o,a=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i.nextTick;g.WritableState=y;var l=Object.create(n(22956));l.inherits=n(46324);var c,u={deprecate:n(39237)},h=n(81085),p=n(12006).Buffer,d=(void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=n(31020);function m(){}function y(t,e){o=o||n(8290),t=t||{};var r=e instanceof o;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var l=t.highWaterMark,c=t.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=l||0===l?l:r&&(c||0===c)?c:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,s=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,s){--e.pendingcb,n?(i.nextTick(s,r),i.nextTick(w,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(s(r),t._writableState.errorEmitted=!0,t.emit("error",r),w(t,e))}(t,n,r,e,s);else{var o=x(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||T(t,n),r?a(b,t,n,o,s):b(t,n,o,s)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function g(t){if(o=o||n(8290),!(c.call(g,this)||this instanceof o))return new g(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function v(t,e,n,r,i,s,o){e.writelen=r,e.writecb=o,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,s,e.onwrite),e.sync=!1}function b(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),w(t,e)}function T(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var a=0,l=!0;n;)i[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;i.allBuffers=l,v(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,h=n.callback;if(v(t,e,!1,e.objectMode?1:c.length,c,u,h),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function S(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),w(t,e)}))}function w(t,e){var n=x(e);return n&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(S,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}l.inherits(g,h),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===g&&t&&t._writableState instanceof y}})):c=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(t,e,n){var r,s=this._writableState,o=!1,a=!s.objectMode&&(r=t,p.isBuffer(r)||r instanceof d);return a&&!p.isBuffer(t)&&(t=function(t){return p.from(t)}(t)),"function"==typeof e&&(n=e,e=null),a?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof n&&(n=m),s.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),i.nextTick(e,n)}(this,n):(a||function(t,e,n,r){var s=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),i.nextTick(r,o),s=!1),s}(this,s,t,n))&&(s.pendingcb++,o=function(t,e,n,r,i,s){if(!n){var o=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=p.from(e,n)),e}(e,r,i);r!==o&&(n=!0,i="buffer",r=o)}var a=e.objectMode?1:r.length;e.length+=a;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:s,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else v(t,e,!1,a,r,i,s);return l}(this,s,a,t,e,n)),o},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||T(this,t))},g.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||function(t,e,n){e.ending=!0,w(t,e),n&&(e.finished?i.nextTick(n):t.once("finish",n)),e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=f.destroy,g.prototype._undestroy=f.undestroy,g.prototype._destroy=function(t,e){this.end(),e(t)}},97359:(t,e,n)=>{e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(51843),e.createHash=e.Hash=n(5590),e.createHmac=e.Hmac=n(74325);var r=n(12237),i=Object.keys(r),s=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return s};var o=n(84518);e.pbkdf2=o.pbkdf2,e.pbkdf2Sync=o.pbkdf2Sync;var a=n(33759);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var l=n(63418);e.DiffieHellmanGroup=l.DiffieHellmanGroup,e.createDiffieHellmanGroup=l.createDiffieHellmanGroup,e.getDiffieHellman=l.getDiffieHellman,e.createDiffieHellman=l.createDiffieHellman,e.DiffieHellman=l.DiffieHellman;var c=n(64690);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=n(56094);var u=n(47022);e.publicEncrypt=u.publicEncrypt,e.privateEncrypt=u.privateEncrypt,e.publicDecrypt=u.publicDecrypt,e.privateDecrypt=u.privateDecrypt;var h=n(16881);e.randomFill=h.randomFill,e.randomFillSync=h.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},97527:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0});var r=n(91418);Object.keys(r).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===r[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return r[t]}}))}));var i=n(69551);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===i[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}}))}));var s=n(89985);Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===s[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}));var o=n(83895);Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===o[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}}))}));var a=n(32917);Object.keys(a).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===a[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[t]}}))}));var l=n(46190);Object.keys(l).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===l[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return l[t]}}))}));var c=n(26350);Object.keys(c).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===c[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return c[t]}}))}));var u=n(38155);Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===u[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}}))}));var h=n(22778);Object.keys(h).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===h[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return h[t]}}))}));var p=n(89666);Object.keys(p).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===p[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return p[t]}}))}));var d=n(43748);Object.keys(d).forEach((function(t){"default"!==t&&"__esModule"!==t&&(t in e&&e[t]===d[t]||Object.defineProperty(e,t,{enumerable:!0,get:function(){return d[t]}}))}))},98919:(t,e,n)=>{n.d(e,{K:()=>r});const r=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"]},99071:(t,e,n)=>{var r=n(13185),i=TypeError;t.exports=function(t,e){if(r(e,t))return t;throw new i("Incorrect invocation")}},99261:(t,e,n)=>{var r=n(52479),i=n(2269),s=n(13185),o=n(15256),a=Object;t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&s(e.prototype,a(t))}},99496:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if(t===e)return!0;const n=r.PLACEHOLDERS_ALIAS[t];return!(null==n||!n.includes(e))};var r=n(49625)},99791:(t,e,n)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return(0,r.isFunctionDeclaration)(t)||(0,r.isClassDeclaration)(t)||(0,i.default)(t)};var r=n(66360),i=n(33599)}};