@batijs/core 0.0.56 → 0.0.58

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 (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -1870,4 +1870,4 @@ import*as e from"tty";import*as t from"util";import*as r from"os";import*as n fr
1870
1870
  || ${o} === "boolean" || ${s} === null`).assign(l,i._`[${s}]`)}}n.else(),d(e),n.endIf(),n.if(i._`${l} !== undefined`,(()=>{n.assign(s,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(i._`${t} !== undefined`,(()=>e.assign(i._`${t}[${r}]`,n)))}(e,l)}))}(e,t,l):d(e)}))}return p};const u=new Set(["string","number","integer","boolean","null"]);function l(e,t,r,n=a.Correct){const s=n===a.Correct?i.operators.EQ:i.operators.NEQ;let o;switch(e){case"null":return i._`${t} ${s} null`;case"array":o=i._`Array.isArray(${t})`;break;case"object":o=i._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=u(i._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=u();break;default:return i._`typeof ${t} ${s} ${e}`}return n===a.Correct?o:(0,i.not)(o);function u(e=i.nil){return(0,i.and)(i._`typeof ${t} == "number"`,e,r?i._`isFinite(${t})`:i.nil)}}function c(e,t,r,n){if(1===e.length)return l(e[0],t,r,n);let a;const o=(0,s.toHash)(e);if(o.array&&o.object){const e=i._`typeof ${t} != "object"`;a=o.null?e:i._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else a=i.nil;o.number&&delete o.integer;for(const e in o)a=(0,i.and)(a,l(e,t,r,n));return a}e.checkDataType=l,e.checkDataTypes=c;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?i._`{type: ${e}}`:i._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,n.reportError)(t,p)}e.reportTypeError=d}(E4);var P4,w4={};var k4,F4,I4={},_4={};function N4(){if(k4)return _4;k4=1,Object.defineProperty(_4,"__esModule",{value:!0}),_4.validateUnion=_4.validateArray=_4.usePattern=_4.callValidateCode=_4.schemaProperties=_4.allSchemaProperties=_4.noPropertyInData=_4.propertyInData=_4.isOwnProperty=_4.hasPropFunc=_4.reportMissingProp=_4.checkMissingProp=_4.checkReportMissingProp=void 0;const e=h4(),t=f4,r=v4(),n=f4;function i(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function s(t,r,n){return e._`${i(t)}.call(${r}, ${n})`}function a(t,r,n,i){const a=e._`${r}${(0,e.getProperty)(n)} === undefined`;return i?(0,e.or)(a,(0,e.not)(s(t,r,n))):a}function o(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}_4.checkReportMissingProp=function(t,r){const{gen:n,data:i,it:s}=t;n.if(a(n,i,r,s.opts.ownProperties),(()=>{t.setParams({missingProperty:e._`${r}`},!0),t.error()}))},_4.checkMissingProp=function({gen:t,data:r,it:{opts:n}},i,s){return(0,e.or)(...i.map((i=>(0,e.and)(a(t,r,i,n.ownProperties),e._`${s} = ${i}`))))},_4.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},_4.hasPropFunc=i,_4.isOwnProperty=s,_4.propertyInData=function(t,r,n,i){const a=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return i?e._`${a} && ${s(t,r,n)}`:a},_4.noPropertyInData=a,_4.allSchemaProperties=o,_4.schemaProperties=function(e,r){return o(r).filter((n=>!(0,t.alwaysValidSchema)(e,r[n])))},_4.callValidateCode=function({schemaCode:t,data:n,it:{gen:i,topSchemaRef:s,schemaPath:a,errorPath:o},it:u},l,c,p){const d=p?e._`${t}, ${n}, ${s}${a}`:n,h=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,o)],[r.default.parentData,u.parentData],[r.default.parentDataProperty,u.parentDataProperty],[r.default.rootData,r.default.rootData]];u.opts.dynamicRef&&h.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const f=e._`${d}, ${i.object(...h)}`;return c!==e.nil?e._`${l}.call(${c}, ${f})`:e._`${l}(${f})`};const u=e._`new RegExp`;return _4.usePattern=function({gen:t,it:{opts:r}},i){const s=r.unicodeRegExp?"u":"",{regExp:a}=r.code,o=a(i,s);return t.scopeValue("pattern",{key:o.toString(),ref:o,code:e._`${"new RegExp"===a.code?u:(0,n.useFunc)(t,a)}(${i}, ${s})`})},_4.validateArray=function(r){const{gen:n,data:i,keyword:s,it:a}=r,o=n.name("valid");if(a.allErrors){const e=n.let("valid",!0);return u((()=>n.assign(e,!1))),e}return n.var(o,!0),u((()=>n.break())),o;function u(a){const u=n.const("len",e._`${i}.length`);n.forRange("i",0,u,(i=>{r.subschema({keyword:s,dataProp:i,dataPropType:t.Type.Num},o),n.if((0,e.not)(o),a)}))}},_4.validateUnion=function(r){const{gen:n,schema:i,keyword:s,it:a}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");if(i.some((e=>(0,t.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const o=n.let("valid",!1),u=n.name("_valid");n.block((()=>i.forEach(((t,i)=>{const a=r.subschema({keyword:s,schemaProp:i,compositeRule:!0},u);n.assign(o,e._`${o} || ${u}`);r.mergeValidEvaluated(a,u)||n.if((0,e.not)(o))})))),r.result(o,(()=>r.reset()),(()=>r.error(!0)))},_4}function O4(){if(F4)return I4;F4=1,Object.defineProperty(I4,"__esModule",{value:!0}),I4.validateKeywordUsage=I4.validSchemaType=I4.funcKeywordCode=I4.macroKeywordCode=void 0;const e=h4(),t=v4(),r=N4(),n=x4();function i(t){const{gen:r,data:n,it:i}=t;r.if(i.parentData,(()=>r.assign(n,e._`${i.parentData}[${i.parentDataProperty}]`)))}function s(t,r,n){if(void 0===n)throw new Error(`keyword "${r}" failed to compile`);return t.scopeValue("keyword","function"==typeof n?{ref:n}:{ref:n,code:(0,e.stringify)(n)})}return I4.macroKeywordCode=function(t,r){const{gen:n,keyword:i,schema:a,parentSchema:o,it:u}=t,l=r.macro.call(u.self,a,o,u),c=s(n,i,l);!1!==u.opts.validateSchema&&u.self.validateSchema(l,!0);const p=n.name("valid");t.subschema({schema:l,schemaPath:e.nil,errSchemaPath:`${u.errSchemaPath}/${i}`,topSchemaRef:c,compositeRule:!0},p),t.pass(p,(()=>t.error(!0)))},I4.funcKeywordCode=function(a,o){var u;const{gen:l,keyword:c,schema:p,parentSchema:d,$data:h,it:f}=a;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(f,o);const m=!h&&o.compile?o.compile.call(f.self,p,d,f):o.validate,y=s(l,c,m),g=l.let("valid");function b(n=(o.async?e._`await `:e.nil)){const i=f.opts.passContext?t.default.this:t.default.self,s=!("compile"in o&&!h||!1===o.schema);l.assign(g,e._`${n}${(0,r.callValidateCode)(a,y,i,s)}`,o.modifying)}function v(t){var r;l.if((0,e.not)(null!==(r=o.valid)&&void 0!==r?r:g),t)}a.block$data(g,(function(){if(!1===o.errors)b(),o.modifying&&i(a),v((()=>a.error()));else{const r=o.async?function(){const t=l.let("ruleErrs",null);return l.try((()=>b(e._`await `)),(r=>l.assign(g,!1).if(e._`${r} instanceof ${f.ValidationError}`,(()=>l.assign(t,e._`${r}.errors`)),(()=>l.throw(r))))),t}():function(){const t=e._`${y}.errors`;return l.assign(t,null),b(e.nil),t}();o.modifying&&i(a),v((()=>function(r,i){const{gen:s}=r;s.if(e._`Array.isArray(${i})`,(()=>{s.assign(t.default.vErrors,e._`${t.default.vErrors} === null ? ${i} : ${t.default.vErrors}.concat(${i})`).assign(t.default.errors,e._`${t.default.vErrors}.length`),(0,n.extendErrors)(r)}),(()=>r.error()))}(a,r)))}})),a.ok(null!==(u=o.valid)&&void 0!==u?u:g)},I4.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},I4.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,s){if(Array.isArray(i.keyword)?!i.keyword.includes(s):i.keyword!==s)throw new Error("ajv implementation error");const a=i.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(i.validateSchema){if(!i.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},I4}var B4,L4={};var M4={},j4=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(s=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;0!=i--;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r},R4={exports:{}},$4=R4.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),U4(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function U4(e,t,r,n,i,s,a,o,u,l){if(n&&"object"==typeof n&&!Array.isArray(n)){for(var c in t(n,i,s,a,o,u,l),n){var p=n[c];if(Array.isArray(p)){if(c in $4.arrayKeywords)for(var d=0;d<p.length;d++)U4(e,t,r,p[d],i+"/"+c+"/"+d,s,i,c,n,d)}else if(c in $4.propsKeywords){if(p&&"object"==typeof p)for(var h in p)U4(e,t,r,p[h],i+"/"+c+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,c,n,h)}else(c in $4.keywords||e.allKeys&&!(c in $4.skipKeywords))&&U4(e,t,r,p,i+"/"+c,s,i,c,n)}r(n,i,s,a,o,u,l)}}$4.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},$4.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},$4.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},$4.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};var V4=R4.exports;Object.defineProperty(M4,"__esModule",{value:!0}),M4.getSchemaRefs=M4.resolveUrl=M4.normalizeId=M4._getFullPath=M4.getFullPath=M4.inlineRef=void 0;const z4=f4,K4=j4,q4=V4,W4=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);M4.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!H4(e):!!t&&X4(e)<=t)};const J4=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function H4(e){for(const t in e){if(J4.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(H4))return!0;if("object"==typeof r&&H4(r))return!0}return!1}function X4(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!W4.has(r)&&("object"==typeof e[r]&&(0,z4.eachItem)(e[r],(e=>t+=X4(e))),t===1/0))return 1/0}return t}function G4(e,t="",r){!1!==r&&(t=Z4(t));const n=e.parse(t);return Y4(e,n)}function Y4(e,t){return e.serialize(t).split("#")[0]+"#"}M4.getFullPath=G4,M4._getFullPath=Y4;const Q4=/#\/?$/;function Z4(e){return e?e.replace(Q4,""):""}M4.normalizeId=Z4,M4.resolveUrl=function(e,t,r){return r=Z4(r),e.resolve(t,r)};const e8=/^[a-z_][-a-z0-9._]*$/i;var t8;function r8(){if(t8)return n4;t8=1,Object.defineProperty(n4,"__esModule",{value:!0}),n4.getData=n4.KeywordCxt=n4.validateFunctionCode=void 0;const e=function(){if(g4)return i4;g4=1,Object.defineProperty(i4,"__esModule",{value:!0}),i4.boolOrEmptySchema=i4.topBoolOrEmptySchema=void 0;const e=x4(),t=h4(),r=v4(),n={message:"boolean schema is false"};function i(t,r){const{gen:i,data:s}=t,a={gen:i,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,e.reportError)(a,n,void 0,r)}return i4.topBoolOrEmptySchema=function(e){const{gen:n,schema:s,validateName:a}=e;!1===s?i(e,!1):"object"==typeof s&&!0===s.$async?n.return(r.default.data):(n.assign(t._`${a}.errors`,null),n.return(!0))},i4.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),i(e)):r.var(t,!0)},i4}(),t=E4,r=C4(),n=E4,i=function(){if(P4)return w4;P4=1,Object.defineProperty(w4,"__esModule",{value:!0}),w4.assignDefaults=void 0;const e=h4(),t=f4;function r(r,n,i){const{gen:s,compositeRule:a,data:o,opts:u}=r;if(void 0===i)return;const l=e._`${o}${(0,e.getProperty)(n)}`;if(a)return void(0,t.checkStrictMode)(r,`default is ignored for: ${l}`);let c=e._`${l} === undefined`;"empty"===u.useDefaults&&(c=e._`${c} || ${l} === null || ${l} === ""`),s.if(c,e._`${l} = ${(0,e.stringify)(i)}`)}return w4.assignDefaults=function(e,t){const{properties:n,items:i}=e.schema;if("object"===t&&n)for(const t in n)r(e,t,n[t].default);else"array"===t&&Array.isArray(i)&&i.forEach(((t,n)=>r(e,n,t.default)))},w4}(),s=O4(),a=function(){if(B4)return L4;B4=1,Object.defineProperty(L4,"__esModule",{value:!0}),L4.extendSubschemaMode=L4.extendSubschemaData=L4.getSubschema=void 0;const e=h4(),t=f4;return L4.getSubschema=function(r,{keyword:n,schemaProp:i,schema:s,schemaPath:a,errSchemaPath:o,topSchemaRef:u}){if(void 0!==n&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==n){const s=r.schema[n];return void 0===i?{schema:s,schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}`,errSchemaPath:`${r.errSchemaPath}/${n}`}:{schema:s[i],schemaPath:e._`${r.schemaPath}${(0,e.getProperty)(n)}${(0,e.getProperty)(i)}`,errSchemaPath:`${r.errSchemaPath}/${n}/${(0,t.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===a||void 0===o||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:a,topSchemaRef:u,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')},L4.extendSubschemaData=function(r,n,{dataProp:i,dataPropType:s,data:a,dataTypes:o,propertyName:u}){if(void 0!==a&&void 0!==i)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=n;if(void 0!==i){const{errorPath:a,dataPathArr:o,opts:u}=n;c(l.let("data",e._`${n.data}${(0,e.getProperty)(i)}`,!0)),r.errorPath=e.str`${a}${(0,t.getErrorPath)(i,s,u.jsPropertySyntax)}`,r.parentDataProperty=e._`${i}`,r.dataPathArr=[...o,r.parentDataProperty]}function c(e){r.data=e,r.dataLevel=n.dataLevel+1,r.dataTypes=[],n.definedProperties=new Set,r.parentData=n.data,r.dataNames=[...n.dataNames,e]}void 0!==a&&(c(a instanceof e.Name?a:l.let("data",a,!0)),void 0!==u&&(r.propertyName=u)),o&&(r.dataTypes=o)},L4.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r},L4}(),o=h4(),u=v4(),l=M4,c=f4,p=x4();function d({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},s){i.code.es5?e.func(t,o._`${u.default.data}, ${u.default.valCxt}`,n.$async,(()=>{e.code(o._`"use strict"; ${h(r,i)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,o._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,o._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,o._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,o._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,o._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,o._`""`),e.var(u.default.parentData,o._`undefined`),e.var(u.default.parentDataProperty,o._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,o._`{}`)}))}(e,i),e.code(s)})):e.func(t,o._`${u.default.data}, ${function(e){return o._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?o._`, ${u.default.dynamicAnchors}={}`:o.nil}}={}`}(i)}`,n.$async,(()=>e.code(h(r,i)).code(s)))}function h(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?o._`/*# sourceURL=${r} */`:o.nil}function f(t,r){y(t)&&(g(t),m(t))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&v(e);(function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,l.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",u.default.errors);b(e,s),n.var(t,o._`${s} === ${u.default.errors}`)}(t,r):(0,e.boolOrEmptySchema)(t,r)}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function y(e){return"boolean"!=typeof e.schema}function g(e){(0,c.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function b(e,r){if(e.opts.jtd)return x(e,[],!1,r);const n=(0,t.getSchemaTypes)(e.schema);x(e,n,!(0,t.coerceAndCheckDataType)(e,n),r)}function v({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const s=r.$comment;if(!0===i.$comment)e.code(o._`${u.default.self}.logger.log(${s})`);else if("function"==typeof i.$comment){const r=o.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(o._`${u.default.self}.opts.$comment(${s}, ${r}, ${i}.schema)`)}}function x(e,t,i,s){const{gen:a,schema:l,data:p,allErrors:d,opts:h,self:f}=e,{RULES:m}=f;function y(c){(0,r.shouldUseGroup)(l,c)&&(c.type?(a.if((0,n.checkDataType)(c.type,p,h.strictNumbers)),E(e,c),1===t.length&&t[0]===c.type&&i&&(a.else(),(0,n.reportTypeError)(e)),a.endIf()):E(e,c),d||a.if(o._`${u.default.errors} === ${s||0}`))}!l.$ref||!h.ignoreKeywordsWithRef&&(0,c.schemaHasRulesButRef)(l,m)?(h.jtd||function(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach((t=>{D(e.dataTypes,t)||T(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)D(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)})(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&T(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function(e,t){const n=e.self.RULES.all;for(const i in n){const s=n[i];if("object"==typeof s&&(0,r.shouldUseRule)(e.schema,s)){const{type:r}=s.definition;r.length&&!r.some((e=>S(t,e)))&&T(e,`missing type "${r.join(",")}" for keyword "${i}"`)}}}(e,e.dataTypes)}(e,t),a.block((()=>{for(const e of m.rules)y(e);y(m.post)}))):a.block((()=>C(e,"$ref",m.all.$ref.definition)))}function E(e,t){const{gen:n,schema:s,opts:{useDefaults:a}}=e;a&&(0,i.assignDefaults)(e,t.type),n.block((()=>{for(const n of t.rules)(0,r.shouldUseRule)(s,n)&&C(e,n.keyword,n.definition,t.type)}))}function S(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function D(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function T(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,c.checkStrictMode)(e,t,e.opts.strictTypes)}n4.validateFunctionCode=function(t){y(t)&&(g(t),m(t))?function(e){const{schema:t,opts:r,gen:n}=e;d(e,(()=>{r.$comment&&t.$comment&&v(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,c.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(u.default.vErrors,null),n.let(u.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",o._`${r}.evaluated`),t.if(o._`${e.evaluated}.dynamicProps`,(()=>t.assign(o._`${e.evaluated}.props`,o._`undefined`))),t.if(o._`${e.evaluated}.dynamicItems`,(()=>t.assign(o._`${e.evaluated}.items`,o._`undefined`)))}(e),b(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:s}=e;r.$async?t.if(o._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(o._`new ${i}(${u.default.vErrors})`))):(t.assign(o._`${n}.errors`,u.default.vErrors),s.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof o.Name&&e.assign(o._`${t}.props`,r);n instanceof o.Name&&e.assign(o._`${t}.items`,n)}(e),t.return(o._`${u.default.errors} === 0`))}(e)}))}(t):d(t,(()=>(0,e.topBoolOrEmptySchema)(t)))};class A{constructor(e,t,r){if((0,s.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,c.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",k(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors))}result(e,t,r){this.failResult((0,o.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,o.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(o._`${t} !== undefined && (${(0,o.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=o.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=o.nil,t=o.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:s}=this;r.if((0,o.or)(o._`${n} === undefined`,t)),e!==o.nil&&r.assign(e,!0),(i.length||s.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==o.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:i,it:s}=this;return(0,o.or)(function(){if(r.length){if(!(t instanceof o.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return o._`${(0,n.checkDataTypes)(e,t,s.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}(),function(){if(i.validateSchema){const r=e.scopeValue("validate$data",{ref:i.validateSchema});return o._`!${r}(${t})`}return o.nil}())}subschema(e,t){const r=(0,a.getSubschema)(this.it,e);(0,a.extendSubschemaData)(r,this.it,e),(0,a.extendSubschemaMode)(r,e);const n={...this.it,...r,items:void 0,props:void 0};return f(n,t),n}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=c.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=c.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,o.Name))),!0}}function C(e,t,r,n){const i=new A(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,s.funcKeywordCode)(i,r):"macro"in r?(0,s.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,s.funcKeywordCode)(i,r)}n4.KeywordCxt=A;const P=/^\/(?:[^~]|~0|~1)*$/,w=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function k(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,s;if(""===e)return u.default.rootData;if("/"===e[0]){if(!P.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,s=u.default.rootData}else{const a=w.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const o=+a[1];if(i=a[2],"#"===i){if(o>=t)throw new Error(p("property/index",o));return n[t-o]}if(o>t)throw new Error(p("data",o));if(s=r[t-o],!i)return s}let a=s;const l=i.split("/");for(const e of l)e&&(s=o._`${s}${(0,o.getProperty)((0,c.unescapeJsonPointer)(e))}`,a=o._`${a} && ${s}`);return a;function p(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}return n4.getData=k,n4}M4.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,i=Z4(e[r]||t),s={"":i},a=G4(n,i,!1),o={},u=new Set;return q4(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const p=a+t;let d=s[i];function h(t){const r=this.opts.uriResolver.resolve;if(t=Z4(d?r(d,t):t),u.has(t))throw c(t);u.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?l(e,n.schema,t):t!==Z4(p)&&("#"===t[0]?(l(e,o[t],t),o[t]=e):this.refs[t]=p),t}function f(e){if("string"==typeof e){if(!e8.test(e))throw new Error(`invalid anchor "${e}"`);h.call(this,`#${e}`)}}"string"==typeof e[r]&&(d=h.call(this,e[r])),f.call(this,e.$anchor),f.call(this,e.$dynamicAnchor),s[t]=d})),o;function l(e,t,r){if(void 0!==t&&!K4(e,t))throw c(r)}function c(e){return new Error(`reference "${e}" resolves to more than one schema`)}};var n8,i8={};function s8(){if(n8)return i8;n8=1,Object.defineProperty(i8,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return i8.default=e,i8}var a8,o8={};function u8(){if(a8)return o8;a8=1,Object.defineProperty(o8,"__esModule",{value:!0});const e=M4;class t extends Error{constructor(t,r,n,i){super(i||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,e.resolveUrl)(t,r,n),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(t,this.missingRef))}}return o8.default=t,o8}var l8={};Object.defineProperty(l8,"__esModule",{value:!0}),l8.resolveSchema=l8.getCompilingSchema=l8.resolveRef=l8.compileSchema=l8.SchemaEnv=void 0;const c8=h4(),p8=s8(),d8=v4(),h8=M4,f8=f4,m8=r8();class y8{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,h8.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function g8(e){const t=v8.call(this,e);if(t)return t;const r=(0,h8.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new c8.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s});let o;e.$async&&(o=a.scopeValue("Error",{ref:p8.default,code:c8._`require("ajv/dist/runtime/validation_error").default`}));const u=a.scopeName("validate");e.validateName=u;const l={gen:a,allErrors:this.opts.allErrors,data:d8.default.data,parentData:d8.default.parentData,parentDataProperty:d8.default.parentDataProperty,dataNames:[d8.default.data],dataPathArr:[c8.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,c8.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:c8.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:c8._`""`,opts:this.opts,self:this};let c;try{this._compilations.add(e),(0,m8.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);const t=a.toString();c=`${a.scopeRefs(d8.default.scope)}return ${t}`,this.opts.code.process&&(c=this.opts.code.process(c,e));const r=new Function(`${d8.default.self}`,`${d8.default.scope}`,c)(this,this.scope.get());if(this.scope.value(u,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:u,validateCode:t,scopeValues:a._values}),this.opts.unevaluated){const{props:e,items:t}=l;r.evaluated={props:e instanceof c8.Name?void 0:e,items:t instanceof c8.Name?void 0:t,dynamicProps:e instanceof c8.Name,dynamicItems:t instanceof c8.Name},r.source&&(r.source.evaluated=(0,c8.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,c&&this.logger.error("Error compiling schema, function code:",c),t}finally{this._compilations.delete(e)}}function b8(e){return(0,h8.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:g8.call(this,e)}function v8(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function x8(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||E8.call(this,e,t)}function E8(e,t){const r=this.opts.uriResolver.parse(t),n=(0,h8._getFullPath)(this.opts.uriResolver,r);let i=(0,h8.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return D8.call(this,r,e);const s=(0,h8.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=E8.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return D8.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||g8.call(this,a),s===(0,h8.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,h8.resolveUrl)(this.opts.uriResolver,i,n)),new y8({schema:t,schemaId:r,root:e,baseId:i})}return D8.call(this,r,a)}}l8.SchemaEnv=y8,l8.compileSchema=g8,l8.resolveRef=function(e,t,r){var n;r=(0,h8.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=x8.call(this,e,r);if(void 0===s){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:a}=this.opts;i&&(s=new y8({schema:i,schemaId:a,root:e,baseId:t}))}return void 0!==s?e.refs[r]=b8.call(this,s):void 0},l8.getCompilingSchema=v8,l8.resolveSchema=E8;const S8=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function D8(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,f8.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!S8.has(n)&&i&&(t=(0,h8.resolveUrl)(this.opts.uriResolver,t,i))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,f8.schemaHasRulesButRef)(r,this.RULES)){const e=(0,h8.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=E8.call(this,n,e)}const{schemaId:a}=this.opts;return s=s||new y8({schema:r,schemaId:a,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}var T8={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},A8={},C8={exports:{}};!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function s(e){return null!=e?e instanceof Array?e:"number"!=typeof e.length||e.split||e.setInterval||e.call?[e]:Array.prototype.slice.call(e):[]}function a(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}function o(e){var n="[A-Za-z]",i="[0-9]",s=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+s+"%"+s+s+"%"+s+s)+"|"+r("%[89A-Fa-f]"+s+"%"+s+s)+"|"+r("%"+s+s)),o="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",o),l=e?"[\\uE000-\\uF8FF]":"[]",c=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(n+t(n,i,"[\\+\\-\\.]")+"*"),r(r(a+"|"+t(c,o,"[\\:]"))+"*");var p=r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i),d=r(p+"\\."+p+"\\."+p+"\\."+p),h=r(s+"{1,4}"),f=r(r(h+"\\:"+h)+"|"+d),m=r(r(h+"\\:")+"{6}"+f),y=r("\\:\\:"+r(h+"\\:")+"{5}"+f),g=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+f),b=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+f),v=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+f),x=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+f),E=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+f),S=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),D=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),T=r([m,y,g,b,v,x,E,S,D].join("|")),A=r(r(c+"|"+a)+"+");r("[vV]"+s+"+\\."+t(c,o,"[\\:]")+"+"),r(r(a+"|"+t(c,o))+"*");var C=r(a+"|"+t(c,o,"[\\:\\@]"));return r(r(a+"|"+t(c,o,"[\\@]"))+"+"),r(r(C+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",c,o),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",c,o),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",c,o),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",c,o),"g"),NOT_QUERY:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",c,o,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",c,o),"g"),UNRESERVED:new RegExp(c,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",c,u),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+d+")$"),IPV6ADDRESS:new RegExp("^\\[?("+T+")"+r(r("\\%25|\\%(?!"+s+"{2})")+"("+A+")")+"?\\]?$")}}var u=o(!1),l=o(!0),c=function(){function e(e,t){var r=[],n=!0,i=!1,s=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,s=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw s}}return r}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),p=function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)},d=2147483647,h=36,f=1,m=26,y=38,g=700,b=72,v=128,x="-",E=/^xn--/,S=/[^\0-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,T={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},A=h-f,C=Math.floor,P=String.fromCharCode;function w(e){throw new RangeError(T[e])}function k(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}function F(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+k((e=e.replace(D,".")).split("."),t).join(".")}function I(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var s=e.charCodeAt(r++);56320==(64512&s)?t.push(((1023&i)<<10)+(1023&s)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:h},N=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},O=function(e,t,r){var n=0;for(e=r?C(e/g):e>>1,e+=C(e/t);e>A*m>>1;n+=h)e=C(e/A);return C(n+(A+1)*e/(e+y))},B=function(e){var t=[],r=e.length,n=0,i=v,s=b,a=e.lastIndexOf(x);a<0&&(a=0);for(var o=0;o<a;++o)e.charCodeAt(o)>=128&&w("not-basic"),t.push(e.charCodeAt(o));for(var u=a>0?a+1:0;u<r;){for(var l=n,c=1,p=h;;p+=h){u>=r&&w("invalid-input");var y=_(e.charCodeAt(u++));(y>=h||y>C((d-n)/c))&&w("overflow"),n+=y*c;var g=p<=s?f:p>=s+m?m:p-s;if(y<g)break;var E=h-g;c>C(d/E)&&w("overflow"),c*=E}var S=t.length+1;s=O(n-l,S,0==l),C(n/S)>d-i&&w("overflow"),i+=C(n/S),n%=S,t.splice(n++,0,i)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],r=(e=I(e)).length,n=v,i=0,s=b,a=!0,o=!1,u=void 0;try{for(var l,c=e[Symbol.iterator]();!(a=(l=c.next()).done);a=!0){var p=l.value;p<128&&t.push(P(p))}}catch(e){o=!0,u=e}finally{try{!a&&c.return&&c.return()}finally{if(o)throw u}}var y=t.length,g=y;for(y&&t.push(x);g<r;){var E=d,S=!0,D=!1,T=void 0;try{for(var A,k=e[Symbol.iterator]();!(S=(A=k.next()).done);S=!0){var F=A.value;F>=n&&F<E&&(E=F)}}catch(e){D=!0,T=e}finally{try{!S&&k.return&&k.return()}finally{if(D)throw T}}var _=g+1;E-n>C((d-i)/_)&&w("overflow"),i+=(E-n)*_,n=E;var B=!0,L=!1,M=void 0;try{for(var j,R=e[Symbol.iterator]();!(B=(j=R.next()).done);B=!0){var $=j.value;if($<n&&++i>d&&w("overflow"),$==n){for(var U=i,V=h;;V+=h){var z=V<=s?f:V>=s+m?m:V-s;if(U<z)break;var K=U-z,q=h-z;t.push(P(N(z+K%q,0))),U=C(K/q)}t.push(P(N(U,0))),s=O(i,_,g==y),i=0,++g}}}catch(e){L=!0,M=e}finally{try{!B&&R.return&&R.return()}finally{if(L)throw M}}++i,++n}return t.join("")},M=function(e){return F(e,(function(e){return E.test(e)?B(e.slice(4).toLowerCase()):e}))},j=function(e){return F(e,(function(e){return S.test(e)?"xn--"+L(e):e}))},R={version:"2.1.0",ucs2:{decode:I,encode:function(e){return String.fromCodePoint.apply(String,p(e))}},decode:B,encode:L,toASCII:j,toUnicode:M},$={};function U(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function V(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var s=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&s)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),o=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&o)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function z(e,t){function r(e){var r=V(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,U).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,U).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,U).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,U).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,U).replace(t.PCT_ENCODED,i)),e}function K(e){return e.replace(/^0*(.*)/,"$1")||"0"}function q(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=c(r,2)[1];return n?n.split(".").map(K).join("."):e}function W(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=c(r,3),i=n[1],s=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),o=c(a,2),u=o[0],l=o[1],p=l?l.split(":").map(K):[],d=u.split(":").map(K),h=t.IPV4ADDRESS.test(d[d.length-1]),f=h?7:8,m=d.length-f,y=Array(f),g=0;g<f;++g)y[g]=p[g]||d[m+g]||"";h&&(y[f-1]=q(y[f-1],t));var b=y.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]),v=b.sort((function(e,t){return t.length-e.length}))[0],x=void 0;if(v&&v.length>1){var E=y.slice(0,v.index),S=y.slice(v.index+v.length);x=E.join(":")+"::"+S.join(":")}else x=y.join(":");return s&&(x+="%"+s),x}return e}var J=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,H=void 0==="".match(/(){0}/)[1];function X(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?l:u;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(J);if(i){H?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=W(q(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var s=$[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||s&&s.unicodeSupport)z(r,n);else{if(r.host&&(t.domainHost||s&&s.domainHost))try{r.host=R.toASCII(r.host.replace(n.PCT_ENCODED,V).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}z(r,u)}s&&s.parse&&s.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function G(e,t){var r=!1!==t.iri?l:u,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(W(q(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var Y=/^\.\.?\//,Q=/^\/\.(\/|$)/,Z=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Y))e=e.replace(Y,"");else if(e.match(Q))e=e.replace(Q,"/");else if(e.match(Z))e=e.replace(Z,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(ee);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function re(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?l:u,n=[],i=$[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?R.toUnicode(e.host):R.toASCII(e.host.replace(r.PCT_ENCODED,V).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}z(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var s=G(e,t);if(void 0!==s&&("suffix"!==t.reference&&n.push("//"),n.push(s),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===s&&(a=a.replace(/^\/\//,"/%2F")),n.push(a)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function ne(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=X(re(e,r),r),t=X(re(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=te(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=te(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function ie(e,t,r){var n=a({scheme:"null"},r);return re(ne(X(e,n),X(t,n),n,!0),n)}function se(e,t){return"string"==typeof e?e=re(X(e,t),t):"object"===n(e)&&(e=X(re(e,t),t)),e}function ae(e,t,r){return"string"==typeof e?e=re(X(e,r),r):"object"===n(e)&&(e=re(e,r)),"string"==typeof t?t=re(X(t,r),r):"object"===n(t)&&(t=re(t,r)),e===t}function oe(e,t){return e&&e.toString().replace(t&&t.iri?l.ESCAPE:u.ESCAPE,U)}function ue(e,t){return e&&e.toString().replace(t&&t.iri?l.PCT_ENCODED:u.PCT_ENCODED,V)}var le={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ce={scheme:"https",domainHost:le.domainHost,parse:le.parse,serialize:le.serialize};function pe(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var de={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=pe(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(pe(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=c(r,2),i=n[0],s=n[1];e.path=i&&"/"!==i?i:void 0,e.query=s,e.resourceName=void 0}return e.fragment=void 0,e}},he={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},fe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ye="[0-9A-Fa-f]",ge=r(r("%[EFef]"+ye+"%"+ye+ye+"%"+ye+ye)+"|"+r("%[89A-Fa-f]"+ye+"%"+ye+ye)+"|"+r("%"+ye+ye)),be="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ve=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),xe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Ee=new RegExp(me,"g"),Se=new RegExp(ge,"g"),De=new RegExp(t("[^]",be,"[\\.]",'[\\"]',ve),"g"),Te=new RegExp(t("[^]",me,xe),"g"),Ae=Te;function Ce(e){var t=V(e);return t.match(Ee)?t:e}var Pe={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,s={},a=r.query.split("&"),o=0,u=a.length;o<u;++o){var l=a[o].split("=");switch(l[0]){case"to":for(var c=l[1].split(","),p=0,d=c.length;p<d;++p)n.push(c[p]);break;case"subject":r.subject=ue(l[1],t);break;case"body":r.body=ue(l[1],t);break;default:i=!0,s[ue(l[0],t)]=ue(l[1],t)}}i&&(r.headers=s)}r.query=void 0;for(var h=0,f=n.length;h<f;++h){var m=n[h].split("@");if(m[0]=ue(m[0]),t.unicodeSupport)m[1]=ue(m[1],t).toLowerCase();else try{m[1]=R.toASCII(ue(m[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[h]=m.join("@")}return r},serialize:function(e,t){var r=e,n=s(e.to);if(n){for(var a=0,o=n.length;a<o;++a){var u=String(n[a]),l=u.lastIndexOf("@"),c=u.slice(0,l).replace(Se,Ce).replace(Se,i).replace(De,U),p=u.slice(l+1);try{p=t.iri?R.toUnicode(p):R.toASCII(ue(p,t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}n[a]=c+"@"+p}r.path=n.join(",")}var d=e.headers=e.headers||{};e.subject&&(d.subject=e.subject),e.body&&(d.body=e.body);var h=[];for(var f in d)d[f]!==fe[f]&&h.push(f.replace(Se,Ce).replace(Se,i).replace(Te,U)+"="+d[f].replace(Se,Ce).replace(Se,i).replace(Ae,U));return h.length&&(r.query=h.join("&")),r}},we=/^([^\:]+)\:(.*)/,ke={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(we),n=e;if(r){var i=t.scheme||n.scheme||"urn",s=r[1].toLowerCase(),a=r[2],o=i+":"+(t.nid||s),u=$[o];n.nid=s,n.nss=a,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),s=$[i];s&&(e=s.serialize(e,t));var a=e,o=e.nss;return a.path=(n||t.nid)+":"+o,a}},Fe=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,Ie={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(Fe)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};$[le.scheme]=le,$[ce.scheme]=ce,$[de.scheme]=de,$[he.scheme]=he,$[Pe.scheme]=Pe,$[ke.scheme]=ke,$[Ie.scheme]=Ie,e.SCHEMES=$,e.pctEncChar=U,e.pctDecChars=V,e.parse=X,e.removeDotSegments=te,e.serialize=re,e.resolveComponents=ne,e.resolve=ie,e.normalize=se,e.equal=ae,e.escapeComponent=oe,e.unescapeComponent=ue,Object.defineProperty(e,"__esModule",{value:!0})}(C8.exports);var P8=C8.exports;Object.defineProperty(A8,"__esModule",{value:!0});const w8=P8;w8.code='require("ajv/dist/runtime/uri").default',A8.default=w8,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=r8();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=h4();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=s8(),i=u8(),s=S4,a=l8,o=h4(),u=M4,l=E4,c=f4,p=T8,d=A8,h=(e,t)=>new RegExp(e,t);h.code="new RegExp";const f=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function b(e){var t,r,n,i,s,a,o,u,l,c,p,f,m,y,g,b,v,x,E,S,D,T,A,C,P;const w=e.strict,k=null===(t=e.code)||void 0===t?void 0:t.optimize,F=!0===k||void 0===k?1:k||0,I=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:h,_=null!==(i=e.uriResolver)&&void 0!==i?i:d.default;return{strictSchema:null===(a=null!==(s=e.strictSchema)&&void 0!==s?s:w)||void 0===a||a,strictNumbers:null===(u=null!==(o=e.strictNumbers)&&void 0!==o?o:w)||void 0===u||u,strictTypes:null!==(c=null!==(l=e.strictTypes)&&void 0!==l?l:w)&&void 0!==c?c:"log",strictTuples:null!==(f=null!==(p=e.strictTuples)&&void 0!==p?p:w)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(m=e.strictRequired)&&void 0!==m?m:w)&&void 0!==y&&y,code:e.code?{...e.code,optimize:F,regExp:I}:{optimize:F,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(x=e.messages)||void 0===x||x,inlineRefs:null===(E=e.inlineRefs)||void 0===E||E,schemaId:null!==(S=e.schemaId)&&void 0!==S?S:"$id",addUsedSchema:null===(D=e.addUsedSchema)||void 0===D||D,validateSchema:null===(T=e.validateSchema)||void 0===T||T,validateFormats:null===(A=e.validateFormats)||void 0===A||A,unicodeRegExp:null===(C=e.unicodeRegExp)||void 0===C||C,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:_}}class v{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...b(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return C;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),x.call(this,y,e,"NOT SUPPORTED"),x.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=A.call(this),e.formats&&D.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),S.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await s.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||a.call(this,r)}async function s(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function a(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof i.default))throw t;return o.call(this,t),await u.call(this,t.missingSchema),a.call(this,e)}}function o({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await l.call(this,e);this.refs[e]||await s.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=E.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new a.SchemaEnv({schema:{},schemaId:r});if(t=a.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=E.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(w.call(this,r,t),!t)return(0,c.eachItem)(r,(e=>k.call(this,e))),this;I.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,c.eachItem)(r,0===n.type.length?e=>k.call(this,e,n):e=>n.type.forEach((t=>k.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=i[e];n&&s&&(i[e]=N(s))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let s;const{schemaId:o}=this.opts;if("object"==typeof e)s=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let l=this._cache.get(e);if(void 0!==l)return l;r=(0,u.normalizeId)(s||r);const c=u.getSchemaRefs.call(this,e,r);return l=new a.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:r,localRefs:c}),this._cache.set(l.schema,l),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=l),n&&this.validateSchema(e,!0),l}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):a.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,e)}finally{this.opts=t}}}function x(e,t,r,n="error"){for(const i in e){const s=i;s in t&&this.logger[n](`${r}: option ${i}. ${e[s]}`)}}function E(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function S(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function D(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function A(){const e={...this.opts};for(const t of f)delete e[t];return e}e.default=v,v.ValidationError=n.default,v.MissingRefError=i.default;const C={log(){},warn(){},error(){}};const P=/^[a-z_$][a-z0-9_$:-]*$/i;function w(e,t){const{RULES:r}=this;if((0,c.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!P.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function k(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let a=i?s.post:s.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;const o={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?F.call(this,a,o,t.before):a.rules.push(o),s.all[e]=o,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function F(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function I(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=N(t)),e.validateSchema=this.compile(t,!0))}const _={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function N(e){return{anyOf:[e,_]}}}(r4);var k8={},F8={},I8={};Object.defineProperty(I8,"__esModule",{value:!0});const _8={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};I8.default=_8;var N8={};Object.defineProperty(N8,"__esModule",{value:!0}),N8.callRef=N8.getValidate=void 0;const O8=u8(),B8=N4(),L8=h4(),M8=v4(),j8=l8,R8=f4,$8={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:i,schemaEnv:s,validateName:a,opts:o,self:u}=n,{root:l}=s;if(("#"===r||"#/"===r)&&i===l.baseId)return function(){if(s===l)return V8(e,a,s,s.$async);const r=t.scopeValue("root",{ref:l});return V8(e,L8._`${r}.validate`,l,l.$async)}();const c=j8.resolveRef.call(u,l,i,r);if(void 0===c)throw new O8.default(n.opts.uriResolver,i,r);return c instanceof j8.SchemaEnv?function(t){const r=U8(e,t);V8(e,r,t,t.$async)}(c):function(n){const i=t.scopeValue("schema",!0===o.code.source?{ref:n,code:(0,L8.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:L8.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(c)}};function U8(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):L8._`${r.scopeValue("wrapper",{ref:t})}.validate`}function V8(e,t,r,n){const{gen:i,it:s}=e,{allErrors:a,schemaEnv:o,opts:u}=s,l=u.passContext?M8.default.this:L8.nil;function c(e){const t=L8._`${e}.errors`;i.assign(M8.default.vErrors,L8._`${M8.default.vErrors} === null ? ${t} : ${M8.default.vErrors}.concat(${t})`),i.assign(M8.default.errors,L8._`${M8.default.vErrors}.length`)}function p(e){var t;if(!s.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==s.props)if(n&&!n.dynamicProps)void 0!==n.props&&(s.props=R8.mergeEvaluated.props(i,n.props,s.props));else{const t=i.var("props",L8._`${e}.evaluated.props`);s.props=R8.mergeEvaluated.props(i,t,s.props,L8.Name)}if(!0!==s.items)if(n&&!n.dynamicItems)void 0!==n.items&&(s.items=R8.mergeEvaluated.items(i,n.items,s.items));else{const t=i.var("items",L8._`${e}.evaluated.items`);s.items=R8.mergeEvaluated.items(i,t,s.items,L8.Name)}}n?function(){if(!o.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code(L8._`await ${(0,B8.callValidateCode)(e,t,l)}`),p(t),a||i.assign(r,!0)}),(e=>{i.if(L8._`!(${e} instanceof ${s.ValidationError})`,(()=>i.throw(e))),c(e),a||i.assign(r,!1)})),e.ok(r)}():e.result((0,B8.callValidateCode)(e,t,l),(()=>p(t)),(()=>c(t)))}N8.getValidate=U8,N8.callRef=V8,N8.default=$8,Object.defineProperty(F8,"__esModule",{value:!0});const z8=N8,K8=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",I8.default,z8.default];F8.default=K8;var q8={},W8={};Object.defineProperty(W8,"__esModule",{value:!0});const J8=h4(),H8=J8.operators,X8={maximum:{okStr:"<=",ok:H8.LTE,fail:H8.GT},minimum:{okStr:">=",ok:H8.GTE,fail:H8.LT},exclusiveMaximum:{okStr:"<",ok:H8.LT,fail:H8.GTE},exclusiveMinimum:{okStr:">",ok:H8.GT,fail:H8.LTE}},G8={message:({keyword:e,schemaCode:t})=>J8.str`must be ${X8[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>J8._`{comparison: ${X8[e].okStr}, limit: ${t}}`},Y8={keyword:Object.keys(X8),type:"number",schemaType:"number",$data:!0,error:G8,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(J8._`${r} ${X8[t].fail} ${n} || isNaN(${r})`)}};W8.default=Y8;var Q8={};Object.defineProperty(Q8,"__esModule",{value:!0});const Z8=h4(),e5={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>Z8.str`must be multiple of ${e}`,params:({schemaCode:e})=>Z8._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),o=s?Z8._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:Z8._`${a} !== parseInt(${a})`;e.fail$data(Z8._`(${n} === 0 || (${a} = ${r}/${n}, ${o}))`)}};Q8.default=e5;var t5={},r5={};function n5(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(r5,"__esModule",{value:!0}),r5.default=n5,n5.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(t5,"__esModule",{value:!0});const i5=h4(),s5=f4,a5=r5,o5={message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return i5.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>i5._`{limit: ${e}}`},u5={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:o5,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,s="maxLength"===t?i5.operators.GT:i5.operators.LT,a=!1===i.opts.unicode?i5._`${r}.length`:i5._`${(0,s5.useFunc)(e.gen,a5.default)}(${r})`;e.fail$data(i5._`${a} ${s} ${n}`)}};t5.default=u5;var l5={};Object.defineProperty(l5,"__esModule",{value:!0});const c5=N4(),p5=h4(),d5={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>p5.str`must match pattern "${e}"`,params:({schemaCode:e})=>p5._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"",o=r?p5._`(new RegExp(${i}, ${a}))`:(0,c5.usePattern)(e,n);e.fail$data(p5._`!${o}.test(${t})`)}};l5.default=d5;var h5={};Object.defineProperty(h5,"__esModule",{value:!0});const f5=h4(),m5={message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return f5.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>f5._`{limit: ${e}}`},y5={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:m5,code(e){const{keyword:t,data:r,schemaCode:n}=e,i="maxProperties"===t?f5.operators.GT:f5.operators.LT;e.fail$data(f5._`Object.keys(${r}).length ${i} ${n}`)}};h5.default=y5;var g5={};Object.defineProperty(g5,"__esModule",{value:!0});const b5=N4(),v5=h4(),x5=f4,E5={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>v5.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>v5._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:n,data:i,$data:s,it:a}=e,{opts:o}=a;if(!s&&0===r.length)return;const u=r.length>=o.loopRequired;if(a.allErrors?function(){if(u||s)e.block$data(v5.nil,l);else for(const t of r)(0,b5.checkReportMissingProp)(e,t)}():function(){const a=t.let("missing");if(u||s){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,s){e.setParams({missingProperty:r}),t.forOf(r,n,(()=>{t.assign(s,(0,b5.propertyInData)(t,i,r,o.ownProperties)),t.if((0,v5.not)(s),(()=>{e.error(),t.break()}))}),v5.nil)}(a,r))),e.ok(r)}else t.if((0,b5.checkMissingProp)(e,r,a)),(0,b5.reportMissingProp)(e,a),t.else()}(),o.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${a.schemaEnv.baseId+a.errSchemaPath}" (strictRequired)`;(0,x5.checkStrictMode)(a,t,a.opts.strictRequired)}}function l(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,b5.noPropertyInData)(t,i,r,o.ownProperties),(()=>e.error()))}))}}};g5.default=E5;var S5={};Object.defineProperty(S5,"__esModule",{value:!0});const D5=h4(),T5={message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return D5.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>D5._`{limit: ${e}}`},A5={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:T5,code(e){const{keyword:t,data:r,schemaCode:n}=e,i="maxItems"===t?D5.operators.GT:D5.operators.LT;e.fail$data(D5._`${r}.length ${i} ${n}`)}};S5.default=A5;var C5={},P5={};Object.defineProperty(P5,"__esModule",{value:!0});const w5=j4;w5.code='require("ajv/dist/runtime/equal").default',P5.default=w5,Object.defineProperty(C5,"__esModule",{value:!0});const k5=E4,F5=h4(),I5=f4,_5=P5,N5={message:({params:{i:e,j:t}})=>F5.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>F5._`{i: ${e}, j: ${t}}`},O5={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:N5,code(e){const{gen:t,data:r,$data:n,schema:i,parentSchema:s,schemaCode:a,it:o}=e;if(!n&&!i)return;const u=t.let("valid"),l=s.items?(0,k5.getSchemaTypes)(s.items):[];function c(n,i){const s=t.name("item"),a=(0,k5.checkDataTypes)(l,s,o.opts.strictNumbers,k5.DataType.Wrong),c=t.const("indices",F5._`{}`);t.for(F5._`;${n}--;`,(()=>{t.let(s,F5._`${r}[${n}]`),t.if(a,F5._`continue`),l.length>1&&t.if(F5._`typeof ${s} == "string"`,F5._`${s} += "_"`),t.if(F5._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(i,F5._`${c}[${s}]`),e.error(),t.assign(u,!1).break()})).code(F5._`${c}[${s}] = ${n}`)}))}function p(n,i){const s=(0,I5.useFunc)(t,_5.default),a=t.name("outer");t.label(a).for(F5._`;${n}--;`,(()=>t.for(F5._`${i} = ${n}; ${i}--;`,(()=>t.if(F5._`${s}(${r}[${n}], ${r}[${i}])`,(()=>{e.error(),t.assign(u,!1).break(a)}))))))}e.block$data(u,(function(){const n=t.let("i",F5._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(u,!0),t.if(F5._`${n} > 1`,(()=>(l.length>0&&!l.some((e=>"object"===e||"array"===e))?c:p)(n,i)))}),F5._`${a} === false`),e.ok(u)}};C5.default=O5;var B5={};Object.defineProperty(B5,"__esModule",{value:!0});const L5=h4(),M5=f4,j5=P5,R5={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>L5._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&"object"==typeof s?e.fail$data(L5._`!${(0,M5.useFunc)(t,j5.default)}(${r}, ${i})`):e.fail(L5._`${s} !== ${r}`)}};B5.default=R5;var $5={};Object.defineProperty($5,"__esModule",{value:!0});const U5=h4(),V5=f4,z5=P5,K5={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>U5._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:n,schema:i,schemaCode:s,it:a}=e;if(!n&&0===i.length)throw new Error("enum must have non-empty array");const o=i.length>=a.opts.loopEnum;let u;const l=()=>null!=u?u:u=(0,V5.useFunc)(t,z5.default);let c;if(o||n)c=t.let("valid"),e.block$data(c,(function(){t.assign(c,!1),t.forOf("v",s,(e=>t.if(U5._`${l()}(${r}, ${e})`,(()=>t.assign(c,!0).break()))))}));else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",s);c=(0,U5.or)(...i.map(((t,n)=>function(e,t){const n=i[t];return"object"==typeof n&&null!==n?U5._`${l()}(${r}, ${e}[${t}])`:U5._`${r} === ${n}`}(e,n))))}e.pass(c)}};$5.default=K5,Object.defineProperty(q8,"__esModule",{value:!0});const q5=Q8,W5=t5,J5=l5,H5=h5,X5=g5,G5=S5,Y5=C5,Q5=B5,Z5=$5,e6=[W8.default,q5.default,W5.default,J5.default,H5.default,X5.default,G5.default,Y5.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Q5.default,Z5.default];q8.default=e6;var t6={},r6={};Object.defineProperty(r6,"__esModule",{value:!0}),r6.validateAdditionalItems=void 0;const n6=h4(),i6=f4,s6={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n6.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n6._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?a6(e,n):(0,i6.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a6(e,t){const{gen:r,schema:n,data:i,keyword:s,it:a}=e;a.items=!0;const o=r.const("len",n6._`${i}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(n6._`${o} <= ${t.length}`);else if("object"==typeof n&&!(0,i6.alwaysValidSchema)(a,n)){const n=r.var("valid",n6._`${o} <= ${t.length}`);r.if((0,n6.not)(n),(()=>function(n){r.forRange("i",t.length,o,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:i6.Type.Num},n),a.allErrors||r.if((0,n6.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}r6.validateAdditionalItems=a6,r6.default=s6;var o6={},u6={};Object.defineProperty(u6,"__esModule",{value:!0}),u6.validateTuple=void 0;const l6=h4(),c6=f4,p6=N4(),d6={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return h6(e,"additionalItems",t);r.items=!0,(0,c6.alwaysValidSchema)(r,t)||e.ok((0,p6.validateArray)(e))}};function h6(e,t,r=e.schema){const{gen:n,parentSchema:i,data:s,keyword:a,it:o}=e;!function(e){const{opts:n,errSchemaPath:i}=o,s=r.length,u=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!u){const e=`"${a}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,c6.checkStrictMode)(o,e,n.strictTuples)}}(i),o.opts.unevaluated&&r.length&&!0!==o.items&&(o.items=c6.mergeEvaluated.items(n,r.length,o.items));const u=n.name("valid"),l=n.const("len",l6._`${s}.length`);r.forEach(((t,r)=>{(0,c6.alwaysValidSchema)(o,t)||(n.if(l6._`${l} > ${r}`,(()=>e.subschema({keyword:a,schemaProp:r,dataProp:r},u))),e.ok(u))}))}u6.validateTuple=h6,u6.default=d6,Object.defineProperty(o6,"__esModule",{value:!0});const f6=u6,m6={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,f6.validateTuple)(e,"items")};o6.default=m6;var y6={};Object.defineProperty(y6,"__esModule",{value:!0});const g6=h4(),b6=f4,v6=N4(),x6=r6,E6={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>g6.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>g6._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,(0,b6.alwaysValidSchema)(n,t)||(i?(0,x6.validateAdditionalItems)(e,i):e.ok((0,v6.validateArray)(e)))}};y6.default=E6;var S6={};Object.defineProperty(S6,"__esModule",{value:!0});const D6=h4(),T6=f4,A6={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?D6.str`must contain at least ${e} valid item(s)`:D6.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?D6._`{minContains: ${e}}`:D6._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;let a,o;const{minContains:u,maxContains:l}=n;s.opts.next?(a=void 0===u?1:u,o=l):a=1;const c=t.const("len",D6._`${i}.length`);if(e.setParams({min:a,max:o}),void 0===o&&0===a)return void(0,T6.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&a>o)return(0,T6.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,T6.alwaysValidSchema)(s,r)){let t=D6._`${c} >= ${a}`;return void 0!==o&&(t=D6._`${t} && ${c} <= ${o}`),void e.pass(t)}s.items=!0;const p=t.name("valid");function d(){const e=t.name("_valid"),r=t.let("count",0);h(e,(()=>t.if(e,(()=>function(e){t.code(D6._`${e}++`),void 0===o?t.if(D6._`${e} >= ${a}`,(()=>t.assign(p,!0).break())):(t.if(D6._`${e} > ${o}`,(()=>t.assign(p,!1).break())),1===a?t.assign(p,!0):t.if(D6._`${e} >= ${a}`,(()=>t.assign(p,!0))))}(r)))))}function h(r,n){t.forRange("i",0,c,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:T6.Type.Num,compositeRule:!0},r),n()}))}void 0===o&&1===a?h(p,(()=>t.if(p,(()=>t.break())))):0===a?(t.let(p,!0),void 0!==o&&t.if(D6._`${i}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,(()=>e.reset()))}};S6.default=A6;var C6={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=h4(),r=f4,n=N4();e.error={message:({params:{property:e,depsCount:r,deps:n}})=>{const i=1===r?"property":"properties";return t.str`must have ${i} ${n} when property ${e} is present`},params:({params:{property:e,depsCount:r,deps:n,missingProperty:i}})=>t._`{property: ${e},
1871
1871
  missingProperty: ${i},
1872
1872
  depsCount: ${r},
1873
- deps: ${n}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),a(e,r)}};function s(e,r=e.schema){const{gen:i,data:s,it:a}=e;if(0===Object.keys(r).length)return;const o=i.let("missing");for(const u in r){const l=r[u];if(0===l.length)continue;const c=(0,n.propertyInData)(i,s,u,a.opts.ownProperties);e.setParams({property:u,depsCount:l.length,deps:l.join(", ")}),a.allErrors?i.if(c,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(i.if(t._`${c} && (${(0,n.checkMissingProp)(e,l,o)})`),(0,n.reportMissingProp)(e,o),i.else())}}function a(e,t=e.schema){const{gen:i,data:s,keyword:a,it:o}=e,u=i.name("valid");for(const l in t)(0,r.alwaysValidSchema)(o,t[l])||(i.if((0,n.propertyInData)(i,s,l,o.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:l},u);e.mergeValidEvaluated(t,u)}),(()=>i.var(u,!0))),e.ok(u))}e.validatePropertyDeps=s,e.validateSchemaDeps=a,e.default=i}(C6);var P6={};Object.defineProperty(P6,"__esModule",{value:!0});const w6=h4(),k6=f4,F6={message:"property name must be valid",params:({params:e})=>w6._`{propertyName: ${e.propertyName}}`},I6={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:F6,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,k6.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,w6.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};P6.default=I6;var _6={};Object.defineProperty(_6,"__esModule",{value:!0});const N6=N4(),O6=h4(),B6=v4(),L6=f4,M6={message:"must NOT have additional properties",params:({params:e})=>O6._`{additionalProperty: ${e.additionalProperty}}`},j6={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:M6,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=a;if(a.props=!0,"all"!==u.removeAdditional&&(0,L6.alwaysValidSchema)(a,r))return;const l=(0,N6.allSchemaProperties)(n.properties),c=(0,N6.allSchemaProperties)(n.patternProperties);function p(e){t.code(O6._`delete ${i}[${e}]`)}function d(n){if("all"===u.removeAdditional||u.removeAdditional&&!1===r)p(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(o||t.break());if("object"==typeof r&&!(0,L6.alwaysValidSchema)(a,r)){const r=t.name("valid");"failing"===u.removeAdditional?(h(n,r,!1),t.if((0,O6.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,O6.not)(r),(()=>t.break())))}}}function h(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:L6.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",i,(r=>{l.length||c.length?t.if(function(r){let i;if(l.length>8){const e=(0,L6.schemaRefOrVal)(a,n.properties,"properties");i=(0,N6.isOwnProperty)(t,e,r)}else i=l.length?(0,O6.or)(...l.map((e=>O6._`${r} === ${e}`))):O6.nil;return c.length&&(i=(0,O6.or)(i,...c.map((t=>O6._`${(0,N6.usePattern)(e,t)}.test(${r})`)))),(0,O6.not)(i)}(r),(()=>d(r))):d(r)})),e.ok(O6._`${s} === ${B6.default.errors}`)}};_6.default=j6;var R6={};Object.defineProperty(R6,"__esModule",{value:!0});const $6=r8(),U6=N4(),V6=f4,z6=_6,K6={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;"all"===s.opts.removeAdditional&&void 0===n.additionalProperties&&z6.default.code(new $6.KeywordCxt(s,z6.default,"additionalProperties"));const a=(0,U6.allSchemaProperties)(r);for(const e of a)s.definedProperties.add(e);s.opts.unevaluated&&a.length&&!0!==s.props&&(s.props=V6.mergeEvaluated.props(t,(0,V6.toHash)(a),s.props));const o=a.filter((e=>!(0,V6.alwaysValidSchema)(s,r[e])));if(0===o.length)return;const u=t.name("valid");for(const r of o)l(r)?c(r):(t.if((0,U6.propertyInData)(t,i,r,s.opts.ownProperties)),c(r),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(u);function l(e){return s.opts.useDefaults&&!s.compositeRule&&void 0!==r[e].default}function c(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}};R6.default=K6;var q6={};Object.defineProperty(q6,"__esModule",{value:!0});const W6=N4(),J6=h4(),H6=f4,X6=f4,G6={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,o=(0,W6.allSchemaProperties)(r),u=o.filter((e=>(0,H6.alwaysValidSchema)(s,r[e])));if(0===o.length||u.length===o.length&&(!s.opts.unevaluated||!0===s.props))return;const l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");!0===s.props||s.props instanceof J6.Name||(s.props=(0,X6.evaluatedPropsToName)(t,s.props));const{props:p}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,H6.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(J6._`${(0,W6.usePattern)(e,r)}.test(${n})`,(()=>{const i=u.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:X6.Type.Str},c),s.opts.unevaluated&&!0!==p?t.assign(J6._`${p}[${n}]`,!0):i||s.allErrors||t.if((0,J6.not)(c),(()=>t.break()))}))}))}!function(){for(const e of o)l&&d(e),s.allErrors?h(e):(t.var(c,!0),h(e),t.if(c))}()}};q6.default=G6;var Y6={};Object.defineProperty(Y6,"__esModule",{value:!0});const Q6=f4,Z6={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Q6.alwaysValidSchema)(n,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};Y6.default=Z6;var e7={};Object.defineProperty(e7,"__esModule",{value:!0});const t7={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:N4().validateUnion,error:{message:"must match a schema in anyOf"}};e7.default=t7;var r7={};Object.defineProperty(r7,"__esModule",{value:!0});const n7=h4(),i7=f4,s7={message:"must match exactly one schema in oneOf",params:({params:e})=>n7._`{passingSchemas: ${e.passing}}`},a7={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:s7,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const s=r,a=t.let("valid",!1),o=t.let("passing",null),u=t.name("_valid");e.setParams({passing:o}),t.block((function(){s.forEach(((r,n)=>{let s;(0,i7.alwaysValidSchema)(i,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(n7._`${u} && ${a}`).assign(a,!1).assign(o,n7._`[${o}, ${n}]`).else(),t.if(u,(()=>{t.assign(a,!0),t.assign(o,n),s&&e.mergeEvaluated(s,n7.Name)}))}))})),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}};r7.default=a7;var o7={};Object.defineProperty(o7,"__esModule",{value:!0});const u7=f4,l7={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,u7.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};o7.default=l7;var c7={};Object.defineProperty(c7,"__esModule",{value:!0});const p7=h4(),d7=f4,h7={message:({params:e})=>p7.str`must match "${e.ifClause}" schema`,params:({params:e})=>p7._`{failingKeyword: ${e.ifClause}}`},f7={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:h7,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,d7.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=m7(n,"then"),s=m7(n,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(t)}(),e.reset(),i&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(o,u("then",r),u("else",r))}else i?t.if(o,u("then")):t.if((0,p7.not)(o),u("else"));function u(r,n){return()=>{const i=e.subschema({keyword:r},o);t.assign(a,o),e.mergeValidEvaluated(i,a),n?t.assign(n,p7._`${r}`):e.setParams({ifClause:r})}}e.pass(a,(()=>e.error(!0)))}};function m7(e,t){const r=e.schema[t];return void 0!==r&&!(0,d7.alwaysValidSchema)(e,r)}c7.default=f7;var y7={};Object.defineProperty(y7,"__esModule",{value:!0});const g7=f4,b7={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,g7.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};y7.default=b7,Object.defineProperty(t6,"__esModule",{value:!0});const v7=r6,x7=o6,E7=u6,S7=y6,D7=S6,T7=C6,A7=P6,C7=_6,P7=R6,w7=q6,k7=Y6,F7=e7,I7=r7,_7=o7,N7=c7,O7=y7;t6.default=function(e=!1){const t=[k7.default,F7.default,I7.default,_7.default,N7.default,O7.default,A7.default,C7.default,T7.default,P7.default,w7.default];return e?t.push(x7.default,S7.default):t.push(v7.default,E7.default),t.push(D7.default),t};var B7={},L7={};Object.defineProperty(L7,"__esModule",{value:!0});const M7=h4(),j7={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>M7.str`must match format "${e}"`,params:({schemaCode:e})=>M7._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:o}=e,{opts:u,errSchemaPath:l,schemaEnv:c,self:p}=o;u.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),s=r.const("fDef",M7._`${i}[${a}]`),o=r.let("fType"),l=r.let("format");r.if(M7._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(o,M7._`${s}.type || "string"`).assign(l,M7._`${s}.validate`)),(()=>r.assign(o,M7._`"string"`).assign(l,s))),e.fail$data((0,M7.or)(!1===u.strictSchema?M7.nil:M7._`${a} && !${l}`,function(){const e=c.$async?M7._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:M7._`${l}(${n})`,r=M7._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return M7._`${l} && ${l} !== true && ${o} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1===u.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===i)return;const[a,o,d]=function(e){const t=e instanceof RegExp?(0,M7.regexpCode)(e):u.code.formats?M7._`${u.code.formats}${(0,M7.getProperty)(s)}`:void 0,n=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,M7._`${n}.validate`];return["string",e,n]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!c.$async)throw new Error("async format in sync schema");return M7._`await ${d}(${n})`}return"function"==typeof o?M7._`${d}(${n})`:M7._`${d}.test(${n})`}())}())}};L7.default=j7,Object.defineProperty(B7,"__esModule",{value:!0});const R7=[L7.default];B7.default=R7;var $7={};Object.defineProperty($7,"__esModule",{value:!0}),$7.contentVocabulary=$7.metadataVocabulary=void 0,$7.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$7.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(k8,"__esModule",{value:!0});const U7=q8,V7=t6,z7=B7,K7=$7,q7=[F8.default,U7.default,(0,V7.default)(),z7.default,K7.metadataVocabulary,K7.contentVocabulary];k8.default=q7;var W7,J7,H7={},X7={};W7=X7,Object.defineProperty(W7,"__esModule",{value:!0}),W7.DiscrError=void 0,(J7=W7.DiscrError||(W7.DiscrError={})).Tag="tag",J7.Mapping="mapping",Object.defineProperty(H7,"__esModule",{value:!0});const G7=h4(),Y7=X7,Q7=l8,Z7=f4,e9={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Y7.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>G7._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if("string"!=typeof o)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),l=t.const("tag",G7._`${r}${(0,G7.getProperty)(o)}`);function c(r){const n=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(i,G7.Name),n}t.if(G7._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=u(i);let n=!0;for(let t=0;t<a.length;t++){let i=a[t];(null==i?void 0:i.$ref)&&!(0,Z7.schemaHasRulesButRef)(i,s.self.RULES)&&(i=Q7.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==i?void 0:i.$ref),i instanceof Q7.SchemaEnv&&(i=i.schema));const c=null===(e=null==i?void 0:i.properties)||void 0===e?void 0:e[o];if("object"!=typeof c)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);n=n&&(r||u(i)),l(c,t)}if(!n)throw new Error(`discriminator: "${o}" must be required`);return t;function u({required:e}){return Array.isArray(e)&&e.includes(o)}function l(e,t){if(e.const)c(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const r of e.enum)c(r,t)}}function c(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${o}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(G7._`${l} === ${e}`),t.assign(u,c(r[e]));t.else(),e.error(!1,{discrError:Y7.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:Y7.DiscrError.Tag,tag:l,tagName:o}))),e.ok(u)}};H7.default=e9;var t9={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=r4,n=k8,i=H7,s=t9,a=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=r8();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=h4();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var p=s8();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=u8();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(t4,t4.exports);const r9={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,definitions:{rule:{oneOf:[{$ref:"#/definitions/ruleToggle"},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"object"}],minItems:2,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"},{type:"object"}],minItems:3,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"}],minItems:2,additionalItems:!1}]},rules:{description:"🐊Putout comes with a large number of rules. You can modify which rules your project uses.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rule"}}},ruleToggle:{oneOf:[{description:'🐊Putout rule\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]},{enum:[!0,!1]}]},processorToggle:{type:"array",items:[{type:"string"},{description:'🐊Putout processor\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]}],minItems:2,maxItems:2}},properties:{parser:{description:"Tell 🐊Putout which parser to use",type:"string"},printer:{description:"Tell 🐊Putout which printer to use",type:"string"},formatter:{description:"Choose the way to show information about errors found",type:["string","array"]},processors:{description:"Tell 🐊Putout which processors to use to support file types other then JavaScript",type:"array",uniqueItems:!0,items:{oneOf:[{$ref:"#/definitions/processorToggle"},{type:"string"}]}},ignore:{description:"Tell 🐊Putout to ignore specific files and directories.",type:"array",uniqueItems:!0,items:{type:"string"}},match:{description:"Allows to match rules for files and folders, specified by glob patterns.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rules"}}},plugins:{description:"Tell 🐊Putout which plugins to load",type:"array",uniqueItems:!0},rules:{$ref:"#/definitions/rules"}}};new(0,t4.exports)({strict:!0,allowUnionTypes:!0}).compile(r9);const{homedir:n9}=r,{readdirSync:i9}=i,{dirname:s9,join:a9}=a,o9=rT,u9=GD,l9=n9(),c9=e=>"."!==e[0]&&!/(^not-rule-.*|^node_modules$)/.test(e);o9((()=>{const e=a9(l9,".putout.json"),[,t={}]=u9(SB,e);return t})),o9((()=>function(e,t){if(!t)return{};let r=a9(e,t);r.startsWith("/")||(r=a9(process.cwd(),t));const[n,i]=u9(i9,r);if(n)return{};const s=[];for(const e of i.filter(c9)){const t=SB(a9(r,e)),n=e.replace("putout-plugin-","");s.push([n,t])}return{plugins:s}}(l9,".putout"))),process.cwd();var p9={},d9={};const{isIdentifier:h9,isObjectExpression:f9,isObjectPattern:m9,isTemplateLiteral:y9,isAssignmentPattern:g9}=G2().types,b9=({use:e,declare:t})=>{const r=S9({use:e});return e=>{for(const n of e){if(n.isRestElement())continue;const{key:e,value:i}=n.node,s=n.get("value");switch(i.type){case"Identifier":t(n,i.name);break;case"AssignmentPattern":n.node.shorthand?t(n,e.name):t(n,s.node.left.name),r(s)}}}};d9.traverseObjectPattern=b9;const v9=({use:e,declare:t})=>r=>{for(const n of r){const{key:r,value:i,computed:s}=n.node;if(s&&h9(r)&&e(n,r.name),h9(i))t(n,i.name);else if(m9(i)){v9({use:e,declare:t})(n.get("value.properties"))}else if(g9(i)){S9({use:e})(n.get("value.right"));const r=n.get("value.left");if("Identifier"===r.type){t(n,r.node.name);continue}}}};d9.processObjectPattern=v9;const x9=e=>{const t=E9(e);return r=>{for(const n of r){const{node:r}=n,{key:i,value:s,computed:a}=r;if(a&&h9(i)&&e(n,i.name),h9(s))e(n,s.name);else if(y9(s))t(n,s.expressions);else if(f9(s)){x9(e)(n.get("value.properties"))}else;}}};d9.traverseObjectExpression=x9;d9.traverseArrayExpression=e=>{const t=x9(e);return e=>{for(const r of e){const{node:e}=r;f9(e)&&t(r.get("properties"))}}};d9.traverseAssignmentExpression=({use:e,declare:t})=>{const r=b9({use:e,declare:t});return n=>{const i=n.get("left"),s=n.get("right");if(i.isIdentifier()){const{parentPath:e}=i.parentPath,{name:r}=i.node;e.isObjectProperty()&&t(e,r),e.isFunction()&&t(i.parentPath,r)}s.isIdentifier()&&e(s,s.node.name),i.isObjectPattern()&&r(i.get("properties"))}};const E9=e=>(t,r)=>{for(const n of r)h9(n)&&e(t,n.name)};d9.traverseTemplateLiteral=E9;const S9=({use:e})=>t=>{const{node:r}=t,{right:n}=r;h9(r)&&e(t.parentPath,r.name),h9(n)&&e(t,n.name)};d9.traverseAssignmentPattern=S9;const{types:D9}=G2(),{isIdentifier:T9,isJSXIdentifier:A9}=D9;const{types:C9}=G2(),{isIdentifier:P9}=C9;const{types:w9}=G2(),{isIdentifier:k9,isTSModuleDeclaration:F9}=w9;const{isAssignmentPattern:I9,isClassDeclaration:_9,isIdentifier:N9,isSpreadElement:O9,isObjectPattern:B9,isObjectExpression:L9,isFunctionDeclaration:M9,isArrayExpression:j9,isVariableDeclaration:R9,isRestElement:$9}=G2().types,{traverseObjectExpression:U9,processObjectPattern:V9,traverseArrayExpression:z9,traverseAssignmentExpression:K9,traverseTemplateLiteral:q9}=d9,W9=e=>({JSXOpeningElement(t){const{node:r}=t,{name:n}=r;/^[A-Z]/.test(n.name)&&e(t,n.name),e(t,"React")},JSXFragment(t){e(t,"React")},JSXSpreadAttribute(t){const r=t.get("argument");if(r.isIdentifier())return e(t,r.node.name)},JSXMemberExpression(t){const{node:r}=t,{object:n}=r;A9(n)&&e(t,n.name)},JSXExpressionContainer(t){const{node:r}=t,{expression:n}=r;T9(n)&&e(t,n.name)}}),J9=({use:e,declare:t})=>({GenericTypeAnnotation(t){const{node:r}=t,{id:n}=r;P9(n)&&e(t,n.name)},QualifiedTypeIdentifier(t){const{qualification:r}=t.node,{type:n}=r;if("Identifier"===n)return e(t,r.name)},InterfaceDeclaration(e){t(e,e.node.id.name)}}),H9=({use:e,declare:t})=>({TSExpressionWithTypeArguments(t){const{expression:r}=t.node,{type:n}=r;if("Identifier"===n)e(t,r.name)},TSFunctionType(r){const{node:n}=r,{parameters:i}=n;for(const n of i){const{type:i}=n;switch(i){case"Identifier":t(r,n.name),e(r,n.name);break;case"RestElement":k9(n.argument)&&e(r,n.argument.name)}}},TSTypeReference(t){const{node:r}=t,{typeName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSTypeAliasDeclaration(e){const{node:r}=e,{id:n}=r,{type:i}=n;if("Identifier"===i)t(e,n.name)},TSTypeQuery(t){const{node:r}=t,{exprName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSAsExpression(t){const{node:r}=t,{expression:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSQualifiedName(t){const{node:r}=t,{left:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSInterfaceDeclaration(r){t(r,r.node.id.name),r.findParent(F9)&&e(r,r.node.id.name)},TSMethodSignature(r){const n=r.get("parameters");for(const r of n){if(r.isIdentifier()){t(r,r.node.name),e(r,r.node.name);continue}const{type:n}=r;"RestElement"!==n||e(r,r.node.argument.name)}},TSDeclareFunction(t){if(!t.get("params").length)return;const[r]=t.get("params");r.isRestElement()&&e(r,r.node.argument.name)}}),{assign:X9}=Object;const G9=e=>{const{remove:t}=e;return()=>{const r=e.node,{elements:n}=e.parentPath.node,i=n.length-1;if(n.indexOf(r)===i)return t.call(e)}};var Y9={};const{types:Q9}=G2(),{isIdentifier:Z9,isObjectPattern:eee,isRestElement:tee}=Q9;function ree(e,t,r){const{length:n}=r,i=r[n-1];if(tee(i))for(let i=0;i<n-1;i++){const{value:n}=r[i],{type:s}=n;"Identifier"!==s||e(t,n.name)}}Y9.usePropertiesBeforeRest=({use:e})=>({path:t,params:r})=>{for(const n of r)eee(n)&&ree(e,t,n.properties)},Y9.useParamsBeforeLastUsed=({use:e,isUsed:t})=>({path:r,params:n})=>{let i=n.length;for(;--i>0;){const e=n[i];if(nee(t,r,e))break}for(;--i>=0;)Z9(n[i])&&e(r,n[i].name);return{path:r,params:n}};const nee=(e,t,r)=>{const{type:n}=r;switch(n){case"Identifier":return e(t,r.name);case"ObjectPattern":return see(e,t,r);case"AssignmentPattern":return iee(e,t,r)}},iee=(e,t,r)=>{const{left:n}=r,{type:i}=n;switch(i){case"Identifier":return e(t,n.name);case"ObjectPattern":return see(e,t,n)}},see=(e,t,r)=>{for(const{value:n}of r.properties)if(Z9(n)){if(e(t,n.name))return!0}else;return!1},{types:aee}=G2(),oee=({use:e,declare:t,addParams:r})=>{const n=U9(e),i=V9({use:e,declare:t}),s=K9({use:e,declare:t}),a=q9(e),o=z9(e);return{"ObjectExpression|RecordExpression"(e){n(e.get("properties"))},SequenceExpression(t){for(const r of t.get("expressions"))r.isIdentifier()&&e(r,r.node.name)},"AwaitExpression|YieldExpression|SpreadElement"(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},CatchClause(r){const n=r.get("param");if(!n.isIdentifier())return;const{name:i}=n.node;t(n,i);r.scope.getOwnBinding(i).referenced&&e(n,i)},Decorator(t){const r=t.get("expression");if(!r.isIdentifier())return;const{name:n}=r.node;e(r,n)},RestElement(e){const{argument:r}=e.node;N9(r)&&t(e,r.name)},VariableDeclarator(r){const{node:n}=r,{init:a}=n,u=r.get("id"),l=r.parentPath.parentPath.isForInStatement();if(N9(n.id))t(r,n.id.name),l&&e(r,n.id.name);else if(B9(n.id))u.traverse({ObjectProperty(i){if(I9(i.node.value)&&s(i.get("value")),i.node.computed&&N9(i.node.key)&&e(i.get("key"),i.node.key.name),!N9(i.node.value))return;const{properties:a}=n.id,o=1===a.length?r:i,{name:u}=i.node.value;t(o,u),$9(i.parentPath.node.properties.at(-1))&&e(o,u)}});else if(u.isArrayPattern()){const r=u.get("elements");for(const n of r)if(n.isObjectPattern())i(n.get("properties"));else{if(n.isAssignmentPattern()){const r=n.get("left"),i=n.get("right");t(r,n.node.left.name),e(i,n.node.right.name),X9(r,{remove:G9(n)})}n.isIdentifier()&&(X9(n,{remove:G9(n)}),t(n,n.node.name))}}const c=r.get("init");N9(a)?e(r,a.name):j9(a)&&o(c.get("elements"))},ClassProperty(t){const r=t.get("value");r.isIdentifier()&&e(r,r.node.name)},"ClassDeclaration|ClassExpression"(r){const{node:n}=r,{id:i,superClass:s}=n;s&&e(r,s.name),i&&t(r,i.name),i&&r.isClassExpression()&&e(r,i.name)},AssignmentExpression(t){const r=t.get("left"),n=t.get("right");r.isIdentifier()&&e(r,r.node.name),n.isIdentifier()&&e(n,n.node.name)},"ArrayExpression|TupleExpression"(t){const{elements:r}=t.node;for(const n of r)N9(n)?e(t,n.name):O9(n)&&e(t,n.argument.name)},ConditionalExpression(t){const{test:r,consequent:n,alternate:i}=t.node,s=t.get("alternate"),a=t.get("consequent");N9(r)&&e(t,r.name),N9(n)&&e(t,n.name),N9(i)&&e(t,i.name),s.isFunction()&&i.id&&e(s,i.id.name),a.isFunction()&&n.id&&e(a,n.id.name)},DoWhileStatement(t){const r=t.get("test");r.isIdentifier()&&e(r,r.node.name)},TemplateLiteral(e){a(e,e.node.expressions)},LogicalExpression(t){const{left:r,right:n}=t.node;N9(r)&&e(t,r.name),N9(n)&&e(t,n.name)},MemberExpression(t){const{property:r,object:n,computed:i}=t.node;N9(n)&&e(t,n.name),i&&N9(r)&&e(t,r.name)},OptionalMemberExpression(t){const{object:r,property:n,computed:i}=t.node;N9(r)&&e(t,r.name),i&&N9(n)&&e(t,n.name)},NewExpression(t){const r=t.get("callee"),{node:n}=t;r.isIdentifier()?e(t,n.callee.name):r.isFunction()&&e(r,r.node.id.name);const i=t.get("arguments");for(const{node:r}of i)N9(r)&&e(t,r.name)},TaggedTemplateExpression(t){const{tag:r}=t.node;N9(r)&&e(t,r.name)},UnaryExpression(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},UpdateExpression(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},ThrowStatement(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},IfStatement(t){const{node:r}=t,{test:n}=r;if(N9(n))return e(t,n.name)},ForInStatement(t){const{node:r}=t,{left:n,right:i}=r;N9(n)&&e(t,n.name),N9(i)&&e(t,i.name)},ForOfStatement(r){const{node:n}=r,{left:i,right:s}=n;N9(s)&&e(r,s.name),N9(i)?e(r,i.name):r.get("left").traverse({Identifier(e){t(r,e.node.name)}}),r.get("left").traverse({Identifier(t){e(t,t.node.name)}})},ExpressionStatement(t){const{node:r}=t;N9(r.expression)&&e(t,r.expression.name)},SwitchStatement(t){const{node:r}=t;N9(r.discriminant)&&e(t,r.discriminant.name);for(const{test:n}of r.cases)N9(n)&&e(t,n.name)},ReturnStatement(t){const{node:r}=t,{argument:n}=r,i=t.get("argument");return i.isIdentifier()?e(t,n.name):i.isFunction()&&n.id?e(i,n.id.name):void 0},ObjectMethod(e){const{params:n}=e.node,i=e.get("params");for(const e of i){const{node:r}=e;N9(r)&&t(e,r.name)}r({path:e,params:n})},"CallExpression|OptionalCallExpression"(t){const{node:r}=t,{callee:n}=r;N9(n)&&e(t,r.callee.name),t.traverse({SpreadElement(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},Identifier(t){r.arguments.includes(t.node)&&e(t,t.node.name)}})},BinaryExpression(t){const{left:r,right:n}=t.node;N9(r)&&e(t,r.name),N9(n)&&e(t,n.name)},ImportDeclaration(e){const r=e.get("specifiers");for(const e of r){const{local:r}=e.node;N9(r)&&t(e,r.name)}},ExportDefaultDeclaration(t){const r=t.get("declaration"),{declaration:i}=t.node,{id:s}=i;s&&M9(i)?e(t,i.id.name):N9(i)?e(t,i.name):s&&_9(i)?e(t,i.id.name):L9(i)&&n(r.get("properties"))},ExportNamedDeclaration(t){const r=t.get("declaration"),{declaration:n,specifiers:i}=t.node;if(r.isFunctionDeclaration())return e(t,n.id.name);if(r.isClassDeclaration())return e(t,n.id.name);if(r.isTSInterfaceDeclaration())return e(t,n.id.name);if(r.isTSTypeAliasDeclaration())return e(t,n.id.name);if(r.isInterfaceDeclaration())return e(t,n.id.name);if(R9(n)){const{declarations:r}=n;for(const{id:n}of r)N9(n)&&e(t,n.name)}else for(const{local:r}of i)N9(r)&&e(t,r.name)},Function(n){const{node:a,parentPath:o}=n,{id:u,body:l,params:c}=a,p=n.get("params");u&&(t(n,a.id.name),o.isBlock()||o.isProgram()||e(n,a.id.name));for(const e of p){const{node:r}=e;N9(r)?t(e,r.name):I9(r)?s(e):B9(r)&&i(e.get("properties"))}N9(l)&&e(n,l.name),r({path:n,params:c})},...W9(e),...J9({use:e,declare:t}),...H9({use:e,declare:t})}},{useParamsBeforeLastUsed:uee,usePropertiesBeforeRest:lee}=Y9,{isClassDeclaration:cee,isFunctionDeclaration:pee}=aee;const dee=e=>({path:t,params:r})=>{e.push({path:t,params:r})};function hee({name:e,scope:t}){if(t.hasOwnBinding(e))return t.uid;for(;t.parent;)if((t=t.parent).hasOwnBinding(e))return t.uid;return t.uid}const fee=({vars:e})=>(t,r)=>{const{scope:n}=t,i=hee({name:r,scope:n}),s=e[i],{used:a}=s[r];return a};const mee=({vars:e,setPath:t})=>(r,n)=>{const i=function(e){const{node:t,scope:r}=e;return pee(t)||cee(t)?e.parentPath.scope:r}(r),s=hee({name:n,scope:i});e[s]||(e[s]={});const a=e[s];a[n]?a[n].declared=!0:a[n]={declared:!0,used:!1},t&&(a[n].path=r)},yee=({vars:e})=>(t,r)=>{const{scope:n}=t,i=hee({name:r,scope:n});e[i]||(e[i]={});const s=e[i];s[r]?s[r].used=!0:s[r]={declared:!1,used:!0}};function gee([e,t]){return{name:e,...t}}const bee=({declared:e,used:t})=>e&&!t;const{operator:vee}=G2(),xee=(e,t)=>{const r={},n=[],{setPath:i,traverse:s}=t,a=yee({vars:r}),o=mee({vars:r,setPath:i}),u=fee({vars:r}),l=dee(n);return s(e,oee({use:a,declare:o,addParams:l})),n.map(uee({use:a,isUsed:u})).map(lee({use:a})),Object.values(r)},Eee=e=>{const t=[];for(const r of e){const e=Object.entries(r);for(const r of e)t.push(gee(r))}return t},See=e=>e.filter(bee),{replaceWith:Dee,compare:Tee,remove:Aee}=vee;p9.report=({name:e})=>`'${e}' is defined but never used`,p9.fix=({path:e})=>Tee(e,"const __a = __b = __c")?Dee(e.parentPath,e.node.init):function({parentPath:e}){return!!e.isImportDeclaration()&&1===e.node.specifiers.length}(e)?e.parentPath.remove():void Aee(e),p9.find=(e,{traverse:t})=>{const r=xee(e,{setPath:!0,traverse:t}),n=Eee(r);return See(n)};var Cee=Object.create,Pee=Object.defineProperty,wee=Object.getOwnPropertyDescriptor,kee=Object.getOwnPropertyNames,Fee=Object.getPrototypeOf,Iee=Object.prototype.hasOwnProperty,_ee=(e,t)=>()=>(e&&(t=e(e=0)),t),Nee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Oee=(e,t)=>{for(var r in t)Pee(e,r,{get:t[r],enumerable:!0})},Bee=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of kee(t))!Iee.call(e,i)&&i!==r&&Pee(e,i,{get:()=>t[i],enumerable:!(n=wee(t,i))||n.enumerable});return e},Lee=(e,t,r)=>(r=null!=e?Cee(Fee(e)):{},Bee(!t&&e&&e.__esModule?r:Pee(r,"default",{value:e,enumerable:!0}),e)),Mee=e=>Bee(Pee({},"__esModule",{value:!0}),e),jee=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Ree=(e,t,r)=>(((e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)})(e,t,"access private method"),r),$ee=Nee((e=>{function t(){}function r(e,t,r,n,i){for(var s=0,a=t.length,o=0,u=0;s<a;s++){var l=t[s];if(l.removed){if(l.value=e.join(n.slice(u,u+l.count)),u+=l.count,s&&t[s-1].added){var c=t[s-1];t[s-1]=t[s],t[s]=c}}else{if(!l.added&&i){var p=r.slice(o,o+l.count);p=p.map((function(e,t){var r=n[u+t];return r.length>e.length?r:e})),l.value=e.join(p)}else l.value=e.join(r.slice(o,o+l.count));o+=l.count,l.added||(u+=l.count)}}var d=t[a-1];return a>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[a-2].value+=d.value,t.pop()),t}function n(e){return{newPos:e.newPos,components:e.components.slice(0)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=t,t.prototype={diff:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=i.callback;"function"==typeof i&&(s=i,i={}),this.options=i;var a=this;function o(e){return s?(setTimeout((function(){s(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var u=(t=this.removeEmpty(this.tokenize(t))).length,l=e.length,c=1,p=u+l;i.maxEditLength&&(p=Math.min(p,i.maxEditLength));var d=[{newPos:-1,components:[]}],h=this.extractCommon(d[0],t,e,0);if(d[0].newPos+1>=u&&h+1>=l)return o([{value:this.join(t),count:t.length}]);function f(){for(var i=-1*c;i<=c;i+=2){var s=void 0,p=d[i-1],h=d[i+1],f=(h?h.newPos:0)-i;p&&(d[i-1]=void 0);var m=p&&p.newPos+1<u,y=h&&0<=f&&f<l;if(m||y){if(!m||y&&p.newPos<h.newPos?(s=n(h),a.pushComponent(s.components,void 0,!0)):((s=p).newPos++,a.pushComponent(s.components,!0,void 0)),f=a.extractCommon(s,t,e,i),s.newPos+1>=u&&f+1>=l)return o(r(a,s.components,t,e,a.useLongestToken));d[i]=s}else d[i]=void 0}c++}if(s)!function e(){setTimeout((function(){if(c>p)return s();f()||e()}),0)}();else for(;c<=p;){var m=f();if(m)return m}},pushComponent:function(e,t,r){var n=e[e.length-1];n&&n.added===t&&n.removed===r?e[e.length-1]={count:n.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,n){for(var i=t.length,s=r.length,a=e.newPos,o=a-n,u=0;a+1<i&&o+1<s&&this.equals(t[a+1],r[o+1]);)a++,o++,u++;return u&&e.components.push({count:u}),e.newPos=a,o},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}})),Uee=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=function(e,t,n){return r.diff(e,t,n)},e.arrayDiff=void 0;var t=function(e){return e&&e.__esModule?e:{default:e}}($ee());var r=new t.default;e.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}})),Vee={};function zee(e,t){function r(){this.constructor=e}pte(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function Kee(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function qee(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a}function Wee(e,t){return function(r,n){t(r,n,e)}}function Jee(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Hee(e,t,r,n){return new(r||(r=Promise))((function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,o)}u((n=n.apply(e,t||[])).next())}))}function Xee(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}}function Gee(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function Yee(e,t){for(var r in e)"default"!==r&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function Qee(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Zee(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a}function ete(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Zee(arguments[t]));return e}function tte(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,i++)n[i]=s[a];return n}function rte(e){return this instanceof rte?(this.v=e,this):new rte(e)}function nte(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||o(e,t)}))})}function o(e,t){try{!function(e){e.value instanceof rte?Promise.resolve(e.value.v).then(u,l):c(s[0][2],e)}(i[e](t))}catch(e){c(s[0][3],e)}}function u(e){o("next",e)}function l(e){o("throw",e)}function c(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}}function ite(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:rte(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function ste(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=Qee(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,i,(t=e[r](t)).done,t.value)}))}}}function ate(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function ote(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function ute(e){return e&&e.__esModule?e:{default:e}}function lte(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function cte(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}Oee(Vee,{__assign:()=>dte,__asyncDelegator:()=>ite,__asyncGenerator:()=>nte,__asyncValues:()=>ste,__await:()=>rte,__awaiter:()=>Hee,__classPrivateFieldGet:()=>lte,__classPrivateFieldSet:()=>cte,__createBinding:()=>Gee,__decorate:()=>qee,__exportStar:()=>Yee,__extends:()=>zee,__generator:()=>Xee,__importDefault:()=>ute,__importStar:()=>ote,__makeTemplateObject:()=>ate,__metadata:()=>Jee,__param:()=>Wee,__read:()=>Zee,__rest:()=>Kee,__spread:()=>ete,__spreadArrays:()=>tte,__values:()=>Qee});var pte,dte,hte=_ee((()=>{pte=function(e,t){return pte=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},pte(e,t)},dte=function(){return dte=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dte.apply(this,arguments)}})),fte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.apiDescriptor={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(t){if(null===t||"object"!=typeof t)return JSON.stringify(t);if(Array.isArray(t))return`[${t.map((t=>e.apiDescriptor.value(t))).join(", ")}]`;let r=Object.keys(t);return 0===r.length?"{}":`{ ${r.map((r=>`${e.apiDescriptor.key(r)}: ${e.apiDescriptor.value(t[r])}`)).join(", ")} }`},pair:({key:t,value:r})=>e.apiDescriptor.value({[t]:r})}})),mte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(hte(),Mee(Vee)).__exportStar(fte(),e)})),yte={};Oee(yte,{default:()=>bte});var gte,bte,vte=_ee((()=>{gte=e=>e,gte.grey=gte,gte.red=gte,gte.bold=gte,gte.yellow=gte,gte.blue=gte,gte.default=gte,bte=gte})),xte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(vte(),Mee(yte));e.commonDeprecatedHandler=(e,r,{descriptor:n})=>{let i=[`${t.default.yellow("string"==typeof e?n.key(e):n.pair(e))} is deprecated`];return r&&i.push(`we now treat it as ${t.default.blue("string"==typeof r?n.key(r):n.pair(r))}`),i.join("; ")+"."}})),Ete=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(hte(),Mee(Vee)).__exportStar(xte(),e)})),Ste=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(vte(),Mee(yte));e.commonInvalidHandler=(e,r,n)=>[`Invalid ${t.default.red(n.descriptor.key(e))} value.`,`Expected ${t.default.blue(n.schemas[e].expected(n))},`,`but received ${t.default.red(n.descriptor.value(r))}.`].join(" ")})),Dte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(hte(),Mee(Vee)).__exportStar(Ste(),e)})),Tte=Nee(((e,t)=>{var r=[],n=[];t.exports=function(e,t){if(e===t)return 0;var i=e;e.length>t.length&&(e=t,t=i);var s=e.length,a=t.length;if(0===s)return a;if(0===a)return s;for(;s>0&&e.charCodeAt(~-s)===t.charCodeAt(~-a);)s--,a--;if(0===s)return a;for(var o=0;o<s&&e.charCodeAt(o)===t.charCodeAt(o);)o++;if(a-=o,0===(s-=o))return a;for(var u,l,c,p,d=0,h=0;d<s;)n[o+d]=e.charCodeAt(o+d),r[d]=++d;for(;h<a;)for(u=t.charCodeAt(o+h),c=h++,l=h,d=0;d<s;d++)p=u===n[o+d]?c:c+1,c=r[d],l=r[d]=c>l?p>l?l+1:p:p>c?c+1:p;return l}})),Ate=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(vte(),Mee(yte)),r=Tte();e.levenUnknownHandler=(e,n,{descriptor:i,logger:s,schemas:a})=>{let o=[`Ignored unknown option ${t.default.yellow(i.pair({key:e,value:n}))}.`],u=Object.keys(a).sort().find((t=>r(e,t)<3));u&&o.push(`Did you mean ${t.default.blue(i.key(u))}?`),s.warn(o.join(" "))}})),Cte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(hte(),Mee(Vee)).__exportStar(Ate(),e)})),Pte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(hte(),Mee(Vee));t.__exportStar(Ete(),e),t.__exportStar(Dte(),e),t.__exportStar(Cte(),e)})),wte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];function r(e,r){let s=new e(r),a=Object.create(s);for(let e of t)e in r&&(a[e]=i(r[e],s,n.prototype[e].length));return a}e.createSchema=r;var n=class{constructor(e){this.name=e.name}static create(e){return r(this,e)}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,r){return e}preprocess(e,t){return e}postprocess(e,t){return e}};function i(e,t,r){return"function"==typeof e?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}e.Schema=n})),kte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wte(),r=class extends t.Schema{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}};e.AliasSchema=r})),Fte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wte(),r=class extends t.Schema{expected(){return"anything"}validate(){return!0}};e.AnySchema=r})),Ite=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(hte(),Mee(Vee)),r=wte(),n=class extends r.Schema{constructor(e){var{valueSchema:r,name:n=r.name}=e,i=t.__rest(e,["valueSchema","name"]);super(Object.assign({},i,{name:n})),this._valueSchema=r}expected(e){return`an array of ${this._valueSchema.expected(e)}`}validate(e,t){if(!Array.isArray(e))return!1;let r=[];for(let n of e){let e=t.normalizeValidateResult(this._valueSchema.validate(n,t),n);!0!==e&&r.push(e.value)}return 0===r.length||{value:r}}deprecated(e,t){let r=[];for(let n of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(n,t),n);!1!==e&&r.push(...e.map((({value:e})=>({value:[e]}))))}return r}forward(e,t){let r=[];for(let n of e){let e=t.normalizeForwardResult(this._valueSchema.forward(n,t),n);r.push(...e.map(i))}return r}redirect(e,t){let r=[],n=[];for(let s of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(s,t),s);"remain"in e&&r.push(e.remain),n.push(...e.redirect.map(i))}return 0===r.length?{redirect:n}:{redirect:n,remain:r}}overlap(e,t){return e.concat(t)}};function i({from:e,to:t}){return{from:[e],to:t}}e.ArraySchema=n})),_te=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wte(),r=class extends t.Schema{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};e.BooleanSchema=r})),Nte=Nee((e=>{function t(e,t){return"string"==typeof e||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function r(e,r){return void 0===e?[]:Array.isArray(e)?e.map((e=>t(e,r))):[t(e,r)]}Object.defineProperty(e,"__esModule",{value:!0}),e.recordFromArray=function(e,t){let r=Object.create(null);for(let n of e){let e=n[t];if(r[e])throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r[e]=n}return r},e.mapFromArray=function(e,t){let r=new Map;for(let n of e){let e=n[t];if(r.has(e))throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r.set(e,n)}return r},e.createAutoChecklist=function(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return!!e[r]||(e[r]=!0,!1)}},e.partition=function(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]},e.isInt=function(e){return e===Math.floor(e)},e.comparePrimitive=function(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):"string"!==r?Number(e)-Number(t):e.localeCompare(t)},e.normalizeDefaultResult=function(e){return void 0===e?{}:e},e.normalizeValidateResult=function(e,t){return!0===e||(!1===e?{value:t}:e)},e.normalizeDeprecatedResult=function(e,t,r=!1){return!1!==e&&(!0===e?!!r||[{value:t}]:"value"in e?[e]:0!==e.length&&e)},e.normalizeTransferResult=t,e.normalizeForwardResult=r,e.normalizeRedirectResult=function(e,t){let n=r("object"==typeof e&&"redirect"in e?e.redirect:e,t);return 0===n.length?{remain:t,redirect:n}:"object"==typeof e&&"remain"in e?{remain:e.remain,redirect:n}:{redirect:n}}})),Ote=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wte(),r=Nte(),n=class extends t.Schema{constructor(e){super(e),this._choices=r.mapFromArray(e.choices.map((e=>e&&"object"==typeof e?e:{value:e})),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map((e=>this._choices.get(e))).filter((e=>!e.deprecated)).map((e=>e.value)).sort(r.comparePrimitive).map(e.value),n=t.slice(0,-2),i=t.slice(-2);return n.concat(i.join(" or ")).join(", ")}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return!(!t||!t.deprecated)&&{value:e}}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}};e.ChoiceSchema=n})),Bte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wte(),r=class extends t.Schema{expected(){return"a number"}validate(e,t){return"number"==typeof e}};e.NumberSchema=r})),Lte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Nte(),r=Bte(),n=class extends r.NumberSchema{expected(){return"an integer"}validate(e,r){return!0===r.normalizeValidateResult(super.validate(e,r),e)&&t.isInt(e)}};e.IntegerSchema=n})),Mte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=wte(),r=class extends t.Schema{expected(){return"a string"}validate(e){return"string"==typeof e}};e.StringSchema=r})),jte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(hte(),Mee(Vee));t.__exportStar(kte(),e),t.__exportStar(Fte(),e),t.__exportStar(Ite(),e),t.__exportStar(_te(),e),t.__exportStar(Ote(),e),t.__exportStar(Lte(),e),t.__exportStar(Bte(),e),t.__exportStar(Mte(),e)})),Rte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=fte(),r=xte(),n=Dte(),i=Ate();e.defaultDescriptor=t.apiDescriptor,e.defaultUnknownHandler=i.levenUnknownHandler,e.defaultInvalidHandler=n.commonInvalidHandler,e.defaultDeprecatedHandler=r.commonDeprecatedHandler})),$te=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=Rte(),r=Nte();e.normalize=(e,t,r)=>new n(t,r).normalize(e);var n=class{constructor(e,n){let{logger:i=console,descriptor:s=t.defaultDescriptor,unknown:a=t.defaultUnknownHandler,invalid:o=t.defaultInvalidHandler,deprecated:u=t.defaultDeprecatedHandler}=n||{};this._utils={descriptor:s,logger:i||{warn:()=>{}},schemas:r.recordFromArray(e,"name"),normalizeDefaultResult:r.normalizeDefaultResult,normalizeDeprecatedResult:r.normalizeDeprecatedResult,normalizeForwardResult:r.normalizeForwardResult,normalizeRedirectResult:r.normalizeRedirectResult,normalizeValidateResult:r.normalizeValidateResult},this._unknownHandler=a,this._invalidHandler=o,this._deprecatedHandler=u,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=r.createAutoChecklist()}normalize(e){let t={},n=[e],i=()=>{for(;0!==n.length;){let e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};i();for(let e of Object.keys(this._utils.schemas)){let i=this._utils.schemas[e];if(!(e in t)){let t=r.normalizeDefaultResult(i.default(this._utils));"value"in t&&n.push({[e]:t.value})}}i();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];e in t&&(t[e]=r.postprocess(t[e],this._utils))}return t}_applyNormalization(e,t){let n=[],[i,s]=r.partition(Object.keys(e),(e=>e in this._utils.schemas));for(let s of i){let i=this._utils.schemas[s],a=i.preprocess(e[s],this._utils),o=r.normalizeValidateResult(i.validate(a,this._utils),a);if(!0!==o){let{value:e}=o,t=this._invalidHandler(s,e,this._utils);throw"string"==typeof t?new Error(t):t}let u=({from:e,to:t})=>{n.push("string"==typeof t?{[t]:e}:{[t.key]:t.value})},l=({value:e,redirectTo:t})=>{let n=r.normalizeDeprecatedResult(i.deprecated(e,this._utils),a,!0);if(!1!==n)if(!0===n)this._hasDeprecationWarned(s)||this._utils.logger.warn(this._deprecatedHandler(s,t,this._utils));else for(let{value:e}of n){let r={key:s,value:e};if(!this._hasDeprecationWarned(r)){let n="string"==typeof t?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(r,n,this._utils))}}};r.normalizeForwardResult(i.forward(a,this._utils),a).forEach(u);let c=r.normalizeRedirectResult(i.redirect(a,this._utils),a);if(c.redirect.forEach(u),"remain"in c){let e=c.remain;t[s]=s in t?i.overlap(t[s],e,this._utils):e,l({value:e})}for(let{from:e,to:t}of c.redirect)l({value:e,redirectTo:t})}for(let r of s){let i=e[r],s=this._unknownHandler(r,i,this._utils);if(s)for(let e of Object.keys(s)){let r={[e]:s[e]};e in this._utils.schemas?n.push(r):Object.assign(t,r)}}return n}};e.Normalizer=n})),Ute=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(hte(),Mee(Vee));t.__exportStar(mte(),e),t.__exportStar(Pte(),e),t.__exportStar(jte(),e),t.__exportStar($te(),e),t.__exportStar(wte(),e)})),Vte={};Oee(Vte,{getChalk:()=>Kte,shouldHighlight:()=>zte});var zte,Kte,qte=_ee((()=>{vte(),zte=()=>!1,Kte=()=>bte})),Wte=Nee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=i,e.default=function(e,t,n,s={}){if(!r){r=!0;let e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";new Error(e).name="DeprecationWarning",console.warn(new Error(e))}return n=Math.max(n,0),i(e,{start:{column:n,line:t}},s)};var t=(qte(),Mee(Vte)),r=!1;var n=/\r\n|[\n\r\u2028\u2029]/;function i(e,r,i={}){let s=(i.highlightCode||i.forceColor)&&(0,t.shouldHighlight)(i),a=(0,t.getChalk)(i),o=function(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}(a),u=(e,t)=>s?e(t):t,l=e.split(n),{start:c,end:p,markerLines:d}=function(e,t,r){let n=Object.assign({column:0,line:-1},e.start),i=Object.assign({},n,e.end),{linesAbove:s=2,linesBelow:a=3}=r||{},o=n.line,u=n.column,l=i.line,c=i.column,p=Math.max(o-(s+1),0),d=Math.min(t.length,l+a);-1===o&&(p=0),-1===l&&(d=t.length);let h=l-o,f={};if(h)for(let e=0;e<=h;e++){let r=e+o;if(u)if(0===e){let e=t[r-1].length;f[r]=[u,e-u+1]}else if(e===h)f[r]=[0,c];else{let n=t[r-e].length;f[r]=[0,n]}else f[r]=!0}else f[o]=u===c?!u||[u,0]:[u,c-u];return{start:p,end:d,markerLines:f}}(r,l,i),h=r.start&&"number"==typeof r.start.column,f=String(p).length,m=(s?(0,t.default)(e,i):e).split(n,p).slice(c,p).map(((e,t)=>{let r=c+1+t,n=` ${` ${r}`.slice(-f)} |`,s=d[r],a=!d[r+1];if(s){let t="";if(Array.isArray(s)){let r=e.slice(0,Math.max(s[0]-1,0)).replace(/[^\t]/g," "),l=s[1]||1;t=["\n ",u(o.gutter,n.replace(/\d/g," "))," ",r,u(o.marker,"^").repeat(l)].join(""),a&&i.message&&(t+=" "+u(o.message,i.message))}return[u(o.marker,">"),u(o.gutter,n),e.length>0?` ${e}`:"",t].join("")}return` ${u(o.gutter,n)}${e.length>0?` ${e}`:""}`})).join("\n");return i.message&&!h&&(m=`${" ".repeat(f+1)}${i.message}\n${m}`),s?a.reset(m):m}}));Oee({},{__debug:()=>tse,check:()=>Zie,doc:()=>qie,format:()=>Qie,formatWithCursor:()=>Yie,getSupportInfo:()=>ese,util:()=>Iie,version:()=>Xie});var Jte=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},Hte=Lee(Uee(),1),Xte="string",Gte="array",Yte="cursor",Qte="indent",Zte="align",ere="trim",tre="group",rre="fill",nre="if-break",ire="indent-if-break",sre="line-suffix",are="line-suffix-boundary",ore="line",ure="label",lre="break-parent",cre=new Set([Yte,Qte,Zte,ere,tre,rre,nre,ire,sre,are,ore,ure,lre]);var pre=function(e){if("string"==typeof e)return Xte;if(Array.isArray(e))return Gte;if(!e)return;let{type:t}=e;return cre.has(t)?t:void 0};function dre(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(pre(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...cre].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var hre=class extends Error{name="InvalidDocError";constructor(e){super(dre(e)),this.doc=e}},fre={};var mre=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===fre){r(i.pop());continue}r&&i.push(e,fre);let s=pre(e);if(!s)throw new hre(e);if(!1!==(null==t?void 0:t(e)))switch(s){case Gte:case rre:{let t=s===Gte?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case nre:i.push(e.flatContents,e.breakContents);break;case tre:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case Zte:case Qte:case ire:case ure:case sre:i.push(e.contents);break;case Xte:case Yte:case ere:case are:case ore:case lre:break;default:throw new hre(e)}}},yre=()=>{};function gre(e){return{type:Qte,contents:e}}function bre(e,t){return{type:Zte,contents:t,n:e}}function vre(e,t={}){return yre(t.expandedStates),{type:tre,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function xre(e){return{type:rre,parts:e}}function Ere(e){return{type:sre,contents:e}}var Sre={type:are},Dre={type:lre},Tre={type:ere},Are={type:ore,hard:!0},Cre={type:ore,hard:!0,literal:!0},Pre={type:ore},wre={type:ore,soft:!0},kre=[Are,Dre],Fre=[Cre,Dre],Ire={type:Yte};function _re(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function Nre(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=gre(n);n=bre(t%r,n),n=bre(Number.NEGATIVE_INFINITY,n)}return n}var Ore=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};function Bre(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}function Lre(e,t){let r;switch(t){case"\n":r=/\n/g;break;case"\r":r=/\r/g;break;case"\r\n":r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}var Mre={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},jre=/[^\x20-\x7F]/;var Rre=function(e){if(!e)return 0;if(!jre.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=Mre.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t},$re=e=>{if(Array.isArray(e))return e;if(e.type!==rre)throw new Error(`Expect doc to be 'array' or '${rre}'.`);return e.parts};function Ure(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(pre(e)){case Gte:return t(e.map(n));case rre:return t({...e,parts:e.parts.map(n)});case nre:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case tre:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case Zte:case Qte:case ire:case ure:case sre:return t({...e,contents:n(e.contents)});case Xte:case Yte:case ere:case are:case ore:case lre:return t(e);default:throw new hre(e)}}(e);return r.set(e,i),i}}function Vre(e,t,r){let n=r,i=!1;return mre(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function zre(e){if(e.type===tre&&e.break||e.type===ore&&e.hard||e.type===lre)return!0}function Kre(e){if(e.length>0){let t=Ore(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function qre(e){return e.type!==ore||e.hard?e.type===nre?e.flatContents:e:e.soft?"":" "}function Wre(e){for(e=[...e];e.length>=2&&Ore(!1,e,-2).type===ore&&Ore(!1,e,-1).type===lre;)e.length-=2;if(e.length>0){let t=Jre(Ore(!1,e,-1));e[e.length-1]=t}return e}function Jre(e){switch(pre(e)){case Zte:case Qte:case ire:case tre:case sre:case ure:{let t=Jre(e.contents);return{...e,contents:t}}case nre:return{...e,breakContents:Jre(e.breakContents),flatContents:Jre(e.flatContents)};case rre:return{...e,parts:Wre(e.parts)};case Gte:return Wre(e);case Xte:return e.replace(/[\n\r]*$/,"");case Yte:case ere:case are:case ore:case lre:break;default:throw new hre(e)}return e}function Hre(e){return Jre(function(e){return Ure(e,(e=>function(e){switch(pre(e)){case rre:if(e.parts.every((e=>""===e)))return"";break;case tre:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===tre&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case Zte:case Qte:case ire:case sre:if(!e.contents)return"";break;case nre:if(!e.flatContents&&!e.breakContents)return"";break;case Gte:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof Ore(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case Xte:case Yte:case ere:case are:case ore:case ure:case lre:break;default:throw new hre(e)}return e}(e)))}(e))}function Xre(e){if(e.type===ore)return!0}function Gre(e,t){return e.type===ure?{...e,contents:t(e.contents)}:t(e)}var Yre=Symbol("MODE_BREAK"),Qre=Symbol("MODE_FLAT"),Zre=Symbol("cursor");function ene(e,t){return rne(e,{type:"indent"},t)}function tne(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?rne(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:rne(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function rne(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function nne(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==Zre)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Zre);return t}function ine(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(pre(l)){case Xte:u.push(l),r-=Rre(l);break;case Gte:case rre:{let t=$re(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case Qte:case Zte:case ire:case ure:o.push({mode:e,doc:l.contents});break;case ere:r+=nne(u);break;case tre:{if(s&&l.break)return!1;let t=l.break?Yre:e,r=l.expandedStates&&t===Yre?Ore(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case nre:{let t=(l.groupId?i[l.groupId]||Qre:e)===Yre?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case ore:if(e===Yre||l.hard)return!0;l.soft||(u.push(" "),r--);break;case sre:n=!0;break;case are:if(n)return!1}}return!1}function sne(e,t){let r={},n=t.printWidth,i=Bre(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:Yre,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];mre(e,(function(e){if(e.type===lre&&Kre(r),e.type===tre){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===tre&&r.pop().break&&Kre(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(pre(d)){case Xte:{let e="\n"!==i?Jte(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=Rre(e));break}case Gte:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case Yte:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Zre),c++;break;case Qte:a.push({ind:ene(e,t),mode:p,doc:d.contents});break;case Zte:a.push({ind:tne(e,d.n,t),mode:p,doc:d.contents});break;case ere:s-=nne(o);break;case tre:switch(p){case Qre:if(!u){a.push({ind:e,mode:d.break?Yre:Qre,doc:d.contents});break}case Yre:{u=!1;let t={ind:e,mode:Qre,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&ine(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=Ore(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Yre,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Yre,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Qre,doc:t};if(ine(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Yre,doc:d.contents});break}}d.id&&(r[d.id]=Ore(!1,a,-1).mode);break;case rre:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Qre,doc:o},h={ind:e,mode:Yre,doc:o},f=ine(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Qre,doc:u},y={ind:e,mode:Yre,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:xre(i)},b=i[0];ine({ind:e,mode:Qre,doc:[o,u,b]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case nre:case ire:{let t=d.groupId?r[d.groupId]:p;if(t===Yre){let t=d.type===nre?d.breakContents:d.negate?d.contents:gre(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Qre){let t=d.type===nre?d.flatContents:d.negate?gre(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case sre:l.push({ind:e,mode:p,doc:d.contents});break;case are:l.length>0&&a.push({ind:e,mode:p,doc:Are});break;case ore:switch(p){case Qre:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Yre:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=nne(o),o.push(i+e.value),s=e.length)}break;case ure:a.push({ind:e,mode:p,doc:d.contents});break;case lre:break;default:throw new hre(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(Zre);if(-1!==p){let e=o.indexOf(Zre,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function ane(e){var t;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...ane(r));else{let e=ane(r);""!==e&&t.push(e)}return t}return e.type===nre?{...e,breakContents:ane(e.breakContents),flatContents:ane(e.flatContents)}:e.type===tre?{...e,contents:ane(e.contents),expandedStates:null==(t=e.expandedStates)?void 0:t.map(ane)}:e.type===rre?{type:"fill",parts:e.parts.map(ane)}:e.contents?{...e,contents:ane(e.contents)}:e}var one=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n},une=class extends Error{name="ConfigError"},lne=class extends Error{name="UndefinedParserError"},cne={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.\nThis option cannot be used with --range-start and --range-end.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:"Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)"}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:"Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:"Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function pne({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap((e=>e.languages??[])),n=[];for(let i of function(e){let t=[];for(let[r,n]of Object.entries(e)){let e={name:r,...n};Array.isArray(e.default)&&(e.default=Ore(!1,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map((({options:e})=>e)),cne)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter((e=>!e.deprecated))),"parser"===i.name&&(i.choices=[...i.choices,...dne(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter((e=>{var t;return void 0!==(null==(t=e.defaultOptions)?void 0:t[i.name])})).map((e=>[e.name,e.defaultOptions[i.name]]))),n.push(i));return{languages:r,options:n}}function*dne(e,t,r){let n=new Set(e.map((e=>e.value)));for(let e of t)if(e.parsers)for(let t of e.parsers)if(!n.has(t)){n.add(t);let i=r.find((e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t))),s=e.name;null!=i&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:t,description:s}}}var hne=e=>e.split(/[/\\]/).pop();function fne(e,t){if(!t)return;let r=hne(t).toLowerCase();return e.find((e=>{var t,n;return(null==(t=e.extensions)?void 0:t.some((e=>r.endsWith(e))))||(null==(n=e.filenames)?void 0:n.some((e=>e.toLowerCase()===r)))}))}var mne,yne=function(e,t){let r=e.plugins.flatMap((e=>e.languages??[])),n=function(e,t){if(t)return e.find((({name:e})=>e.toLowerCase()===t))??e.find((({aliases:e})=>null==e?void 0:e.includes(t)))??e.find((({extensions:e})=>null==e?void 0:e.includes(`.${t}`)))}(r,t.language)??fne(r,t.physicalFile)??fne(r,t.file)??void t.physicalFile;return null==n?void 0:n.parsers[0]},gne=Lee(Ute(),1);function bne(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let i,{name:s}=e,a={name:s},o={};switch(e.type){case"int":i=gne.default.IntegerSchema,t&&(a.preprocess=Number);break;case"string":case"path":i=gne.default.StringSchema;break;case"choice":i=gne.default.ChoiceSchema,a.choices=e.choices.map((t=>null!=t&&t.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t));break;case"boolean":i=gne.default.BooleanSchema;break;case"flag":i=n,a.flags=r.flatMap((e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean)));break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?a.validate=(t,r,n)=>e.exception(t)||r.validate(t,n):a.validate=(e,t,r)=>void 0===e||t.validate(e,r),e.redirect&&(o.redirect=t=>t?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,r,n)=>r.preprocess(e(Array.isArray(t)?Ore(!1,t,-1):t),n)}return e.array?gne.default.ArraySchema.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:i.create(a)}):i.create({...a,...o})}var vne=function(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:a}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=gne.default.apiDescriptor;let o=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,r)=>{let{_:n,...i}=r.schemas;return gne.default.levenUnknownHandler(e,t,{...r,schemas:i})},u=function(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(gne.default.AnySchema.create({name:"_"}));for(let i of e)n.push(bne(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(gne.default.AliasSchema.create({name:i.alias,sourceName:i.name}));return n}(t,{isCLI:n,FlagSchema:s}),l=new gne.default.Normalizer(u,{logger:r,unknown:o,descriptor:a}),c=!1!==r;c&&mne&&(l._hasDeprecationWarned=mne);let p=l.normalize(e);return c&&(mne=l._hasDeprecationWarned),p};function xne(e,t){if(!t)throw new Error("parserName is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.parsers&&Object.prototype.hasOwnProperty.call(n.parsers,t))return n}let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new une(r)}function Ene({plugins:e,parser:t}){return Sne(xne(e,t),t)}function Sne(e,t){let r=e.parsers[t];return"function"==typeof r?r():r}var Dne={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};var Tne=async function(e,t={}){var r;let n={...e};if(!n.parser){if(!n.filepath)throw new lne("No parser and no file path given, couldn't infer a parser.");if(n.parser=yne(n,{physicalFile:n.filepath}),!n.parser)throw new lne(`No parser could be inferred for file "${n.filepath}".`)}let i=pne({plugins:e.plugins,showDeprecated:!0}).options,s={...Dne,...Object.fromEntries(i.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default])))},a=xne(n.plugins,n.parser),o=await Sne(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let u=null!=(r=a.printers)&&r[o.astFormat]?a:function(e,t){if(!t)throw new Error("astFormat is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.printers&&Object.prototype.hasOwnProperty.call(n.printers,t))return n}let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new une(r)}(n.plugins,o.astFormat),l=await function(e,t){let r=e.printers[t];return"function"==typeof r?r():r}(u,o.astFormat);n.printer=l;let c={...s,...u.defaultOptions?Object.fromEntries(Object.entries(u.defaultOptions).filter((([,e])=>void 0!==e))):{}};for(let[e,t]of Object.entries(c))(null===n[e]||void 0===n[e])&&(n[e]=t);return"json"===n.parser&&(n.trailingComma="none"),vne(n,i,{passThrough:Object.keys(Dne),...t})},Ane=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),Cne=e=>Object.keys(e).filter((e=>!Ane.has(e)));var Pne=function(e){return e?t=>e(t,Ane):Cne};var wne=function(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=Pne(n),s=r.ignoredProperties??new Set;return function e(t,n){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>e(t,n))).filter(Boolean);let a={},o=new Set(i(t));for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||s.has(r)||(o.has(r)?a[r]=e(t[r],t):a[r]=t[r]);let u=r(t,a,n);if(null!==u)return u??a}(e)},kne=Lee(Wte(),1);var Fne,Ine,_ne,Nne,One=async function(e,t){let r,n=await Ene(t),i=n.preprocess?n.preprocess(e,t):e;t.originalText=i;try{r=await n.parse(i,t,t)}catch(t){!function(e,t){let{loc:r}=e;if(r){let n=(0,kne.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+="\n"+n,e.codeFrame=n,e}throw e}(t,e)}return{text:i,ast:r}};Fne=new WeakSet,Ine=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},_ne=new WeakSet,Nne=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var Bne=class{constructor(e){jee(this,Fne),jee(this,_ne),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return Ore(!1,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:Ore(!1,this.stack,-2)}get node(){return Ore(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return null!==this.siblings}get siblings(){let{stack:e}=this,t=Ore(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return null===e?null:e[this.index+1]}get previous(){let{siblings:e}=this;return null===e?null:e[this.index-1]}get isFirst(){return 0===this.index}get isLast(){let{siblings:e,index:t}=this;return null!==e&&t===e.length-1}get isRoot(){return 1===this.stack.length}get root(){return this.stack[0]}get ancestors(){return[...Ree(this,_ne,Nne).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?Ore(!1,e,-2):null}getValue(){return Ore(!1,this.stack,-1)}getNode(e=0){let t=Ree(this,Fne,Ine).call(this,e);return-1===t?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:r}=this,{length:n}=r,i=Ore(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{return e(this)}finally{r.length=n}}callParent(e,t=0){let r=Ree(this,Fne,Ine).call(this,t+1),n=this.stack.splice(r+1);try{return e(this)}finally{this.stack.push(...n)}}each(e,...t){let{stack:r}=this,{length:n}=r,i=Ore(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{for(let t=0;t<i.length;++t)r.push(t,i[t]),e(this,t,i),r.length-=2}finally{r.length=n}}map(e,...t){let r=[];return this.each(((t,n,i)=>{r[n]=e(t,n,i)}),...t),r}match(...e){let t=this.stack.length-1,r=null,n=this.stack[t--];for(let i of e){if(void 0===n)return!1;let e=null;if("number"==typeof r&&(e=r,r=this.stack[t--],n=this.stack[t--]),i&&!i(n,r,e))return!1;r=this.stack[t--],n=this.stack[t--]}return!0}findAncestor(e){for(let t of Ree(this,_ne,Nne).call(this))if(e(t))return t}hasAncestor(e){for(let t of Ree(this,_ne,Nne).call(this))if(e(t))return!0;return!1}},Lne=()=>{};Lne.ok=Lne,Lne.strictEqual=Lne;var Mne=Lne;function jne(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var Rne=jne(/\s/),$ne=jne(" \t"),Une=jne(",; \t"),Vne=jne(/[^\n\r]/);var zne=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var Kne=function(e,t,r={}){let n=$ne(e,r.backwards?t-1:t,r);return n!==zne(e,n,r)};var qne=function(e){return Array.isArray(e)&&e.length>0};var Wne=function(e){return null!==e&&"object"==typeof e};function*Jne(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>Wne(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function Hne(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function Xne(e,t){t.leading=!0,t.trailing=!1,Hne(e,t)}function Gne(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Hne(e,t)}function Yne(e,t){t.leading=!1,t.trailing=!0,Hne(e,t)}var Qne=new WeakMap;function Zne(e,t){if(Qne.has(e))return Qne.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:a}=t;if(!n)return[];let o=((null==r?void 0:r(e,t))??[...Jne(e,{getVisitorKeys:Pne(i)})]).flatMap((e=>n(e)?[e]:Zne(e,t)));return o.sort(((e,t)=>s(e)-s(t)||a(e)-a(t))),Qne.set(e,o),o}function eie(e,t,r,n){let i,s,{locStart:a,locEnd:o}=r,u=a(t),l=o(t),c=Zne(e,r),p=0,d=c.length;for(;p<d;){let e=p+d>>1,n=c[e],h=a(n),f=o(n);if(h<=u&&l<=f)return eie(n,t,r,n);if(f<=u)i=n,p=e+1;else{if(!(l<=h))throw new Error("Comment location overlaps with node location");s=n,d=e}}if("TemplateLiteral"===(null==n?void 0:n.type)){let{quasis:e}=n,a=aie(e,t,r);i&&aie(e,i,r)!==a&&(i=null),s&&aie(e,s,r)!==a&&(s=null)}return{enclosingNode:n,precedingNode:i,followingNode:s}}var tie=()=>!1;var rie=e=>!/[\S\n\u2028\u2029]/.test(e);function nie(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=a(i);if(s)for(let t=n-1;t>=0;t--){let{comment:n,precedingNode:i}=r[t];if(i!==s||!rie(e.slice(o(n),u)))break;u=a(n)}return Kne(e,u,{backwards:!0})}function iie(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=o(i);if(s)for(let t=n+1;t<r.length;t++){let{comment:n,followingNode:i}=r[t];if(i!==s||!rie(e.slice(u,a(n))))break;u=o(n)}return Kne(e,u)}function sie(e,t){var r,n;let i=e.length;if(0===i)return;let s,{precedingNode:a,followingNode:o}=e[0],u=t.locStart(o);for(s=i;s>0;--s){let{comment:i,precedingNode:l,followingNode:c}=e[s-1];Mne.strictEqual(l,a),Mne.strictEqual(c,o);let p=t.originalText.slice(t.locEnd(i),u);if(!((null==(n=(r=t.printer).isGap)?void 0:n.call(r,p,t))??/^[\s(]*$/.test(p)))break;u=t.locStart(i)}for(let[t,{comment:r}]of e.entries())t<s?Yne(a,r):Xne(o,r);for(let e of[a,o])e.comments&&e.comments.length>1&&e.comments.sort(((e,r)=>t.locStart(e)-t.locStart(r)));e.length=0}function aie(e,t,r){let n=r.locStart(t)-1;for(let t=1;t<e.length;++t)if(n<r.locStart(e[t]))return t-1;return 0}var oie=function(e,t){let r=t-1;return r=$ne(e,r,{backwards:!0}),r=zne(e,r,{backwards:!0}),r=$ne(e,r,{backwards:!0}),r!==zne(e,r,{backwards:!0})};function uie(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function lie(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[uie(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=Kne(a,u(n))?Kne(a,o(n),{backwards:!0})?kre:Pre:" ";i.push(e)}else i.push(kre);let l=zne(a,$ne(a,u(n)));return!1!==l&&Kne(a,l)&&i.push(kre),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=uie(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||Kne(o,u(i),{backwards:!0})){let e=oie(o,u(i));return{doc:Ere([kre,e?kre:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[Ere([" ",s]),Dre],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}async function cie(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:a,hasPrettierIgnore:o=(()=>!1),getVisitorKeys:u}}=r;if(!a||"auto"!==s)return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let l=Pne(a.getVisitorKeys??u),c=[];!function t(){let{node:n}=e;if(null===n||"object"!=typeof n||o(e))return;for(let r of l(n))Array.isArray(n[r])?e.each(t,r):e.call(t,r);let s=a(e,r);if(s){if("function"==typeof s)return void c.push({print:s,node:n,pathStack:[...e.stack]});i.set(n,s)}}();let p=e.stack;for(let{print:n,node:s,pathStack:a}of c)try{e.stack=a;let o=await n(d,t,e,r);o&&i.set(s,o)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}function d(e,t){return async function(e,t,r,n){let i=await Tne({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await One(e,i),a=await n(s,i);return Hre(a)}(e,t,r,n)}e.stack=p}var pie=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)};async function die(e,t){({ast:e}=await fie(e,t));let r=new Map,n=new Bne(e),i=new Map;await cie(n,a,t,die,i);let s=await hie(n,t,a,void 0,i);return function(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let e of t){if(!e.printed&&!r.has(e))throw new Error('Comment "'+e.value.trim()+'" was not printed. Please report this error!');delete e.printed}}(t),s;function a(e,t){return void 0===e||e===n?o(t):Array.isArray(e)?n.call((()=>o(t)),...e):n.call((()=>o(t)),e)}function o(e){let s=n.node;if(null==s)return"";let o=s&&"object"==typeof s&&void 0===e;if(o&&r.has(s))return r.get(s);let u=hie(n,t,a,e,i);return o&&r.set(s,u),u}}function hie(e,t,r,n,i){var s;let a,{node:o}=e,{printer:u}=t;return a=null!=(s=u.hasPrettierIgnore)&&s.call(u,e)?pie(e,t):i.has(o)?i.get(o):u.print(e,t,r,n),u.printComment&&(!u.willPrintOwnComments||!u.willPrintOwnComments(e,t))&&(a=function(e,t,r){let{leading:n,trailing:i}=lie(e,r);return n||i?Gre(t,(e=>[n,e,i])):t}(e,a,t)),o===t.cursorNode&&(a=Gre(a,(e=>[Ire,e,Ire]))),a}async function fie(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,function(e,t){let{comments:r}=e;if(delete e.comments,!qne(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:o={}},originalText:u}=t,{ownLine:l=tie,endOfLine:c=tie,remaining:p=tie}=o,d=r.map(((n,i)=>({...eie(e,n,t),comment:n,text:u,options:t,ast:e,isLastComment:r.length-1===i})));for(let[e,t]of d.entries()){let r,{comment:o,precedingNode:u,enclosingNode:h,followingNode:f,text:m,options:y,ast:g,isLastComment:b}=t;if("json"===y.parser||"json5"===y.parser||"__js_expression"===y.parser||"__ts_expression"===y.parser||"__vue_expression"===y.parser||"__vue_ts_expression"===y.parser){if(i(o)-i(g)<=0){Xne(g,o);continue}if(s(o)-s(g)>=0){Yne(g,o);continue}}if(a?r=[t]:(o.enclosingNode=h,o.precedingNode=u,o.followingNode=f,r=[o,m,y,g,b]),nie(m,y,d,e))o.placement="ownLine",l(...r)||(f?Xne(f,o):u?Yne(u,o):Gne(h||g,o));else if(iie(m,y,d,e))o.placement="endOfLine",c(...r)||(u?Yne(u,o):f?Xne(f,o):Gne(h||g,o));else if(o.placement="remaining",!p(...r))if(u&&f){let e=n.length;e>0&&n[e-1].followingNode!==f&&sie(n,y),n.push(t)}else u?Yne(u,o):f?Xne(f,o):Gne(h||g,o)}if(sie(n,t),!a)for(let e of r)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}(e,t);let{printer:{preprocess:n}}=t;return{ast:e=n?await n(e,t):e,comments:r}}var mie=({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e;function yie(e){let t=e.length-1;for(;;){let r=e[t];if("Program"!==(null==r?void 0:r.type)&&"File"!==(null==r?void 0:r.type))break;t--}return e.slice(0,t+1)}function gie(e,t,r,n,i=[],s){let{locStart:a,locEnd:o}=r,u=a(e),l=o(e);if(!(t>l||t<u||"rangeEnd"===s&&t===u||"rangeStart"===s&&t===l)){for(let a of Zne(e,r)){let o=gie(a,t,r,n,[e,...i],s);if(o)return o}if(!n||n(e,i[0]))return{node:e,parentNodes:i}}}var bie=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),vie=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function xie(e,t,r){if(!t)return!1;switch(e.parser){case"flow":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"__babel_estree":return function(e,t){return"DeclareExportDeclaration"!==t&&"TypeParameterDeclaration"!==e&&("Directive"===e||"TypeAlias"===e||"TSExportAssignment"===e||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}(t.type,null==r?void 0:r.type);case"json":case"json5":case"json-stringify":return bie.has(t.type);case"graphql":return vie.has(t.kind);case"vue":return"root"!==t.tag}return!1}function Eie(e,t,r){let{rangeStart:n,rangeEnd:i,locStart:s,locEnd:a}=t;Mne.ok(i>n);let o=e.slice(n,i).search(/\S/),u=-1===o;if(!u)for(n+=o;i>n&&!/\S/.test(e[i-1]);--i);let l,c,p=gie(r,n,t,((e,r)=>xie(t,e,r)),[],"rangeStart"),d=u?p:gie(r,i,t,(e=>xie(t,e)),[],"rangeEnd");if(!p||!d)return{rangeStart:0,rangeEnd:0};if(mie(t)){let e=function(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find((e=>bie.has(e.type)&&n.has(e)))}(p,d);l=e,c=e}else({startNode:l,endNode:c}=function(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let a=r(e.node);for(let e of yie(t.parentNodes)){if(!(r(e)>=a))break;s=e}let o=n(t.node);for(let t of yie(e.parentNodes)){if(!(n(t)<=o))break;if(i=t,i===s)break}return{startNode:i,endNode:s}}(p,d,t));return{rangeStart:Math.min(s(l),s(c)),rangeEnd:Math.max(a(l),a(c))}}var Sie=function(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=Pne(t.printer.getVisitorKeys),a=e=>n(e)<=r&&i(e)>=r,o=e;for(let t of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of Jne(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:s,filter:a}))o=t;return o},Die="\ufeff",Tie=Symbol("cursor");async function Aie(e,t,r=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await One(e,t);t.cursorOffset>=0&&(t.cursorNode=Sie(n,t));let s=await die(n,t);r>0&&(s=Nre([kre,s],r,t.tabWidth));let a=sne(s,t);if(r>0){let e=a.formatted.trim();void 0!==a.cursorNodeStart&&(a.cursorNodeStart-=a.formatted.indexOf(e)),a.formatted=e+Bre(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let e,r,n,s,u;if(t.cursorNode&&a.cursorNodeText?(e=t.locStart(t.cursorNode),r=i.slice(e,t.locEnd(t.cursorNode)),n=t.cursorOffset-e,s=a.cursorNodeStart,u=a.cursorNodeText):(e=0,r=i,n=t.cursorOffset,s=0,u=a.formatted),r===u)return{formatted:a.formatted,cursorOffset:s+n,comments:o};let l=r.split("");l.splice(n,0,Tie);let c=u.split(""),p=(0,Hte.diffArrays)(l,c),d=s;for(let e of p)if(e.removed){if(e.value.includes(Tie))break}else d+=e.count;return{formatted:a.formatted,cursorOffset:d,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}function Cie(e,t,r){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?r:t}function Pie(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=Cie(e,r,-1),n=Cie(e,n,0),i=Cie(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function wie(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=Pie(e,t),a=e.charAt(0)===Die;if(a&&(e=e.slice(1),r--,n--,i--),"auto"===s&&(s=function(e){let t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"}(e)),e.includes("\r")){let t=t=>Lre(e.slice(0,Math.max(t,0)),"\r\n");r-=t(r),n-=t(n),i-=t(i),e=function(e){return Jte(!1,e,/\r\n?/g,"\n")}(e)}return{hasBOM:a,text:e,options:Pie(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function kie(e,t){let r=await Ene(t);return!r.hasPragma||r.hasPragma(e)}async function Fie(e,t){let r,{hasBOM:n,text:i,options:s}=wie(e,await Tne(t));return s.rangeStart>=s.rangeEnd&&""!==i||s.requirePragma&&!await kie(i,s)?{formatted:e,cursorOffset:t.cursorOffset,comments:[]}:(s.rangeStart>0||s.rangeEnd<i.length?r=await async function(e,t){let{ast:r,text:n}=await One(e,t),{rangeStart:i,rangeEnd:s}=Eie(n,t,r),a=n.slice(i,s),o=Math.min(i,n.lastIndexOf("\n",i)+1),u=n.slice(o,i).match(/^\s*/)[0],l=one(u,t.tabWidth),c=await Aie(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),p=c.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=p.length-a.length:c.cursorOffset>=0&&(d=c.cursorOffset+i);let h=n.slice(0,i)+p+n.slice(s);if("lf"!==t.endOfLine){let e=Bre(t.endOfLine);d>=0&&"\r\n"===e&&(d+=Lre(h.slice(0,d),"\n")),h=Jte(!1,h,"\n",e)}return{formatted:h,cursorOffset:d,comments:c.comments}}(i,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await kie(i,s)&&(i=s.printer.insertPragma(i)),r=await Aie(i,s)),n&&(r.formatted=Die+r.formatted,r.cursorOffset>=0&&r.cursorOffset++),r)}var Iie={};Oee(Iie,{addDanglingComment:()=>Gne,addLeadingComment:()=>Xne,addTrailingComment:()=>Yne,getAlignmentSize:()=>one,getIndentSize:()=>Mie,getMaxContinuousCount:()=>Lie,getNextNonSpaceNonCommentCharacter:()=>$ie,getNextNonSpaceNonCommentCharacterIndex:()=>Vie,getStringWidth:()=>Rre,hasNewline:()=>Kne,hasNewlineInRange:()=>jie,hasSpaces:()=>Rie,isNextLineEmpty:()=>Kie,isNextLineEmptyAfterIndex:()=>Bie,isPreviousLineEmpty:()=>zie,makeString:()=>Uie,skip:()=>jne,skipEverythingButNewLine:()=>Vne,skipInlineComment:()=>_ie,skipNewline:()=>zne,skipSpaces:()=>$ne,skipToLineEnd:()=>Une,skipTrailingComment:()=>Nie,skipWhitespace:()=>Rne});var _ie=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var Nie=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Vne(e,t):t)};var Oie=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=$ne(e,n),n=_ie(e,n),n=Nie(e,n),n=zne(e,n);return n};var Bie=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Une(e,n),n=_ie(e,n),n=$ne(e,n);return n=Nie(e,n),n=zne(e,n),!1!==n&&Kne(e,n)};var Lie=function(e,t){let r=e.match(new RegExp(`(${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)};var Mie=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:one(e.slice(r+1).match(/^[\t ]*/)[0],t)};var jie=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};var Rie=function(e,t,r={}){return $ne(e,r.backwards?t-1:t,r)!==t};var $ie=function(e,t){let r=Oie(e,t);return!1===r?"":e.charAt(r)};var Uie=function(e,t,r){let n='"'===t?"'":'"',i=Jte(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};function Vie(e,t){return 2===arguments.length||"number"==typeof t?Oie(e,t):function(e,t,r){return Oie(e,r(t))}(...arguments)}function zie(e,t){return 2===arguments.length||"number"==typeof t?oie(e,t):function(e,t,r){return oie(e,r(t))}(...arguments)}function Kie(e,t){return 2===arguments.length||"number"==typeof t?Bie(e,t):function(e,t,r){return Bie(e,r(t))}(...arguments)}var qie={};Oee(qie,{builders:()=>Wie,printer:()=>Jie,utils:()=>Hie});var Wie={join:_re,line:Pre,softline:wre,hardline:kre,literalline:Fre,group:vre,conditionalGroup:function(e,t){return vre(e[0],{...t,expandedStates:e})},fill:xre,lineSuffix:Ere,lineSuffixBoundary:Sre,cursor:Ire,breakParent:Dre,ifBreak:function(e,t="",r={}){return{type:nre,breakContents:e,flatContents:t,groupId:r.groupId}},trim:Tre,indent:gre,indentIfBreak:function(e,t){return{type:ire,contents:e,groupId:t.groupId,negate:t.negate}},align:bre,addAlignmentToDoc:Nre,markAsRoot:function(e){return bre({type:"root"},e)},dedentToRoot:function(e){return bre(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return bre(-1,e)},hardlineWithoutBreakParent:Are,literallineWithoutBreakParent:Cre,label:function(e,t){return e?{type:ure,label:e,contents:t}:t},concat:e=>e},Jie={printDocToString:sne},Hie={willBreak:function(e){return Vre(e,zre,!1)},traverseDoc:mre,findInDoc:Vre,mapDoc:Ure,removeLines:function(e){return Ure(e,qre)},stripTrailingHardline:Hre,replaceEndOfLine:function(e,t=Fre){return Ure(e,(e=>"string"==typeof e?_re(t,e.split("\n")):e))},canBreak:function(e){return Vre(e,Xre,!1)}},Xie="3.0.0";function Gie(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var Yie=Gie(Fie);async function Qie(e,t){let{formatted:r}=await Yie(e,{...t,cursorOffset:-1});return r}async function Zie(e,t){return await Qie(e,t)===e}var ese=Gie(pne,0),tse={parse:Gie((async function(e,t,r){let{text:n,options:i}=wie(e,await Tne(t)),s=await One(n,i);return r&&(r.preprocessForPrint&&(s.ast=await fie(s.ast,i)),r.massage&&(s.ast=wne(s.ast,i))),s})),formatAST:Gie((async function(e,t){return t=await Tne(t),sne(await die(e,t),t)})),formatDoc:Gie((async function(e,t){let r=function(e){let t=Object.create(null),r=new Set;return function e(t,r,i){var s,a;if("string"==typeof t)return JSON.stringify(t);if(Array.isArray(t)){let r=t.map(e).filter(Boolean);return 1===r.length?r[0]:`[${r.join(", ")}]`}if(t.type===ore){let e=(null==(s=null==i?void 0:i[r+1])?void 0:s.type)===lre;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===lre)return(null==(a=null==i?void 0:i[r-1])?void 0:a.type)===ore&&i[r-1].hard?void 0:"breakParent";if(t.type===ere)return"trim";if(t.type===Qte)return"indent("+e(t.contents)+")";if(t.type===Zte)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if(t.type===nre)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if(t.type===ire){let r=[];t.negate&&r.push("negate: true"),t.groupId&&r.push(`groupId: ${n(t.groupId)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if(t.type===tre){let r=[];t.break&&"propagated"!==t.break&&r.push("shouldBreak: true"),t.id&&r.push(`id: ${n(t.id)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if(t.type===rre)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if(t.type===sre)return"lineSuffix("+e(t.contents)+")";if(t.type===are)return"lineSuffixBoundary";if(t.type===ure)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(ane(e));function n(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];let n=e.description||"symbol";for(let i=0;;i++){let s=n+(i>0?` #${i}`:"");if(!r.has(s))return r.add(s),t[e]=`Symbol.for(${JSON.stringify(s)})`}}}(e),{formatted:n}=await Fie(r,{...t,parser:"__js_expression"});return n})),printToDoc:Gie((async function(e,t){t=await Tne(t);let{ast:r}=await One(e,t);return die(r,t)})),printDocToString:Gie((async function(e,t){return sne(e,await Tne(t))}))},rse=Object.create,nse=Object.defineProperty,ise=Object.getOwnPropertyDescriptor,sse=Object.getOwnPropertyNames,ase=Object.getPrototypeOf,ose=Object.prototype.hasOwnProperty,use=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),lse=(e,t,r)=>(r=null!=e?rse(ase(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of sse(t))!ose.call(e,i)&&i!==r&&nse(e,i,{get:()=>t[i],enumerable:!(n=ise(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:nse(r,"default",{value:e,enumerable:!0}),e)),cse=use((e=>{function t(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],!(t.indexOf(r)>=0)&&(i[r]=e[r]);return i}Object.defineProperty(e,"__esModule",{value:!0});var r=class{constructor(e,t,r){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=r}},n=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:n,column:i,index:s}=e;return new r(n,i+t,s+t)}var s="BABEL_PARSER_SYNTAX_ERROR",a="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o=(e,t=e.length-1)=>({get(){return e.reduce(((e,t)=>e[t]),this)},set(r){e.reduce(((e,n,i)=>i===t?e[n]=r:e[n]),this)}}),u=(e,t,r)=>Object.keys(r).map((e=>[e,r[e]])).filter((([,e])=>!!e)).map((([e,t])=>[e,"function"==typeof t?{value:t,enumerable:!1}:"string"==typeof t.reflect?Object.assign({},t,o(t.reflect.split("."))):t])).reduce(((e,[t,r])=>Object.defineProperty(e,t,Object.assign({configurable:!0},r))),Object.assign(new e,t)),l={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:a},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:a}},c={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"},p=({type:e,prefix:t})=>"UpdateExpression"===e?c.UpdateExpression[String(t)]:c[e],d={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} 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.",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:e})=>`\`${e}\` 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:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"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:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${1===e?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${p(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${p(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} 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:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).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:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' 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:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,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.",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:e})=>`Unexpected keyword '${e}'.`,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:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),f={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:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:e})}; 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.'},m=["toMessage"],y=["message"];function g(e){let{toMessage:n}=e,i=t(e,m);return function e({loc:t,details:s}){return u(SyntaxError,Object.assign({},i,{loc:t}),{clone(t={}){let n=t.loc||{};return e({loc:new r("line"in n?n.line:this.loc.line,"column"in n?n.column:this.loc.column,"index"in n?n.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:s,enumerable:!1},message:{get(){return`${n(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:"loc.index",enumerable:!0},missingPlugin:"missingPlugin"in s&&{reflect:"details.missingPlugin",enumerable:!0}})}}function b(e,r){if(Array.isArray(e))return t=>b(t,e[0]);let n={};for(let i of Object.keys(e)){let a=e[i],o="string"==typeof a?{message:()=>a}:"function"==typeof a?{message:a}:a,{message:u}=o,l=t(o,y),c="string"==typeof u?()=>u:u;n[i]=g(Object.assign({code:s,reasonCode:i,toMessage:c},r?{syntaxPlugin:r}:{},l))}return n}var v=Object.assign({},b(l),b(d),b({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' 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."}),b`pipelineOperator`(f)),{defineProperty:x}=Object,E=(e,t)=>x(e,t,{enumerable:!1,value:e[t]});function S(e){return e.loc.start&&E(e.loc.start,"index"),e.loc.end&&E(e.loc.end,"index"),e}var D=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},T={brace:new D("{"),j_oTag:new D("<tag"),j_cTag:new D("</tag"),j_expr:new D("<tag>...</tag>",!0)};T.template=new D("`",!0);var A=!0,C=!0,P=!0,w=!0,k=!0,F=class{constructor(e,t={}){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=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}},I=new Map;function _(e,t={}){t.keyword=e;let r=U(e,t);return I.set(e,r),r}function N(e,t){return U(e,{beforeExpr:A,binop:t})}var O=-1,B=[],L=[],M=[],j=[],R=[],$=[];function U(e,t={}){var r,n,i,s;return++O,L.push(e),M.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),$.push(null!=(s=t.prefix)&&s),B.push(new F(e,t)),O}function V(e,t={}){var r,n,i,s;return++O,I.set(e,O),L.push(e),M.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),$.push(null!=(s=t.prefix)&&s),B.push(new F("name",t)),O}var z={bracketL:U("[",{beforeExpr:A,startsExpr:C}),bracketHashL:U("#[",{beforeExpr:A,startsExpr:C}),bracketBarL:U("[|",{beforeExpr:A,startsExpr:C}),bracketR:U("]"),bracketBarR:U("|]"),braceL:U("{",{beforeExpr:A,startsExpr:C}),braceBarL:U("{|",{beforeExpr:A,startsExpr:C}),braceHashL:U("#{",{beforeExpr:A,startsExpr:C}),braceR:U("}"),braceBarR:U("|}"),parenL:U("(",{beforeExpr:A,startsExpr:C}),parenR:U(")"),comma:U(",",{beforeExpr:A}),semi:U(";",{beforeExpr:A}),colon:U(":",{beforeExpr:A}),doubleColon:U("::",{beforeExpr:A}),dot:U("."),question:U("?",{beforeExpr:A}),questionDot:U("?."),arrow:U("=>",{beforeExpr:A}),template:U("template"),ellipsis:U("...",{beforeExpr:A}),backQuote:U("`",{startsExpr:C}),dollarBraceL:U("${",{beforeExpr:A,startsExpr:C}),templateTail:U("...`",{startsExpr:C}),templateNonTail:U("...${",{beforeExpr:A,startsExpr:C}),at:U("@"),hash:U("#",{startsExpr:C}),interpreterDirective:U("#!..."),eq:U("=",{beforeExpr:A,isAssign:w}),assign:U("_=",{beforeExpr:A,isAssign:w}),slashAssign:U("_=",{beforeExpr:A,isAssign:w}),xorAssign:U("_=",{beforeExpr:A,isAssign:w}),moduloAssign:U("_=",{beforeExpr:A,isAssign:w}),incDec:U("++/--",{prefix:k,postfix:!0,startsExpr:C}),bang:U("!",{beforeExpr:A,prefix:k,startsExpr:C}),tilde:U("~",{beforeExpr:A,prefix:k,startsExpr:C}),doubleCaret:U("^^",{startsExpr:C}),doubleAt:U("@@",{startsExpr:C}),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:A,binop:9,prefix:k,startsExpr:C}),modulo:U("%",{binop:10,startsExpr:C}),star:U("*",{binop:10}),slash:N("/",10),exponent:U("**",{beforeExpr:A,binop:11,rightAssociative:!0}),_in:_("in",{beforeExpr:A,binop:7}),_instanceof:_("instanceof",{beforeExpr:A,binop:7}),_break:_("break"),_case:_("case",{beforeExpr:A}),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",{beforeExpr:A}),_else:_("else",{beforeExpr:A}),_finally:_("finally"),_function:_("function",{startsExpr:C}),_if:_("if"),_return:_("return",{beforeExpr:A}),_switch:_("switch"),_throw:_("throw",{beforeExpr:A,prefix:k,startsExpr:C}),_try:_("try"),_var:_("var"),_const:_("const"),_with:_("with"),_new:_("new",{beforeExpr:A,startsExpr:C}),_this:_("this",{startsExpr:C}),_super:_("super",{startsExpr:C}),_class:_("class",{startsExpr:C}),_extends:_("extends",{beforeExpr:A}),_export:_("export"),_import:_("import",{startsExpr:C}),_null:_("null",{startsExpr:C}),_true:_("true",{startsExpr:C}),_false:_("false",{startsExpr:C}),_typeof:_("typeof",{beforeExpr:A,prefix:k,startsExpr:C}),_void:_("void",{beforeExpr:A,prefix:k,startsExpr:C}),_delete:_("delete",{beforeExpr:A,prefix:k,startsExpr:C}),_do:_("do",{isLoop:P,beforeExpr:A}),_for:_("for",{isLoop:P}),_while:_("while",{isLoop:P}),_as:V("as",{startsExpr:C}),_assert:V("assert",{startsExpr:C}),_async:V("async",{startsExpr:C}),_await:V("await",{startsExpr:C}),_from:V("from",{startsExpr:C}),_get:V("get",{startsExpr:C}),_let:V("let",{startsExpr:C}),_meta:V("meta",{startsExpr:C}),_of:V("of",{startsExpr:C}),_sent:V("sent",{startsExpr:C}),_set:V("set",{startsExpr:C}),_static:V("static",{startsExpr:C}),_using:V("using",{startsExpr:C}),_yield:V("yield",{startsExpr:C}),_asserts:V("asserts",{startsExpr:C}),_checks:V("checks",{startsExpr:C}),_exports:V("exports",{startsExpr:C}),_global:V("global",{startsExpr:C}),_implements:V("implements",{startsExpr:C}),_intrinsic:V("intrinsic",{startsExpr:C}),_infer:V("infer",{startsExpr:C}),_is:V("is",{startsExpr:C}),_mixins:V("mixins",{startsExpr:C}),_proto:V("proto",{startsExpr:C}),_require:V("require",{startsExpr:C}),_satisfies:V("satisfies",{startsExpr:C}),_keyof:V("keyof",{startsExpr:C}),_readonly:V("readonly",{startsExpr:C}),_unique:V("unique",{startsExpr:C}),_abstract:V("abstract",{startsExpr:C}),_declare:V("declare",{startsExpr:C}),_enum:V("enum",{startsExpr:C}),_module:V("module",{startsExpr:C}),_namespace:V("namespace",{startsExpr:C}),_interface:V("interface",{startsExpr:C}),_type:V("type",{startsExpr:C}),_opaque:V("opaque",{startsExpr:C}),name:U("name",{startsExpr:C}),string:U("string",{startsExpr:C}),num:U("num",{startsExpr:C}),bigint:U("bigint",{startsExpr:C}),decimal:U("decimal",{startsExpr:C}),regexp:U("regexp",{startsExpr:C}),privateName:U("#name",{startsExpr:C}),eof:U("eof"),jsxName:U("jsxName"),jsxText:U("jsxText",{beforeExpr:!0}),jsxTagStart:U("jsxTagStart",{startsExpr:!0}),jsxTagEnd:U("jsxTagEnd"),placeholder:U("%%",{startsExpr:!0})};function K(e){return e>=93&&e<=130}function q(e){return e>=58&&e<=130}function W(e){return e>=58&&e<=134}function J(e){return R[e]}function H(e){return e>=127&&e<=129}function X(e){return e>=58&&e<=92}function G(e){return L[e]}function Y(e){return M[e]}function Q(e){return e>=24&&e<=25}function Z(e){return B[e]}B[8].updateContext=e=>{e.pop()},B[5].updateContext=B[7].updateContext=B[23].updateContext=e=>{e.push(T.brace)},B[22].updateContext=e=>{e[e.length-1]===T.template?e.pop():e.push(T.template)},B[140].updateContext=e=>{e.push(T.j_expr,T.j_oTag)};var ee="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",te="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",re=new RegExp("["+ee+"]"),ne=new RegExp("["+ee+te+"]");ee=te=null;var ie=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],se=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function ae(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function oe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&re.test(String.fromCharCode(e)):ae(e,ie)))}function ue(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ne.test(String.fromCharCode(e)):ae(e,ie)||ae(e,se))))}var le=["implements","interface","let","package","private","protected","public","static","yield"],ce=["eval","arguments"],pe=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"]),de=new Set(le),he=new Set(ce);function fe(e,t){return t&&"await"===e||"enum"===e}function me(e,t){return fe(e,t)||de.has(e)}function ye(e){return he.has(e)}function ge(e,t){return me(e,t)||ye(e)}var be=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"]);var ve=64,xe=128,Ee=256,Se=387,De=128,Te=1024,Ae=2048,Ce=4096,Pe=8192,we=8201,ke=64,Fe=class{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}},Ie=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}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 inClass(){return(this.currentThisScopeFlags()&ve)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&ve)>0&&0==(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&xe)return!0;if(451&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Fe(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(n,e,t,r),16&t?n.functions.add(e):n.lexical.add(e),8&t&&this.maybeExportDefined(n,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(n=this.scopeStack[i],this.checkRedeclarationInScope(n,e,t,r),n.var.add(e),this.maybeExportDefined(n,e),!(n.flags&Se));--i);this.parser.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(v.VarRedeclaration,{at:n,identifierName:t})}isRedeclaredInScope(e,t,r){return!!(1&r)&&(8&r?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&r?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){let{name:t}=e,r=this.scopeStack[0];!r.lexical.has(t)&&!r.var.has(t)&&!r.functions.has(t)&&this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&Se)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(451&t&&!(4&t))return t}}},_e=class extends Fe{constructor(...e){super(...e),this.declareFunctions=new Set}},Ne=class extends Ie{createScope(e){return new _e(e)}declareName(e,t,r){let n=this.currentScope();if(t&Ae)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){return!!super.isRedeclaredInScope(e,t,r)||!!(r&Ae)&&(!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Oe=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{let[t,r]=e;if(!this.hasPlugin(t))return!1;let n=this.plugins.get(t);for(let e of Object.keys(r))if((null==n?void 0:n[e])!==r[e])return!1;return!0}}getPluginOption(e,t){var r;return null==(r=this.plugins.get(e))?void 0:r[t]}};function Be(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Le(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Me(e,t,r){let n=null,i=t.length;for(;null===n&&i>0;)n=t[--i];null===n||n.start>r.start?Le(e,r.comments):Be(n,r.comments)}var je=class extends Oe{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){let{commentStack:t}=this.state,r=t.length;if(0===r)return;let n=r-1,i=t[n];i.start===e.end&&(i.leadingNode=e,n--);let{start:s}=e;for(;n>=0;n--){let r=t[n],i=r.end;if(!(i>s)){i===s&&(r.trailingNode=e);break}r.containingNode=e,this.finalizeComment(r),t.splice(n,1)}}finalizeComment(e){let{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Be(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{let{containingNode:r,start:n}=e;if(44===this.input.charCodeAt(n-1))switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Me(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":Me(r,r.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Me(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Me(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Me(r,r.specifiers,e);break;default:Le(r,t)}else Le(r,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:r}=t;if(0===r)return;let n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:t}=this.state,{length:r}=t;0!==r&&(t[r-1].trailingNode===e?t[r-1].trailingNode=null:r>=2&&t[r-2].trailingNode===e&&(t[r-2].trailingNode=null))}takeSurroundingComments(e,t,r){let{commentStack:n}=this.state,i=n.length;if(0===i)return;let s=i-1;for(;s>=0;s--){let i=n[s],a=i.end;if(i.start===r)i.leadingNode=e;else if(a===t)i.trailingNode=e;else if(a<t)break}}},Re=/\r\n?|[\n\u2028\u2029]/,$e=new RegExp(Re.source,"g");function Ue(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var Ve=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ze=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,Ke=new RegExp("(?=("+ze.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function qe(e){switch(e){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}}var We=function(e){return e>=48&&e<=57},Je={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},He={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Xe(e,t,r,n,i,s){let a=r,o=n,u=i,l="",c=null,p=r,{length:d}=t;for(;;){if(r>=d){s.unterminated(a,o,u),l+=t.slice(p,r);break}let h=t.charCodeAt(r);if(Ge(e,h,t,r)){l+=t.slice(p,r);break}if(92===h){l+=t.slice(p,r);let a=Ye(t,r,n,i,"template"===e,s);null!==a.ch||c?l+=a.ch:c={pos:r,lineStart:n,curLine:i},({pos:r,lineStart:n,curLine:i}=a),p=r}else 8232===h||8233===h?(++i,n=++r):10===h||13===h?"template"===e?(l+=t.slice(p,r)+"\n",++r,13===h&&10===t.charCodeAt(r)&&++r,++i,p=n=r):s.unterminated(a,o,u):++r}return{pos:r,str:l,firstInvalidLoc:c,lineStart:n,curLine:i,containsInvalid:!!c}}function Ge(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function Ye(e,t,r,n,i,s){let a=!i;t++;let o=e=>({pos:t,ch:e,lineStart:r,curLine:n}),u=e.charCodeAt(t++);switch(u){case 110:return o("\n");case 114:return o("\r");case 120:{let i;return({code:i,pos:t}=Qe(e,t,r,n,2,!1,a,s)),o(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:t}=et(e,t,r,n,a,s)),o(null===i?null:String.fromCodePoint(i))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);s.strictNumericEscape(t-1,r,n);default:if(u>=48&&u<=55){let a=t-1,u=e.slice(a,t+2).match(/^[0-7]+/)[0],l=parseInt(u,8);l>255&&(u=u.slice(0,-1),l=parseInt(u,8)),t+=u.length-1;let c=e.charCodeAt(t);if("0"!==u||56===c||57===c){if(i)return o(null);s.strictNumericEscape(a,r,n)}return o(String.fromCharCode(l))}return o(String.fromCharCode(u))}}function Qe(e,t,r,n,i,s,a,o){let u,l=t;return({n:u,pos:t}=Ze(e,t,r,n,16,i,s,!1,o,!a)),null===u&&(a?o.invalidEscapeSequence(l,r,n):t=l-1),{code:u,pos:t}}function Ze(e,t,r,n,i,s,a,o,u,l){let c=t,p=16===i?Je.hex:Je.decBinOct,d=16===i?He.hex:10===i?He.dec:8===i?He.oct:He.bin,h=!1,f=0;for(let c=0,m=s??1/0;c<m;++c){let s,c=e.charCodeAt(t);if(95!==c||"bail"===o){if(s=c>=97?c-97+10:c>=65?c-65+10:We(c)?c-48:1/0,s>=i){if(s<=9&&l)return{n:null,pos:t};if(s<=9&&u.invalidDigit(t,r,n,i))s=0;else{if(!a)break;s=0,h=!0}}++t,f=f*i+s}else{let i=e.charCodeAt(t-1),s=e.charCodeAt(t+1);if(o){if(Number.isNaN(s)||!d(s)||p.has(i)||p.has(s)){if(l)return{n:null,pos:t};u.unexpectedNumericSeparator(t,r,n)}}else{if(l)return{n:null,pos:t};u.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===c||null!=s&&t-c!==s||h?{n:null,pos:t}:{n:f,pos:t}}function et(e,t,r,n,i,s){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Qe(e,t,r,n,e.indexOf("}",t)-t,!0,i,s)),++t,null!==a&&a>1114111){if(!i)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else({code:a,pos:t}=Qe(e,t,r,n,4,!1,i,s));return{code:a,pos:t}}var tt=["at"],rt=["at"];function nt(e,t,n){return new r(n,e-t,e)}var it=new Set([103,109,115,105,121,117,100,118]),st=class{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new n(e.startLoc,e.endLoc)}},at=class extends je{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,r,n)=>!!this.options.errorRecovery&&(this.raise(v.InvalidDigit,{at:nt(e,t,r),radix:n}),!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:(e,t,r)=>{this.recordStrictModeErrors(v.StrictNumericEscape,{at:nt(e,t,r)})},unterminated:(e,t,r)=>{throw this.raise(v.UnterminatedString,{at:nt(e-1,t,r)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(v.UnterminatedTemplate,{at:nt(e,t,r)})}}),this.state=new class e{constructor(){this.strict=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.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[T.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:n,startColumn:i}){this.strict=!1!==e&&(!0===e||"module"===t),this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new r(n,i,0)}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let r=new e,n=Object.keys(this);for(let e=0,i=n.length;e<i;e++){let i=n[e],s=this[i];!t&&Array.isArray(s)&&(s=s.slice()),r[i]=s}return r}},this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new st(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ve.lastIndex=e,Ve.test(this.input)?Ve.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return ze.lastIndex=e,ze.test(this.input)?ze.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){let r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,{at:t}))),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(137):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let r=this.state.pos,i=this.input.indexOf(e,r+2);if(-1===i)throw this.raise(v.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+e.length,$e.lastIndex=r+2;$e.test(this.input)&&$e.lastIndex<=i;)++this.state.curLine,this.state.lineStart=$e.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(r+2,i),start:r,end:i+e.length,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(e){let t,r=this.state.pos;this.isLookahead||(t=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ue(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+e,s),start:r,end:s,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,t=[];e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){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:{let e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}case 47:{let e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}default:break e}break;default:if(qe(r))++this.state.pos;else if(45===r&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(45!==this.input.charCodeAt(r+1)||62!==this.input.charCodeAt(r+2)||!(0===e||this.state.lineStart>e))break e;{let e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}else{if(60!==r||this.inModule||!this.options.annexB)break e;{let e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{let e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}}}}if(t.length>0){let r={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(v.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else oe(t)?(++this.state.pos,this.finishToken(136,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&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 e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;let t=this.state.pos;for(this.state.pos+=1;!Ue(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=42===e?55:54,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=57),61===n&&!this.state.inType&&(r++,t=37===e?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&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(e){let t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){let t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){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,{at: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,{at: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:{let e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)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(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);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(oe(e))return void this.readWord(e)}throw this.raise(v.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){let r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){let e,t,r=this.state.startLoc,n=this.state.start+1,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(v.UnterminatedRegExp,{at:i(r,1)});let n=this.input.charCodeAt(s);if(Ue(n))throw this.raise(v.UnterminatedRegExp,{at:i(r,1)});if(e)e=!1;else{if(91===n)t=!0;else if(93===n&&t)t=!1;else if(47===n&&!t)break;e=92===n}}let a=this.input.slice(n,s);++s;let o="",u=()=>i(r,s+2-n);for(;s<this.length;){let e=this.codePointAtPos(s),t=String.fromCharCode(e);if(it.has(e))118===e?o.includes("u")&&this.raise(v.IncompatibleRegExpUVFlags,{at:u()}):117===e&&o.includes("v")&&this.raise(v.IncompatibleRegExpUVFlags,{at:u()}),o.includes(t)&&this.raise(v.DuplicateRegExpFlags,{at:u()});else{if(!ue(e)&&92!==e)break;this.raise(v.MalformedRegExpFlags,{at:u()})}++s,o+=t}this.state.pos=s,this.finishToken(135,{pattern:a,flags:o})}readInt(e,t,r=!1,n=!0){let{n:i,pos:s}=Ze(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,n,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){let t=this.state.curPosition(),r=!1;this.state.pos+=2;let n=this.readInt(e);null==n&&this.raise(v.InvalidDigit,{at:i(t,2),radix:e});let s=this.input.charCodeAt(this.state.pos);if(110===s)++this.state.pos,r=!0;else if(109===s)throw this.raise(v.InvalidDecimal,{at:t});if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,{at:this.state.curPosition()});if(r){let e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,e)}else this.finishToken(132,n)}readNumber(e){let t=this.state.pos,r=this.state.curPosition(),n=!1,s=!1,a=!1,o=!1,u=!1;!e&&null===this.readInt(10)&&this.raise(v.InvalidNumber,{at:this.state.curPosition()});let l=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(l){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,{at:r}),!this.state.strict){let t=e.indexOf("_");t>0&&this.raise(v.ZeroDigitNumericSeparator,{at:i(r,t)})}u=l&&!/[89]/.test(e)}let c=this.input.charCodeAt(this.state.pos);if(46===c&&!u&&(++this.state.pos,this.readInt(10),n=!0,c=this.input.charCodeAt(this.state.pos)),(69===c||101===c)&&!u&&(c=this.input.charCodeAt(++this.state.pos),(43===c||45===c)&&++this.state.pos,null===this.readInt(10)&&this.raise(v.InvalidOrMissingExponent,{at:r}),n=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((n||l)&&this.raise(v.InvalidBigIntLiteral,{at:r}),++this.state.pos,s=!0),109===c&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(v.InvalidDecimal,{at:r}),++this.state.pos,a=!0),oe(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,{at:this.state.curPosition()});let p=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s)return void this.finishToken(133,p);if(a)return void this.finishToken(134,p);let d=u?parseInt(p,8):parseFloat(p);this.finishToken(132,d)}readCodePoint(e){let{code:t,pos:r}=et(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){let{str:t,pos:r,curLine:n,lineStart:i}=Xe(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=i,this.state.curLine=n,this.finishToken(131,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:i,curLine:s,lineStart:a}=Xe("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=a,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new r(n.curLine,n.pos-n.lineStart,n.pos)),96===this.input.codePointAt(i)?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,{at:t}){let r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,{at:t}):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",r=this.state.pos,n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(ue(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===r?oe:ue;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(v.MissingUnicodeEscape,{at:this.state.curPosition()}),n=this.state.pos-1;continue}++this.state.pos;let s=this.readCodePoint(!0);null!==s&&(i(s)||this.raise(v.EscapedCharNotAnIdentifier,{at:e}),t+=String.fromCodePoint(s)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){let t=this.readWord1(e),r=I.get(t);void 0!==r?this.finishToken(r,G(r)):this.finishToken(130,t)}checkKeywordEscapes(){let{type:e}=this.state;X(e)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:G(e)})}raise(e,n){let{at:i}=n,s=t(n,tt),a=e({loc:i instanceof r?i:i.loc.start,details:s});if(!this.options.errorRecovery)throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,n){let{at:i}=n,s=t(n,rt),a=i instanceof r?i:i.loc.start,o=a.index,u=this.state.errors;for(let t=u.length-1;t>=0;t--){let r=u[t];if(r.loc.index===o)return u[t]=e({loc:a,details:s});if(r.loc.index<o)break}return this.raise(e,n)}updateContext(e){}unexpected(e,t){throw this.raise(v.UnexpectedToken,{expected:t?G(t):null,at:e??this.state.startLoc})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(v.MissingPlugin,{at:t??this.state.startLoc,missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(v.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,{at:nt(t,r,n)})}}},ot=class{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}},ut=class extends ot{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,{at:t}){let r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}};function lt(){return new ot}function ct(e,t){return(e?2:0)|(t?1:0)}var pt=class extends at{addExtra(e,t,r,n=!0){if(!e)return;let i=e.extra=e.extra||{};n?i[t]=r:Object.defineProperty(i,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){let r=e+t.length;if(this.input.slice(e,r)===t){let e=this.input.charCodeAt(r);return!(ue(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,{at:this.state.startLoc});this.unexpected(null,e)}}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Re.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Ke.lastIndex=this.state.end,Ke.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let r={node:null};try{let n=e(((e=null)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:i,optionalParametersLoc:s}=e;if(!t)return!!(r||n||s||i);null!=r&&this.raise(v.InvalidCoverInitializedName,{at:r}),null!=n&&this.raise(v.DuplicateProto,{at:n}),null!=i&&this.raise(v.UnexpectedPrivateField,{at:i}),null!=s&&this.unexpected(s)}isLiteralPropertyName(){return W(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){let t=this.state.labels;this.state.labels=[];let r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=e;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);let a=this.prodParam;this.prodParam=new class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}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}};let o=this.classScope;this.classScope=new class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}})}exit(){let e=this.stack.pop(),t=this.current();for(let[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(v.InvalidPrivateFieldResolution,{at:n,identifierName:r})}declarePrivateName(e,t,r){let{privateNames:n,loneAccessors:i,undefinedPrivateNames:s}=this.current(),a=n.has(e);if(3&t){let r=a&&i.get(e);r?(a=(3&r)==(3&t)||(4&r)!=(4&t),a||i.delete(e)):a||i.set(e,t)}a&&this.parser.raise(v.PrivateNameRedeclaration,{at:r,identifierName:e}),n.add(e),s.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(v.InvalidPrivateFieldResolution,{at:t,identifierName:e})}}(this);let u=this.expressionScope;return this.expressionScope=new class{constructor(e){this.parser=void 0,this.stack=[new ot],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){let r={at:t.loc.start},{stack:n}=this,i=n.length-1,s=n[i];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(e,r),s=n[--i]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,{at:t}){let{stack:r}=this,n=r[r.length-1],i={at:t.loc.start};if(n.isCertainlyParameterDeclaration())this.parser.raise(e,i);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,i)}}recordAsyncArrowParametersError({at:e}){let{stack:t}=this,r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)2===n.type&&n.recordDeclarationError(v.AwaitBindingIdentifier,{at:e}),n=t[--r]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,r])=>{this.parser.raise(t,{at:r});let n=e.length-2,i=e[n];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(r.index),i=e[--n]}))}}(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=u}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}},dt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ht=class{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new n(r),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}},ft=ht.prototype;function mt(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a,name:o}=e,u=Object.create(ft);return u.type=t,u.start=r,u.end=n,u.loc=i,u.range=s,u.extra=a,u.name=o,"Placeholder"===t&&(u.expectedNode=e.expectedNode),u}function yt(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a}=e;if("Placeholder"===t)return function(e){return mt(e)}(e);let o=Object.create(ft);return o.type=t,o.start=r,o.end=n,o.loc=i,o.range=s,void 0!==e.raw?o.raw=e.raw:o.extra=a,o.value=e.value,o}ft.__clone=function(){let e=new ht(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let n=t[r];"leadingComments"!==n&&"trailingComments"!==n&&"innerComments"!==n&&(e[n]=this[n])}return e};var gt=class extends pt{startNode(){return new ht(this,this.state.start,this.state.startLoc)}startNodeAt(e){return new ht(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,this.options.ranges&&(e.range[1]=r.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.options.ranges&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}},bt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),vt=b`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,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:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitailized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,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:e})=>`Unexpected reserved type ${e}.`,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:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function xt(e){return"type"===e.importKind||"typeof"===e.importKind}var Et={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var St=/\*?\s*@((?:no)?flow)\b/,Dt=b`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,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:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,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 Tt(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function At(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return At(e.object)+"."+At(e.property);throw new Error("Node had unexpected type: "+e.type)}var Ct=class extends Fe{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}},Pt=class extends Ie{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new Ct(e)}enter(e){e==Ee&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e==Ee&&this.importsStack.pop(),e}hasImport(e,t){let r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1)for(let t=0;t<r-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,r){if(t&Ce)return this.hasImport(e,!0)&&this.parser.raise(v.VarRedeclaration,{at:r,identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);let n=this.currentScope();if(t&Te)return this.maybeExportDefined(n,e),void n.exportOnlyBindings.add(e);super.declareName(e,t,r),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),n.types.add(e)),256&t&&n.enums.add(e),512&t&&n.constEnums.add(e),t&De&&n.classes.add(e)}isRedeclaredInScope(e,t,r){if(e.enums.has(t)){if(256&r){return!!(512&r)!==e.constEnums.has(t)}return!0}return r&De&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&r):!!(2&r&&e.types.has(t))||super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){let{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(r.types.has(t)||r.exportOnlyBindings.has(t))return}super.checkLocalExport(e)}}},wt=e=>"ParenthesizedExpression"===e.type?wt(e.expression):e,kt=class extends gt{toAssignable(e,t=!1){var r,n;let i;switch(("ParenthesizedExpression"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(i=wt(e),t?"Identifier"===i.type?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,{at:e}):"MemberExpression"!==i.type&&this.raise(v.InvalidParenthesizedAssignment,{at:e}):this.raise(v.InvalidParenthesizedAssignment,{at:e})),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,n=e.properties.length,i=n-1;r<n;r++){var s;let n=e.properties[r],a=r===i;this.toAssignableObjectExpressionProp(n,a,t),a&&"RestElement"===n.type&&null!=(s=e.extra)&&s.trailingCommaLoc&&this.raise(v.RestTrailingComma,{at:e.extra.trailingCommaLoc})}break;case"ObjectProperty":{let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t);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":e.type="ArrayPattern",this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(v.MissingEqInAssignment,{at:e.left.loc.end}),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t)}}toAssignableObjectExpressionProp(e,t,r){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?v.PatternHasAccessor:v.PatternHasMethod,{at:e.key});else if("SpreadElement"===e.type){e.type="RestElement";let n=e.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,r),t||this.raise(v.RestTrailingComma,{at:e})}else this.toAssignable(e,r)}toAssignableList(e,t,r){let n=e.length-1;for(let i=0;i<=n;i++){let s=e[i];if(s){if("SpreadElement"===s.type){s.type="RestElement";let e=s.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,r)}else this.toAssignable(s,r);"RestElement"===s.type&&(i<n?this.raise(v.RestTrailingComma,{at:s}):t&&this.raise(v.RestTrailingComma,{at:t}))}}}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=e.properties.length-1;return e.properties.every(((e,r)=>"ObjectMethod"!==e.type&&(r===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,r){let n=1&r,i=[],s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),n&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding(),r)),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let e=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());i.push(this.parseAssignableListItem(r,e))}}return i}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let e=this.startNode(),{type:t,startLoc:r}=this.state;return 21===t?this.parseBindingRestProperty(e):(136===t?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),e.key=this.parsePrivateName()):this.parsePropertyName(e),e.method=!1,this.parseObjPropValue(e,r,!1,!1,!0,!1))}parseAssignableListItem(e,t){let r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r,e);let n=this.parseMaybeDefault(r.loc.start,r);return t.length&&(r.decorators=t),n}parseAssignableListItemTypes(e,t){return e}parseMaybeDefault(e,t){var r;if(null!=e||(e=this.state.startLoc),t=null!=(r=t)?r:this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},e)}checkLVal(e,{in:t,binding:r=ke,checkClashes:n=!1,strictModeChanged:i=!1,hasParenthesizedAncestor:s=!1}){var a;let o=e.type;if(this.isObjectMethod(e))return;if("MemberExpression"===o)return void(r!==ke&&this.raise(v.InvalidPropertyBindingPattern,{at:e}));if("Identifier"===o){this.checkIdentifier(e,r,i);let{name:t}=e;return void(n&&(n.has(t)?this.raise(v.ParamDupe,{at:e}):n.add(t)))}let u=this.isValidLVal(o,!(s||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,r);if(!0===u)return;if(!1===u){let n=r===ke?v.InvalidLhs:v.InvalidLhsBinding;return void this.raise(n,{at:e,ancestor:t})}let[l,c]=Array.isArray(u)?u:[u,"ParenthesizedExpression"===o],p="ArrayPattern"===o||"ObjectPattern"===o||"ParenthesizedExpression"===o?{type:o}:t;for(let t of[].concat(e[l]))t&&this.checkLVal(t,{in:p,binding:r,checkClashes:n,strictModeChanged:i,hasParenthesizedAncestor:c})}checkIdentifier(e,t,r=!1){this.state.strict&&(r?ge(e.name,this.inModule):ye(e.name))&&(t===ke?this.raise(v.StrictEvalArguments,{at:e,referenceName:e.name}):this.raise(v.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})),t&Pe&&"let"===e.name&&this.raise(v.LetInLexicalBinding,{at:e}),t&ke||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(v.InvalidRestAssignmentPattern,{at:e})}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?v.RestTrailingComma:v.ElementAfterRest,{at:this.state.startLoc}),!0)}};function Ft(e){if(!e)throw new Error("Assert fail")}var It=b`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' 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:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[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.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,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.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,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:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function _t(e){return"private"===e||"public"===e||"protected"===e}function Nt(e){return"in"===e||"out"===e}function Ot(e){if("MemberExpression"!==e.type)return!1;let{computed:t,property:r}=e;return(!t||"StringLiteral"===r.type||!("TemplateLiteral"!==r.type||r.expressions.length>0))&&Mt(e.object)}function Bt(e,t){var r;let{type:n}=e;if(null!=(r=e.extra)&&r.parenthesized)return!1;if(t){if("Literal"===n){let{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===n||"BooleanLiteral"===n)return!0;return!!(Lt(e,t)||function(e,t){if("UnaryExpression"===e.type){let{operator:r,argument:n}=e;if("-"===r&&Lt(n,t))return!0}return!1}(e,t)||"TemplateLiteral"===n&&0===e.expressions.length||Ot(e))}function Lt(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Mt(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Mt(e.object)}var jt=b`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});function Rt(e,t){let[r,n]="string"==typeof t?[t,{}]:t,i=Object.keys(n),s=0===i.length;return e.some((e=>{if("string"==typeof e)return s&&e===r;{let[t,s]=e;if(t!==r)return!1;for(let e of i)if(s[e]!==n[e])return!1;return!0}}))}function $t(e,t,r){let n=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return n&&Array.isArray(n)&&n.length>1?n[1][r]:null}var Ut=["minimal","fsharp","hack","smart"],Vt=["^^","@@","^","%","#"],zt=["hash","bar"];var Kt={estree:e=>class extends e{parse(){let e=S(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(S)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,r,n,i){super.parseBlockBody(e,t,r,n,i);let s=e.directives.map((e=>this.directiveToStmt(e)));e.body=s.concat(e.body),delete e.directives}pushClassMethod(e,t,r,n,i,s){this.parseMethod(t,r,n,i,s,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,r,n,i,s,a=!1){let o=this.startNode();return o.kind=e.kind,o=super.parseMethod(o,t,r,n,i,s,a),o.type="FunctionExpression",delete o.kind,e.value=o,"ClassPrivateMethod"===s&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,r,n,i){let s=super.parseObjectMethod(e,t,r,n,i);return s&&(s.type="Property","method"===s.kind&&(s.kind="init"),s.shorthand=!1),s}parseObjectProperty(e,t,r,n){let i=super.parseObjectProperty(e,t,r,n);return i&&(i.kind="init",i.type="Property"),i}isValidLVal(e,t,r){return"Property"===e?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){"get"===e.kind||"set"===e.kind?this.raise(v.PatternHasAccessor,{at:e.key}):e.method?this.raise(v.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if("Import"===r.callee.type){var n;if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r.attributes=null!=(n=r.arguments[1])?n:null;delete r.arguments,delete r.callee}return r}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){let r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":1===n.specifiers.length&&"ExportNamespaceSpecifier"===n.specifiers[0].type&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var i;let{declaration:e}=n;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(i=e.decorators)?void 0:i.length)>0&&e.start===n.start&&this.resetStartLocation(n,r)}}return n}parseSubscript(e,t,r,n){let i=super.parseSubscript(e,t,r,n);if(n.optionalChainMember){if(("OptionalMemberExpression"===i.type||"OptionalCallExpression"===i.type)&&(i.type=i.type.substring(8)),n.stop){let e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,"ChainExpression")}}else("MemberExpression"===i.type||"CallExpression"===i.type)&&(i.optional=!1);return i}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return e.method||"get"===e.kind||"set"===e.kind}finishNodeAt(e,t,r){return S(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),S(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),S(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Dt.UnterminatedJsxContent,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?void(60===r&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(r)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(139,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:Ue(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t,r=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===r&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,t}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,{at:this.state.startLoc});let n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):Ue(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(131,t)}jsxReadEntity(){let e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);let t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=59==this.codePointAtPos(this.state.pos));)++this.state.pos;if(r){this.input.slice(e,this.state.pos),++this.state.pos}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(ue(e)||45===e);this.finishToken(138,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:X(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(T.brace),this.next(),e=this.jsxParseExpressionContainer(e,T.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(Dt.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(Dt.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(T.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(T.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(T.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(141);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(141),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e),i=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 140:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 139:r.push(this.parseExprAtom());break;case 5:{let e=this.startNode();this.setContext(T.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(e)):r.push(this.jsxParseExpressionContainer(e,T.j_expr));break}default:this.unexpected()}Tt(n)&&!Tt(i)&&null!==i?this.raise(Dt.MissingClosingTagFragment,{at:i}):(!Tt(n)&&Tt(i)||!Tt(n)&&!Tt(i)&&At(i.name)!==At(n.name))&&this.raise(Dt.MissingClosingTagElement,{at:i,openingTagName:At(n.name)})}if(Tt(n)?(t.openingFragment=n,t.closingFragment=i):(t.openingElement=n,t.closingElement=i),t.children=r,this.match(47))throw this.raise(Dt.UnwrappedAdjacentJSXElements,{at:this.state.startLoc});return Tt(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(139)?this.parseLiteral(this.state.value,"JSXText"):this.match(140)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(140),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t!==T.j_expr){if(t===T.j_oTag||t===T.j_cTag){if(oe(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(141);if((34===e||39===e)&&t===T.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(140);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){let{context:t,type:r}=this.state;if(56===r&&140===e)t.splice(-2,2,T.j_cTag),this.state.canStartJSXElement=!1;else if(140===r)t.push(T.j_oTag);else if(141===r){let r=t[t.length-1];r===T.j_oTag&&56===e||r===T.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===T.j_expr):(this.setContext(T.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=function(e){return j[e]}(r)}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ne}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){131!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){let t=St.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>t.index+1&&this.raise(vt.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return r.params=i.params,r.rest=i.rest,r.this=i._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(125)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(vt.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e)):this.isContextual(128)?this.flowParseDeclareTypeAlias(e):this.isContextual(129)?this.flowParseDeclareOpaqueType(e):this.isContextual(127)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(131)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(128)&&!this.match(87)&&this.raise(vt.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(e)):(this.expectContextual(123,vt.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),r.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,i=!1;return r.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(vt.DuplicateDeclareModuleExports,{at:e}),"ES"===n&&this.raise(vt.AmbiguousDeclareModuleKind,{at:e}),n="CommonJS",i=!0):("CommonJS"===n&&this.raise(vt.AmbiguousDeclareModuleKind,{at:e}),n="ES")})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(128)||this.isContextual(127))&&!t){let e=this.state.value;throw this.raise(vt.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:Et[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(129)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129)?("ExportNamedDeclaration"===(e=this.parseExport(e,null)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(115))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(111))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(vt.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,t,r){bt.has(e)&&this.raise(r?vt.AssignReservedType:vt.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return r.name=i.name,r.variance=n,r.bound=i.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(vt.MissingTypeParamDefault,{at:t}),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let r=!1;do{let e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(127),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:i}){let s=this.state.inType;this.state.inType=!0;let a=this.startNode();a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let o,u,l=!1;for(t&&this.match(6)?(this.expect(6),o=9,u=!0):(this.expect(5),o=8,u=!1),a.exact=u;!this.match(o);){let t=!1,s=null,o=null,c=this.startNode();if(n&&this.isContextual(116)){let t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),s=this.state.startLoc,e=!1)}if(e&&this.isContextual(104)){let e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}let p=this.flowParseVariance();if(this.eat(0))null!=s&&this.unexpected(s),this.eat(0)?(p&&this.unexpected(p.loc.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,t))):a.indexers.push(this.flowParseObjectTypeIndexer(c,t,p));else if(this.match(10)||this.match(47))null!=s&&this.unexpected(s),p&&this.unexpected(p.loc.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(c,t));else{let e="init";if(this.isContextual(98)||this.isContextual(103)){W(this.lookahead().type)&&(e=this.state.value,this.next())}let n=this.flowParseObjectTypeProperty(c,t,s,p,e,r,i??!u);null===n?(l=!0,o=this.state.lastTokStartLoc):a.properties.push(n)}this.flowObjectTypeSemicolon(),o&&!this.match(8)&&!this.match(9)&&this.raise(vt.UnexpectedExplicitInexactInObject,{at:o})}this.expect(o),r&&(a.inexact=l);let c=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=s,c}flowParseObjectTypeProperty(e,t,r,n,i,s,a){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(s?a||this.raise(vt.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(vt.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),n&&this.raise(vt.InexactVariance,{at:n}),null):(s||this.raise(vt.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),null!=r&&this.unexpected(r),n&&this.raise(vt.SpreadVariance,{at:n}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=i;let a=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),("get"===i||"set"===i)&&this.flowCheckGetterSetterParams(e),!s&&"constructor"===e.key.name&&e.value.this&&this.raise(vt.ThisParamBannedInConstructor,{at:e.value.this})):("init"!==i&&this.unexpected(),e.method=!1,this.eat(17)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t="get"===e.kind?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?vt.GetterMayNotHaveThisParam:vt.SetterMayNotHaveThisParam,{at:e.value.this}),r!==t&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,{at:e}),"set"===e.kind&&e.value.rest&&this.raise(v.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let r=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=r,t.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(t,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null,i=this.startNode(),s=this.lookahead(),a=78===this.state.type;return 14===s.type||17===s.type?(a&&!e&&this.raise(vt.ThisParamMustBeFirst,{at:i}),t=this.parseIdentifier(a),this.eat(17)&&(r=!0,a&&this.raise(vt.ThisParamMayNotBeOptional,{at:i})),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),i.name=t,i.optional=r,i.typeAnnotation=n,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e,t,r=this.state.startLoc,n=this.startNode(),i=!1,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,t=this.flowParseTupleType(),this.state.noAnonFunctionType=s,t;case 47:return n.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),e=this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),this.finishNode(n,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(K(this.state.type)||this.match(78)){let e=this.lookahead().type;i=17!==e&&14!==e}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,t=this.flowParseType(),this.state.noAnonFunctionType=s,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),t;this.eat(12)}return e=t?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(t)]):this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation");case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(vt.UnexpectedSubtractionOperand,{at:this.state.startLoc})}return void this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(X(this.state.type)){let e=G(this.state.type);return this.next(),super.createIdentifier(n,e)}if(K(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let n=this.startNodeAt(e),i=this.eat(18);r=r||i,this.expect(0),!i&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=i,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(130===this.state.type&&"_"===this.state.value){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){if(q(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return void 0===this.flowPragma&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||K(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(K(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(17);let n=this.state.clone(),i=this.state.noArrowAt,s=this.startNodeAt(t),{consequent:a,failed:o}=this.tryParseConditionalConsequent(),[u,l]=this.getArrowLikeExpressions(a);if(o||l.length>0){let e=[...i];if(l.length>0){this.state=n,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[u,l]=this.getArrowLikeExpressions(a)}o&&u.length>1&&this.raise(vt.AmbiguousConditionalArrow,{at:n.startLoc}),o&&1===u.length&&(this.state=n,e.push(u[0].start),this.state.noArrowAt=e,({consequent:a,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=i,this.expect(14),s.test=e,s.consequent=a,s.alternate=this.forwardNoArrowParamsConversionAt(s,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(s,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let r=[e],n=[];for(;0!==r.length;){let e=r.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):"ConditionalExpression"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){let r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?r:n).push(e[i]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(127)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(128)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&"type"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:n}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(vt.DeclareClassElement,{at:n}):t.value&&this.raise(vt.DeclareClassFieldInitializer,{at:t.value}))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(v.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(130,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,r){return 64===e&&64===t&&oe(r)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&"AssignmentExpression"===e.type&&"TypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;let i=e[n];i&&"TypeCastExpression"===i.type&&(null==(r=i.extra)||!r.parenthesized)&&(e.length>1||!t)&&this.raise(vt.TypeCastInPattern,{at:i.typeAnnotation})}return e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(e,t,r){return"TypeCastExpression"===e||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,i,s){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,i,s),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(vt.ThisParamBannedInConstructor,{at:t})}else if("MethodDefinition"===t.type&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(vt.ThisParamBannedInConstructor,{at:t})}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&"get"===e.kind?this.raise(vt.GetterMayNotHaveThisParam,{at:r}):this.isThisParam(r)&&this.raise(vt.SetterMayNotHaveThisParam,{at:r})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,i,s,a){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!s&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,t,r,n,i,s,a);return o&&((u.value||u).typeParameters=o),u}parseAssignableListItemTypes(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(vt.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(vt.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(vt.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(vt.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(vt.TypeBeforeInitializer,{at:r.typeAnnotation}),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(vt.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,t,r){t.local=xt(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){if(!e)return!0;let t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind="type"===r?r:"value"}else"type"===r&&this.match(55)&&this.unexpected(),e.importKind="type"===r||"typeof"===r?r:"value"}parseImportSpecifier(e,t,r,n,i){let s=e.imported,a=null;"Identifier"===s.type&&("type"===s.name?a="type":"typeof"===s.name&&(a="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let t=this.parseIdentifier(!0);null===a||q(this.state.type)?(e.imported=s,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=mt(t))}else{if(null!==a&&q(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(v.ImportBindingIsString,{at:e,importName:s.value});e.imported=s,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=mt(e.imported))}let u=xt(e);return r&&u&&this.raise(vt.ImportTypeShorthandOnlyInPureImport,{at:e}),(r||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),o&&!r&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){let r=e.kind;"get"!==r&&"set"!==r&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,i=null;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(i=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),i),!n.error)return n.node;let{context:r}=this.state,s=r[r.length-1];(s===T.j_oTag||s===T.j_expr)&&r.pop()}if(null!=(r=n)&&r.error||this.match(47)){var s,a;i=i||this.state.clone();let r,o=this.tryParse((n=>{var i;r=this.flowParseTypeParameterDeclaration();let s=this.forwardNoArrowParamsConversionAt(r,(()=>{let n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));null!=(i=s.extra)&&i.parenthesized&&n();let a=this.maybeUnwrapTypeCastExpression(s);return"ArrowFunctionExpression"!==a.type&&n(),a.typeParameters=r,this.resetStartLocationFromNode(a,r),s}),i),u=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(vt.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:r}),o.node;u=o.node}if(null!=(s=n)&&s.node)return this.state=n.failState,n.node;if(u)return this.state=o.failState,u;throw null!=(a=n)&&a.thrown?n.error:o.thrown?o.error:this.raise(vt.UnexpectedTokenAfterTypeParameter,{at:r})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!r||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(vt.ThisParamMustBeFirst,{at:e.params[t]});super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t.index)){this.next();let r=this.startNodeAt(t);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){let n=this.state.clone(),i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),n);if(!i.error&&!i.aborted)return i.node;let s=this.tryParse((()=>super.parseSubscripts(e,t,r)),n);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(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),i.arguments=this.parseCallExpressionArguments(11,!1),i.optional=!0,this.finishCallExpression(i,!0)}if(!r&&this.shouldParseTypes()&&this.match(47)){let r=this.startNodeAt(t);r.callee=e;let i=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),r.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,n.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){let r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(vt.UnterminatedFlowComment,{at:this.state.curPosition()}),r}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(vt.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(v.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(vt.EnumBooleanMemberNotInitialized,{at:e,memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?vt.EnumInvalidMemberInitializerSymbolType:vt.EnumInvalidMemberInitializerPrimaryType:vt.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(vt.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:r})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(vt.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 131:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let s=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),u=a.name;if(""===u)continue;/^[a-z]/.test(u)&&this.raise(vt.EnumInvalidMemberName,{at:a,memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(vt.EnumDuplicateMemberName,{at:a,memberName:u,enumName:e}),r.add(u);let l={enumName:e,explicitType:t,memberName:u};switch(s.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"boolean"),s.init=o.value,n.booleanMembers.push(this.finishNode(s,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"number"),s.init=o.value,n.numberMembers.push(this.finishNode(s,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"string"),s.init=o.value,n.stringMembers.push(this.finishNode(s,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,l);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,l);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,l);break;default:n.defaultedMembers.push(this.finishNode(s,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:r});return t}for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!K(this.state.type))throw this.raise(vt.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(vt.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,n=t.loc.start,i=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:s,hasUnknownMembers:a}=this.flowEnumMembers({enumName:r,explicitType:i});switch(e.hasUnknownMembers=a,i){case"boolean":return e.explicitType=!0,e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=s.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let i=s.booleanMembers.length,a=s.numberMembers.length,o=s.stringMembers.length,u=s.defaultedMembers.length;if(!(i||a||o||u))return t();if(!i&&!a)return e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!a&&!o&&i>=u){for(let e of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!i&&!o&&a>=u){for(let e of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(vt.EnumInconsistentMemberValues,{at:n,enumName:r}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){let t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:It.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:It.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:It.InvalidModifierOnTypeParameter})}getScopeHandler(){return Pt}tsIsIdentifier(){return K(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(136)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!K(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;let r=this.state.value;if(-1!==e.indexOf(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=It.InvalidModifierOnTypeMember},i){let s=(e,t,r,n)=>{t===r&&i[n]&&this.raise(It.InvalidModifiersOrder,{at:e,orderedModifiers:[r,n]})},a=(e,t,r,n)=>{(i[r]&&t===n||i[n]&&t===r)&&this.raise(It.IncompatibleModifiers,{at:e,modifiers:[r,n]})};for(;;){let{startLoc:o}=this.state,u=this.tsParseModifier(e.concat(t??[]),r);if(!u)break;_t(u)?i.accessibility?this.raise(It.DuplicateAccessibilityModifier,{at:o,modifier:u}):(s(o,u,u,"override"),s(o,u,u,"static"),s(o,u,u,"readonly"),i.accessibility=u):Nt(u)?(i[u]&&this.raise(It.DuplicateModifier,{at:o,modifier:u}),i[u]=!0,s(o,u,"in","out")):(Object.hasOwnProperty.call(i,u)?this.raise(It.DuplicateModifier,{at:o,modifier:u}):(s(o,u,"static","readonly"),s(o,u,"static","override"),s(o,u,"override","readonly"),s(o,u,"abstract","override"),a(o,u,"declare","override"),a(o,u,"static","abstract")),i[u]=!0),null!=t&&t.includes(u)&&this.raise(n,{at:o,modifier:u})}}tsIsListTerminator(e){switch(e){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(e,t){let r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){let i=[],s=-1;for(;!this.tsIsListTerminator(e);){s=-1;let n=t();if(null==n)return;if(i.push(n),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(12))}s=this.state.lastTokStart}return n&&(n.value=s),i}tsParseBracketedList(e,t,r,n,i){n||(r?this.expect(0):this.expect(47));let s=this.tsParseDelimitedList(e,t,i);return r?this.expect(3):this.expect(48),s}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(131)||this.raise(It.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(140)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),0===t.params.length&&this.raise(It.EmptyTypeParameters,{at:t}),-1!==r.value&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=19===e,n="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:e}=t;("AssignmentPattern"===e||"TSParameterProperty"===e)&&this.raise(It.UnsupportedSignatureParameterKind,{at:t,type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!K(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(It.ReadonlyForMethodSignature,{at:e});let n=r;n.kind&&this.match(47)&&this.raise(It.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if("get"===n.kind)n[i].length>0&&(this.raise(v.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(n[i][0])&&this.raise(It.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if("set"===n.kind){if(1!==n[i].length)this.raise(v.BadSetterArity,{at:this.state.curPosition()});else{let e=n[i][0];this.isThisParam(e)&&this.raise(It.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),"Identifier"===e.type&&e.optional&&this.raise(It.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),"RestElement"===e.type&&this.raise(It.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}n[s]&&this.raise(It.SetAccesorCannotHaveReturnType,{at:n[s]})}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}{let e=r;t&&(e.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e),this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(120):(this.isContextual(120)&&this.next(),!(!this.match(0)||(this.next(),!this.tsIsIdentifier()))&&(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(120)):this.eatContextual(120)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,r=null;return e.elementTypes.forEach((e=>{let{type:n}=e;t&&"TSRestType"!==n&&"TSOptionalType"!==n&&!("TSNamedTupleMember"===n&&e.optional)&&this.raise(It.OptionalTypeBeforeRequired,{at:e}),t||(t="TSNamedTupleMember"===n&&e.optional||"TSOptionalType"===n);let i=n;"TSRestType"===n&&(i=(e=e.typeAnnotation).type);let s="TSNamedTupleMember"===i;null!=r||(r=s),r!==s&&this.raise(It.MixedLabeledAndUnlabeledElements,{at:e})})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e,t,r,n,{startLoc:i}=this.state,s=this.eat(21),a=q(this.state.type)?this.lookaheadCharCode():null;if(58===a)e=!0,r=!1,t=this.parseIdentifier(!0),this.expect(14),n=this.tsParseType();else if(63===a){r=!0;let i=this.state.startLoc,s=this.state.value,a=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(e=!0,t=this.createIdentifier(this.startNodeAt(i),s),this.expect(17),this.expect(14),n=this.tsParseType()):(e=!1,n=a,this.expect(17))}else n=this.tsParseType(),r=this.eat(17),e=this.eat(14);if(e){let e;t?(e=this.startNodeAtNode(t),e.optional=r,e.label=t,e.elementType=n,this.eat(17)&&(e.optional=!0,this.raise(It.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(e=this.startNodeAtNode(n),e.optional=r,this.raise(It.InvalidTupleMemberLabel,{at:n}),e.label=n,e.elementType=this.tsParseType()),n=this.finishNode(e,"TSNamedTupleMember")}else if(r){let e=this.startNodeAtNode(n);e.typeAnnotation=n,n=this.finishNode(e,"TSOptionalType")}if(s){let e=this.startNodeAt(i);e.typeAnnotation=n,n=this.finishNode(e,"TSRestType")}return n}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return"TSConstructorType"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,r))),this.finishNode(r,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 132:case 133:case 131:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(114)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){let e=this.startNode(),t=this.lookahead();return 132!==t.type&&133!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(K(e)||88===e||84===e){let t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){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!==t&&46!==this.lookaheadCharCode()){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(It.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(113);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return function(e){return e>=119&&e<=121}(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(113)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){let n=this.startNode(),i=this.eat(r),s=[];do{s.push(t())}while(this.eat(r));return 1!==s.length||i?(n.types=s,this.finishNode(n,e)):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(K(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{let t=this.startNode();this.expect(e);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let s=this.tsParseTypeAnnotation(!1);return r.parameterName=i,r.typeAnnotation=s,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(114)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(107!==this.state.type)return!1;let e=this.state.containsEsc;return this.next(),!(!K(this.state.type)&&!this.match(78))&&(e&&this.raise(v.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Ft(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(122)&&77===this.lookahead().type}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(It.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{let e=this.startNode();return e.expression=this.tsParseEntityName(),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return r.length||this.raise(It.EmptyHeritageClauseType,{at:t,token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(127),t.declare&&(e.declare=!0),K(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(It.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(112)&&16!==this.lookahead().type){let e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(124),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(Ee),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(110)?(e.global=!0,e.id=this.parseIdentifier()):this.match(131)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(Ee),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,Ce),this.expect(29);let n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(It.ImportAliasHasImportType,{at:n}),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(117)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(117),this.expect(10),this.match(131)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(void 0!==r&&!1!==r)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,r=this.state.type;return this.isContextual(99)&&(r=74,t="let"),this.tsInAmbientContext((()=>{switch(r){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 124:return this.tsParseEnumDeclaration(e,{declare:!0});case 110:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,t||this.state.value,!0));case 127:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(K(r))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){switch(t.name){case"declare":{let t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(Ee),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,r)}}tsParseDeclaration(e,t,r,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||K(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(131))return this.tsParseAmbientExternalModuleDeclaration(e);if(K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let r=this.tsTryParseAndCatch((()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,r?super.parseArrowExpression(r,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(It.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===T.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return function(e){return e>=122&&e<=128}(this.state.type)}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);let i=n.accessibility,s=n.override,a=n.readonly;!(4&e)&&(i||a||s)&&this.raise(It.UnexpectedParameterModifier,{at:r});let o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o,e);let u=this.parseMaybeDefault(o.loc.start,o);if(i||a||s){let e=this.startNodeAt(r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),s&&(e.override=s),"Identifier"!==u.type&&"AssignmentPattern"!==u.type&&this.raise(It.UnsupportedParameterPropertyKind,{at:e}),e.parameter=u,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),u}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(It.PatternIsOptional,{at:t})}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let n="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):"TSDeclareFunction"===n&&this.state.isAmbientContext&&(this.raise(It.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(It.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return"ArrayExpression"===i.type&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let r=this.startNodeAt(t);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let i=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(r)return n.stop=!0,e;n.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let s,a=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){let e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}let a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(i&&!this.match(10))return void(s=this.state.curPosition());if(Q(this.state.type)){let r=super.parseTaggedTemplateExpression(e,t,n);return r.typeParameters=a,r}if(!r&&this.eat(10)){let r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeParameters=a,n.optionalChainMember&&(r.optional=i),this.finishCallExpression(r,n.optionalChainMember)}let o=this.state.type;if(48===o||52===o||10!==o&&J(o)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=a,this.finishNode(u,"TSInstantiationExpression")}));if(s&&this.unexpected(s,10),a)return"TSInstantiationExpression"===a.type&&(this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(It.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),a}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;"TSInstantiationExpression"===r.type&&(null==(t=r.extra)||!t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(Y(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(118)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(n&&this.raise(v.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(i,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(It.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){let t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind="type"===r?"type":"value":e.importKind="type"===r||"typeof"===r?r:"value"}parseImport(e){if(this.match(131))return e.importKind="value",super.parseImport(e);let t;if(K(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(128)){let r=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(It.TypeImportCannotSpecifyDefaultAndNamed,{at:t}),t}parseExport(e,t){if(this.match(83)){this.next();let t=null;return this.isContextual(128)&&this.isPotentialImportPhase(!1)?t=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,t,!0)}if(this.eat(29)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){let t=e;return this.expectContextual(126),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(122)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){let{isAmbientContext:n}=this.state,i=super.parseVarStatement(e,t,r||n);if(!n)return i;for(let{id:e,init:r}of i.declarations)r&&("const"!==t||e.typeAnnotation?this.raise(It.InitializerNotAllowedInAmbientContext,{at:r}):Bt(r,this.hasPlugin("estree"))||this.raise(It.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:r}));return i}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(124))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>_t(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&123===this.lookaheadCharCode()}parseClassMember(e,t,r){let n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:It.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(It.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,r,n){let i=this.tsTryParseIndexSignature(t);if(i)return e.body.push(i),t.abstract&&this.raise(It.IndexSignatureHasAbstract,{at:t}),t.accessibility&&this.raise(It.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility}),t.declare&&this.raise(It.IndexSignatureHasDeclare,{at:t}),void(t.override&&this.raise(It.IndexSignatureHasOverride,{at:t}));!this.state.inAbstractClass&&t.abstract&&this.raise(It.NonAbstractClassHasAbstractMethod,{at:t}),t.override&&(r.hadSuperClass||this.raise(It.OverrideNotInSubClass,{at:t})),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(It.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(It.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,t,r){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let n=this.tryParse((()=>super.parseConditional(e,t)));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(123))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));let t=this.state.startLoc,r=this.eatContextual(123);if(r&&(this.isContextual(123)||!this.shouldParseExportDeclaration()))throw this.raise(It.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=K(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(n,t),n.declare=!0),n):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(111))return;super.parseClassId(e,t,r,e.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(It.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:t}=e;this.raise(It.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(It.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(It.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(It.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,i,s){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&i&&this.raise(It.ConstructorHasTypeParameters,{at:a});let{declare:o=!1,kind:u}=t;o&&("get"===u||"set"===u)&&this.raise(It.DeclareAccessor,{at:t,kind:u}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,r,n,i,s)}pushClassPrivateMethod(e,t,r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&!e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(111)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,i,s,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,r,n,i,s,a)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,i,s,a;let o,u,l;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(o=this.state.clone(),u=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!u.error)return u.node;let{context:r}=this.state,n=r[r.length-1];(n===T.j_oTag||n===T.j_expr)&&r.pop()}if(!(null!=(r=u)&&r.error||this.match(47)))return super.parseMaybeAssign(e,t);(!o||o===this.state)&&(o=this.state.clone());let c,p=this.tryParse((r=>{var n,i;c=this.tsParseTypeParameters(this.tsParseConstModifier);let s=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==s.type||null!=(n=s.extra)&&n.parenthesized)&&r(),0!==(null==(i=c)?void 0:i.params.length)&&this.resetStartLocationFromNode(s,c),s.typeParameters=c,s}),o);if(!p.error&&!p.aborted)return c&&this.reportReservedArrowTypeParam(c),p.node;if(!u&&(Ft(!this.hasPlugin("jsx")),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!l.error))return l.node;if(null!=(n=u)&&n.node)return this.state=u.failState,u.node;if(p.node)return this.state=p.failState,c&&this.reportReservedArrowTypeParam(c),p.node;if(null!=(i=l)&&i.node)return this.state=l.failState,l.node;throw(null==(s=u)?void 0:s.error)||p.error||(null==(a=l)?void 0:a.error)}reportReservedArrowTypeParam(e){var t;1===e.params.length&&!e.params[0].constraint&&(null==(t=e.extra)||!t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(It.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(2&t))return e;this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(It.UnexpectedTypeCastInParameter,{at:e}):this.raise(It.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&"TSTypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==ke||!t)&&["expression",!0],TSSatisfiesExpression:(r!==ke||!t)&&["expression",!0],TSTypeAssertion:(r!==ke||!t)&&["expression",!0]},e)||super.isValidLVal(e,t,r)}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=t,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(It.TypeAnnotationAfterAssign,{at:r.typeAnnotation}),r}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TSTypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(127)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(It.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,n,i,s,a){let o=super.parseMethod(e,t,r,n,i,s,a);if(o.abstract&&(this.hasPlugin("estree")?o.value.body:o.body)){let{key:e}=o;this.raise(It.AbstractMethodHasImplementation,{at:o,methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(e.start,e.end)}]`:e.name})}return o}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(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,i){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:Ce))}parseTypeOnlyImportExportSpecifier(e,t,r){let n,i=t?"imported":"local",s=t?"local":"exported",a=e[i],o=!1,u=!0,l=a.loc.start;if(this.isContextual(93)){let e=this.parseIdentifier();if(this.isContextual(93)){let r=this.parseIdentifier();q(this.state.type)?(o=!0,a=e,n=t?this.parseIdentifier():this.parseModuleExportName(),u=!1):(n=r,u=!1)}else q(this.state.type)?(u=!1,n=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,a=e)}else q(this.state.type)&&(o=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());o&&r&&this.raise(t?It.TypeModifierIsUsedInTypeImports:It.TypeModifierIsUsedInTypeExports,{at:l}),e[i]=a,e[s]=n,e[t?"importKind":"exportKind"]=o?"type":"value",u&&this.eatContextual(93)&&(e[s]=t?this.parseIdentifier():this.parseModuleExportName()),e[s]||(e[s]=mt(e[i])),t&&this.checkIdentifier(e[s],o?4098:Ce)}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),K(this.state.type)){let e=this.parseIdentifierName(),r=this.createIdentifier(t,e);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(142)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(142),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(142,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){void 0!==e&&super.checkReservedWord(e,t,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return"Placeholder"===e||super.isValidLVal(e,t,r)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!(!super.chStartsBindingIdentifier(e,t)&&142!==this.lookahead().type)}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let n=t?"ClassDeclaration":"ClassExpression";this.next();let i=this.state.strict,s=this.parsePlaceholder("Identifier");if(s){if(!(this.match(81)||this.match(142)||this.match(5))){if(r||!t)return e.id=null,e.body=this.finishPlaceholder(s,"ClassBody"),this.finishNode(e,n);throw this.raise(jt.ClassNameIsRequired,{at:this.state.startLoc})}e.id=s}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,i),this.finishNode(e,n)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);if(!this.isContextual(97)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let n=this.startNode();return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(142),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return!(null==(r=e.specifiers)||!r.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(97)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(97),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(jt.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}},qt=Object.keys(Kt),Wt={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};var Jt=class extends kt{checkProto(e,t,r,n){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;let i=e.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(t)return void this.raise(v.RecordNoProto,{at:i});r.used&&(n?null===n.doubleProtoLoc&&(n.doubleProtoLoc=i.loc.start):this.raise(v.DuplicateProto,{at:i})),r.used=!0}}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}getExpression(){this.enterInitialScopes(),this.nextToken();let e=this.parseExpression();return this.match(137)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){let t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){let n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var r;e.optionalParametersLoc=null!=(r=null==t?void 0:t.loc)?r:this.state.startLoc}parseMaybeAssign(e,t){let r,n=this.state.startLoc;if(this.isContextual(106)&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,n)),e}e?r=!1:(e=new dt,r=!0);let{type:i}=this.state;(10===i||K(i))&&(this.state.potentialArrowAt=this.state.start);let s=this.parseMaybeConditional(e);if(t&&(s=t.call(this,s,n)),(a=this.state.type)>=29&&a<=33){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(s,!0),t.left=s;let r=n.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=s;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(s,{in:this.finishNode(t,"AssignmentExpression")}),t}var a;return r&&this.checkExpressionErrors(e,!0),s}parseMaybeConditional(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){let r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(136)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(r>=Y(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,{at:e,identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let n=this.state.type;if((i=n)>=39&&i<=59&&(this.prodParam.hasIn||!this.match(58))){let i=Y(n);if(i>r){if(39===n){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;let a=41===n||42===n,o=40===n;if(o&&(i=Y(42)),this.next(),39===n&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});s.right=this.parseExprOpRightExpr(n,i);let u=this.finishNode(s,a||o?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(o&&(41===l||42===l)||a&&40===l)throw this.raise(v.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(u,t,r)}}var i;return e}parseExprOpRightExpr(e,t){let r=this.state.startLoc;if(39===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(106))throw this.raise(v.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){let r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,57===e?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,r=this.parseMaybeAssign();return h.has(r.type)&&!(null!=(e=r.extra)&&e.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,{at:t,type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,{at:t}),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,{at:e.argument})}parseMaybeUnary(e,t){let r=this.state.startLoc,n=this.isContextual(96);if(n&&this.isAwaitAllowed()){this.next();let e=this.parseAwait(r);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(34),s=this.startNode();if(a=this.state.type,$[a]){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let r=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){let e=s.argument;"Identifier"===e.type?this.raise(v.StrictDelete,{at:s}):this.hasPropertyAsPrivateName(e)&&this.raise(v.DeletePrivateField,{at:s})}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}var a;let o=this.parseUpdate(s,i,e);if(n){let{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?J(e):J(e)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,{at:r}),this.parseAwait(r)}return o}parseUpdate(e,t,r){if(t){let t=e;return this.checkLVal(t.argument,{in:this.finishNode(t,"UpdateExpression")}),e}let n=this.state.startLoc,i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return i;for(;34===this.state.type&&!this.canInsertSemicolon();){let e=this.startNodeAt(n);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(e,"UpdateExpression")})}return i}parseExprSubscripts(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return e}parseSubscript(e,t,r,n){let{type:i}=this.state;if(!r&&15===i)return this.parseBind(e,t,r,n);if(Q(i))return this.parseTaggedTemplateExpression(e,t,n);let s=!1;if(18===i){if(r&&(this.raise(v.OptionalChainingNoNew,{at:this.state.startLoc}),40===this.lookaheadCharCode()))return n.stop=!0,e;n.optionalChainMember=s=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,s);{let r=this.eat(0);return r||s||this.eat(16)?this.parseMember(e,t,n,r,s):(n.stop=!0,e)}}parseMember(e,t,r,n,i){let s=this.startNodeAt(t);return s.object=e,s.computed=n,n?(s.property=this.parseExpression(),this.expect(3)):this.match(136)?("Super"===e.type&&this.raise(v.SuperPrivateField,{at:t}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),r.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,r,n){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:u}=r;o&&(this.expressionScope.enter(new ut(2)),s=new dt),u&&(a.optional=n),a.arguments=n?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===e.type,"Super"!==e.type,a,s);let l=this.finishCallExpression(a,u);return o&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){let n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,{at:t}),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),0===e.arguments.length||e.arguments.length>2)this.raise(v.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of e.arguments)"SpreadElement"===t.type&&this.raise(v.ImportCallSpreadArgument,{at:t});return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,n,i){let s=[],a=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){t&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(!1,i,r))}return this.state.inFSharpPipelineDirectBody=o,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingCommaLoc),t.innerComments&&Le(e,t.innerComments),t.callee.trailingComments&&Le(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null,{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):(this.match(10)||this.raise(v.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseDecimalLiteral(this.state.value);case 131:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(v.UnsupportedBind,{at:e})}case 136:return this.raise(v.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{let e=this.input.codePointAt(this.nextTokenStart());oe(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(K(n)){if(this.isContextual(125)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){let{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(r),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(r));if(K(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r)):r;if(90===e)return this.resetPreviousNodeTrailingComments(r),this.parseDo(this.startNodeAtNode(r),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(r);this.unexpected()}parseTopicReference(e){let t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n)){let n="smart"===r?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise("smart"===r?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,{at:t}),this.registerTopicReference(),this.finishNode(e,n)}throw this.raise(v.PipeTopicUnconfiguredToken,{at:t,token:G(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(r)}]);case"smart":return 27===r;default:throw this.raise(v.PipeTopicRequiresHackPipes,{at:t})}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(ct(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,{at:e}):this.raise(v.SuperNotAllowed,{at:e}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,{at:e}),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(102)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;let n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(v.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){let t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.next(),this.isContextual(100)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,{at:t}),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){let r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t,r=this.state.startLoc;this.next(),this.expressionScope.enter(new ut(1));let n=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s,a,o=this.state.startLoc,u=[],l=new dt,c=!0;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,null===l.optionalParametersLoc?null:l.optionalParametersLoc),this.match(11)){a=this.state.startLoc;break}if(this.match(21)){let e=this.state.startLoc;if(s=this.state.startLoc,u.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else u.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let p=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=i;let d=this.startNodeAt(r);return e&&this.shouldParseArrow(u)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,u,!1),d):(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStartLoc),a&&this.unexpected(a),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(u,!0),u.length>1?(t=this.startNodeAt(o),t.expressions=u,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,p)):t=u[0],this.wrapParenthesis(r,t))}wrapParenthesis(e,t){if(!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let r=this.parseMetaProperty(e,t,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,{at:r}),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){e.callee=this.parseNoCallExpr(),"Import"===e.callee.type&&this.raise(v.ImportCallNotNewExpression,{at:e.callee})}parseTemplateElement(e){let{start:t,startLoc:r,end:n,value:s}=this.state,a=t+1,o=this.startNodeAt(i(r,1));null===s&&(e||this.raise(v.InvalidEscapeSequenceTemplate,{at:i(this.state.firstInvalidTemplateEscapePos,1)}));let u=this.match(24),l=u?-1:-2,c=n+l;o.value={raw:this.input.slice(a,c).replace(/\r\n?/g,"\n"),cooked:null===s?null:s.slice(1,l)},o.tail=u,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,i(this.state.lastTokEndLoc,l)),p}parseTemplate(e){let t=this.startNode();t.expressions=[];let r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(r=this.parseTemplateElement(e));return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=Object.create(null),a=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(n),this.checkProto(i,r,s,n)),r&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(v.InvalidRecordProperty,{at:i}),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return t?u="ObjectPattern":r&&(u="RecordExpression"),this.finishNode(o,u)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStart),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)t.push(this.parseDecorator());let r,n=this.startNode(),i=!1,s=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(r=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let o=this.state.containsEsc,u=this.parsePropertyName(n,e);if(!a&&!o&&this.maybeAsyncOrAccessorProp(n)){let e=u.name;"async"===e&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),("get"===e||"set"===e)&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=e,this.match(55)&&(a=!0,this.raise(v.AccessorIsGenerator,{at:this.state.curPosition(),kind:e}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,r,a,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==r&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,{at:e}),"set"===e.kind&&"RestElement"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(v.BadSetterRestParameter,{at:e})}parseObjectMethod(e,t,r,n,i){if(i){let r=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(r),r}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(n),this.finishNode(e,"ObjectProperty");if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,mt(e.key));else if(this.match(29)){let r=this.state.startLoc;null!=n?null===n.shorthandAssignLoc&&(n.shorthandAssignLoc=r):this.raise(v.InvalidCoverInitializedName,{at:r}),e.value=this.parseMaybeDefault(t,mt(e.key))}else e.value=mt(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,r,n,i,s,a){let o=this.parseObjectMethod(e,r,n,i,s)||this.parseObjectProperty(e,t,i,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let r,{type:n,value:i}=this.state;if(q(n))r=this.parseIdentifier(!0);else switch(n){case 132:r=this.parseNumericLiteral(i);break;case 131:r=this.parseStringLiteral(i);break;case 133:r=this.parseBigIntLiteral(i);break;case 134:r=this.parseDecimalLiteral(i);break;case 136:{let e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(v.UnexpectedPrivateField,{at:e}),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,136!==n&&(e.computed=!1)}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,i,s,a=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(18|(a?ve:0)|(i?32:0)),this.prodParam.enter(ct(r,e.generator)),this.parseFunctionParams(e,n);let o=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!r,n,s),this.state.inFSharpPipelineDirectBody=i,this.finishNode(s,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(6);let i=ct(r,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,r);let s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){let n=t&&!this.match(5);if(this.expressionScope.enter(lt()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let n=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(i=>{let s=!this.isSimpleParamList(e.params);i&&s&&this.raise(v.IllegalLanguageModeDirective,{at:"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end});let a=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||s),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)})),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,n=!0){let i=!t&&new Set,s={type:"FormalParameters"};for(let t of e.params)this.checkLVal(t,{in:s,binding:5,checkClashes:i,strictModeChanged:n})}parseExprList(e,t,r,n){let i=[],s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}i.push(this.parseExprListItem(t,r))}return i}parseExprListItem(e,t,r){let n;if(this.match(12))e||this.raise(v.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),n=null;else if(this.match(21)){let e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(v.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return n}parseIdentifier(e){let t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}parseIdentifierName(e){let t,{startLoc:r,type:n}=this.state;q(n)?t=this.state.value:this.unexpected();let i=n<=92;return e?i&&this.replaceToken(130):this.checkReservedWord(t,r,i,!1),this.next(),t}checkReservedWord(e,t,r,n){var i;if(!(e.length>10)&&(i=e,be.has(i)))if(r&&function(e){return pe.has(e)}(e))this.raise(v.UnexpectedKeyword,{at:t,keyword:e});else if((this.state.strict?n?ge:me:fe)(e,this.inModule))this.raise(v.UnexpectedReservedWord,{at:t,reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(v.YieldBindingIdentifier,{at:t})}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(v.AwaitBindingIdentifier,{at:t});if(this.scope.inStaticBlock)return void this.raise(v.AwaitBindingIdentifierInStaticBlock,{at:t});this.expressionScope.recordAsyncArrowParametersError({at:t})}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(v.ArgumentsInClass,{at:t})}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,{at:t}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return 53===e||10===e||0===e||Q(e)||101===e&&!this.state.containsEsc||135===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(){let e=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,{at:e}),this.next();let t=!1,r=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:r=this.parseMaybeAssign()}return e.delegate=t,e.argument=r,this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(v.PipelineHeadSequenceExpression,{at:t})}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,{at:e})}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}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(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}},Ht={kind:"loop"},Xt={kind:"switch"},Gt=/[\uD800-\uDFFF]/u,Yt=/in(?:stanceof)?/y;var Qt=class extends Jt{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e,t){for(let r=0;r<e.length;r++){let n=e[r],{type:s}=n;if("number"==typeof s){if(136===s){let{loc:t,start:s,value:a,end:o}=n,u=s+1,l=i(t.start,1);e.splice(r,1,new st({type:Z(27),value:"#",start:s,end:u,startLoc:t.start,endLoc:l}),new st({type:Z(130),value:a,start:u,end:o,startLoc:l,endLoc:t.end})),r++;continue}if(Q(s)){let a,o,u,l,c,{loc:p,start:d,value:h,end:f}=n,m=d+1,y=i(p.start,1);a=96===t.charCodeAt(d)?new st({type:Z(22),value:"`",start:d,end:m,startLoc:p.start,endLoc:y}):new st({type:Z(8),value:"}",start:d,end:m,startLoc:p.start,endLoc:y}),24===s?(u=f-1,l=i(p.end,-1),o=null===h?null:h.slice(1,-1),c=new st({type:Z(22),value:"`",start:u,end:f,startLoc:l,endLoc:p.end})):(u=f-2,l=i(p.end,-2),o=null===h?null:h.slice(1,-2),c=new st({type:Z(23),value:"${",start:u,end:f,startLoc:l,endLoc:p.end})),e.splice(r,1,a,new st({type:Z(20),value:o,start:m,end:u,startLoc:y,endLoc:l}),c),r+=2;continue}n.type=Z(s)}}return e}(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,t=137,r=this.options.sourceType){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[e,t]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,{at:t,localName:e});let n;return n=137===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",i(this.state.startLoc,-1)),n}stmtToDirective(e){let t=e;t.type="Directive",t.value=t.expression,delete t.expression;let r=t.value,n=r.value,i=this.input.slice(r.start,r.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),this.addExtra(r,"expressionValue",n),r.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(99)&&this.hasFollowingBindingAtom()}chStartsBindingIdentifier(e,t){if(oe(e)){if(Yt.lastIndex=t,Yt.test(this.input)){let e=this.codePointAtPos(Yt.lastIndex);if(!ue(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifier(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}startsUsingForOf(){let{type:e,containsEsc:t}=this.lookahead();return!(101===e&&!t)&&(K(e)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):void 0)}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type,n=this.startNode(),i=!!(2&e),s=!!(4&e),a=1&e;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(46===this.lookaheadCharCode())break;return s||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(n,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?i||this.raise(v.UnexpectedLexicalDeclaration,{at:n}):this.raise(v.AwaitUsingNotInAsyncContext,{at:n}),this.next(),this.parseVarStatement(n,"await using");break;case 105:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,{at:this.state.startLoc}):i||this.raise(v.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(n,"using");case 99:{if(this.state.containsEsc)break;let e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(t,e)&&123!==t))break}case 75:i||this.raise(v.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let e=this.state.value;return this.parseVarStatement(n,e)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return!this.options.allowImportExportEverywhere&&!a&&this.raise(v.UnexpectedImportExport,{at:this.state.startLoc}),this.next(),83===r?(e=this.parseImport(n),"ImportDeclaration"===e.type&&(!e.importKind||"value"===e.importKind)&&(this.sawUnambiguousESM=!0)):(e=this.parseExport(n,t),("ExportNamedDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportAllDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportDefaultDeclaration"===e.type)&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(v.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(n,!0,!i&&s)}let o=this.state.value,u=this.parseExpression();return K(r)&&"Identifier"===u.type&&this.eat(14)?this.parseLabeledStatement(n,o,u,e):this.parseExpressionStatement(n,u,t)}assertModuleNodeAllowed(e){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,{at:e})}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,r){return e&&(t.decorators&&t.decorators.length>0?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorsBeforeAfterExport,{at:t.decorators[0]}),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t,r=this.state.startLoc;if(this.match(10)){let r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==t&&this.raise(v.DecoratorArgumentsOutsideParentheses,{at:n})}else{for(t=this.parseIdentifier(!1);this.eat(16);){let e=this.startNodeAt(r);e.object=t,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,t=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){let t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){let n=this.state.labels[r];if((null==e.label||n.name===e.label.name)&&(null!=n.kind&&(t||"loop"===n.kind)||e.label&&t))break}if(r===this.state.labels.length){let r=t?"BreakStatement":"ContinueStatement";this.raise(v.IllegalBreakContinue,{at:e,type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Ht),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Ht);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(t=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);let r=this.isContextual(99);{let n=this.isContextual(96)&&this.startsAwaitUsing(),i=n||this.isContextual(105)&&this.startsUsingForOf(),s=r&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||s){let r,s=this.startNode();n?(r="await using",this.isAwaitAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):r=this.state.value,this.next(),this.parseVar(s,!0,r);let a=this.finishNode(s,"VariableDeclaration"),o=this.match(58);return o&&i&&this.raise(v.ForInUsing,{at:a}),(o||this.isContextual(101))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}let n=this.isContextual(95),i=new dt,s=this.parseExpression(!0,i),a=this.isContextual(101);if(a&&(r&&this.raise(v.ForOfLet,{at:s}),null===t&&n&&"Identifier"===s.type&&this.raise(v.ForOfAsync,{at:s})),a||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let r=a?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{in:{type:r}}),this.parseForIn(e,s,t)}return this.checkExpressionErrors(i,!0),null!==t&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t,r=e.cases=[];this.expect(5),this.state.labels.push(Xt),this.scope.enter(0);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){let n=this.match(61);t&&this.finishNode(t,"SwitchCase"),r.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(e&&this.raise(v.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),e=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{in:{type:"CatchClause"},binding:9}),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(v.NoCatchOrFinally,{at:e}),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Ht),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(v.StrictWith,{at:this.state.startLoc}),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(let e of this.state.labels)e.name===t&&this.raise(v.LabelRedeclaration,{at:r,labelName:t});let i=(s=this.state.type)>=90&&s<=92?"loop":this.match(71)?"switch":null;var s;for(let t=this.state.labels.length-1;t>=0;t--){let r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.state.start,r.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=8&n?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){let n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,i){let s=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?a:void 0,r,n,i)}parseBlockOrModuleBlockBody(e,t,r,n,i){let s=this.state.strict,a=!1,o=!1;for(;!this.match(n);){let n=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(n)){let e=this.stmtToDirective(n);t.push(e),!a&&"use strict"===e.value.value&&(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(n)}i&&i.call(this,a),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){let n=this.match(58);return this.next(),n?null!==r&&this.unexpected(r):e.await=null!==r,"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||!this.options.annexB||this.state.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(v.ForInOfLoopInitializer,{at:t,type:n?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(v.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){let i=e.declarations=[];for(e.kind=r;;){let e=this.startNode();if(this.parseVarId(e,r),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null===e.init&&!n&&("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(101))?"const"===r&&!(this.match(58)||this.isContextual(101))&&this.raise(v.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"}):this.raise(v.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})),i.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let r=this.parseBindingAtom();this.checkLVal(r,{in:{type:"VariableDeclarator"},binding:"var"===t?5:we}),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let r=2&t,n=!!(1&t),i=n&&!(4&t),s=!!(8&t);this.initFunction(e,s),this.match(55)&&(r&&this.raise(v.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(i));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ct(s,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||K(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new ot(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:we:17,e.id.loc.start)}parseClass(e,t,r){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:e},n=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(v.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){n.push(this.parseDecorator());continue}let e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(i,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(v.DecoratorConstructor,{at:e})}})),this.state.strict=t,this.next(),n.length)throw this.raise(v.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){let n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){let n=this.isContextual(104);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){let i=t,s=t,a=t,o=t,u=t,l=i,c=i;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";let t=this.match(136);return this.parseClassElementName(l),t?void this.pushClassPrivateMethod(e,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsGenerator,{at:i.key}),void this.pushClassMethod(e,i,!0,!1,!1,!1))}let p=K(this.state.type)&&!this.state.containsEsc,d=this.match(136),h=this.parseClassElementName(t),f=this.state.startLoc;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,s,!1,!1);let n=this.isNonstaticConstructor(i),a=!1;n&&(i.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,{at:h}),n&&this.hasPlugin("typescript")&&t.override&&this.raise(v.OverrideOnConstructor,{at:h}),r.hadConstructor=!0,a=r.hadSuperClass),this.pushClassMethod(e,i,!1,!1,n,a)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if(p&&"async"===h.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);let t=this.eat(55);c.optional&&this.unexpected(f),l.kind="method";let r=this.match(136);this.parseClassElementName(l),this.parsePostMemberNameModifiers(c),r?this.pushClassPrivateMethod(e,s,t,!0):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAsync,{at:i.key}),this.pushClassMethod(e,i,t,!0,!1,!1))}else if(!p||"get"!==h.name&&"set"!==h.name||this.match(55)&&this.isLineTerminator())if(p&&"accessor"===h.name&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);let t=this.match(136);this.parseClassElementName(a),this.pushClassAccessorProperty(e,u,t)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.resetPreviousNodeTrailingComments(h),l.kind=h.name;let t=this.match(136);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAccessor,{at:i.key}),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}}parseClassElementName(e){let{type:t,value:r}=this.state;if((130===t||131===t)&&e.static&&"prototype"===r&&this.raise(v.StaticPrototype,{at:this.state.startLoc}),136===t){"constructor"===r&&this.raise(v.ConstructorClassPrivateField,{at:this.state.startLoc});let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e)}parseClassStaticBlock(e,t){var r;this.scope.enter(208);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,"StaticBlock")),null!=(r=t.decorators)&&r.length&&this.raise(v.DecoratorStaticBlock,{at:t})}pushClassProperty(e,t){!t.computed&&("constructor"===t.key.name||"constructor"===t.key.value)&&this.raise(v.ConstructorClassField,{at:t.key}),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){if(!r&&!t.computed){let e=t.key;("constructor"===e.name||"constructor"===e.value)&&this.raise(v.ConstructorClassField,{at:e})}let n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,i,s){e.body.push(this.parseMethod(t,r,n,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){let i=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);let s="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(lt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(K(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else{if(!r&&t)throw this.raise(v.MissingClassName,{at:this.state.startLoc});e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),i=!n||this.eat(12),s=i&&this.eatExportStar(e),a=s&&this.maybeParseExportNamespaceSpecifier(e),o=i&&(!a||this.eat(12)),u=n||s;if(s&&!a){if(n&&this.unexpected(),t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}let l,c=this.maybeParseExportNamedSpecifiers(e);if(n&&i&&!s&&!c&&this.unexpected(null,5),a&&o&&this.unexpected(null,97),u||c){if(l=!1,t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});this.parseExportFrom(e,u)}else l=this.maybeParseExportDeclaration(e);if(u||c||l){var p;let r=e;if(this.checkExport(r,!0,!1,!!r.source),"ClassDeclaration"===(null==(p=r.declaration)?void 0:p.type))this.maybeTakeDecorators(t,r.declaration,r);else if(t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});return this.finishNode(r,"ExportNamedDeclaration")}if(this.eat(65)){let r=e,n=this.parseExportDefaultExpression();if(r.declaration=n,"ClassDeclaration"===n.type)this.maybeTakeDecorators(t,n,r);else if(t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});return this.checkExport(r,!0,!0),this.finishNode(r,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);let r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers||(e.specifiers=[]);let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){e.specifiers||(e.specifiers=[]);let t="type"===e.exportKind;return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,{at:this.state.startLoc});let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(K(e)){if(95===e&&!this.state.containsEsc||99===e)return!1;if((128===e||127===e)&&!this.state.containsEsc){let{type:e}=this.lookahead();if(K(e)&&97!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||K(this.state.type)&&r)return!0;if(this.match(65)&&r){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(97)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,{at:this.state.startLoc}),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){if(t)if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i;let t=e.declaration;"Identifier"===t.type&&"from"===t.name&&t.end-t.start==4&&(null==(i=t.extra)||!i.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,{at:t})}}else if(e.specifiers&&e.specifiers.length)for(let t of e.specifiers){let{exported:e}=t,r="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){let{local:e}=t;"Identifier"!==e.type?this.raise(v.ExportBindingIsString,{at:t,localName:e.value,exportName:r}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){let t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if("VariableDeclaration"===e.declaration.type)for(let t of e.declaration.declarations)this.checkDeclaration(t.id)}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(let t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(let t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(v.DuplicateDefaultExport,{at:e}):this.raise(v.DuplicateExport,{at:e,exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(128),i=this.match(131),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=yt(e.local):e.exported||(e.exported=mt(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let e=this.parseStringLiteral(this.state.value),t=e.value.match(Gt);return t&&this.raise(v.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){var t;e.module&&((1!==e.specifiers.length||"ImportDefaultSpecifier"!==e.specifiers[0].type)&&this.raise(v.ImportReflectionNotBinding,{at:e.specifiers[0].loc.start}),(null==(t=e.assertions)?void 0:t.length)>0&&this.raise(v.ImportReflectionHasAssertion,{at:e.specifiers[0].loc.start}))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){let{specifiers:t}=e;if(null!=t){let e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(v.ImportJSONBindingNotDefault,{at:e.loc.start})}}}isPotentialImportPhase(e){return!e&&this.isContextual(125)}applyImportPhase(e,t,r,n){t||("module"===r?(this.expectPlugin("importReflection",n),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let r=this.parseIdentifier(!0),{type:n}=this.state;return(q(n)?97!==n||102===this.lookaheadCharCode():12!==n)?(this.resetPreviousIdentifierLeadingComments(r),this.applyImportPhase(e,t,r.name,r.loc.start),null):(this.applyImportPhase(e,t,null),r)}isPrecedingIdImportPhase(e){let{type:t}=this.state;return K(t)?97!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(131)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(97),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=we){return this.checkLVal(e.local,{in:{type:t},binding:r}),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(v.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:n}),t.add(n),this.match(131)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(v.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),"type"!==r.key.name&&this.raise(v.ModuleAttributeDifferentFromType,{at:r.key}),t.has(r.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,{at:r.key,key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(131))throw this.raise(v.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t,r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),t=this.parseImportAttributes()),r=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(!0!==this.getPluginOption("importAttributes","deprecatedAssertSyntax")&&this.raise(v.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),t=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))t=[];else{if(!this.hasPlugin("moduleAttributes"))return;t=[]}!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}return!!q(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let r=this.startNode(),n=this.match(131),i=this.isContextual(128);r.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(r,n,"type"===e.importKind||"typeof"===e.importKind,i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,r,n,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:r}=e;if(t)throw this.raise(v.ImportBindingIsString,{at:e,importName:r.value});this.checkReservedWord(r.name,e.loc.start,!0,!0),e.local||(e.local=mt(r))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}},Zt=class extends Qt{constructor(e,t){e=function(e){if(e&&null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let r of Object.keys(Wt))t[r]=e&&null!=e[r]?e[r]:Wt[r];return t}(e),super(e,t),this.options=e,this.initializeScopes(),this.plugins=function(e){let t=new Map;for(let r of e){let[e,n]=Array.isArray(r)?r:[r,{}];t.has(e)||t.set(e,n||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return Ie}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}};var er=function(e){let t={};for(let r of Object.keys(e))t[r]=Z(e[r]);return t}(z);function tr(e,t){let r=Zt;return null!=e&&e.plugins&&(function(e){if(Rt(e,"decorators")){if(Rt(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=$t(e,"decorators","decoratorsBeforeExport");if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let r=$t(e,"decorators","allowCallParenthesized");if(null!=r&&"boolean"!=typeof r)throw new Error("'allowCallParenthesized' must be a boolean.")}if(Rt(e,"flow")&&Rt(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Rt(e,"placeholders")&&Rt(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Rt(e,"pipelineOperator")){let t=$t(e,"pipelineOperator","proposal");if(!Ut.includes(t)){let e=Ut.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}let r=Rt(e,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===t){if(Rt(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Rt(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=$t(e,"pipelineOperator","topicToken");if(!Vt.includes(t)){let e=Vt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if("#"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Rt(e,"moduleAttributes")){if(Rt(e,"importAssertions")||Rt(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if("may-2020"!==$t(e,"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(Rt(e,"importAssertions")&&Rt(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Rt(e,"recordAndTuple")&&null!=$t(e,"recordAndTuple","syntaxType")&&!zt.includes($t(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+zt.map((e=>`'${e}'`)).join(", "));if(Rt(e,"asyncDoExpressions")&&!Rt(e,"doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}}(e.plugins),r=function(e){let t=qt.filter((t=>Rt(e,t))),r=t.join("/"),n=rr[r];if(!n){n=Zt;for(let e of t)n=Kt[e](n);rr[r]=n}return n}(e.plugins)),new r(e,t)}var rr={};e.parse=function(e,t){var r;if("unambiguous"!==(null==(r=t)?void 0:r.sourceType))return tr(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";let r=tr(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType="script",tr(t,e).parse()}catch{}else n.program.sourceType="script";return n}catch(r){try{return t.sourceType="script",tr(t,e).parse()}catch{}throw r}},e.parseExpression=function(e,t){let r=tr(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},e.tokTypes=er})),pse=use((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),dse={};((e,t)=>{for(var r in t)nse(e,r,{get:t[r],enumerable:!0})})(dse,{parsers:()=>dae});var hse=lse(cse(),1);var fse=function(e){let t=[];for(let r of e)try{return r()}catch(e){t.push(e)}throw Object.assign(new Error("All combinations failed"),{errors:t})};var mse=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};var yse=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var gse=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};function bse(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var vse=bse(" \t"),xse=bse(/[^\n\r]/);var Ese=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?xse(e,t):t)};var Sse=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=vse(e,n),n=yse(e,n),n=Ese(e,n),n=gse(e,n);return n},Dse=lse(pse(),1);function Tse(e){let{pragmas:t}=function(e){let t=mse(e);t&&(e=e.slice(t.length+1));let r=(0,Dse.extract)(e),{pragmas:n,comments:i}=(0,Dse.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}var Ase=function(e){return Array.isArray(e)&&e.length>0};function Cse(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return Ase(n)?Math.min(Cse(n[0]),r):r}function Pse(e){return e.range?e.range[1]:e.end}var wse=function(e){return e="function"==typeof e?{parse:e}:e,{astFormat:"estree",hasPragma:Tse,locStart:Cse,locEnd:Pse,...e}};var kse=function(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)};var Fse=function(e){let{message:t,loc:r}=e;return kse(t.replace(/ \(.*\)$/,""),{loc:{start:{line:r?r.line:0,column:r?r.column+1:0}},cause:e})},Ise=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};var _se=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)}(["Block","CommentBlock","MultiLine"]);var Nse=function(e){return _se(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};var Ose=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))},Bse=null;function Lse(e){if(null!==Bse&&(Bse.property,1)){let e=Bse;return Bse=Lse.prototype=null,e}return Bse=Lse.prototype=e??Object.create(null),new Lse}for(let e=0;e<=10;e++)Lse();var Mse=function(e,t="type"){return function(e){Lse(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}}({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","parameter"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var jse=function e(t,r){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t)){for(let n=0;n<t.length;n++)t[n]=e(t[n],r);return t}let n=Mse(t);for(let i=0;i<n.length;i++)t[n[i]]=e(t[n[i]],r);return r(t)||t};var Rse=function(e,t){let{start:r,end:n}=e.loc;throw kse(t,{loc:{start:{line:r.line,column:r.column+1},end:{line:n.line,column:n.column+1}}})};function $se(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function Use(e){return $se(e)?Use({type:"LogicalExpression",operator:e.operator,left:Use({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[Cse(e.left),Pse(e.right.left)]}),right:e.right.right,range:[Cse(e),Pse(e)]}):e}var Vse=function(e,t){let{parser:r,text:n}=t;if("File"===e.type&&e.program.interpreter){let{program:{interpreter:t},comments:r}=e;delete e.program.interpreter,r.unshift(t)}if("babel"===r){let t=new Set;e=jse(e,(e=>{var r;null!=(r=e.leadingComments)&&r.some(Nse)&&t.add(Cse(e))})),e=jse(e,(e=>{if("ParenthesizedExpression"===e.type){let{expression:r}=e;if("TypeCastExpression"===r.type)return r.range=e.range,r;let n=Cse(e);if(!t.has(n))return r.extra={...r.extra,parenthesized:!0},r}}))}if(e=jse(e,(t=>{switch(t.type){case"LogicalExpression":if($se(t))return Use(t);break;case"VariableDeclaration":{let e=Ise(!1,t.declarations,-1);null!=e&&e.init&&function(e,t){";"!==n[Pse(t)]&&(e.range=[Cse(e),Pse(t)])}(t,e);break}case"TSParenthesizedType":return t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){let e=Cse(t);t.name={type:"Identifier",name:t.name,range:[e,e+t.name.length]}}break;case"ObjectExpression":if("typescript"===r){let e=t.properties.find((e=>"Property"===e.type&&"TSEmptyBodyFunctionExpression"===e.value.type));e&&Rse(e.value,"Unexpected token.")}break;case"TSInterfaceDeclaration":Ase(t.implements)&&Rse(t.implements[0],"Interface declaration cannot have 'implements' clause.");break;case"TSPropertySignature":t.initializer&&Rse(t.initializer,"An interface property cannot have an initializer.");break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:e}=t;if("meriyah"===r&&"Identifier"===(null==e?void 0:e.type)){let r=n.slice(Cse(e),Pse(e));(r.startsWith('"')||r.startsWith("'"))&&(t.exported={...t.exported,type:"Literal",value:t.exported.name,raw:r})}break}case"TSUnionType":case"TSIntersectionType":if(1===t.types.length)return t.types[0]}})),Ase(e.comments)){let t=Ise(!1,e.comments,-1);for(let r=e.comments.length-2;r>=0;r--){let n=e.comments[r];Pse(n)===Cse(t)&&_se(n)&&_se(t)&&Ose(n)&&Ose(t)&&(e.comments.splice(r+1,1),n.value+="*//*"+t.value,n.range=[Cse(n),Pse(t)]),t=n}}return"Program"===e.type&&(e.range=[0,n.length]),e};var zse=function(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}};var Kse=function(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:a}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:a,type:r,node:e,range:[0,i.length],rootMarker:n}},qse=e=>wse(function({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if(("babel"===n.parser||"__babel_estree"===n.parser)&&function(e,t){var r;if(null!=(r=t.filepath)&&r.endsWith(".js.flow"))return!0;let n=mse(e);n&&(e=e.slice(n.length));let i=Sse(e,0);return!1!==i&&(e=e.slice(0,i)),Yse.test(e)}(r,n))return n.parser="babel-flow",iae.parse(r,n);let i=t;"script"===(n.__babelSourceType??zse(n))&&(i=i.map((e=>({...e,sourceType:"script"})))),/#[[{]/.test(r)&&(i=i.map((e=>Gse([Jse],e))));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...Xse,Hse]:Xse).flatMap((e=>i.map((t=>Gse([e],t))))):s&&(i=i.map((e=>Gse([Hse],e))));let a,o=e?hse.parseExpression:hse.parse;try{a=fse(i.map((e=>()=>function(e,t,r){let n=e(t,r),i=n.errors.find((e=>!Qse.has(e.reasonCode)));if(i)throw i;return n}(o,r,e))))}catch({errors:[e]}){throw Fse(e)}return e&&(a=Kse(a,{text:r,rootMarker:n.rootMarker})),Vse(a,{parser:"babel",text:r})}}(e)),Wse={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}]],tokens:!0,ranges:!0},Jse=["recordAndTuple",{syntaxType:"hash"}],Hse="v8intrinsic",Xse=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],Gse=(e,t=Wse)=>({...t,plugins:[...t.plugins,...e]}),Yse=/@(?:no)?flow\b/;var Qse=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","MixedLabeledAndUnlabeledElements","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Zse=[Gse(["jsx"])],eae=qse({optionsCombinations:Zse}),tae=qse({optionsCombinations:[Gse(["jsx","typescript"]),Gse(["typescript"])]}),rae=qse({isExpression:!0,optionsCombinations:[Gse(["jsx"])]}),nae=qse({isExpression:!0,optionsCombinations:[Gse(["typescript"])]}),iae=qse({optionsCombinations:[Gse(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),sae=qse({optionsCombinations:Zse.map((e=>Gse(["estree"],e)))}),aae={babel:eae,"babel-flow":iae,"babel-ts":tae,__js_expression:rae,__ts_expression:nae,__vue_expression:rae,__vue_ts_expression:nae,__vue_event_binding:eae,__vue_ts_event_binding:tae,__babel_estree:sae},oae=lse(cse(),1);function uae(e={}){let{allowComments:t=!0}=e;return function(e){let r;try{r=(0,oae.parseExpression)(e,{tokens:!0,ranges:!0})}catch(e){throw"MissingPlugin"===(null==e?void 0:e.reasonCode)||"MissingOneOfPlugins"===(null==e?void 0:e.reasonCode)?Fse({message:"Unexpected token",loc:e.loc}):Fse(e)}if(!t&&Ase(r.comments))throw lae(r.comments[0],"Comment");return cae(r),Kse(r,{type:"JsonRoot",text:e})}}function lae(e,t){let[r,n]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return kse(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function cae(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)null!==t&&cae(t);return;case"ObjectExpression":for(let t of e.properties)cae(t);return;case"ObjectProperty":if(e.computed)throw lae(e.key,"Computed key");if(e.shorthand)throw lae(e.key,"Shorthand property");return"Identifier"!==e.key.type&&cae(e.key),void cae(e.value);case"UnaryExpression":{let{operator:t,argument:r}=e;if("+"!==t&&"-"!==t)throw lae(e,`Operator '${e.operator}'`);if("NumericLiteral"===r.type||"Identifier"===r.type&&("Infinity"===r.name||"NaN"===r.name))return;throw lae(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw lae(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(Ase(e.expressions))throw lae(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)cae(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw lae(e,`'${e.type}'`)}}var pae=uae(),dae={...aae,...{json:wse({parse:pae,hasPragma:()=>!0}),json5:wse(pae),"json-stringify":wse({parse:uae({allowComments:!1}),astFormat:"estree-json"})}},hae=dse,fae=Object.freeze({__proto__:null,default:hae,parsers:dae}),mae=Object.create,yae=Object.defineProperty,gae=Object.getOwnPropertyDescriptor,bae=Object.getOwnPropertyNames,vae=Object.getPrototypeOf,xae=Object.prototype.hasOwnProperty,Eae=(e,t)=>{for(var r in t)yae(e,r,{get:t[r],enumerable:!0})},Sae=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},Dae=(e,t,r)=>(Sae(e,t,"read from private field"),r?r.call(e):t.get(e)),Tae=((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),Aae={};Eae(Aae,{languages:()=>vfe,options:()=>gfe,printers:()=>bfe});var Cae={};Eae(Cae,{canAttachComment:()=>kce,embed:()=>Xhe,experimentalFeatures:()=>nfe,getCommentChildNodes:()=>Fce,getVisitorKeys:()=>Zoe,handleComments:()=>Nle,insertPragma:()=>rfe,isBlockComment:()=>tue,isGap:()=>_ce,massageAstNode:()=>Zhe,print:()=>_he,printComment:()=>Pce,willPrintOwnComments:()=>Ice});var Pae=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)},wae="string",kae="array",Fae="cursor",Iae="indent",_ae="align",Nae="trim",Oae="group",Bae="fill",Lae="if-break",Mae="indent-if-break",jae="line-suffix",Rae="line-suffix-boundary",$ae="line",Uae="label",Vae="break-parent",zae=new Set([Fae,Iae,_ae,Nae,Oae,Bae,Lae,Mae,jae,Rae,$ae,Uae,Vae]);var Kae=function(e){if("string"==typeof e)return wae;if(Array.isArray(e))return kae;if(!e)return;let{type:t}=e;return zae.has(t)?t:void 0};function qae(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(Kae(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...zae].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var Wae=class extends Error{name="InvalidDocError";constructor(e){super(qae(e)),this.doc=e}},Jae={};var Hae=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Jae){r(i.pop());continue}r&&i.push(e,Jae);let s=Kae(e);if(!s)throw new Wae(e);if(!1!==(null==t?void 0:t(e)))switch(s){case kae:case Bae:{let t=s===kae?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case Lae:i.push(e.flatContents,e.breakContents);break;case Oae:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case _ae:case Iae:case Mae:case Uae:case jae:i.push(e.contents);break;case wae:case Fae:case Nae:case Rae:case $ae:case Vae:break;default:throw new Wae(e)}}},Xae=()=>{};function Gae(e){return{type:Iae,contents:e}}function Yae(e,t){return{type:_ae,contents:t,n:e}}function Qae(e,t={}){return Xae(t.expandedStates),{type:Oae,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Zae(e){return Yae(Number.NEGATIVE_INFINITY,e)}function eoe(e,t){return Qae(e[0],{...t,expandedStates:e})}function toe(e){return{type:Bae,parts:e}}function roe(e,t="",r={}){return{type:Lae,breakContents:e,flatContents:t,groupId:r.groupId}}function noe(e,t){return{type:Mae,contents:e,groupId:t.groupId,negate:t.negate}}function ioe(e){return{type:jae,contents:e}}var soe={type:Rae},aoe={type:Vae},ooe={type:$ae,hard:!0},uoe={type:$ae},loe={type:$ae,soft:!0},coe=[ooe,aoe],poe=[{type:$ae,hard:!0,literal:!0},aoe],doe={type:Fae};function hoe(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function foe(e,t){return e?{type:Uae,label:e,contents:t}:t}var moe=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)},yoe=e=>{if(Array.isArray(e))return e;if(e.type!==Bae)throw new Error(`Expect doc to be 'array' or '${Bae}'.`);return e.parts};function goe(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(Kae(e)){case kae:return t(e.map(n));case Bae:return t({...e,parts:e.parts.map(n)});case Lae:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case Oae:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case _ae:case Iae:case Mae:case Uae:case jae:return t({...e,contents:n(e.contents)});case wae:case Fae:case Nae:case Rae:case $ae:case Vae:return t(e);default:throw new Wae(e)}}(e);return r.set(e,i),i}}function boe(e,t,r){let n=r,i=!1;return Hae(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function voe(e){if(e.type===Oae&&e.break||e.type===$ae&&e.hard||e.type===Vae)return!0}function xoe(e){return boe(e,voe,!1)}function Eoe(e){if(e.length>0){let t=moe(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Soe(e){return e.type!==$ae||e.hard?e.type===Lae?e.flatContents:e:e.soft?"":" "}function Doe(e){return goe(e,Soe)}function Toe(e){return goe(e,(e=>function(e){switch(Kae(e)){case Bae:if(e.parts.every((e=>""===e)))return"";break;case Oae:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===Oae&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case _ae:case Iae:case Mae:case jae:if(!e.contents)return"";break;case Lae:if(!e.flatContents&&!e.breakContents)return"";break;case kae:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof moe(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case wae:case Fae:case Nae:case Rae:case $ae:case Uae:case Vae:break;default:throw new Wae(e)}return e}(e)))}function Aoe(e,t=poe){return goe(e,(e=>"string"==typeof e?hoe(t,e.split("\n")):e))}function Coe(e){if(e.type===$ae)return!0}function Poe(e,t){return e.type===Uae?{...e,contents:t(e.contents)}:t(e)}var woe=function(e){return Array.isArray(e)&&e.length>0},koe=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,Foe=e=>koe.test(e);var Ioe=function(e){return null!==e&&"object"==typeof e};function*_oe(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>Ioe(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function Noe(e,{getVisitorKeys:t,predicate:r}){for(let n of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of _oe(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}function Ooe(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var Boe=Ooe(" \t"),Loe=Ooe(",; \t"),Moe=Ooe(/[^\n\r]/);var joe=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var Roe=function(e,t,r={}){let n=Boe(e,r.backwards?t-1:t,r);return n!==joe(e,n,r)};var $oe=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var Uoe=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Moe(e,t):t)};var Voe=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Loe(e,n),n=$oe(e,n),n=Boe(e,n);return n=Uoe(e,n),n=joe(e,n),!1!==n&&Roe(e,n)},zoe={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},Koe=/[^\x20-\x7F]/;var qoe=function(e){if(!e)return 0;if(!Koe.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=zoe.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t};function Woe(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return woe(n)?Math.min(Woe(n[0]),r):r}function Joe(e){return e.range?e.range[1]:e.end}function Hoe(e,t){let r=Woe(e);return Number.isInteger(r)&&r===Woe(t)}function Xoe(e,t){return Hoe(e,t)&&function(e,t){let r=Joe(e);return Number.isInteger(r)&&r===Joe(t)}(e,t)}var Goe=null;function Yoe(e){if(null!==Goe&&(Goe.property,1)){let e=Goe;return Goe=Yoe.prototype=null,e}return Goe=Yoe.prototype=e??Object.create(null),new Yoe}for(let e=0;e<=10;e++)Yoe();var Qoe=function(e,t="type"){return function(e){Yoe(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}},Zoe=Qoe({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","parameter"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var eue=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)},tue=eue(["Block","CommentBlock","MultiLine"]);var rue=function(e,t){return t.some((t=>function(e,t){let r=t.split(".");for(let t=r.length-1;t>=0;t--){let n=r[t];if(0===t)return"Identifier"===e.type&&e.name===n;if("MemberExpression"!==e.type||e.optional||e.computed||"Identifier"!==e.property.type||e.property.name!==n)return!1;e=e.object}}(e,t)))},nue=eue(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]);var iue=function({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")};function sue(e,t){return t(e)||Noe(e,{getVisitorKeys:Zoe,predicate:t})}function aue(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||Fue(e)||Iue(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||fle(e)||"TSNonNullExpression"===e.type||"ChainExpression"===e.type}function oue(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function uue(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var lue=eue(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),cue=eue(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),pue=eue(["ArrayExpression","TupleExpression"]),due=eue(["ObjectExpression","RecordExpression"]);function hue(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function fue(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&hue(e.argument)}function mue(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function yue(e){return"RegExpLiteral"===e.type||"Literal"===e.type&&!!e.regex}var gue=eue(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),bue=eue(["FunctionExpression","ArrowFunctionExpression"]);function vue(e){return Fue(e)&&"Identifier"===e.callee.type&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var xue=eue(["JSXElement","JSXFragment"]);function Eue(e){return"get"===e.kind||"set"===e.kind}function Sue(e){return Eue(e)||Hoe(e,e.value)}function Due(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||Sue(e))}var Tue=eue(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function Aue(e){return Iue(e)||"BindExpression"===e.type&&!!e.object}var Cue=eue(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function Pue(e){return iue(e)||nue(e)||Cue(e)||("GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)&&!e.typeParameters}var wue=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function kue(e,t){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(vue(e)&&t&&kue(t))return bue(e.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&1===e.arguments.length&&/^(?:before|after)(?:Each|All)$/.test(e.callee.name)}(e))return vue(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("TemplateLiteral"===e.arguments[0].type||mue(e.arguments[0]))&&function(e){return rue(e,wue)}(e.callee))return!(e.arguments[2]&&!hue(e.arguments[2]))&&((2===e.arguments.length?bue(e.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(e.arguments[1])&&Zue(e.arguments[1]).length<=1)||vue(e.arguments[1]));return!1}var Fue=eue(["CallExpression","OptionalCallExpression"]),Iue=eue(["MemberExpression","OptionalMemberExpression"]);function _ue(e,t){return xue(t)?sle(t):ule(t,ale.Leading,(t=>Roe(e,Joe(t))))}function Nue(e,t){return"json"!==t.parser&&mue(e.key)&&Uue(e.key).slice(1,-1)===e.key.value&&(Foe(e.key.value)&&!("babel-ts"===t.parser&&"ClassProperty"===e.type||"typescript"===t.parser&&"PropertyDefinition"===e.type)||Oue(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser))}function Oue(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function Bue(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function Lue(e,t){return("TemplateLiteral"===e.type&&Bue(e)||"TaggedTemplateExpression"===e.type&&Bue(e.quasi))&&!Roe(t,Woe(e),{backwards:!0})}function Mue(e){if(!ule(e))return!1;let t=moe(!1,lle(e,ale.Dangling),-1);return t&&!tue(t)}function jue(e){let{node:t,parent:r,key:n}=e;return"callee"===n&&Fue(t)&&Fue(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Rue=new Set(["!","-","+","~"]);function $ue(e,t=2){if(t<=0)return!1;let r=e=>$ue(e,t-1);if(yue(e))return qoe(e.pattern??e.regex.pattern)<=5;if("Literal"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"BooleanLiteral"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"StringLiteral"===e.type||"Identifier"===e.type||"ThisExpression"===e.type||"Super"===e.type||"PrivateName"===e.type||"PrivateIdentifier"===e.type||"ArgumentPlaceholder"===e.type||"Import"===e.type)return!0;if("TemplateLiteral"===e.type)return e.quasis.every((e=>!e.value.raw.includes("\n")))&&e.expressions.every(r);if(due(e))return e.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value))));if(pue(e))return e.elements.every((e=>null===e||r(e)));if(ple(e)){if("ImportExpression"===e.type||$ue(e.callee,t)){let n=tle(e);return n.length<=t&&n.every(r)}return!1}return Iue(e)?$ue(e.object,t)&&$ue(e.property,t):"UnaryExpression"===e.type&&Rue.has(e.operator)||"UpdateExpression"===e.type?$ue(e.argument,t):"TSNonNullExpression"===e.type&&$ue(e.expression,t)}function Uue(e){var t;return(null==(t=e.extra)?void 0:t.raw)??e.raw}function Vue(e){return e}function zue(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)}function Kue(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Kue(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Kue(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&Kue(e.tag,t);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&Kue(e.callee,t);case"ConditionalExpression":return Kue(e.test,t);case"UpdateExpression":return!e.prefix&&Kue(e.argument,t);case"BindExpression":return e.object&&Kue(e.object,t);case"SequenceExpression":return Kue(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":return Kue(e.expression,t);default:return t(e)}}var que={"==":!0,"!=":!0,"===":!0,"!==":!0},Wue={"*":!0,"/":!0,"%":!0},Jue={">>":!0,">>>":!0,"<<":!0};function Hue(e,t){return!(Gue(t)!==Gue(e)||"**"===e||que[e]&&que[t]||"%"===t&&Wue[e]||"%"===e&&Wue[t]||t!==e&&Wue[t]&&Wue[e]||Jue[e]&&Jue[t])}var Xue=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap(((e,t)=>e.map((e=>[e,t])))));function Gue(e){return Xue.get(e)}function Yue(e){var t;if(e.rest)return!0;let r=Zue(e);return"RestElement"===(null==(t=moe(!1,r,-1))?void 0:t.type)}var Que=new WeakMap;function Zue(e){if(Que.has(e))return Que.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Que.set(e,t),t}var ele=new WeakMap;function tle(e){if(ele.has(e))return ele.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),ele.set(e,t),t}function rle(e,t){let{node:r}=e;"ImportExpression"===r.type?(e.call((e=>t(e,0)),"source"),r.attributes&&e.call((e=>t(e,1)),"attributes")):e.each(t,"arguments")}function nle(e,t){if("ImportExpression"===e.type){if(0===t||t===(e.attributes?-2:-1))return"source";if(e.attributes&&(1===t||-1===t))return"attributes";throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return["arguments",t]}function ile(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function sle(e){return(null==e?void 0:e.prettierIgnore)||ule(e,ale.PrettierIgnore)}var ale={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},ole=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(r,n,i)=>!(e&ale.Leading&&!r.leading||e&ale.Trailing&&!r.trailing||e&ale.Dangling&&(r.leading||r.trailing)||e&ale.Block&&!tue(r)||e&ale.Line&&!lue(r)||e&ale.First&&0!==n||e&ale.Last&&n!==i.length-1||e&ale.PrettierIgnore&&!ile(r)||t&&!t(r))};function ule(e,t,r){if(!woe(null==e?void 0:e.comments))return!1;let n=ole(t,r);return!n||e.comments.some(n)}function lle(e,t,r){if(!Array.isArray(null==e?void 0:e.comments))return[];let n=ole(t,r);return n?e.comments.filter(n):e.comments}var cle=(e,{originalText:t})=>Voe(t,Joe(e));function ple(e){return Fue(e)||"NewExpression"===e.type||"ImportExpression"===e.type}function dle(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)}var hle=Symbol("ifWithoutBlockAndSameLineComment"),fle=eue(["TSAsExpression","TSSatisfiesExpression"]);function mle(e,t){var r,n,i,s,a,o,u;if(e.isRoot)return!1;let{node:l,key:c,parent:p}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&function(e){return due(e)}(l)&&gle(e))return!0;if(yle(l))return!1;if("Identifier"===l.type){if(null!=(r=l.extra)&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(l.name)||"left"===c&&("async"===l.name&&!p.await||"let"===l.name)&&"ForOfStatement"===p.type)return!0;if("let"===l.name){let t=null==(n=e.findAncestor((e=>"ForOfStatement"===e.type)))?void 0:n.left;if(t&&Kue(t,(e=>e===l)))return!0}if("object"===c&&"let"===l.name&&"MemberExpression"===p.type&&p.computed&&!p.optional){let t=e.findAncestor((e=>"ExpressionStatement"===e.type||"ForStatement"===e.type||"ForInStatement"===e.type)),r=t?"ExpressionStatement"===t.type?t.expression:"ForStatement"===t.type?t.init:t.left:void 0;if(r&&Kue(r,(e=>e===l)))return!0}return!1}if("ObjectExpression"===l.type||"FunctionExpression"===l.type||"ClassExpression"===l.type||"DoExpression"===l.type){let t=null==(i=e.findAncestor((e=>"ExpressionStatement"===e.type)))?void 0:i.expression;if(t&&Kue(t,(e=>e===l)))return!0}if("ObjectExpression"===l.type){let t=null==(s=e.findAncestor((e=>"ArrowFunctionExpression"===e.type)))?void 0:s.body;if(t&&"SequenceExpression"!==t.type&&"AssignmentExpression"!==t.type&&Kue(t,(e=>e===l)))return!0}switch(p.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if("superClass"===c&&("ArrowFunctionExpression"===l.type||"AssignmentExpression"===l.type||"AwaitExpression"===l.type||"BinaryExpression"===l.type||"ConditionalExpression"===l.type||"LogicalExpression"===l.type||"NewExpression"===l.type||"ObjectExpression"===l.type||"SequenceExpression"===l.type||"TaggedTemplateExpression"===l.type||"UnaryExpression"===l.type||"UpdateExpression"===l.type||"YieldExpression"===l.type||"TSNonNullExpression"===l.type||"ClassExpression"===l.type&&woe(l.decorators)))return!0;break;case"ExportDefaultDeclaration":return ble(e,t)||"SequenceExpression"===l.type;case"Decorator":if("expression"===c){if(Iue(l)&&l.computed)return!0;let e=!1,r=!1,n=l;for(;n;)switch(n.type){case"MemberExpression":r=!0,n=n.object;break;case"CallExpression":if(r||e)return"typescript"!==t.parser;e=!0,n=n.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return"typescript"!==t.parser;default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))&&function(e){return sue(e,(e=>"ObjectTypeAnnotation"===e.type&&sue(e,(e=>"FunctionTypeAnnotation"===e.type))))}(l))return!0}switch(l.type){case"UpdateExpression":if("UnaryExpression"===p.type)return l.prefix&&("++"===l.operator&&"+"===p.operator||"--"===l.operator&&"-"===p.operator);case"UnaryExpression":switch(p.type){case"UnaryExpression":return l.operator===p.operator&&("+"===l.operator||"-"===l.operator);case"BindExpression":case"TaggedTemplateExpression":case"TSNonNullExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"BinaryExpression":return"left"===c&&"**"===p.operator;default:return!1}case"BinaryExpression":if("UpdateExpression"===p.type||"in"===l.operator&&function(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if("ForStatement"===(null==n?void 0:n.type)&&n.init===r)return!0;r=n}return!1}(e))return!0;if("|>"===l.operator&&null!=(a=l.extra)&&a.parenthesized){let t=e.grandparent;if("BinaryExpression"===t.type&&"|>"===t.operator)return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"LogicalExpression":switch(p.type){case"TSAsExpression":case"TSSatisfiesExpression":return!fle(l);case"ConditionalExpression":return fle(l);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return"callee"===c;case"ClassExpression":case"ClassDeclaration":return"superClass"===c;case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"AssignmentExpression":case"AssignmentPattern":return"left"===c&&("TSTypeAssertion"===l.type||fle(l));case"LogicalExpression":if("LogicalExpression"===l.type)return p.operator!==l.operator;case"BinaryExpression":{let{operator:e,type:t}=l;if(!e&&"TSTypeAssertion"!==t)return!0;let r=Gue(e),n=p.operator,i=Gue(n);return i>r||"right"===c&&i===r||i===r&&!Hue(n,e)||(i<r&&"%"===e?"+"===n||"-"===n:!!function(e){return!!Jue[e]||"|"===e||"^"===e||"&"===e}(n))}default:return!1}case"SequenceExpression":switch(p.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==c;case"ArrowFunctionExpression":return"body"!==c;default:return!0}case"YieldExpression":if("AwaitExpression"===p.type)return!0;case"AwaitExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"BinaryExpression":return!(!l.argument&&"|>"===p.operator);default:return!1}case"TSFunctionType":if(e.match((e=>"TSFunctionType"===e.type),((e,t)=>"typeAnnotation"===t&&"TSTypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;case"TSConditionalType":case"TSConstructorType":if("extendsType"===c&&"TSConditionalType"===p.type){if("TSConditionalType"===l.type)return!0;let{typeAnnotation:e}=l.returnType||l.typeAnnotation;if("TSTypePredicate"===e.type&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),"TSInferType"===e.type&&e.typeParameter.constraint)return!0}if("checkType"===c&&"TSConditionalType"===p.type)return!0;case"TSUnionType":case"TSIntersectionType":if(("TSUnionType"===p.type||"TSIntersectionType"===p.type)&&p.types.length>1&&(!l.types||l.types.length>1))return!0;case"TSInferType":if("TSInferType"===l.type&&"TSRestType"===p.type)return!1;case"TSTypeOperator":return"TSArrayType"===p.type||"TSOptionalType"===p.type||"TSRestType"===p.type||"objectType"===c&&"TSIndexedAccessType"===p.type||"TSTypeOperator"===p.type||"TSTypeAnnotation"===p.type&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return"objectType"===c&&"TSIndexedAccessType"===p.type||"elementType"===c&&"TSArrayType"===p.type;case"TypeofTypeAnnotation":return"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type)||"elementType"===c&&"ArrayTypeAnnotation"===p.type;case"ArrayTypeAnnotation":return"NullableTypeAnnotation"===p.type;case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"NullableTypeAnnotation"===p.type||"IntersectionTypeAnnotation"===p.type||"UnionTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"InferTypeAnnotation":case"NullableTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"FunctionTypeAnnotation":{if(e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))||e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypePredicate"===e.type),((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;let t="NullableTypeAnnotation"===p.type?e.grandparent:p;return"UnionTypeAnnotation"===t.type||"IntersectionTypeAnnotation"===t.type||"ArrayTypeAnnotation"===t.type||"objectType"===c&&("IndexedAccessType"===t.type||"OptionalIndexedAccessType"===t.type)||"checkType"===c&&"ConditionalTypeAnnotation"===p.type||"extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"InferTypeAnnotation"===l.returnType.type&&l.returnType.typeParameter.bound||"NullableTypeAnnotation"===t.type||"FunctionTypeParam"===p.type&&null===p.name&&Zue(l).some((e=>{var t;return"NullableTypeAnnotation"===(null==(t=e.typeAnnotation)?void 0:t.type)}))}case"ConditionalTypeAnnotation":if("extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"ConditionalTypeAnnotation"===l.type||"checkType"===c&&"ConditionalTypeAnnotation"===p.type)return!0;case"OptionalIndexedAccessType":return"objectType"===c&&"IndexedAccessType"===p.type;case"StringLiteral":case"NumericLiteral":case"Literal":if("string"==typeof l.value&&"ExpressionStatement"===p.type&&!p.directive){let t=e.grandparent;return"Program"===t.type||"BlockStatement"===t.type}return"object"===c&&"MemberExpression"===p.type&&"number"==typeof l.value;case"AssignmentExpression":{let t=e.grandparent;return"body"===c&&"ArrowFunctionExpression"===p.type||("key"!==c||"ClassProperty"!==p.type&&"PropertyDefinition"!==p.type||!p.computed)&&("init"!==c&&"update"!==c||"ForStatement"!==p.type)&&("ExpressionStatement"===p.type?"ObjectPattern"===l.left.type:!("key"===c&&"TSPropertySignature"===p.type||"AssignmentExpression"===p.type||"SequenceExpression"===p.type&&"ForStatement"===t.type&&(t.init===p||t.update===p)||"value"===c&&"Property"===p.type&&"ObjectPattern"===t.type&&t.properties.includes(p)||"NGChainedExpression"===p.type))}case"ConditionalExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;default:return!1}case"FunctionExpression":switch(p.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(p.type){case"BinaryExpression":return"|>"!==p.operator||(null==(o=l.extra)?void 0:o.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return"test"===c;default:return!1}case"ClassExpression":return"NewExpression"===p.type&&"callee"===c;case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(function(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!(("OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type)&&("object"===i&&"MemberExpression"===r.type||"callee"===i&&("CallExpression"===r.type||"NewExpression"===r.type)||"TSNonNullExpression"===r.type&&"MemberExpression"===n.type&&n.object===r)||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type))&&(e.match(void 0,void 0,((e,t)=>"callee"===t&&("CallExpression"===e.type&&!e.optional||"NewExpression"===e.type)||"object"===t&&"MemberExpression"===e.type&&!e.optional))||e.match(void 0,void 0,((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))}(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if("callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)){let e=l;for(;e;)switch(e.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":e=e.object;break;case"TaggedTemplateExpression":e=e.tag;break;case"TSNonNullExpression":e=e.expression;break;default:return!1}}return!1;case"BindExpression":return"callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)||"object"===c&&Iue(p);case"NGPipeExpression":return!("NGRoot"===p.type||"NGMicrosyntaxExpression"===p.type||"ObjectProperty"===p.type&&(null==(u=l.extra)||!u.parenthesized)||pue(p)||"arguments"===c&&Fue(p)||"right"===c&&"NGPipeExpression"===p.type||"property"===c&&"MemberExpression"===p.type||"AssignmentExpression"===p.type);case"JSXFragment":case"JSXElement":return"callee"===c||"left"===c&&"BinaryExpression"===p.type&&"<"===p.operator||!pue(p)&&"ArrowFunctionExpression"!==p.type&&"AssignmentExpression"!==p.type&&"AssignmentPattern"!==p.type&&"BinaryExpression"!==p.type&&"NewExpression"!==p.type&&"ConditionalExpression"!==p.type&&"ExpressionStatement"!==p.type&&"JsExpressionRoot"!==p.type&&"JSXAttribute"!==p.type&&"JSXElement"!==p.type&&"JSXExpressionContainer"!==p.type&&"JSXFragment"!==p.type&&"LogicalExpression"!==p.type&&!Fue(p)&&!dle(p)&&"ReturnStatement"!==p.type&&"ThrowStatement"!==p.type&&"TypeCastExpression"!==p.type&&"VariableDeclarator"!==p.type&&"YieldExpression"!==p.type;case"TSInstantiationExpression":return"object"===c&&Iue(p)}return!1}var yle=eue(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function gle(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if("arguments"===r&&e.isLast)return e.callParent(gle);break;case"ObjectProperty":if("value"===r)return e.callParent((()=>"properties"===e.key&&e.isLast));break;case"BinaryExpression":case"LogicalExpression":if("right"===r)return e.callParent(gle);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(gle);break;case"UnaryExpression":if(t.prefix)return e.callParent(gle)}return!1}function ble(e,t){let{node:r,parent:n}=e;return"FunctionExpression"===r.type||"ClassExpression"===r.type?"ExportDefaultDeclaration"===n.type||!mle(e,t):!(!aue(r)||"ExportDefaultDeclaration"!==n.type&&mle(e,t))&&e.call((()=>ble(e,t)),...uue(r))}var vle=mle,xle=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)};var Ele=function(e,t){let r=t-1;return r=Boe(e,r,{backwards:!0}),r=joe(e,r,{backwards:!0}),r=Boe(e,r,{backwards:!0}),r!==joe(e,r,{backwards:!0})},Sle=()=>!0;function Dle(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function Tle(e,t,r={}){let{node:n}=e;if(!woe(null==n?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:a=Sle}=r,o=[];if(e.each((({node:r})=>{r.leading||r.trailing||r.marker!==s||!a(r)||o.push(Dle(e,t))}),"comments"),0===o.length)return"";let u=hoe(coe,o);return i?Gae([coe,u]):u}function Ale(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[Dle(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=Roe(a,u(n))?Roe(a,o(n),{backwards:!0})?coe:uoe:" ";i.push(e)}else i.push(coe);let l=joe(a,Boe(a,u(n)));return!1!==l&&Roe(a,l)&&i.push(coe),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=Dle(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||Roe(o,u(i),{backwards:!0})){let e=Ele(o,u(i));return{doc:ioe([coe,e?coe:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[ioe([" ",s]),aoe],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}function Cle(e,t,r){let{leading:n,trailing:i}=Ale(e,r);return n||i?Poe(t,(e=>[n,e,i])):t}var Ple=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},wle=Ple,kle="'";var Fle=function(e,t){let r=!0===t||t===kle?kle:'"',n=r===kle?'"':kle,i=0,s=0;for(let t of e)t===r?i++:t===n&&s++;return i>s?n:r};var Ile;Ile=new WeakMap;var _le=class{constructor(e){((e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)})(this,Ile,void 0),((e,t,r,n)=>{Sae(e,t,"write to private field"),n?n.call(e,r):t.set(e,r)})(this,Ile,new Set(e))}getLeadingWhitespaceCount(e){let t=Dae(this,Ile),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=Dae(this,Ile),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return Dae(this,Ile).has(e.charAt(0))}hasTrailingWhitespace(e){return Dae(this,Ile).has(moe(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}([...Dae(this,Ile)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=Dae(this,Ile);return Array.prototype.some.call(e,(e=>t.has(e)))}hasNonWhitespaceCharacter(e){let t=Dae(this,Ile);return Array.prototype.some.call(e,(e=>!t.has(e)))}isWhitespaceOnly(e){let t=Dae(this,Ile);return Array.prototype.every.call(e,(e=>t.has(e)))}},Nle={};Eae(Nle,{endOfLine:()=>zle,ownLine:()=>Vle,remaining:()=>Kle});var Ole=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Boe(e,n),n=$oe(e,n),n=Uoe(e,n),n=joe(e,n);return n};var Ble=function(e,t){let r=Ole(e,t);return!1===r?"":e.charAt(r)};var Lle=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};function Mle(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function jle(e,t){t.leading=!0,t.trailing=!1,Mle(e,t)}function Rle(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Mle(e,t)}function $le(e,t){t.leading=!1,t.trailing=!0,Mle(e,t)}var Ule=function(e){return tue(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};function Vle(e){return[Sce,uce,Yle,Hle,Xle,Gle,tce,mce,dce,fce,yce,gce,nce,lce,cce].some((t=>t(e)))}function zle(e){return[Jle,uce,Qle,yce,Hle,Xle,Gle,tce,lce,pce,hce,fce,xce,cce,Tce].some((t=>t(e)))}function Kle(e){return[Sce,Hle,Xle,Zle,oce,nce,fce,ace,sce,Dce,cce,Ece].some((t=>t(e)))}function qle(e,t){let r=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));r?jle(r,t):Rle(e,t)}function Wle(e,t){"BlockStatement"===e.type?qle(e,t):jle(e,t)}function Jle({comment:e,followingNode:t}){return!(!t||!Ule(e))&&(jle(t,e),!0)}function Hle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("IfStatement"!==(null==r?void 0:r.type)||!n)return!1;if(")"===Ble(i,Joe(e)))return $le(t,e),!0;if(t===r.consequent&&n===r.alternate){if("BlockStatement"===t.type)$le(t,e);else{let n="SingleLine"===e.type||e.loc.start.line===e.loc.end.line,i=e.loc.start.line===t.loc.start.line;n&&i?Rle(t,e,hle):Rle(r,e)}return!0}return"BlockStatement"===n.type?(qle(n,e),!0):"IfStatement"===n.type?(Wle(n.consequent,e),!0):r.consequent===n&&(jle(n,e),!0)}function Xle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return!("WhileStatement"!==(null==r?void 0:r.type)||!n)&&(")"===Ble(i,Joe(e))?($le(t,e),!0):"BlockStatement"===n.type?(qle(n,e),!0):r.body===n&&(jle(n,e),!0))}function Gle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return!("TryStatement"!==(null==r?void 0:r.type)&&"CatchClause"!==(null==r?void 0:r.type)||!n)&&("CatchClause"===r.type&&t?($le(t,e),!0):"BlockStatement"===n.type?(qle(n,e),!0):"TryStatement"===n.type?(Wle(n.finalizer,e),!0):"CatchClause"===n.type&&(Wle(n.body,e),!0))}function Yle({comment:e,enclosingNode:t,followingNode:r}){return!(!Iue(t)||"Identifier"!==(null==r?void 0:r.type))&&(jle(t,e),!0)}function Qle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){let s=t&&!Lle(i,Joe(t),Woe(e));return!(t&&s||"ConditionalExpression"!==(null==r?void 0:r.type)&&"TSConditionalType"!==(null==r?void 0:r.type)||!n)&&(jle(n,e),!0)}function Zle({comment:e,precedingNode:t,enclosingNode:r}){return!(!dle(r)||!r.shorthand||r.key!==t||"AssignmentPattern"!==r.value.type)&&($le(r.value.left,e),!0)}var ece=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function tce({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(ece.has(null==r?void 0:r.type)){if(woe(r.decorators)&&"Decorator"!==(null==n?void 0:n.type))return $le(moe(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return qle(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return $le(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return!t||t!==r.id&&t!==r.typeParameters&&t!==r.superClass?Rle(r,e,i):$le(t,e),!0}}return!1}var rce=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function nce({comment:e,precedingNode:t,enclosingNode:r,text:n}){return(r&&t&&"("===Ble(n,Joe(e))&&("Property"===r.type||"TSDeclareMethod"===r.type||"TSAbstractMethodDefinition"===r.type)&&"Identifier"===t.type&&r.key===t&&":"!==Ble(n,Joe(t))||!("Decorator"!==(null==t?void 0:t.type)||!rce.has(null==r?void 0:r.type)))&&($le(t,e),!0)}var ice=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function sce({comment:e,precedingNode:t,enclosingNode:r,text:n}){return"("===Ble(n,Joe(e))&&(!(!t||!ice.has(null==r?void 0:r.type))&&($le(t,e),!0))}function ace({comment:e,enclosingNode:t,text:r}){if("ArrowFunctionExpression"!==(null==t?void 0:t.type))return!1;let n=Ole(r,Joe(e));return!1!==n&&"=>"===r.slice(n,n+2)&&(Rle(t,e),!0)}function oce({comment:e,enclosingNode:t,text:r}){return")"===Ble(r,Joe(e))&&(t&&(Ace(t)&&0===Zue(t).length||ple(t)&&0===tle(t).length)?(Rle(t,e),!0):("MethodDefinition"===(null==t?void 0:t.type)||"TSAbstractMethodDefinition"===(null==t?void 0:t.type))&&0===Zue(t.value).length&&(Rle(t.value,e),!0))}function uce({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("FunctionTypeParam"===(null==t?void 0:t.type)&&"FunctionTypeAnnotation"===(null==r?void 0:r.type)&&"FunctionTypeParam"!==(null==n?void 0:n.type))return $le(t,e),!0;if(("Identifier"===(null==t?void 0:t.type)||"AssignmentPattern"===(null==t?void 0:t.type)||"ObjectPattern"===(null==t?void 0:t.type)||"ArrayPattern"===(null==t?void 0:t.type)||"RestElement"===(null==t?void 0:t.type))&&r&&Ace(r)&&")"===Ble(i,Joe(e)))return $le(t,e),!0;if("FunctionDeclaration"===(null==r?void 0:r.type)&&"BlockStatement"===(null==n?void 0:n.type)){let t=(()=>{let e=Zue(r);if(e.length>0)return Ole(i,Joe(moe(!1,e,-1)));let t=Ole(i,Joe(r.id));return!1!==t&&Ole(i,t+1)})();if(Woe(e)>t)return qle(n,e),!0}return!1}function lce({comment:e,enclosingNode:t}){return"LabeledStatement"===(null==t?void 0:t.type)&&(jle(t,e),!0)}function cce({comment:e,enclosingNode:t}){return!("ContinueStatement"!==(null==t?void 0:t.type)&&"BreakStatement"!==(null==t?void 0:t.type)||t.label)&&($le(t,e),!0)}function pce({comment:e,precedingNode:t,enclosingNode:r}){return!!(Fue(r)&&t&&r.callee===t&&r.arguments.length>0)&&(jle(r.arguments[0],e),!0)}function dce({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"UnionTypeAnnotation"===(null==r?void 0:r.type)||"TSUnionType"===(null==r?void 0:r.type)?(ile(e)&&(n.prettierIgnore=!0,e.unignore=!0),!!t&&($le(t,e),!0)):(("UnionTypeAnnotation"===(null==n?void 0:n.type)||"TSUnionType"===(null==n?void 0:n.type))&&ile(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function hce({comment:e,enclosingNode:t}){return!!dle(t)&&(jle(t,e),!0)}function fce({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:i}){var s;return 0===(null==(s=null==n?void 0:n.body)?void 0:s.length)?(i?Rle(n,e):jle(n,e),!0):"Program"!==(null==t?void 0:t.type)||0!==t.body.length||woe(t.directives)?"Program"===(null==r?void 0:r.type)&&0===r.body.length&&"ModuleExpression"===(null==t?void 0:t.type)&&(Rle(r,e),!0):(i?Rle(t,e):jle(t,e),!0)}function mce({comment:e,enclosingNode:t}){return("ForInStatement"===(null==t?void 0:t.type)||"ForOfStatement"===(null==t?void 0:t.type))&&(jle(t,e),!0)}function yce({comment:e,precedingNode:t,enclosingNode:r,text:n}){if("ImportSpecifier"===(null==r?void 0:r.type)||"ExportSpecifier"===(null==r?void 0:r.type))return jle(r,e),!0;let i="ImportSpecifier"===(null==t?void 0:t.type)&&"ImportDeclaration"===(null==r?void 0:r.type),s="ExportSpecifier"===(null==t?void 0:t.type)&&"ExportNamedDeclaration"===(null==r?void 0:r.type);return!(!i&&!s||!Roe(n,Joe(e)))&&($le(t,e),!0)}function gce({comment:e,enclosingNode:t}){return"AssignmentPattern"===(null==t?void 0:t.type)&&(jle(t,e),!0)}var bce=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),vce=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function xce({comment:e,enclosingNode:t,followingNode:r}){return!(!bce.has(null==t?void 0:t.type)||!r||!vce.has(r.type)&&!tue(e))&&(jle(r,e),!0)}function Ece({comment:e,enclosingNode:t,followingNode:r,text:n}){return!(r||"TSMethodSignature"!==(null==t?void 0:t.type)&&"TSDeclareFunction"!==(null==t?void 0:t.type)&&"TSAbstractMethodDefinition"!==(null==t?void 0:t.type)||";"!==Ble(n,Joe(e)))&&($le(t,e),!0)}function Sce({comment:e,enclosingNode:t,followingNode:r}){if(ile(e)&&"TSMappedType"===(null==t?void 0:t.type)&&"TSTypeParameter"===(null==r?void 0:r.type)&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function Dce({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"TSMappedType"===(null==r?void 0:r.type)&&("TSTypeParameter"===(null==n?void 0:n.type)&&n.name?(jle(n.name,e),!0):!("TSTypeParameter"!==(null==t?void 0:t.type)||!t.constraint)&&($le(t.constraint,e),!0))}function Tce({comment:e,enclosingNode:t,followingNode:r}){return!(!t||"SwitchCase"!==t.type||t.test||!r||r!==t.consequent[0])&&("BlockStatement"===r.type&&lue(e)?qle(r,e):Rle(t,e),!0)}var Ace=eue(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var Cce=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))};function Pce(e,t){let r=e.node;if(lue(r))return t.originalText.slice(Woe(r),Joe(r)).trimEnd();if(tue(r))return Cce(r)?function(e){let t=e.value.split("\n");return["/*",hoe(coe,t.map(((e,r)=>0===r?e.trimEnd():" "+(r<t.length-1?e.trim():e.trimStart())))),"*/"]}(r):["/*",Aoe(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}var wce=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function kce(e){return!wce.has(e.type)}function Fce(e,t){var r;if(("typescript"===t.parser||"flow"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser)&&"MethodDefinition"===e.type&&"FunctionExpression"===(null==(r=e.value)?void 0:r.type)&&0===Zue(e.value).length&&!e.value.returnType&&!woe(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function Ice(e){let{node:t,parent:r}=e;return(xue(t)||r&&("JSXSpreadAttribute"===r.type||"JSXSpreadChild"===r.type||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type||("ClassDeclaration"===r.type||"ClassExpression"===r.type)&&r.superClass===t))&&(!sle(t)||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)}function _ce(e,{parser:t}){if("flow"===t||"babel-flow"===t)return""===(e=xle(!1,e,/[\s(]/g,""))||"/*"===e||"/*::"===e}var Nce=new _le(" \n\r\t"),Oce=e=>""===e||e===uoe||e===coe||e===loe;function Bce(e,t,r){var n,i,s;let{node:a}=e;if("JSXElement"===a.type&&function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;let t=e.children[0];return"JSXText"===t.type&&!Vce(t)}(a))return[r("openingElement"),r("closingElement")];let o="JSXElement"===a.type?r("openingElement"):r("openingFragment"),u="JSXElement"===a.type?r("closingElement"):r("closingFragment");if(1===a.children.length&&"JSXExpressionContainer"===a.children[0].type&&("TemplateLiteral"===a.children[0].expression.type||"TaggedTemplateExpression"===a.children[0].expression.type))return[o,...e.map(r,"children"),u];a.children=a.children.map((e=>function(e){return"JSXExpressionContainer"===e.type&&mue(e.expression)&&" "===e.expression.value&&!ule(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));let l=a.children.some(xue),c=a.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,p="JSXElement"===a.type&&a.openingElement.attributes.length>1,d=xoe(o)||l||p||c,h="mdx"===e.parent.rootMarker,f=t.singleQuote?"{' '}":'{" "}',m=h?" ":roe([f,loe]," "),y=function(e,t,r,n,i){let s=[];return e.each((({node:e,next:t})=>{if("JSXText"===e.type){let r=Uue(e);if(Vce(e)){let a,o=Nce.split(r,!0);if(""===o[0]&&(s.push(""),o.shift(),/\n/.test(o[0])?s.push(Mce(i,o[1],e,t)):s.push(n),o.shift()),""===moe(!1,o,-1)&&(o.pop(),a=o.pop()),0===o.length)return;for(let[e,t]of o.entries())e%2==1?s.push(uoe):s.push(t);void 0!==a?/\n/.test(a)?s.push(Mce(i,moe(!1,s,-1),e,t)):s.push(n):s.push(Lce(i,moe(!1,s,-1),e,t))}else/\n/.test(r)?r.match(/\n/g).length>1&&s.push("",coe):s.push("",n)}else{let n=r();if(s.push(n),t&&Vce(t)){let r=Nce.trim(Uue(t)),[n]=Nce.split(r);s.push(Lce(i,n,e,t))}else s.push(coe)}}),"children"),s}(e,0,r,m,"fbt"===(null==(i=null==(n=a.openingElement)?void 0:n.name)?void 0:i.name)),g=a.children.some((e=>Vce(e)));for(let e=y.length-2;e>=0;e--){let t=""===y[e]&&""===y[e+1],r=y[e]===coe&&""===y[e+1]&&y[e+2]===coe,n=(y[e]===loe||y[e]===coe)&&""===y[e+1]&&y[e+2]===m,i=y[e]===m&&""===y[e+1]&&(y[e+2]===loe||y[e+2]===coe),s=y[e]===m&&""===y[e+1]&&y[e+2]===m,a=y[e]===loe&&""===y[e+1]&&y[e+2]===coe||y[e]===coe&&""===y[e+1]&&y[e+2]===loe;r&&g||t||n||s||a?y.splice(e,2):i&&y.splice(e+1,2)}for(;y.length>0&&Oce(moe(!1,y,-1));)y.pop();for(;y.length>1&&Oce(y[0])&&Oce(y[1]);)y.shift(),y.shift();let b=[];for(let[e,t]of y.entries()){if(t===m){if(1===e&&""===y[e-1]){if(2===y.length){b.push(f);continue}b.push([f,coe]);continue}if(e===y.length-1){b.push(f);continue}if(""===y[e-1]&&y[e-2]===coe){b.push(f);continue}}b.push(t),xoe(t)&&(d=!0)}let v=g?toe(b):Qae(b,{shouldBreak:!0});if("JSXText"===(null==(s=t.cursorNode)?void 0:s.type)&&a.children.includes(t.cursorNode)&&(v=[doe,v,doe]),h)return v;let x=Qae([o,Gae([coe,v]),coe,u]);return d?x:eoe([Qae([o,...y,u]),x])}function Lce(e,t,r,n){return e?"":"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?1===t.length?loe:coe:loe}function Mce(e,t,r,n){return e?coe:1===t.length?"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?coe:loe:coe}var jce=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function Rce(e,t,r){return e.selfClosing?[uoe,"/>"]:function(e,t,r){let n=e.attributes.length>0&&ule(moe(!1,e.attributes,-1),ale.Trailing);return 0===e.attributes.length&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}(e,t,r)?[">"]:[loe,">"]}function $ce(e,t,r){return function(e,t,r){let{parent:n}=e;if(jce.has(n.type))return t;let i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),Fue,(e=>"JSXExpressionContainer"===e.type)),s=vle(e,r);return Qae([s?"":roe("("),Gae([loe,t]),loe,s?"":roe(")")],{shouldBreak:i})}(e,Cle(e,Bce(e,t,r),t),t)}function Uce(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return function(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(mue(n.value)){let r=Uue(n.value),i=xle(!1,xle(!1,r.slice(1,-1),"&apos;","'"),"&quot;",'"'),a=Fle(i,t.jsxSingleQuote);i='"'===a?xle(!1,i,'"',"&quot;"):xle(!1,i,"'","&apos;"),s=e.call((()=>Cle(e,Aoe(a+i+a),t)),"value")}else s=r("value");i.push("=",s)}return i}(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return hoe(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return hoe(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return function(e,t,r){let{node:n}=e;return["{",e.call((({node:n})=>{let i=["...",r()];return ule(n)&&Ice(e)?[Gae([loe,Cle(e,i,t)]),loe]:i}),"JSXSpreadAttribute"===n.type?"argument":"expression"),"}"]}(e,t,r);case"JSXExpressionContainer":return function(e,t,r){let{node:n}=e,i=(e,t)=>"JSXEmptyExpression"===e.type||!ule(e)&&(pue(e)||due(e)||"ArrowFunctionExpression"===e.type||"AwaitExpression"===e.type&&(i(e.argument,e)||"JSXElement"===e.argument.type)||Fue(e)||"ChainExpression"===e.type&&Fue(e.expression)||"FunctionExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||"DoExpression"===e.type||xue(t)&&("ConditionalExpression"===e.type||Tue(e)));return i(n.expression,e.parent)?Qae(["{",r("expression"),soe,"}"]):Qae(["{",Gae([loe,r("expression")]),loe,soe,"}"])}(e,0,r);case"JSXFragment":case"JSXElement":return $ce(e,t,r);case"JSXOpeningElement":return function(e,t,r){var n,i;let{node:s}=e,a=ule(s.name)||ule(s.typeParameters);if(s.selfClosing&&0===s.attributes.length&&!a)return["<",r("name"),r("typeParameters")," />"];if(1===(null==(n=s.attributes)?void 0:n.length)&&s.attributes[0].value&&mue(s.attributes[0].value)&&!s.attributes[0].value.value.includes("\n")&&!a&&!ule(s.attributes[0]))return Qae(["<",r("name"),r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let o=null==(i=s.attributes)?void 0:i.some((e=>e.value&&mue(e.value)&&e.value.value.includes("\n"))),u=t.singleAttributePerLine&&s.attributes.length>1?coe:uoe;return Qae(["<",r("name"),r("typeParameters"),Gae(e.map((()=>[u,r()]),"attributes")),...Rce(s,t,a)],{shouldBreak:o})}(e,t,r);case"JSXClosingElement":return function(e,t,r){let{node:n}=e,i=[];i.push("</");let s=r("name");return ule(n.name,ale.Leading|ale.Line)?i.push(Gae([coe,s]),coe):ule(n.name,ale.Leading|ale.Block)?i.push(" ",s):i.push(s),i.push(">"),i}(e,0,r);case"JSXOpeningFragment":case"JSXClosingFragment":return function(e,t){let{node:r}=e,n=ule(r),i=ule(r,ale.Line),s="JSXOpeningFragment"===r.type;return[s?"<":"</",Gae([i?coe:n&&!s?" ":"",Tle(e,t)]),i?coe:"",">"]}(e,t);case"JSXEmptyExpression":return function(e,t){let{node:r}=e,n=ule(r,ale.Line);return[Tle(e,t,{indent:n}),n?coe:""]}(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new wle(n,"JSX")}}function Vce(e){return"JSXText"===e.type&&(Nce.hasNonWhitespaceCharacter(Uue(e))||!/\n/.test(Uue(e)))}var zce=function(e){return sle(e.node)||function(e){let{node:t,parent:r}=e;if(!xue(t)||!xue(r))return!1;let n,{index:i,siblings:s}=e;for(let e=i;e>0;e--){let t=s[e-1];if("JSXText"!==t.type||Vce(t)){n=t;break}}return"JSXExpressionContainer"===(null==n?void 0:n.type)&&"JSXEmptyExpression"===n.expression.type&&sle(n.expression)}(e)},Kce=0;function qce(e,t,r){var n;let{node:i,parent:s,grandparent:a,key:o}=e,u="body"!==o&&("IfStatement"===s.type||"WhileStatement"===s.type||"SwitchStatement"===s.type||"DoWhileStatement"===s.type),l="|>"===i.operator&&(null==(n=e.root.extra)?void 0:n.__isUsingHackPipeline),c=Wce(e,r,t,!1,u);if(u)return c;if(l)return Qae(c);if(Fue(s)&&s.callee===i||"UnaryExpression"===s.type||Iue(s)&&!s.computed)return Qae([Gae([loe,...c]),loe]);let p="ReturnStatement"===s.type||"ThrowStatement"===s.type||"JSXExpressionContainer"===s.type&&"JSXAttribute"===a.type||"|"!==i.operator&&"JsExpressionRoot"===s.type||"NGPipeExpression"!==i.type&&("NGRoot"===s.type&&"__ng_binding"===t.parser||"NGMicrosyntaxExpression"===s.type&&"NGMicrosyntax"===a.type&&1===a.body.length)||i===s.body&&"ArrowFunctionExpression"===s.type||i!==s.body&&"ForStatement"===s.type||"ConditionalExpression"===s.type&&"ReturnStatement"!==a.type&&"ThrowStatement"!==a.type&&!Fue(a)||"TemplateLiteral"===s.type,d="AssignmentExpression"===s.type||"VariableDeclarator"===s.type||"ClassProperty"===s.type||"PropertyDefinition"===s.type||"TSAbstractPropertyDefinition"===s.type||"ClassPrivateProperty"===s.type||dle(s),h=Tue(i.left)&&Hue(i.operator,i.left.operator);if(p||Jce(i)&&!h||!Jce(i)&&d)return Qae(c);if(0===c.length)return"";let f=xue(i.right),m=c.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&e.type===Oae)),y=c.slice(0,-1===m?1:m+1),g=c.slice(y.length,f?-1:void 0),b=Symbol("logicalChain-"+ ++Kce),v=Qae([...y,Gae(g)],{id:b});return f?Qae([v,noe(moe(!1,c,-1),{groupId:b})]):v}function Wce(e,t,r,n,i){var s;let{node:a}=e;if(!Tue(a))return[Qae(t())];let o=[];Hue(a.operator,a.left.operator)?o=e.call((e=>Wce(e,t,r,!0,i)),"left"):o.push(Qae(t("left")));let u,l=Jce(a),c=("|>"===a.operator||"NGPipeExpression"===a.type||function(e,t){return("__vue_expression"===t.parser||"__vue_ts_expression"===t.parser)&&Hce(e.node)&&!e.hasAncestor((e=>!Hce(e)&&"JsExpressionRoot"!==e.type))}(e,r))&&!_ue(r.originalText,a.right),p="NGPipeExpression"===a.type?"|":a.operator,d="NGPipeExpression"===a.type&&a.arguments.length>0?Qae(Gae([loe,": ",hoe([uoe,": "],e.map((()=>Yae(2,Qae(t()))),"arguments"))])):"";if(l)u=[p," ",t("right"),d];else{let n="|>"===p&&(null==(s=e.root.extra)?void 0:s.__isUsingHackPipeline)?e.call((e=>Wce(e,t,r,!0,i)),"right"):t("right");u=[c?uoe:"",p,c?" ":uoe,n,d]}let{parent:h}=e,f=ule(a.left,ale.Trailing|ale.Line),m=f||!(i&&"LogicalExpression"===a.type)&&h.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type;if(o.push(c?"":" ",m?Qae(u,{shouldBreak:f}):u),n&&ule(a)){let t=Toe(Cle(e,o,r));return Array.isArray(t)||t.type===Bae?yoe(t):[t]}return o}function Jce(e){return"LogicalExpression"===e.type&&!!(due(e.right)&&e.right.properties.length>0||pue(e.right)&&e.right.elements.length>0||xue(e.right))}var Hce=e=>"BinaryExpression"===e.type&&"|"===e.operator;var Xce=class extends Error{name="ArgExpansionBailout"};function Gce(e,t,r){let{node:n}=e,i=[],s="TupleExpression"===n.type?"#[":"[",a="TupleTypeAnnotation"===n.type&&n.types?"types":"TSTupleType"===n.type||"TupleTypeAnnotation"===n.type?"elementTypes":"elements",o=n[a];if(0===o.length)i.push(function(e,t,r,n){let{node:i}=e;return ule(i,ale.Dangling)?Qae([r,Tle(e,t,{indent:!0}),loe,n]):[r,n]}(e,t,s,"]"));else{let u=moe(!1,o,-1),l="RestElement"!==(null==u?void 0:u.type),c=null===u,p=Symbol("array"),d=!t.__inJestEach&&o.length>1&&o.every(((e,t,r)=>{let n=null==e?void 0:e.type;if(!pue(e)&&!due(e))return!1;let i=r[t+1];if(i&&n!==i.type)return!1;let s=pue(e)?"elements":"properties";return e[s]&&e[s].length>1})),h=Yce(n,t),f=l?c?",":zue(t)?h?roe(",","",{groupId:p}):roe(","):"":"";i.push(Qae([s,Gae([loe,h?epe(e,t,r,f):[Zce(e,t,a,r),f],Tle(e,t)]),loe,"]"],{shouldBreak:d,id:p}))}return i.push(zpe(e),Mpe(e,r)),i}function Yce(e,t){return pue(e)&&e.elements.length>1&&e.elements.every((e=>e&&(hue(e)||fue(e)&&!ule(e.argument))&&!ule(e,ale.Trailing|ale.Line,(e=>!Roe(t.originalText,Woe(e),{backwards:!0})))))}function Qce({node:e},{originalText:t}){let r=e=>","===t[e]?e:r((e=>$oe(t,Uoe(t,e)))(e+1));return Voe(t,r(Joe(e)))}function Zce(e,t,r,n){let i=[];return e.each((({node:r,isLast:s})=>{i.push(r?Qae(n()):""),s||i.push([",",uoe,r&&Qce(e,t)?loe:""])}),r),i}function epe(e,t,r,n){let i=[];return e.each((({isLast:s,next:a})=>{i.push([r(),s?n:","]),s||i.push(Qce(e,t)?[coe,coe]:ule(a,ale.Leading|ale.Line)?coe:uoe)}),"elements"),toe(i)}function tpe(e,t=!1){return due(e)&&(e.properties.length>0||ule(e))||pue(e)&&(e.elements.length>0||ule(e))||"TSTypeAssertion"===e.type&&tpe(e.expression)||fle(e)&&tpe(e.expression)||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&(!e.returnType||!e.returnType.typeAnnotation||"TSTypeReference"!==e.returnType.typeAnnotation.type||function(e){return"BlockStatement"===e.type&&(e.body.some((e=>"EmptyStatement"!==e.type))||ule(e,ale.Dangling))}(e.body))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&tpe(e.body,!0)||due(e.body)||pue(e.body)||!t&&(Fue(e.body)||"ConditionalExpression"===e.body.type)||xue(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type}function rpe(e){var t;if("ParenthesizedExpression"===e.type)return rpe(e.expression);if(fle(e)||"TypeCastExpression"===e.type){let{typeAnnotation:r}=e;return"TypeAnnotation"===r.type&&(r=r.typeAnnotation),"TSArrayType"===r.type&&(r=r.elementType,"TSArrayType"===r.type&&(r=r.elementType)),("GenericTypeAnnotation"===r.type||"TSTypeReference"===r.type)&&1===(null==(t=r.typeParameters)?void 0:t.params.length)&&(r=r.typeParameters.params[0]),Pue(r)&&$ue(e.expression,1)}return!(ple(e)&&tle(e).length>1)&&(Tue(e)?$ue(e.left,1)&&$ue(e.right,1):yue(e)||$ue(e))}var npe=function(e,t,r){let{node:n}=e,i=tle(n);if(0===i.length)return["(",Tle(e,t),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===Zue(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>ule(e)))}(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,a=i.length-1,o=[];rle(e,(({node:e},n)=>{let i=r();n===a||(cle(e,t)?(s=!0,i=[i,",",coe,coe]):i=[i,",",uoe]),o.push(i)}));let u="ImportExpression"!==n.type&&"Import"!==n.callee.type&&zue(t,"all")?",":"";function l(){return Qae(["(",Gae([uoe,...o]),u,uoe,")"],{shouldBreak:!0})}if(s||"Decorator"!==e.parent.type&&function(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(bue(r)){if(t+=1,t>1)return!0}else if(Fue(r))for(let e of r.arguments)if(bue(e))return!0;return!1}(i))return l();if(function(e){if(2!==e.length)return!1;let[t,r]=e;return!("ModuleExpression"!==t.type||!function(e){return"ObjectExpression"===e.type&&1===e.properties.length&&dle(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&mue(e.properties[0].value)&&"module"===e.properties[0].value.value}(r))||!ule(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==r.type&&"ArrowFunctionExpression"!==r.type&&"ConditionalExpression"!==r.type&&rpe(r)&&!tpe(r)}(i)){let e,t=o.slice(1);if(t.some(xoe))return l();try{e=r(nle(n,0),{expandFirstArg:!0})}catch(e){if(e instanceof Xce)return l();throw e}return xoe(e)?[aoe,eoe([["(",Qae(e,{shouldBreak:!0}),", ",...t,")"],l()])]:eoe([["(",e,", ",...t,")"],["(",Qae(e,{shouldBreak:!0}),", ",...t,")"],l()])}if(function(e,t,r){var n,i;let s=moe(!1,e,-1);if(1===e.length){let e=moe(!1,t,-1);if(null!=(n=e.label)&&n.embed&&!1!==(null==(i=e.label)?void 0:i.hug))return!0}let a=moe(!1,e,-2);return!ule(s,ale.Leading)&&!ule(s,ale.Trailing)&&tpe(s)&&(!a||a.type!==s.type)&&(2!==e.length||"ArrowFunctionExpression"!==a.type||!pue(s))&&!(e.length>1&&Yce(s,r))}(i,o,t)){let e,t=o.slice(0,-1);if(t.some(xoe))return l();try{e=r(nle(n,-1),{expandLastArg:!0})}catch(e){if(e instanceof Xce)return l();throw e}return xoe(e)?[aoe,eoe([["(",...t,Qae(e,{shouldBreak:!0}),")"],l()])]:eoe([["(",...t,e,")"],["(",...t,Qae(e,{shouldBreak:!0}),")"],l()])}let c=["(",Gae([loe,...o]),roe(u),loe,")"];return jue(e)?c:Qae(c,{shouldBreak:o.some(xoe)||s})};function ipe(e,t,r){let n=r("property"),{node:i}=e,s=zpe(e);return i.computed?!i.property||hue(i.property)?[s,"[",n,"]"]:Qae([s,"[",Gae([loe,n]),loe,"]"]):[s,".",n]}var spe=function(e,t,r){let{parent:n}=e,i=!n||"ExpressionStatement"===n.type,s=[];function a(e){let{originalText:r}=t,n=Ole(r,Joe(e));return")"===r.charAt(n)?!1!==n&&Voe(r,n+1):cle(e,t)}function o(e){let{node:n}=e;Fue(n)&&(Aue(n.callee)||Fue(n.callee))?(s.unshift({node:n,printed:[Cle(e,[zpe(e),Xpe(e,t,r),npe(e,t,r)],t),a(n)?coe:""]}),e.call((e=>o(e)),"callee")):Aue(n)?(s.unshift({node:n,needsParens:vle(e,t),printed:Cle(e,Iue(n)?ipe(e,0,r):Gpe(e,t,r),t)}),e.call((e=>o(e)),"object")):"TSNonNullExpression"===n.type?(s.unshift({node:n,printed:Cle(e,"!",t)}),e.call((e=>o(e)),"expression")):s.unshift({node:n,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[zpe(e),Xpe(e,t,r),npe(e,t,r)]}),u.callee&&e.call((e=>o(e)),"callee");let l=[],c=[s[0]],p=1;for(;p<s.length&&("TSNonNullExpression"===s[p].node.type||Fue(s[p].node)||Iue(s[p].node)&&s[p].node.computed&&hue(s[p].node.property));++p)c.push(s[p]);if(!Fue(s[0].node))for(;p+1<s.length&&Aue(s[p].node)&&Aue(s[p+1].node);++p)c.push(s[p]);l.push(c),c=[];let d=!1;for(;p<s.length;++p){if(d&&Aue(s[p].node)){if(s[p].node.computed&&hue(s[p].node.property)){c.push(s[p]);continue}l.push(c),c=[],d=!1}(Fue(s[p].node)||"ImportExpression"===s[p].node.type)&&(d=!0),c.push(s[p]),ule(s[p].node,ale.Trailing)&&(l.push(c),c=[],d=!1)}function h(e){return/^[A-Z]|^[$_]+$/.test(e)}c.length>0&&l.push(c);let f=l.length>=2&&!ule(l[1][0].node)&&function(e){var r;let n=null==(r=e[1][0])?void 0:r.node.computed;if(1===e[0].length){let r=e[0][0].node;return"ThisExpression"===r.type||"Identifier"===r.type&&(h(r.name)||i&&function(e){return e.length<=t.tabWidth}(r.name)||n)}let s=moe(!1,e[0],-1).node;return Iue(s)&&"Identifier"===s.property.type&&(h(s.property.name)||n)}(l);function m(e){let t=e.map((e=>e.printed));return e.length>0&&moe(!1,e,-1).needsParens?["(",...t,")"]:t}let y=l.map(m),g=y,b=f?3:2,v=l.flat(),x=v.slice(1,-1).some((e=>ule(e.node,ale.Leading)))||v.slice(0,-1).some((e=>ule(e.node,ale.Trailing)))||l[b]&&ule(l[b][0].node,ale.Leading);if(l.length<=b&&!x)return jue(e)?g:Qae(g);let E,S=moe(!1,l[f?1:0],-1).node,D=!Fue(S)&&a(S),T=[m(l[0]),f?l.slice(1,2).map(m):"",D?coe:"",function(e){return 0===e.length?"":Gae(Qae([coe,hoe(coe,e.map(m))]))}(l.slice(f?2:1))],A=s.map((({node:e})=>e)).filter(Fue);return E=x||A.length>2&&A.some((e=>!e.arguments.every((e=>$ue(e)))))||y.slice(0,-1).some(xoe)||function(){let e=moe(!1,moe(!1,l,-1),-1).node,t=moe(!1,y,-1);return Fue(e)&&xoe(t)&&A.slice(0,-1).some((e=>e.arguments.some(bue)))}()?Qae(T):[xoe(g)||D?aoe:"",eoe([g,T])],foe({memberChain:!0},E)};function ape(e,t,r){var n;let{node:i,parent:s}=e,a="NewExpression"===i.type,o="ImportExpression"===i.type,u=zpe(e),l=tle(i),c=1===l.length&&Lue(l[0],t.originalText);if(c||l.length>0&&!a&&!o&&(function(e,t){if("Identifier"!==e.callee.type)return!1;if("require"===e.callee.name)return!0;if("define"===e.callee.name){let r=tle(e);return"ExpressionStatement"===t.type&&(1===r.length||2===r.length&&"ArrayExpression"===r[0].type||3===r.length&&mue(r[0])&&"ArrayExpression"===r[1].type)}return!1}(i,s)||kue(i,s))){let i=[];if(rle(e,(()=>{i.push(r())})),!c||null==(n=i[0].label)||!n.embed)return[a?"new ":"",r("callee"),u,Xpe(e,t,r),"(",hoe(", ",i),")"]}if(!o&&!a&&Aue(i.callee)&&!e.call((e=>vle(e,t)),"callee"))return spe(e,t,r);let p=[a?"new ":"",o?"import":r("callee"),u,Xpe(e,t,r),npe(e,t,r)];return o||Fue(i.callee)?Qae(p):p}var ope=function(e,t,r){let n='"'===t?"'":'"',i=xle(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};var upe=function(e,t){let r=e.slice(1,-1),n="json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":Fle(r,t.singleQuote);return ope(r,n,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))};var lpe=function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")};function cpe(e){return e.toLowerCase()}function ppe({pattern:e,flags:t}){return`/${e}/${t=[...t].sort().join("")}`}function dpe(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}var hpe=eue(["Literal","BigIntLiteral","BooleanLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]);function fpe(e,t,r,n,i,s){let a=function(e,t,r,n,i){let{node:s}=e,a=s[i];if(!a)return"only-left";let o=!mpe(a);if(e.match(mpe,ype,(e=>!o||"ExpressionStatement"!==e.type&&"VariableDeclaration"!==e.type)))return o?"ArrowFunctionExpression"===a.type&&"ArrowFunctionExpression"===a.body.type?"chain-tail-arrow-chain":"chain-tail":"chain";if(!o&&mpe(a.right)||_ue(t.originalText,a))return"break-after-operator";if("CallExpression"===a.type&&"require"===a.callee.name||"json5"===t.parser||"json"===t.parser)return"never-break-after-operator";if(function(e){if(ype(e)){let t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>{var t;return dle(e)&&(!e.shorthand||"AssignmentPattern"===(null==(t=e.value)?void 0:t.type))}))}return!1}(s)||function(e){let t=function(e){var t;if(gpe(e))return null==(t=e.typeParameters)?void 0:t.params}(e);if(woe(t)){let r="TSTypeAliasDeclaration"===e.type?"constraint":"bound";if(t.length>1&&t.some((e=>e[r]||e.default)))return!0}return!1}(s)||function(e){if("VariableDeclarator"!==e.type)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=xpe(t.typeAnnotation);return woe(r)&&r.length>1&&r.some((e=>woe(xpe(e))||"TSConditionalType"===e.type))}(s)||bpe(s)&&function(e){return boe(e,Coe,!1)}(n))return"break-lhs";let u=function(e,t,r){if(!dle(e))return!1;t=Toe(t);let n=3;return"string"==typeof t&&qoe(t)<r.tabWidth+n}(s,n,t);return e.call((()=>function(e,t,r,n){let i=e.node;if(Tue(i)&&!Jce(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{let{test:e}=i;return Tue(e)&&!Jce(e)}case"ClassExpression":return woe(i.decorators)}if(n)return!1;let s=i,a=[];for(;;)if("UnaryExpression"===s.type)s=s.argument,a.push("argument");else{if("TSNonNullExpression"!==s.type)break;s=s.expression,a.push("expression")}return!(!mue(s)&&!e.call((()=>Epe(e,t,r)),...a))}(e,t,r,u)),i)?"break-after-operator":u||"TemplateLiteral"===a.type||"TaggedTemplateExpression"===a.type||"BooleanLiteral"===a.type||hue(a)||"ClassExpression"===a.type?"never-break-after-operator":"fluid"}(e,t,r,n,s),o=s?r(s,{assignmentLayout:a}):"";switch(a){case"break-after-operator":return Qae([Qae(n),i,Qae(Gae([uoe,o]))]);case"never-break-after-operator":return Qae([Qae(n),i," ",o]);case"fluid":{let e=Symbol("assignment");return Qae([Qae(n),i,Qae(Gae(uoe),{id:e}),soe,noe(o,{groupId:e})])}case"break-lhs":return Qae([n,i," ",Qae(o)]);case"chain":return[Qae(n),i,uoe,o];case"chain-tail":return[Qae(n),i,Gae([uoe,o])];case"chain-tail-arrow-chain":return[Qae(n),i,o];case"only-left":return n}}function mpe(e){return"AssignmentExpression"===e.type}function ype(e){return mpe(e)||"VariableDeclarator"===e.type}var gpe=eue(["TSTypeAliasDeclaration","TypeAlias"]);function bpe(e){var t;return"VariableDeclarator"===e.type&&"ArrowFunctionExpression"===(null==(t=e.init)?void 0:t.type)}var vpe=eue(["TSTypeReference","GenericTypeAnnotation"]);function xpe(e){var t;if(vpe(e))return null==(t=e.typeParameters)?void 0:t.params}function Epe(e,t,r,n=!1){var i;let{node:s}=e,a=()=>Epe(e,t,r,!0);if("ChainExpression"===s.type||"TSNonNullExpression"===s.type)return e.call(a,"expression");if(Fue(s)){if(null!=(i=ape(e,t,r).label)&&i.memberChain)return!1;let n=tle(s);return!(!(0===n.length||1===n.length&&function(e,{printWidth:t}){if(ule(e))return!1;let r=t*Spe;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=r||fue(e)&&!ule(e.argument))return!0;let n="Literal"===e.type&&"regex"in e&&e.regex.pattern||"RegExpLiteral"===e.type&&e.pattern;return n?n.length<=r:mue(e)?Uue(e).length<=r:"TemplateLiteral"===e.type?0===e.expressions.length&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes("\n"):hpe(e)}(n[0],t))||function(e,t){let r=function(e){var t;return null==(t=e.typeParameters??e.typeArguments)?void 0:t.params}(e);if(woe(r)){if(r.length>1)return!0;if(1===r.length){let e=r[0];if("TSUnionType"===e.type||"UnionTypeAnnotation"===e.type||"TSIntersectionType"===e.type||"IntersectionTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"ObjectTypeAnnotation"===e.type)return!0}if(xoe(t(e.typeParameters?"typeParameters":"typeArguments")))return!0}return!1}(s,r))&&e.call(a,"callee")}return Iue(s)?e.call(a,"object"):n&&("Identifier"===s.type||"ThisExpression"===s.type)}var Spe=.25;function Dpe(e,t,r,n,i){let s=e.node,a=Zue(s),o=i?Xpe(e,r,t):"";if(0===a.length)return[o,"(",Tle(e,r,{filter:e=>")"===Ble(r.originalText,Joe(e))}),")"];let{parent:u}=e,l=kue(u),c=Tpe(s),p=[];if(function(e,t){let{node:r}=e,n=0,i=e=>t(e,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}(e,((e,n)=>{let i=n===a.length-1;i&&s.rest&&p.push("..."),p.push(t()),!i&&(p.push(","),l||c?p.push(" "):cle(a[n],r)?p.push(coe,coe):p.push(uoe))})),n&&!function(e){return e.match((e=>"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type),((e,t)=>{if("CallExpression"===e.type&&"arguments"===t&&1===e.arguments.length&&"CallExpression"===e.callee.type){let t=e.callee.callee;return"Identifier"===t.type||"MemberExpression"===t.type&&!t.computed&&"Identifier"===t.object.type&&"Identifier"===t.property.type}return!1}),((e,t)=>"VariableDeclarator"===e.type&&"init"===t||"ExportDefaultDeclaration"===e.type&&"declaration"===t||"TSExportAssignment"===e.type&&"expression"===t||"AssignmentExpression"===e.type&&"right"===t&&"MemberExpression"===e.left.type&&"Identifier"===e.left.object.type&&"module"===e.left.object.name&&"Identifier"===e.left.property.type&&"exports"===e.left.property.name),(e=>"VariableDeclaration"!==e.type||"const"===e.kind&&1===e.declarations.length))}(e)){if(xoe(o)||xoe(p))throw new Xce;return Qae([Doe(o),"(",Doe(p),")"])}let d=a.every((e=>!e.decorators));return c&&d||l?[o,"(",...p,")"]:(Due(u)||function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||Hoe(e,e.typeAnnotation))}(u)||"TypeAlias"===u.type||"UnionTypeAnnotation"===u.type||"TSUnionType"===u.type||"IntersectionTypeAnnotation"===u.type||"FunctionTypeAnnotation"===u.type&&u.returnType===s)&&1===a.length&&null===a[0].name&&s.this!==a[0]&&a[0].typeAnnotation&&null===s.typeParameters&&Pue(a[0].typeAnnotation)&&!s.rest?"always"===r.arrowParens?["(",...p,")"]:p:[o,"(",Gae([loe,...p]),roe(!Yue(s)&&zue(r,"all")?",":""),loe,")"]}function Tpe(e){if(!e)return!1;let t=Zue(e);if(1!==t.length)return!1;let[r]=t;return!ule(r)&&("ObjectPattern"===r.type||"ArrayPattern"===r.type||"Identifier"===r.type&&r.typeAnnotation&&("TypeAnnotation"===r.typeAnnotation.type||"TSTypeAnnotation"===r.typeAnnotation.type)&&gue(r.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===r.type&&gue(r.typeAnnotation)&&r!==e.rest||"AssignmentPattern"===r.type&&("ObjectPattern"===r.left.type||"ArrayPattern"===r.left.type)&&("Identifier"===r.right.type||due(r.right)&&0===r.right.properties.length||pue(r.right)&&0===r.right.elements.length))}function Ape(e,t){var r;let n=function(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}(e);if(!n)return!1;let i=null==(r=e.typeParameters)?void 0:r.params;if(i){if(i.length>1)return!1;if(1===i.length){let e=i[0];if(e.constraint||e.default)return!1}}return 1===Zue(e).length&&(gue(n)||xoe(t))}function Cpe(e){if(Pue(e)||gue(e))return!0;if("UnionTypeAnnotation"===e.type||"TSUnionType"===e.type){let t=e.types.filter((e=>"VoidTypeAnnotation"===e.type||"TSVoidKeyword"===e.type||"NullLiteralTypeAnnotation"===e.type||"TSNullKeyword"===e.type)).length,r=e.types.some((e=>"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)),n=e.types.some((e=>ule(e)));if(e.types.length-1===t&&r&&!n)return!0}return!1}function Ppe(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Wpe(e)];return s.push("type ",r("id"),r("typeParameters")),[fpe(e,t,r,s," =","TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right"),n]}function wpe(e,t,r){let n=!1;return Qae(e.map((({isFirst:e,previous:t,node:i,index:s})=>{let a=r();if(e)return a;let o=gue(i),u=gue(t);return u&&o?[" & ",n?Gae(a):a]:u||o?(s>1&&(n=!0),[" & ",s>1?Gae(a):a]):Gae([" &",uoe,a])}),"types"))}function kpe(e,t,r){let{node:n}=e,{parent:i}=e,s=!("TypeParameterInstantiation"===i.type||"TSTypeParameterInstantiation"===i.type||"GenericTypeAnnotation"===i.type||"TSTypeReference"===i.type||"TSTypeAssertion"===i.type||"TupleTypeAnnotation"===i.type||"TSTupleType"===i.type||"FunctionTypeParam"===i.type&&!i.name&&e.grandparent.this!==i||("TypeAlias"===i.type||"VariableDeclarator"===i.type||"TSTypeAliasDeclaration"===i.type)&&_ue(t.originalText,n)),a=Cpe(n),o=e.map((e=>{let n=r();return a||(n=Yae(2,n)),Cle(e,n,t)}),"types");if(a)return hoe(" | ",o);let u=[roe([s&&!_ue(t.originalText,n)?uoe:"","| "]),hoe([uoe,"| "],o)];return vle(e,t)?Qae([Gae(u),loe]):("TupleTypeAnnotation"===i.type||"TSTupleType"===i.type)&&i["TupleTypeAnnotation"===i.type&&i.types?"types":"elementTypes"].length>1?Qae([Gae([roe(["(",loe]),u]),loe,roe(")")]):Qae(s?Gae(u):u)}function Fpe(e,t,r){let{node:n}=e,i=[Hpe(e)];("TSConstructorType"===n.type||"TSConstructSignatureDeclaration"===n.type)&&i.push("new ");let s=Dpe(e,r,t,!1,!0),a=[];return"FunctionTypeAnnotation"===n.type?a.push(function(e){var t;let{node:r,parent:n}=e;return"FunctionTypeAnnotation"===r.type&&(Due(n)||!(("ObjectTypeProperty"===n.type||"ObjectTypeInternalSlot"===n.type)&&!n.variance&&!n.optional&&Hoe(n,r)||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===(null==(t=e.getParentNode(2))?void 0:t.type)))}(e)?" => ":": ",r("returnType")):a.push(Mpe(e,r,n.returnType?"returnType":"typeAnnotation")),Ape(n,a)&&(s=Qae(s)),i.push(s,a),Qae(i)}function Ipe(e,t,r){return[r("objectType"),zpe(e),"[",r("indexType"),"]"]}function _pe(e,t,r){return["infer ",r("typeParameter")]}function Npe(e,t,r){let{node:n}=e;return[n.postfix?"":r,Mpe(e,t),n.postfix?r:""]}function Ope(e,t,r){let{node:n}=e;return["...",..."TupleTypeSpreadElement"===n.type&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function Bpe(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var Lpe=new WeakSet;function Mpe(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if("TSTypeAnnotation"===n.type||"TypeAnnotation"===n.type){let t=e.call(jpe,r);("=>"===t||":"===t&&ule(n,ale.Leading))&&(i=!0),Lpe.add(n)}return i?[" ",t(r)]:t(r)}var jpe=e=>e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>!("returnType"!==t&&"typeAnnotation"!==t||"TSFunctionType"!==e.type&&"TSConstructorType"!==e.type)))?"=>":e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&("TSJSDocNullableType"===e.type||"TSJSDocNonNullableType"===e.type||"TSTypePredicate"===e.type)))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&"Identifier"===e.type),((e,t)=>"id"===t&&"DeclareFunction"===e.type))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"bound"===t&&"TypeParameter"===e.type&&e.usesExtendsBound))?"":":";function Rpe(e,t,r){let n=jpe(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function $pe(e){return[e("elementType"),"[]"]}function Upe({node:e},t){return["typeof ",..."TSTypeQuery"===e.type?[t("exprName"),t("typeParameters")]:[t("argument")]]}function Vpe(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",Mpe(e,t)]:""]}function zpe(e){let{node:t}=e;return!t.optional||"Identifier"===t.type&&t===e.parent.key?"":Fue(t)||Iue(t)&&t.computed||"OptionalIndexedAccessType"===t.type?"?.":"?"}function Kpe(e){return e.node.definite||e.match(void 0,((e,t)=>"id"===t&&"VariableDeclarator"===e.type&&e.definite))?"!":""}var qpe=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Wpe(e){let{node:t}=e;return t.declare||qpe.has(t.type)&&"DeclareExportDeclaration"!==e.parent.type?"declare ":""}var Jpe=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Hpe({node:e}){return e.abstract||Jpe.has(e.type)?"abstract ":""}function Xpe(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function Gpe(e,t,r){return["::",r("callee")]}function Ype(e,t,r){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||r?[" ",t]:Gae([uoe,t])}function Qpe(e,t){return["...",t("argument"),Mpe(e,t)]}function Zpe(e){return e.accessibility?e.accessibility+" ":""}function ede(e,t,r){let{node:n}=e;return Qae([hoe(uoe,e.map(r,"decorators")),rde(n,t)?coe:uoe])}function tde(e,t,r){return nde(e.node)?[hoe(coe,e.map(r,"declaration","decorators")),coe]:""}function rde(e,t){return e.decorators.some((e=>Roe(t.originalText,Joe(e))))}function nde(e){var t;if("ExportDefaultDeclaration"!==e.type&&"ExportNamedDeclaration"!==e.type&&"DeclareExportDeclaration"!==e.type)return!1;let r=null==(t=e.declaration)?void 0:t.decorators;return woe(r)&&Hoe(e,r[0])}var ide=e=>"ExportDefaultDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&e.default;function sde(e,t,r){let{node:n}=e,i=[tde(e,0,r),Wpe(e),"export",ide(n)?" default":""],{declaration:s,exported:a}=n;return ule(n,ale.Dangling)&&(i.push(" ",Tle(e,t)),Mue(n)&&i.push(coe)),s?i.push(" ",r("declaration")):(i.push(function(e){return ode(e.exportKind)}(n)),"ExportAllDeclaration"===n.type||"DeclareExportAllDeclaration"===n.type?(i.push(" *"),a&&i.push(" as ",r("exported"))):i.push(cde(e,t,r)),i.push(lde(e,t,r),dde(e,t,r))),i.push(function(e,t){return t.semi&&(!e.declaration||ide(e)&&!ade(e.declaration))?";":""}(n,t)),i}var ade=eue(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function ode(e,t=!0){return e&&"value"!==e?`${t?" ":""}${e}${t?"":" "}`:""}function ude(e,t){return ode(e.importKind,t)}function lde(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return pde(n,t)||i.push(" from"),i.push(" ",r("source")),i}function cde(e,t,r){let{node:n}=e;if(pde(n,t))return"";let i=[" "];if(woe(n.specifiers)){let s=[],a=[];e.each((()=>{let t=e.node.type;if("ExportNamespaceSpecifier"===t||"ExportDefaultSpecifier"===t||"ImportNamespaceSpecifier"===t||"ImportDefaultSpecifier"===t)s.push(r());else{if("ExportSpecifier"!==t&&"ImportSpecifier"!==t)throw new wle(n,"specifier");a.push(r())}}),"specifiers"),i.push(hoe(", ",s)),a.length>0&&(s.length>0&&i.push(", "),a.length>1||s.length>0||n.specifiers.some((e=>ule(e)))?i.push(Qae(["{",Gae([t.bracketSpacing?uoe:loe,hoe([",",uoe],a)]),roe(zue(t)?",":""),t.bracketSpacing?uoe:loe,"}"])):i.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function pde(e,t){let{type:r,importKind:n,source:i,specifiers:s}=e;return"ImportDeclaration"===r&&!woe(s)&&"type"!==n&&!/{\s*}/.test(t.originalText.slice(Woe(e),Woe(i)))}function dde(e,t,r){var n;let{node:i}=e,s=woe(i.attributes)?"attributes":woe(i.assertions)?"assertions":void 0;return s?[` ${"assertions"===s||null!=(n=i.extra)&&n.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",hoe(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function hde(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),a=s?"imported":"local",o=s?"local":"exported",u=n[a],l=n[o],c="",p="";return"ExportNamespaceSpecifier"===i||"ImportNamespaceSpecifier"===i?c="*":u&&(c=r(a)),l&&!function(e){if("ImportSpecifier"!==e.type&&"ExportSpecifier"!==e.type)return!1;let{local:t,["ImportSpecifier"===e.type?"imported":"exported"]:r}=e;if(t.type!==r.type||!Xoe(t,r))return!1;if(mue(t))return t.value===r.value&&Uue(t)===Uue(r);if("Identifier"===t.type)return t.name===r.name;return!1}(n)&&(p=r(o)),[ode("ImportSpecifier"===i?n.importKind:n.exportKind,!1),c,c&&p?" as ":"",p]}function fde(e,t,r){let{node:n}=e,i="ConditionalExpression"===n.type,s=i?"alternate":"falseType",{parent:a}=e,o=i?r("test"):[r("checkType")," ","extends"," ",r("extendsType")];return a.type===n.type&&a[s]===n?Yae(2,o):o}var mde=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function yde(e,t,r){let n,i,{node:s}=e,a="ConditionalExpression"===s.type,o=a?"consequent":"trueType",u=a?"alternate":"falseType",l=a?["test"]:["checkType","extendsType"],c=s[o],p=s[u],d=[],h=!1,{parent:f}=e,m=f.type===s.type&&l.some((e=>f[e]===s)),y=f.type===s.type&&!m,g=0;do{i=n||s,n=e.getParentNode(g),g++}while(n&&n.type===s.type&&l.every((e=>n[e]!==i)));let b=n||f,v=i;if(a&&(xue(s[l[0]])||xue(c)||xue(p)||function(e){let t=[e];for(let e=0;e<t.length;e++){let r=t[e];for(let e of["test","consequent","alternate"]){let n=r[e];if(xue(n))return!0;"ConditionalExpression"===n.type&&t.push(n)}}return!1}(v))){h=!0,y=!0;let e=e=>[roe("("),Gae([loe,e]),loe,roe(")")],t=e=>"NullLiteral"===e.type||"Literal"===e.type&&null===e.value||"Identifier"===e.type&&"undefined"===e.name;d.push(" ? ",t(c)?r(o):e(r(o))," : ",p.type===s.type||t(p)?r(u):e(r(u)))}else{let e=[uoe,"? ",c.type===s.type?roe("","("):"",Yae(2,r(o)),c.type===s.type?roe("",")"):"",uoe,": ",p.type===s.type?r(u):Yae(2,r(u))];d.push(f.type!==s.type||f[u]===s||m?e:t.useTabs?function(e){return Yae(-1,e)}(Gae(e)):Yae(Math.max(0,t.tabWidth-2),e))}let x=[o,u,...l].some((e=>ule(s[e],(e=>tue(e)&&Lle(t.originalText,Woe(e),Joe(e)))))),E=!h&&(Iue(f)||"NGPipeExpression"===f.type&&f.left===s)&&!f.computed,S=function(e){let{node:t}=e;if("ConditionalExpression"!==t.type)return!1;let r,n=t;for(let t=0;!r;t++){let i=e.getParentNode(t);"ChainExpression"===i.type&&i.expression===n||Fue(i)&&i.callee===n||Iue(i)&&i.object===n||"TSNonNullExpression"===i.type&&i.expression===n?n=i:"NewExpression"===i.type&&i.callee===n||fle(i)&&i.expression===n?(r=e.getParentNode(t+1),n=i):r=i}return n!==t&&r[mde.get(r.type)]===n}(e),D=(e=>f===b?Qae(e,{shouldBreak:x}):x?[e,aoe]:e)([fde(e,0,r),y?d:Gae(d),a&&E&&!S?loe:""]);return m||S?Qae([Gae([loe,D]),loe]):D}var gde=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n};var bde=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:gde(e.slice(r+1).match(/^[\t ]*/)[0],t)};var vde=Symbol("MODE_BREAK"),xde=Symbol("MODE_FLAT"),Ede=Symbol("cursor");function Sde(e,t){return Tde(e,{type:"indent"},t)}function Dde(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?Tde(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:Tde(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function Tde(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function Ade(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==Ede)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(Ede);return t}function Cde(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(Kae(l)){case wae:u.push(l),r-=qoe(l);break;case kae:case Bae:{let t=yoe(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case Iae:case _ae:case Mae:case Uae:o.push({mode:e,doc:l.contents});break;case Nae:r+=Ade(u);break;case Oae:{if(s&&l.break)return!1;let t=l.break?vde:e,r=l.expandedStates&&t===vde?moe(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case Lae:{let t=(l.groupId?i[l.groupId]||xde:e)===vde?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case $ae:if(e===vde||l.hard)return!0;l.soft||(u.push(" "),r--);break;case jae:n=!0;break;case Rae:if(n)return!1}}return!1}function Pde(e,t){let r={},n=t.printWidth,i=function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:vde,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];Hae(e,(function(e){if(e.type===Vae&&Eoe(r),e.type===Oae){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===Oae&&r.pop().break&&Eoe(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(Kae(d)){case wae:{let e="\n"!==i?xle(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=qoe(e));break}case kae:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case Fae:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(Ede),c++;break;case Iae:a.push({ind:Sde(e,t),mode:p,doc:d.contents});break;case _ae:a.push({ind:Dde(e,d.n,t),mode:p,doc:d.contents});break;case Nae:s-=Ade(o);break;case Oae:switch(p){case xde:if(!u){a.push({ind:e,mode:d.break?vde:xde,doc:d.contents});break}case vde:{u=!1;let t={ind:e,mode:xde,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&Cde(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=moe(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:vde,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:vde,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:xde,doc:t};if(Cde(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:vde,doc:d.contents});break}}d.id&&(r[d.id]=moe(!1,a,-1).mode);break;case Bae:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:xde,doc:o},h={ind:e,mode:vde,doc:o},f=Cde(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:xde,doc:u},y={ind:e,mode:vde,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:toe(i)},b=i[0];Cde({ind:e,mode:xde,doc:[o,u,b]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case Lae:case Mae:{let t=d.groupId?r[d.groupId]:p;if(t===vde){let t=d.type===Lae?d.breakContents:d.negate?d.contents:Gae(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===xde){let t=d.type===Lae?d.flatContents:d.negate?Gae(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case jae:l.push({ind:e,mode:p,doc:d.contents});break;case Rae:l.length>0&&a.push({ind:e,mode:p,doc:ooe});break;case $ae:switch(p){case xde:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case vde:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=Ade(o),o.push(i+e.value),s=e.length)}break;case Uae:a.push({ind:e,mode:p,doc:d.contents});break;case Vae:break;default:throw new Wae(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(Ede);if(-1!==p){let e=o.indexOf(Ede,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function wde(e,t,r){let{node:n}=e;if("TemplateLiteral"===n.type&&function({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&r.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&r.test(t.tag.object.object.name))}(e)){let n=function(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some((e=>e.length>0))){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let a=[],o=s.map((e=>"${"+Pde(e,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}")),u=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<n.quasis.length;e++){let t=moe(!1,u,-1),r=o[e-1];t.cells.push(r),r.includes("\n")&&(t.hasLineBreak=!0),n.quasis[e].value.raw.includes("\n")&&u.push({hasLineBreak:!1,cells:[]})}let l=Math.max(i.length,...u.map((e=>e.cells.length))),c=Array.from({length:l}).fill(0),p=[{cells:i},...u.filter((e=>e.cells.length>0))];for(let{cells:e}of p.filter((e=>!e.hasLineBreak)))for(let[t,r]of e.entries())c[t]=Math.max(c[t],qoe(r));return a.push(soe,"`",Gae([coe,hoe(coe,p.map((e=>hoe(" | ",e.cells.map(((t,r)=>e.hasLineBreak?t:t+" ".repeat(c[r]-qoe(t))))))))]),coe,"`"),a}}(e,r,t);if(n)return n}let i="expressions";"TSTemplateLiteralType"===n.type&&(i="types");let s=[],a=e.map(t,i),o=function(e){let t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");let r=e[t];return 0!==r.length&&r.every((e=>{if(ule(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("ChainExpression"===e.type&&(e=e.expression),Iue(e)){let t=e;for(;Iue(t);)if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type||(t=t.object,ule(t)))return!1;return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))}(n);o&&(a=a.map((e=>Pde(e,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted))),s.push(soe,"`");let u=0;return e.each((({index:e,node:l})=>{if(s.push(t()),l.tail)return;let{tabWidth:c}=r,p=l.value.raw,d=p.includes("\n")?bde(p,c):u;u=d;let h=a[e];if(!o){let t=n[i][e];(ule(t)||Iue(t)||"ConditionalExpression"===t.type||"SequenceExpression"===t.type||fle(t)||Tue(t))&&(h=[Gae([loe,h]),loe])}let f=0===d&&p.endsWith("\n")?Yae(Number.NEGATIVE_INFINITY,h):function(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=Gae(n);n=Yae(t%r,n),n=Yae(Number.NEGATIVE_INFINITY,n)}return n}(h,d,c);s.push(Qae(["${",f,soe,"}"]))}),"quasis"),s.push("`"),s}function kde(e,t){return e.map((e=>function(e,t){let{node:r}=e,n=t();return ule(r)&&(n=Qae([Gae([loe,n]),loe])),["${",n,soe,"}"]}(e,t)),"expressions")}function Fde(e,t){return goe(e,(e=>"string"==typeof e?t?xle(!1,e,/(\\*)`/g,"$1$1\\`"):Ide(e):e))}function Ide(e){return xle(!1,e,/([\\`]|\${)/g,"\\$1")}var _de=function(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}};function Nde(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function Ode(e,t){return"+"===e||"-"===e?e+t:t}var Bde=_de("typeParameters");function Lde(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=e.getNode(2),a=s&&kue(s),o=e.match((e=>!(1===e[n].length&&gue(e[n][0]))),void 0,((e,t)=>"typeAnnotation"===t),(e=>"Identifier"===e.type),bpe);if(0===i[n].length||!o&&(a||1===i[n].length&&("NullableTypeAnnotation"===i[n][0].type||Cpe(i[n][0]))))return["<",hoe(", ",e.map(r,n)),Mde(e,t),">"];let u="TSTypeParameterInstantiation"===i.type?"":function(e,t,r){let{node:n}=e;return 1===Zue(n).length&&n.type.startsWith("TS")&&!n[r][0].constraint&&"ArrowFunctionExpression"===e.parent.type&&!(t.filepath&&/\.ts$/.test(t.filepath))}(e,t,n)?",":zue(t)?roe(","):"";return Qae(["<",Gae([loe,hoe([",",uoe],e.map(r,n))]),u,loe,">"],{id:Bde(i)})}function Mde(e,t){let{node:r}=e;if(!ule(r,ale.Dangling))return"";let n=!ule(r,ale.Line),i=Tle(e,t,{indent:!n});return n?i:[i,coe]}function jde(e,t,r){let{node:n,parent:i}=e,s=["TSTypeParameter"===n.type&&n.const?"const ":""],a="TSTypeParameter"===n.type?r("name"):n.name;if("TSMappedType"===i.type)return i.readonly&&s.push(Ode(i.readonly,"readonly")," "),s.push("[",a),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent((()=>r("nameType")))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(a),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(Mpe(e,r,"bound"))),n.constraint){let e=Symbol("constraint");s.push(" extends",Qae(Gae(uoe),{id:e}),soe,noe(r("constraint"),{groupId:e}))}return n.default&&s.push(" = ",r("default")),Qae(s)}var Rde=()=>{};Rde.ok=Rde,Rde.strictEqual=Rde;var $de=Rde,Ude=new WeakMap;function Vde(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if("consistent"===t.quoteProps&&!Ude.has(i)){let e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&mue(e.key)&&!Nue(e,t)));Ude.set(i,e)}if(("Identifier"===s.type||hue(s)&&Oue(lpe(Uue(s)))&&String(s.value)===lpe(Uue(s))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&Ude.get(i))){let r=upe(JSON.stringify("Identifier"===s.type?s.name:s.value.toString()),t);return e.call((e=>Cle(e,r,t)),"key")}return Nue(n,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!Ude.get(i))?e.call((e=>Cle(e,/^\d/.test(s.value)?lpe(s.value):s.value,t)),"key"):r("key")}var zde=e=>"FunctionExpression"===e.node.type&&"value"===e.key&&(e=>"ObjectMethod"===e.type||"ClassMethod"===e.type||"ClassPrivateMethod"===e.type||"MethodDefinition"===e.type||"TSAbstractMethodDefinition"===e.type||"TSDeclareMethod"===e.type||("Property"===e.type||"ObjectProperty"===e.type)&&(e.method||"get"===e.kind||"set"===e.kind))(e.parent);function Kde(e,t,r,n){if(zde(e))return Wde(e,r,t);let{node:i}=e,s=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&null!=n&&n.expandLastArg){let{parent:t}=e;Fue(t)&&(tle(t).length>1||Zue(i).every((e=>"Identifier"===e.type&&!e.typeAnnotation)))&&(s=!0)}let a=[Wpe(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],o=Dpe(e,t,r,s),u=Hde(e,t),l=Ape(i,u);return a.push(Xpe(e,0,t),Qae([l?Qae(o):o,u]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&a.push(";"),a}function qde(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,a=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?($de.ok("get"===i||"set"===i),a.push(i," ")):s.async&&a.push("async "),s.generator&&a.push("*"),a.push(Vde(e,t,r),n.optional||n.key.optional?"?":"",n===s?Wde(e,t,r):r("value")),a}function Wde(e,t,r){let{node:n}=e,i=Dpe(e,r,t),s=Hde(e,r),a=function(e){let t=Zue(e);return t.length>1&&t.some((e=>"TSParameterProperty"===e.type))}(n),o=Ape(n,s),u=[Xpe(e,0,r),Qae([a?Qae(i,{shouldBreak:!0}):o?Qae(i):i,s])];return n.body?u.push(" ",r("body")):u.push(t.semi?";":""),u}function Jde(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){let{node:t}=e;return function(e){let t=Zue(e);return!(1!==t.length||e.typeParameters||ule(e,ale.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||ule(t[0])||t[0].optional||e.predicate||e.returnType)}(t)}return!1}function Hde(e,t){let{node:r}=e,n=[Mpe(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Xde(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let e=r("argument");!function(e,t){if(_ue(e.originalText,t))return!0;if(aue(t)){let r,n=t;for(;r=oue(n);)if(n=r,_ue(e.originalText,n))return!0}return!1}(t,n.argument)?(Tue(n.argument)||"SequenceExpression"===n.argument.type)&&(e=Qae([roe("("),Gae([loe,e]),loe,roe(")")])):e=["(",Gae([coe,e]),coe,")"],s.push(" ",e)}let a=ule(n,ale.Dangling),o=i&&a&&ule(n,ale.Last|ale.Line);return o&&s.push(i),a&&s.push(" ",Tle(e,t)),o||s.push(i),s}var Gde=eue(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Yde(e,t,r){let{node:n}=e,i=[Wpe(e),Hpe(e),"class"],s=ule(n.id,ale.Trailing)||ule(n.typeParameters,ale.Trailing)||ule(n.superClass)||woe(n.extends)||woe(n.mixins)||woe(n.implements),a=[],o=[];if(n.id&&a.push(" ",r("id")),a.push(r("typeParameters")),n.superClass){let n=[rhe(e,t,r),r("superTypeParameters")],i=e.call((e=>["extends ",Cle(e,n,t)]),"superClass");s?o.push(uoe,Qae(i)):o.push(" ",i)}else o.push(the(e,t,r,"extends"));if(o.push(the(e,t,r,"mixins"),the(e,t,r,"implements")),s){let e;e=ehe(n)?[...a,Gae(o)]:Gae([...a,o]),i.push(Qae(e,{id:Qde(n)}))}else i.push(...a,...o);return i.push(" ",r("body")),i}var Qde=_de("heritageGroup");function Zde(e){return roe(coe,"",{groupId:Qde(e)})}function ehe(e){return e.typeParameters&&!ule(e.typeParameters,ale.Trailing|ale.Line)&&!function(e){return["extends","mixins","implements"].reduce(((t,r)=>t+(Array.isArray(e[r])?e[r].length:0)),e.superClass?1:0)>1}(e)}function the(e,t,r,n){let{node:i}=e;if(!woe(i[n]))return"";let s=Tle(e,t,{marker:n});return[ehe(i)?roe(" ",uoe,{groupId:Bde(i.typeParameters)}):uoe,s,s&&coe,n,Qae(Gae([uoe,hoe([",",uoe],e.map(r,n))]))]}function rhe(e,t,r){let n=r("superClass"),{parent:i}=e;return"AssignmentExpression"===i.type?Qae(roe(["(",Gae([loe,n]),loe,")"],n)):n}function nhe(e,t,r){let{node:n}=e,i=[];return woe(n.decorators)&&i.push(ede(e,t,r)),i.push(Zpe(n)),n.static&&i.push("static "),i.push(Hpe(e)),n.override&&i.push("override "),i.push(qde(e,t,r)),i}function ihe(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";return woe(n.decorators)&&i.push(ede(e,t,r)),i.push(Zpe(n),Wpe(e)),n.static&&i.push("static "),i.push(Hpe(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),("ClassAccessorProperty"===n.type||"AccessorProperty"===n.type||"TSAbstractAccessorProperty"===n.type)&&i.push("accessor "),i.push(Vde(e,t,r),zpe(e),Kpe(e),Mpe(e,r)),[fpe(e,t,r,i," =","TSAbstractPropertyDefinition"===n.type||"TSAbstractAccessorProperty"===n.type?void 0:"value"),s]}function she(e,t,r){let{node:n}=e,i=[];return e.each((({node:e,next:n,isLast:s})=>{i.push(r()),!t.semi&&Gde(e)&&function(e,t){var r;let{type:n,name:i}=e.key;if(!(e.computed||"Identifier"!==n||"static"!==i&&"get"!==i&&"set"!==i||e.value||e.typeAnnotation))return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let e=null==(r=t.key)?void 0:r.name;if("in"===e||"instanceof"===e)return!0}if(Gde(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||"get"===t.kind||"set"===t.kind)return!1;let e=t.value?t.value.generator:t.generator;return!(!t.computed&&!e)}case"TSIndexSignature":return!0}return!1}(e,n)&&i.push(";"),s||(i.push(coe),cle(e,t)&&i.push(coe))}),"body"),ule(n,ale.Dangling)&&i.push(Tle(e,t)),[woe(n.body)?Zde(e.parent):"","{",i.length>0?[Gae([coe,i]),coe]:"","}"]}function ahe(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,a="ObjectTypeAnnotation"===s.type,o="TSEnumDeclaration"===s.type||"EnumBooleanBody"===s.type||"EnumNumberBody"===s.type||"EnumStringBody"===s.type||"EnumSymbolBody"===s.type,u=["TSTypeLiteral"===s.type||o?"members":"TSInterfaceBody"===s.type?"body":"properties"];a&&u.push("indexers","callProperties","internalSlots");let l=u.flatMap((t=>e.map((({node:e})=>({node:e,printed:r(),loc:Woe(e)})),t)));u.length>1&&l.sort(((e,t)=>e.loc-t.loc));let{parent:c,key:p}=e,d=a&&"body"===p&&("InterfaceDeclaration"===c.type||"DeclareInterface"===c.type||"DeclareClass"===c.type),h="TSInterfaceBody"===s.type||o||d||"ObjectPattern"===s.type&&"FunctionDeclaration"!==c.type&&"FunctionExpression"!==c.type&&"ArrowFunctionExpression"!==c.type&&"ObjectMethod"!==c.type&&"ClassMethod"!==c.type&&"ClassPrivateMethod"!==c.type&&"AssignmentPattern"!==c.type&&"CatchClause"!==c.type&&s.properties.some((e=>e.value&&("ObjectPattern"===e.value.type||"ArrayPattern"===e.value.type)))||"ObjectPattern"!==s.type&&l.length>0&&Lle(t.originalText,Woe(s),l[0].loc),f=d?";":"TSInterfaceBody"===s.type||"TSTypeLiteral"===s.type?roe(i,";"):",",m="RecordExpression"===s.type?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",g=[],b=l.map((e=>{let r=[...g,Qae(e.printed)];return g=[f,uoe],("TSPropertySignature"===e.node.type||"TSMethodSignature"===e.node.type||"TSConstructSignatureDeclaration"===e.node.type||"TSCallSignatureDeclaration"===e.node.type)&&ule(e.node,ale.PrettierIgnore)&&g.shift(),cle(e.node,t)&&g.push(coe),r}));if(s.inexact||s.hasUnknownMembers){let r;if(ule(s,ale.Dangling)){let n=ule(s,ale.Line);r=[Tle(e,t),n||Roe(t.originalText,Joe(moe(!1,lle(s),-1)))?coe:uoe,"..."]}else r=["..."];b.push([...g,...r])}let v,x=null==(n=moe(!1,l,-1))?void 0:n.node,E=!(s.inexact||s.hasUnknownMembers||x&&("RestElement"===x.type||("TSPropertySignature"===x.type||"TSCallSignatureDeclaration"===x.type||"TSMethodSignature"===x.type||"TSConstructSignatureDeclaration"===x.type)&&ule(x,ale.PrettierIgnore)));if(0===b.length){if(!ule(s,ale.Dangling))return[m,y,Mpe(e,r)];v=Qae([m,Tle(e,t,{indent:!0}),loe,y,zpe(e),Mpe(e,r)])}else v=[d&&woe(s.properties)?Zde(c):"",m,Gae([t.bracketSpacing?uoe:loe,...b]),roe(E&&(","!==f||zue(t))?f:""),t.bracketSpacing?uoe:loe,y,zpe(e),Mpe(e,r)];return e.match((e=>"ObjectPattern"===e.type&&!e.decorators),ohe)||gue(s)&&(e.match(void 0,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),ohe)||e.match(void 0,((e,t)=>"FunctionTypeParam"===e.type&&"typeAnnotation"===t),ohe))||!h&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?v:Qae(v,{shouldBreak:h})}function ohe(e,t){return("params"===t||"parameters"===t||"this"===t||"rest"===t)&&Tpe(e)}var uhe=new WeakMap;function lhe(e){return uhe.has(e)||uhe.set(e,"ConditionalExpression"===e.type&&!Kue(e,(e=>"ObjectExpression"===e.type))),uhe.get(e)}var che=e=>"SequenceExpression"===e.type;function phe(e,t,r,n={}){let i,s,a=[],o=[],u=!1,l=!n.expandLastArg&&"ArrowFunctionExpression"===e.node.body.type;!function c(){let{node:p}=e,d=function(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),Jde(e,t))s.push(r(["params",0]));else{let i=n.expandLastArg||n.expandFirstArg,a=Hde(e,r);if(i){if(xoe(a))throw new Xce;a=Qae(Doe(a))}s.push(Qae([Dpe(e,r,t,i,!0),a]))}let a=Tle(e,t,{filter(e){let r=Ole(t.originalText,Joe(e));return!1!==r&&"=>"===t.originalText.slice(r,r+2)}});return a&&s.push(" ",a),s}(e,t,r,n);if(0===a.length)a.push(d);else{let{leading:r,trailing:n}=Ale(e,t);a.push([r,d]),o.unshift(n)}l&&(u||(u=p.returnType&&Zue(p).length>0||p.typeParameters||Zue(p).some((e=>"Identifier"!==e.type)))),l&&"ArrowFunctionExpression"===p.body.type?e.call(c,"body"):(i=r("body",n),s=p.body)}();let c,p=!_ue(t.originalText,s)&&(che(s)||function(e,t,r){var n,i;return pue(e)||due(e)||"ArrowFunctionExpression"===e.type||"DoExpression"===e.type||"BlockStatement"===e.type||xue(e)||!1!==(null==(n=t.label)?void 0:n.hug)&&((null==(i=t.label)?void 0:i.embed)||Lue(e,r.originalText))}(s,i,t)||!u&&lhe(s)),d="callee"===e.key&&ple(e.parent),h=Symbol("arrow-chain"),f=function(e,t,{signatureDocs:r,shouldBreak:n}){if(1===r.length)return r[0];let{parent:i,key:s}=e;return"callee"!==s&&ple(i)||Tue(i)?Qae([r[0]," =>",Gae([uoe,hoe([" =>",uoe],r.slice(1))])],{shouldBreak:n}):"callee"===s&&ple(i)||t.assignmentLayout?Qae(hoe([" =>",uoe],r),{shouldBreak:n}):Qae(Gae(hoe([" =>",uoe],r)),{shouldBreak:n})}(e,n,{signatureDocs:a,shouldBreak:u}),m=!1;return l&&(d||n.assignmentLayout)&&(m=!0,c="chain-tail-arrow-chain"===n.assignmentLayout||d&&!p),i=function(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:a}){let{node:o,parent:u}=e,l=r.expandLastArg&&zue(t,"all")?roe(","):"",c=!r.expandLastArg&&"JSXExpressionContainer"!==u.type||ule(o)?"":loe;return a&&lhe(s)?[" ",Qae([roe("","("),Gae([loe,n]),roe("",")"),l,c]),i]:(che(s)&&(n=Qae(["(",Gae([loe,n]),loe,")"])),a?[" ",n,i]:[Gae([uoe,n,i]),l,c])}(e,t,n,{bodyDoc:i,bodyComments:o,functionBody:s,shouldPutBodyOnSameLine:p}),Qae([Qae(m?Gae([loe,f]):f,{shouldBreak:c,id:h})," =>",l?noe(i,{groupId:h}):Qae(i),l&&d?roe(loe,"",{groupId:h}):""])}function dhe(e,t,r,n){let{node:i}=e,s=[],a=function(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if("EmptyStatement"!==r.type)return r}}(i[n]);return e.each((({node:e})=>{"EmptyStatement"!==e.type&&(s.push(r()),e!==a&&(s.push(coe),cle(e,t)&&s.push(coe)))}),n),s}function hhe(e,t,r){let{node:n}=e,i=[];"StaticBlock"===n.type&&i.push("static "),i.push("{");let s=fhe(e,t,r);if(s)i.push(Gae([coe,s]),coe);else{let{parent:t}=e,r=e.grandparent;"ArrowFunctionExpression"===t.type||"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ObjectMethod"===t.type||"ClassMethod"===t.type||"ClassPrivateMethod"===t.type||"ForStatement"===t.type||"WhileStatement"===t.type||"DoWhileStatement"===t.type||"DoExpression"===t.type||"CatchClause"===t.type&&!r.finalizer||"TSModuleDeclaration"===t.type||"TSDeclareFunction"===t.type||"StaticBlock"===n.type||i.push(coe)}return i.push("}"),i}function fhe(e,t,r){var n;let{node:i}=e,s=woe(i.directives),a=i.body.some((e=>"EmptyStatement"!==e.type)),o=ule(i,ale.Dangling);if(!s&&!a&&!o)return"";let u=[];return s&&(u.push(dhe(e,t,r,"directives")),(a||o)&&(u.push(coe),cle(moe(!1,i.directives,-1),t)&&u.push(coe))),a&&u.push(dhe(e,t,r,"body")),o&&u.push(Tle(e,t)),"Program"===i.type&&"ModuleExpression"!==(null==(n=e.parent)?void 0:n.type)&&u.push(coe),u}function mhe(e,t){if(t.semi||ghe(e,t)||vhe(e,t))return!1;let{node:r,key:n,parent:i}=e;return!("ExpressionStatement"!==r.type||("body"!==n||"Program"!==i.type&&"BlockStatement"!==i.type&&"StaticBlock"!==i.type&&"TSModuleBlock"!==i.type)&&("consequent"!==n||"SwitchCase"!==i.type)||!e.call((()=>yhe(e,t)),"expression"))}function yhe(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!Jde(e,t))return!0;break;case"UnaryExpression":{let{prefix:e,operator:t}=r;if(e&&("+"===t||"-"===t))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(xue(r))return!0}return!!vle(e,t)||!!aue(r)&&e.call((()=>yhe(e,t)),...uue(r))}function ghe({node:e,parent:t},r){return("markdown"===r.parentParser||"mdx"===r.parentParser)&&"ExpressionStatement"===e.type&&xue(e.expression)&&"Program"===t.type&&1===t.body.length}function bhe(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return bhe(e.object)}return!1;case"Identifier":return!0;default:return!1}}function vhe({node:e,parent:t},r){return("__vue_event_binding"===r.parser||"__vue_ts_event_binding"===r.parser)&&"ExpressionStatement"===e.type&&"Program"===t.type&&1===t.body.length}function xhe(e,t,r){let n=[r("expression")];return vhe(e,t)?bhe(e.node.expression)&&n.push(";"):ghe(e,t)||t.semi&&n.push(";"),ule(e.node,ale.Dangling,(({marker:e})=>e===hle))&&n.push(" ",Tle(e,t,{marker:hle})),n}function Ehe(e,t,r,n){let{node:i}=e;if(hpe(i))return function(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return ppe(r);case"BigIntLiteral":return cpe(r.extra.raw);case"NumericLiteral":return lpe(r.extra.raw);case"StringLiteral":return Aoe(upe(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return lpe(r.value)+"m";case"DirectiveLiteral":return dpe(r.extra.raw,t);case"Literal":{if(r.regex)return ppe(r.regex);if(r.bigint)return cpe(r.raw);if(r.decimal)return lpe(r.decimal)+"m";let{value:n}=r;return"number"==typeof n?lpe(r.raw):"string"==typeof n?function(e){if("expression"!==e.key)return;let{parent:t}=e;return"ExpressionStatement"===t.type&&t.directive}(e)?dpe(r.raw,t):Aoe(upe(r.raw,t)):String(n)}}}(e,t);let s=t.semi?";":"",a=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),coe];case"File":return function(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(1===n.length)return n[0];let i=hoe([",",uoe],n);return t.__isVueForBindingLeft?["(",Gae([loe,Qae(i)]),loe,")"]:i}}(e,t,r)??r("program");case"Program":return fhe(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return xhe(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return ule(i.expression)||!due(i.expression)&&!pue(i.expression)?Qae(["(",Gae([loe,r("expression")]),loe,")"]):["(",r("expression"),")"];case"AssignmentExpression":return function(e,t,r){let{node:n}=e;return fpe(e,t,r,r("left"),[" ",n.operator],"right")}(e,t,r);case"VariableDeclarator":return function(e,t,r){return fpe(e,t,r,r("id")," =","init")}(e,t,r);case"BinaryExpression":case"LogicalExpression":return qce(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return function(e,t,r){var n;let i=r("object"),s=ipe(e,0,r),{node:a,parent:o}=e,u=e.findAncestor((e=>!(Iue(e)||"TSNonNullExpression"===e.type))),l=u&&("NewExpression"===u.type||"BindExpression"===u.type||"AssignmentExpression"===u.type&&"Identifier"!==u.left.type)||a.computed||"Identifier"===a.object.type&&"Identifier"===a.property.type&&!Iue(o)||("AssignmentExpression"===o.type||"VariableDeclarator"===o.type)&&(Fue(a.object)&&a.object.arguments.length>0||"TSNonNullExpression"===a.object.type&&Fue(a.object.expression)&&a.object.expression.arguments.length>0||(null==(n=i.label)?void 0:n.memberChain));return foe(i.label,[i,l?s:Qae(Gae([loe,s]))])}(e,0,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&a.push(r("object")),a.push(Qae(Gae([loe,Gpe(0,0,r)]))),a;case"Identifier":return[i.name,zpe(e),Kpe(e),Mpe(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Qpe(e,r);case"FunctionDeclaration":case"FunctionExpression":return Kde(e,r,t,n);case"ArrowFunctionExpression":return phe(e,t,r,n);case"YieldExpression":return a.push("yield"),i.delegate&&a.push("*"),i.argument&&a.push(" ",r("argument")),a;case"AwaitExpression":if(a.push("await"),i.argument){a.push(" ",r("argument"));let{parent:t}=e;if(Fue(t)&&t.callee===i||Iue(t)&&t.object===i){a=[Gae([loe,...a]),loe];let t=e.findAncestor((e=>"AwaitExpression"===e.type||"BlockStatement"===e.type));if("AwaitExpression"!==(null==t?void 0:t.type)||!Kue(t.argument,(e=>e===i)))return Qae(a)}}return a;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return sde(e,t,r);case"ImportDeclaration":return function(e,t,r){let{node:n}=e;return["import",n.module?" module":"",ude(n),cde(e,t,r),lde(e,t,r),dde(e,t,r),t.semi?";":""]}(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return hde(e,0,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return hhe(e,t,r);case"ClassBody":return she(e,t,r);case"ThrowStatement":return function(e,t,r){return["throw",Xde(e,t,r)]}(e,t,r);case"ReturnStatement":return function(e,t,r){return["return",Xde(e,t,r)]}(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return ape(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return ahe(e,t,r);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?qde(e,t,r):function(e,t,r){let{node:n}=e;return n.shorthand?r("value"):fpe(e,t,r,Vde(e,t,r),":","value")}(e,t,r);case"ObjectMethod":return qde(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return Gce(e,t,r);case"SequenceExpression":{let{parent:t}=e;if("ExpressionStatement"===t.type||"ForStatement"===t.type){let t=[];return e.each((({isFirst:e})=>{e?t.push(r()):t.push(",",Gae([uoe,r()]))}),"expressions"),Qae(t)}return Qae(hoe([",",uoe],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return a.push(i.operator),/[a-z]$/.test(i.operator)&&a.push(" "),ule(i.argument)?a.push(Qae(["(",Gae([loe,r("argument")]),loe,")"])):a.push(r("argument")),a;case"UpdateExpression":return a.push(r("argument"),i.operator),i.prefix&&a.reverse(),a;case"ConditionalExpression":return yde(e,t,r);case"VariableDeclaration":{let t,n=e.map(r,"declarations"),o=e.parent,u="ForStatement"===o.type||"ForInStatement"===o.type||"ForOfStatement"===o.type,l=i.declarations.some((e=>e.init));return 1!==n.length||ule(i.declarations[0])?n.length>0&&(t=Gae(n[0])):t=n[0],a=[Wpe(e),i.kind,t?[" ",t]:"",Gae(n.slice(1).map((e=>[",",l&&!u?coe:uoe,e])))],u&&o.body!==i||a.push(s),Qae(a)}case"WithStatement":return Qae(["with (",r("object"),")",Ype(i.body,r("body"))]);case"IfStatement":{let n=Ype(i.consequent,r("consequent")),s=Qae(["if (",Qae([Gae([loe,r("test")]),loe]),")",n]);if(a.push(s),i.alternate){let n=ule(i.consequent,ale.Trailing|ale.Line)||Mue(i),s="BlockStatement"===i.consequent.type&&!n;a.push(s?" ":coe),ule(i,ale.Dangling)&&a.push(Tle(e,t),n?coe:" "),a.push("else",Qae(Ype(i.alternate,r("alternate"),"IfStatement"===i.alternate.type)))}return a}case"ForStatement":{let n=Ype(i.body,r("body")),s=Tle(e,t),a=s?[s,loe]:"";return i.init||i.test||i.update?[a,Qae(["for (",Qae([Gae([loe,r("init"),";",uoe,r("test"),";",uoe,r("update")]),loe]),")",n])]:[a,Qae(["for (;;)",n])]}case"WhileStatement":return Qae(["while (",Qae([Gae([loe,r("test")]),loe]),")",Ype(i.body,r("body"))]);case"ForInStatement":return Qae(["for (",r("left")," in ",r("right"),")",Ype(i.body,r("body"))]);case"ForOfStatement":return Qae(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Ype(i.body,r("body"))]);case"DoWhileStatement":return a=[Qae(["do",Ype(i.body,r("body"))])],"BlockStatement"===i.body.type?a.push(" "):a.push(coe),a.push("while (",Qae([Gae([loe,r("test")]),loe]),")",s),a;case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return a.push("BreakStatement"===i.type?"break":"continue"),i.label&&a.push(" ",r("label")),a.push(s),a;case"LabeledStatement":return"EmptyStatement"===i.body.type?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let e=ule(i.param,(e=>!tue(e)||e.leading&&Roe(t.originalText,Joe(e))||e.trailing&&Roe(t.originalText,Woe(e),{backwards:!0}))),n=r("param");return["catch ",e?["(",Gae([loe,n]),loe,") "]:["(",n,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[Qae(["switch (",Gae([loe,r("discriminant")]),loe,")"])," {",i.cases.length>0?Gae([coe,hoe(coe,e.map((({node:e,isLast:n})=>[r(),!n&&cle(e,t)?coe:""]),"cases"))]):"",coe,"}"];case"SwitchCase":{i.test?a.push("case ",r("test"),":"):a.push("default:"),ule(i,ale.Dangling)&&a.push(" ",Tle(e,t));let n=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(n.length>0){let i=dhe(e,t,r,"consequent");a.push(1===n.length&&"BlockStatement"===n[0].type?[" ",i]:Gae([coe,i]))}return a}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return Yde(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return nhe(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return ihe(e,t,r);case"TemplateElement":return Aoe(i.value.raw);case"TemplateLiteral":return wde(e,r,t);case"TaggedTemplateExpression":return function(e){let t=e("quasi");return foe(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),soe,t])}(r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{a.push("module {");let e=r("body");return e&&a.push(Gae([coe,e]),coe),a.push("}"),a}default:throw new wle(i,"ESTree")}}function She(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),ule(n.node)?" //"+lle(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return qce(e,t,r);case"NGChainedExpression":return Qae(hoe([";",uoe],e.map((()=>function({node:e}){return sue(e,The)}(e)?r():["(",r(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map((()=>[e.isFirst?"":Dhe(e)?" ":[";",uoe],r()]),"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),null===n.alias?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:t,parent:i}=e,s=Dhe(e)||(1===t&&("then"===n.key.name||"else"===n.key.name)||2===t&&"else"===n.key.name&&"NGMicrosyntaxKeyedExpression"===i.body[t-1].type&&"then"===i.body[t-1].key.name)&&"NGMicrosyntaxExpression"===i.body[0].type;return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),null===n.value?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new wle(n,"Angular")}}function Dhe({node:e,index:t,parent:r}){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===r.body[0].type&&null===r.body[0].value}var The=eue(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function Ahe(e,t,r){let{node:n}=e,i=[Wpe(e),"interface"],s=[],a=[];"InterfaceTypeAnnotation"!==n.type&&s.push(" ",r("id"),r("typeParameters"));let o=n.typeParameters&&!ule(n.typeParameters,ale.Trailing|ale.Line);return woe(n.extends)&&a.push(o?roe(" ",uoe,{groupId:Bde(n.typeParameters)}):uoe,"extends ",(1===n.extends.length?Vue:Gae)(hoe([",",uoe],e.map(r,"extends")))),ule(n.id,ale.Trailing)||woe(n.extends)?o?i.push(Qae([...s,Gae(a)])):i.push(Qae(Gae([...s,...a]))):i.push(...s,...a),i.push(" ",r("body")),Qae(i)}function Che(e,t,r){return ahe(e,r,t)}function Phe(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function whe(e,t,r){let{node:n}=e;return[Wpe(e),n.const?"const ":"","enum ",t("id")," ","TSEnumDeclaration"===n.type?Che(e,t,r):t("body")]}function khe(e,t,r){let{node:n}=e;if(nue(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return Yde(e,t,r);case"DeclareFunction":return[Wpe(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",Mpe(e,r),i];case"DeclareVariable":return[Wpe(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return sde(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return function(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Wpe(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return Ppe(e,t,r);case"IntersectionTypeAnnotation":return wpe(e,0,r);case"UnionTypeAnnotation":return kpe(e,t,r);case"ConditionalTypeAnnotation":return yde(e,t,r);case"InferTypeAnnotation":return _pe(0,0,r);case"FunctionTypeAnnotation":return Fpe(e,t,r);case"TupleTypeAnnotation":return Gce(e,t,r);case"TupleTypeLabeledElement":return Bpe(e,0,r);case"TupleTypeSpreadElement":return Ope(e,0,r);case"GenericTypeAnnotation":return[r("id"),Lde(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return Ipe(e,0,r);case"TypeAnnotation":return Rpe(e,0,r);case"TypeParameter":return jde(e,0,r);case"TypeofTypeAnnotation":return Upe(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return $pe(r);case"DeclareEnum":case"EnumDeclaration":return whe(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return function(e,t,r){let n,{node:i}=e;if("EnumSymbolBody"===i.type||i.explicitType)switch(i.type){case"EnumBooleanBody":n="boolean";break;case"EnumNumberBody":n="number";break;case"EnumStringBody":n="string";break;case"EnumSymbolBody":n="symbol"}return[n?`of ${n} `:"",Che(e,t,r)]}(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return Phe(e,r);case"FunctionTypeParam":{let t=n.name?r("name"):e.parent.this===n?"this":"";return[t,zpe(e),t?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return Ahe(e,0,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:e}=n;return $de.ok("plus"===e||"minus"===e),"plus"===e?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return function(e,t,r){let{node:n}=e;return Qae([n.variance?r("variance"):"","[",Gae([r("keyTparam")," in ",r("sourceType")]),"]",Nde(n.optional),": ",r("propType")])}(e,0,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let i="";return n.proto?i="proto ":n.static&&(i="static "),[i,Eue(n)?n.kind+" ":"",n.variance?r("variance"):"",Vde(e,t,r),zpe(e),Sue(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return ahe(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",zpe(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Qpe(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return Aoe(upe(Uue(n),t));case"NumberLiteralTypeAnnotation":return lpe(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return cpe(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),Mpe(e,r),")"];case"TypePredicate":return Vpe(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return Lde(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return["predicate"!==e.key||"DeclareFunction"===e.parent.type||e.parent.returnType?" ":": ","%checks",..."DeclaredPredicate"===n.type?["(",r("value"),")"]:[]]}}function Fhe(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(iue(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",a=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let e=!(pue(i.expression)||due(i.expression)),t=Qae(["<",Gae([loe,r("typeAnnotation")]),loe,">"]),n=[roe("("),Gae([loe,r("expression")]),loe,roe(")")];return e?eoe([[t,r("expression")],[t,Qae(n,{shouldBreak:!0})],[t,r("expression")]]):Qae([t,r("expression")])}case"TSDeclareFunction":return Kde(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return hhe(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return ahe(e,t,r);case"TSTypeAliasDeclaration":return Ppe(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return nhe(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return ihe(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return wde(e,r,t);case"TSNamedTupleMember":return Bpe(e,0,r);case"TSRestType":return Ope(e,0,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return Ahe(e,0,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return Lde(e,t,r,"params");case"TSTypeParameter":return jde(e,0,r);case"TSAsExpression":case"TSSatisfiesExpression":{let t="TSAsExpression"===i.type?"as":"satisfies";a.push(r("expression"),` ${t} `,r("typeAnnotation"));let{parent:n}=e;return Fue(n)&&n.callee===i||Iue(n)&&n.object===i?Qae([Gae([loe,...a]),loe]):a}case"TSArrayType":return $pe(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",Vde(e,t,r),zpe(e),Mpe(e,r)];case"TSParameterProperty":return[Zpe(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Upe(e,r);case"TSIndexSignature":{let n=i.parameters.length>1?roe(zue(t)?",":""):"",a=Qae([Gae([loe,hoe([", ",loe],e.map(r,"parameters"))]),n,loe]),o="ClassBody"===e.parent.type&&"body"===e.key;return[o&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",Mpe(e,r),o?s:""]}case"TSTypePredicate":return Vpe(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r(i.parameter?"parameter":"argument"),")",i.qualifier?[".",r("qualifier")]:"",Lde(e,t,r,"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return Ipe(e,0,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return function(e,t,r){let{node:n}=e,i=Lle(t.originalText,Woe(n),Woe(n.typeParameter));return Qae(["{",Gae([t.bracketSpacing?uoe:loe,Qae([r("typeParameter"),n.optional?Ode(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?roe(";"):""]),Tle(e,t),t.bracketSpacing?uoe:loe,"}"],{shouldBreak:i})}(e,t,r);case"TSMethodSignature":{let n=i.kind&&"method"!==i.kind?`${i.kind} `:"";a.push(Zpe(i),n,i.computed?"[":"",r("key"),i.computed?"]":"",zpe(e));let s=Dpe(e,r,t,!1,!0),o=i.returnType?"returnType":"typeAnnotation",u=i[o],l=u?Mpe(e,r,o):"",c=Ape(i,l);return a.push(c?Qae(s):s),u&&a.push(Qae(l)),Qae(a)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return whe(e,r,t);case"TSEnumMember":return Phe(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",ude(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:o}=e,u="TSModuleDeclaration"===o.type,l="TSModuleDeclaration"===(null==(n=i.body)?void 0:n.type);if(u)a.push(".");else if(a.push(Wpe(e)),"global"!==i.kind&&!i.global){let e=i.kind??(mue(i.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(Woe(i),Woe(i.id)))?"module":"namespace");a.push(e," ")}return a.push(r("id")),l?a.push(r("body")):i.body?a.push(" ",Qae(r("body"))):a.push(s),a}case"TSConditionalType":return yde(e,t,r);case"TSInferType":return _pe(0,0,r);case"TSIntersectionType":return wpe(e,0,r);case"TSUnionType":return kpe(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return Fpe(e,t,r);case"TSTupleType":return Gce(e,t,r);case"TSTypeReference":return[r("typeName"),Lde(e,t,r,"typeParameters")];case"TSTypeAnnotation":return Rpe(e,0,r);case"TSEmptyBodyFunctionExpression":return Wde(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return Npe(e,r,"?");case"TSJSDocNonNullableType":return Npe(e,r,"!");default:throw new wle(i,"TypeScript")}}var Ihe=eue(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);var _he=function(e,t,r,n){var i;e.isRoot&&(null==(i=t.__onHtmlBindingRoot)||i.call(t,e.node,t));let s=function(e,t,r,n){if(zce(e))return Pae(e,t);for(let i of[She,Uce,khe,Fhe,Ehe]){let s=i(e,t,r,n);if(void 0!==s)return s}}(e,t,r,n);if(!s)return"";let{node:a}=e;if(Ihe(a))return s;let o=woe(a.decorators),u=function(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!woe(s)||nde(i)||zce(e))return"";let a="ClassExpression"===n.type||"ClassDeclaration"===n.type||rde(n,t);return["declaration"===e.key&&cue(i)?coe:a?aoe:"",hoe(uoe,e.map(r,"decorators")),uoe]}(e,t,r),l="ClassExpression"===a.type;if(o&&!l)return Poe(s,(e=>Qae([u,e])));let c=vle(e,t),p=mhe(e,t);return u||c||p?Poe(s,(e=>[p?";":"",c?"(":"",c&&l&&o?[Gae([uoe,u,e]),uoe]:[u,e],c?")":""])):s},Nhe=[(e,t)=>"ObjectExpression"===e.type&&"properties"===t,(e,t)=>"CallExpression"===e.type&&"Identifier"===e.callee.type&&"Component"===e.callee.name&&"arguments"===t,(e,t)=>"Decorator"===e.type&&"expression"===t];function Ohe(e,t){return ule(e,ale.Block|ale.Leading,(({value:e})=>e===` ${t} `))}async function Bhe(e,t,r){let{node:n}=r,i=n.quasis.map((e=>e.value.raw)),s=0,a=i.reduce(((e,t,r)=>0===r?t:e+"@prettier-placeholder-"+s+++"-id"+t),""),o=function(e,t){if(!woe(t))return e;let r=0,n=goe(Toe(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,n)=>n%2==0?Aoe(e):(r++,t[e]))):e));return t.length===r?n:null}(await e(a,{parser:"scss"}),kde(r,t));if(!o)throw new Error("Couldn't insert all the expressions");return["`",Gae([coe,o]),loe,"`"]}function Lhe(e){return"Identifier"===e.type&&"styled"===e.name}function Mhe(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}var jhe=function(e){if(function({node:e,parent:t,grandparent:r}){return r&&e.quasis&&"JSXExpressionContainer"===t.type&&"JSXElement"===r.type&&"style"===r.openingElement.name.name&&r.openingElement.attributes.some((e=>"jsx"===e.name.name))||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"Identifier"===t.tag.type&&"css"===t.tag.name||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"MemberExpression"===t.tag.type&&"css"===t.tag.object.name&&("global"===t.tag.property.name||"resolve"===t.tag.property.name)}(e)||function({parent:e}){if(!e||"TaggedTemplateExpression"!==e.type)return!1;let t="ParenthesizedExpression"===e.tag.type?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return Lhe(t.object)||Mhe(t);case"CallExpression":return Lhe(t.callee)||"MemberExpression"===t.callee.type&&("MemberExpression"===t.callee.object.type&&(Lhe(t.callee.object.object)||Mhe(t.callee.object))||"CallExpression"===t.callee.object.type&&Lhe(t.callee.object.callee));case"Identifier":return"css"===t.name;default:return!1}}(e)||function({parent:e,grandparent:t}){return"JSXAttribute"===(null==t?void 0:t.type)&&"JSXExpressionContainer"===e.type&&"JSXIdentifier"===t.name.type&&"css"===t.name.name}(e)||function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>pue(e)&&"elements"===t),((e,t)=>dle(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...Nhe)}(e))return Bhe};async function Rhe(e,t,r){let{node:n}=r,i=n.quasis.length,s=kde(r,t),a=[];for(let t=0;t<i;t++){let r=0===t,o=t===i-1,u=n.quasis[t].value.cooked,l=u.split("\n"),c=l.length,p=s[t],d=c>2&&""===l[0].trim()&&""===l[1].trim(),h=c>2&&""===l[c-1].trim()&&""===l[c-2].trim(),f=l.every((e=>/^\s*(?:#[^\n\r]*)?$/.test(e)));if(!o&&/#[^\n\r]*$/.test(l[c-1]))return null;let m=null;m=f?$he(l):await e(u,{parser:"graphql"}),m?(m=Fde(m,!1),!r&&d&&a.push(""),a.push(m),!o&&h&&a.push("")):!r&&!o&&d&&a.push(""),p&&a.push(p)}return["`",Gae([coe,hoe(coe,a)]),coe,"`"]}function $he(e){let t=[],r=!1,n=e.map((e=>e.trim()));for(let[e,i]of n.entries())""!==i&&(""===n[e-1]&&r?t.push([coe,i]):t.push(i),r=!0);return 0===t.length?null:hoe(coe,t)}var Uhe=function(e){if(function({node:e,parent:t}){return Ohe(e,"GraphQL")||t&&("TaggedTemplateExpression"===t.type&&("MemberExpression"===t.tag.type&&"graphql"===t.tag.object.name&&"experimental"===t.tag.property.name||"Identifier"===t.tag.type&&("gql"===t.tag.name||"graphql"===t.tag.name))||"CallExpression"===t.type&&"Identifier"===t.callee.type&&"graphql"===t.callee.name)}(e))return Rhe},Vhe=0;async function zhe(e,t,r,n,i){let{node:s}=n,a=Vhe;Vhe=Vhe+1>>>0;let o=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${a}_IN_JS`,u=s.quasis.map(((e,t,r)=>t===r.length-1?e.value.cooked:e.value.cooked+o(t))).join(""),l=kde(n,r),c=new RegExp(o("(\\d+)"),"g"),p=0,d=await t(u,{parser:e,__onHtmlRoot(e){p=e.children.length}}),h=goe(d,(e=>{if("string"!=typeof e)return e;let t=[],r=e.split(c);for(let e=0;e<r.length;e++){let n=r[e];if(e%2==0){n&&(n=Ide(n),i.__embeddedInHtml&&(n=xle(!1,n,/<\/(?=script\b)/gi,"<\\/")),t.push(n));continue}let s=Number(n);t.push(l[s])}return t})),f=/^\s/.test(u)?" ":"",m=/\s$/.test(u)?" ":"",y="ignore"===i.htmlWhitespaceSensitivity?coe:f&&m?uoe:null;return y?Qae(["`",Gae([y,Qae(h)]),y,"`"]):foe({hug:!1},Qae(["`",f,p>1?Gae(Qae(h)):Qae(h),m,"`"]))}var Khe=zhe.bind(void 0,"html"),qhe=zhe.bind(void 0,"angular");var Whe=function(e){return function(e){return Ohe(e.node,"HTML")||e.match((e=>"TemplateLiteral"===e.type),((e,t)=>"TaggedTemplateExpression"===e.type&&"Identifier"===e.tag.type&&"html"===e.tag.name&&"quasi"===t))}(e)?Khe:function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>dle(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...Nhe)}(e)?qhe:void 0};async function Jhe(e,t,r){let{node:n}=r,i=xle(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,((e,t)=>"\\".repeat(t.length/2)+"`")),s=function(e){let t=e.match(/^([^\S\n]*)\S/m);return null===t?"":t[1]}(i),a=""!==s;a&&(i=xle(!1,i,new RegExp(`^${s}`,"gm"),""));let o=Fde(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?Gae([loe,o]):[poe,Zae(o)],loe,"`"]}var Hhe=function(e){if(function({node:e,parent:t}){return"TaggedTemplateExpression"===(null==t?void 0:t.type)&&1===e.quasis.length&&"Identifier"===t.tag.type&&("md"===t.tag.name||"markdown"===t.tag.name)}(e))return Jhe};var Xhe=function(e){let t,{node:r}=e;if("TemplateLiteral"===r.type&&!function({quasis:e}){return e.some((({value:{cooked:e}})=>null===e))}(r))for(let n of[jhe,Uhe,Whe,Hhe])if(t=n(e),t)return 1===r.quasis.length&&""===r.quasis[0].value.raw.trim()?"``":async(...e)=>{let r=await t(...e);return r&&foe({embed:!0,...r.label},r)}},Ghe=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Yhe=e=>{for(let t of e.quasis)delete t.value};function Qhe(e,t,r){var n,i;if("Program"===e.type&&delete t.sourceType,("BigIntLiteral"===e.type||"BigIntLiteralTypeAnnotation"===e.type)&&t.value&&(t.value=t.value.toLowerCase()),("BigIntLiteral"===e.type||"Literal"===e.type)&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),"DecimalLiteral"===e.type&&(t.value=Number(t.value)),"Literal"===e.type&&t.decimal&&(t.decimal=Number(t.decimal)),"EmptyStatement"===e.type||"JSXText"===e.type||"JSXExpressionContainer"===e.type&&("Literal"===e.expression.type||"StringLiteral"===e.expression.type)&&" "===e.expression.value)return null;if(("Property"===e.type||"ObjectProperty"===e.type||"MethodDefinition"===e.type||"ClassProperty"===e.type||"ClassMethod"===e.type||"PropertyDefinition"===e.type||"TSDeclareMethod"===e.type||"TSPropertySignature"===e.type||"ObjectTypeProperty"===e.type)&&"object"==typeof e.key&&e.key&&("Literal"===e.key.type||"NumericLiteral"===e.key.type||"StringLiteral"===e.key.type||"Identifier"===e.key.type)&&delete t.key,"JSXElement"===e.type&&"style"===e.openingElement.name.name&&e.openingElement.attributes.some((e=>"jsx"===e.name.name)))for(let{type:e,expression:r}of t.children)"JSXExpressionContainer"===e&&"TemplateLiteral"===r.type&&Yhe(r);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&Yhe(t.value.expression),"JSXAttribute"===e.type&&"Literal"===(null==(n=e.value)?void 0:n.type)&&/["']|&quot;|&apos;/.test(e.value.value)&&(t.value.value=xle(!1,t.value.value,/["']|&quot;|&apos;/g,'"'));let s=e.expression||e.callee;if("Decorator"===e.type&&"CallExpression"===s.type&&"Component"===s.callee.name&&1===s.arguments.length){let r=e.expression.arguments[0].properties;for(let[e,n]of t.expression.arguments[0].properties.entries())switch(r[e].key.name){case"styles":pue(n.value)&&Yhe(n.value.elements[0]);break;case"template":"TemplateLiteral"===n.value.type&&Yhe(n.value)}}if("TaggedTemplateExpression"===e.type&&("MemberExpression"===e.tag.type||"Identifier"===e.tag.type&&("gql"===e.tag.name||"graphql"===e.tag.name||"css"===e.tag.name||"md"===e.tag.name||"markdown"===e.tag.name||"html"===e.tag.name)||"CallExpression"===e.tag.type)&&Yhe(t.quasi),"TemplateLiteral"===e.type&&(null!=(i=e.leadingComments)&&i.some((e=>tue(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===r.type&&"graphql"===r.callee.name||!e.leadingComments)&&Yhe(t),("TSIntersectionType"===e.type||"TSUnionType"===e.type)&&1===e.types.length)return t.types[0];"ChainExpression"===e.type&&"TSNonNullExpression"===e.expression.type&&([t.type,t.expression.type]=[t.expression.type,t.type])}Qhe.ignoredProperties=Ghe;var Zhe=Qhe,efe=((e,t,r)=>(r=null!=e?mae(vae(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of bae(t))!xae.call(e,i)&&i!==r&&yae(e,i,{get:()=>t[i],enumerable:!(n=gae(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:yae(r,"default",{value:e,enumerable:!0}),e)))(Tae(),1);var tfe=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};function rfe(e){let{shebang:t,text:r,pragmas:n,comments:i}=function(e){let t=tfe(e);t&&(e=e.slice(t.length+1));let r=(0,efe.extract)(e),{pragmas:n,comments:i}=(0,efe.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e),s=(0,efe.strip)(r);return(t?`${t}\n`:"")+(0,efe.print)({pragmas:{format:"",...n},comments:i.trimStart()})+(s.startsWith("\n")?"\n":"\n\n")+s}var nfe={avoidAstMutation:!0},ife={};Eae(ife,{getVisitorKeys:()=>sfe,massageAstNode:()=>lfe,print:()=>afe});var sfe=Qoe({JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]});function afe(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),coe];case"ArrayExpression":{if(0===n.elements.length)return"[]";let t=e.map((()=>null===e.node?"null":r()),"elements");return["[",Gae([coe,hoe([",",coe],t)]),coe,"]"]}case"ObjectExpression":return 0===n.properties.length?"{}":["{",Gae([coe,hoe([",",coe],e.map(r,"properties"))]),coe,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return["+"===n.operator?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return ofe(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return ofe(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new wle(n,"JSON")}}function ofe(e){return"key"===e.key&&"ObjectProperty"===e.parent.type}var ufe=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function lfe(e,t){let{type:r}=e;if("ObjectProperty"!==r){if("UnaryExpression"===r&&"+"===e.operator)return t.argument;if("ArrayExpression"!==r)return"TemplateLiteral"===r?{type:"StringLiteral",value:e.quasis[0].value.cooked}:void 0;for(let[r,n]of e.elements.entries())null===n&&t.elements.splice(r,0,{type:"NullLiteral"})}else{let{key:r}=e;"Identifier"===r.type?t.key={type:"StringLiteral",value:r.name}:"NumericLiteral"===r.type&&(t.key={type:"StringLiteral",value:String(r.value)})}}lfe.ignoredProperties=ufe;var cfe,pfe,dfe,hfe,ffe,mfe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},yfe="JavaScript",gfe={arrowParens:{category:yfe,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:mfe.bracketSameLine,bracketSpacing:mfe.bracketSpacing,jsxBracketSameLine:{category:yfe,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:yfe,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:mfe.singleQuote,jsxSingleQuote:{category:yfe,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:yfe,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:yfe,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:mfe.singleAttributePerLine},bfe={estree:Cae,"estree-json":ife},vfe=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]},{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","mcmod.info"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json",".eslintrc",".swcrc"],parsers:["json"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],xfe=Aae,Efe=Object.freeze({__proto__:null,default:xfe,languages:vfe,options:gfe,printers:bfe});function Sfe(e,t={}){return Qie(function(...e){return Y2(...e)}(e,{isJSX:Boolean(t.filepath?.match(/\.[jt]sx$/)),isTS:!0,printer:"recast",plugins:[["remove-unused-variables",p9]]}).code,{parser:"babel-ts",plugins:[fae,Efe]})}function Dfe(e,t={}){return e=e.replaceAll("import.meta","BATI_META"),e=`var BATI_META = ${JSON.stringify(t)};(${e})`,(0,eval)(e)}function Tfe(e,t,r={}){const n=function(e,t){return b.visit(e,{visitJSXAttribute(e){const r=e.value.comments?.[0];r&&r.value.includes("import.meta.BATI_")&&(Dfe(r.value.replace("# ",""),t)?e.get("comments").prune():e.prune()),this.traverse(e)},visitImportDeclaration(e){if(b.namedTypes.ImportDeclaration.check(e.value)&&e.value.comments&&e.value.comments.some((e=>e.value.includes("import.meta.BATI_")))){const r=e.value.comments.find((e=>e.value.includes("import.meta.BATI_"))).value;Dfe(r.replace("# ",""),t)?e.value.comments=[]:e.prune()}this.traverse(e)},visitIdentifier(e){if("BATI_REMOVE"===e.value.name){if(!e.parent)throw new Error("BATI_REMOVE cannot appear at top level");if(!b.namedTypes.ArrayExpression.check(e.parent?.parent?.value))throw new Error("BATI_REMOVE can only be an array element for now");return e.parent.prune(),void this.traverse(e)}this.traverse(e)},visitConditionalExpression(e){this.visitIfStatement(e)},visitIfStatement(e){let r=!1;if(this.traverse(e.get("test"),{visitMemberExpression(e){_o(e.value).code.startsWith("import.meta.BATI_")&&(r=!0),this.traverse(e)}}),this.traverse(e),r)if(Dfe(_o(e.value.test).code,t)){let t=e;b.namedTypes.ConditionalExpression.check(e.value)&&b.namedTypes.JSXExpressionContainer.check(e.parent.value)&&(t=e.parent),b.namedTypes.BlockStatement.check(e.value.consequent)?t.replace(...e.value.consequent.body):t.replace(e.value.consequent)}else e.value.alternate?b.namedTypes.BlockStatement.check(e.value.alternate)?e.replace(...e.value.alternate.body):e.replace(e.value.alternate):e.prune()}}),e}(e,t);return Sfe(_o(n).code,r)}function Afe(e,t){if(!e)throw new Error(t)}async function Cfe(e){const t=await(e?.());return Afe("string"==typeof t,"Unable to load previous JSON module"),JSON.parse(t)}async function Pfe(e){const t=await(e?.());return Afe("string"==typeof t,"Unable to load previous module"),Fo(t)}async function wfe(e,t){const r=p(t.url),n=d(r);return No(h(n,e))}function kfe(e){return"function-call"===e.$type?e.$args[0]:e}function Ffe(e,t){const r=function(e){return kfe(e.exports.default)}(e);return"identifier"===r.$type?function(e,t){const{config:r,declaration:n}=function(e){if("identifier"!==e.exports.default.$type)throw new uo(`Not supported: Cannot modify this kind of default export (${e.exports.default.$type})`);const t=e.exports.default.$name;for(const r of e.$ast.body)if("VariableDeclaration"===r.type)for(const e of r.declarations)if("Identifier"===e.id.type&&e.id.name===t&&e.init)return{declaration:e,config:kfe(Io(_o(e.init).code))};throw new uo("Couldn't find config declaration")}(e);Ife(t,r),n.init&&("ObjectExpression"===n.init.type?n.init=_o(r).code:"CallExpression"===n.init.type&&"Identifier"===n.init.callee.type&&(n.init=_o(Bo.functionCall(n.init.callee.name,r)).code))}(e,t):Ife(t,r),e.imports.$add({from:t.from,local:t.constructor,imported:t.imported||"default"}),!0}function Ife(e,t){const r=e.index??t.plugins?.length??0;t.plugins||(t.plugins=[]),t.plugins.splice(r,0,e.options?Bo.functionCall(e.constructor,e.options):Bo.functionCall(e.constructor))}function*_fe(e,t){for(const r of t){const t=e.get(r);if(!t)throw new Error(`key '${t}' not found in package.json`);yield[r,t]}}function Nfe(e,t,r){e.devDependencies??(e.devDependencies={}),e.dependencies??(e.dependencies={});const n=new Map(function*(e){if(e.devDependencies)for(const t in e.devDependencies)yield[t,e.devDependencies[t]];if(e.dependencies)for(const t in e.dependencies)yield[t,e.dependencies[t]]}(t));for(const[t,i]of _fe(n,r.devDependencies??[]))t in e.dependencies||(e.devDependencies[t]=i);for(const[t,i]of _fe(n,r.dependencies??[]))t in e.devDependencies&&delete e.devDependencies[t],e.dependencies[t]=i;return e}ffe="win32"===process.platform||y.TESTING_WINDOWS?function(){if(pfe)return cfe;pfe=1,cfe=r,r.sync=function(r,n){return t(e.statSync(r),r,n)};var e=i;function t(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function r(r,n,i){e.stat(r,(function(e,s){i(e,!e&&t(s,r,n))}))}return cfe}():function(){if(hfe)return dfe;hfe=1,dfe=t,t.sync=function(t,n){return r(e.statSync(t),n)};var e=i;function t(t,n,i){e.stat(t,(function(e,t){i(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),a=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8);return r&parseInt("001",8)||r&u&&i===a||r&o&&n===s||r&(o|u)&&0===s}(e,t)}return dfe}();var Ofe=Bfe;function Bfe(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){Bfe(e,t||{},(function(e,t){e?n(e):r(t)}))}))}ffe(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}Bfe.sync=function(e,t){try{return ffe.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}};const Lfe=Ofe,{join:Mfe,delimiter:jfe,sep:Rfe,posix:$fe}=a,Ufe="win32"===process.platform,Vfe=new RegExp(`[${$fe.sep}${Rfe===$fe.sep?"":Rfe}]`.replace(/(\\)/g,"\\$1")),zfe=new RegExp(`^\\.${Vfe.source}`),Kfe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),qfe=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=jfe})=>{const i=e.match(Vfe)?[""]:[...Ufe?[process.cwd()]:[],...(t||"").split(n)];if(Ufe){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),s=t.split(n).reduce(((e,t)=>(e.push(t),e.push(t.toLowerCase()),e)),[]);return e.includes(".")&&""!==s[0]&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:t}}return{pathEnv:i,pathExt:[""]}},Wfe=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&zfe.test(t)?t.slice(0,2):"")+Mfe(r,t)},Jfe=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=qfe(e,t),s=[];for(const a of r){const r=Wfe(a,e);for(const e of n){const n=r+e;if(await Lfe(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Kfe(e)};var Hfe=Jfe;Jfe.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=qfe(e,t),s=[];for(const a of r){const r=Wfe(a,e);for(const e of n){const n=r+e;if(Lfe.sync(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Kfe(e)};var Xfe=g(Hfe);function Gfe(e,t,r=0){const n=`${" ".repeat(2*r)}${t?t(e):e}`;return e=>`${n} ${e}`}export{Nfe as addDependency,Ffe as addVitePlugin,f as features,m as flags,_o as generateCode,Cfe as loadAsJson,Pfe as loadAsMagicast,No as loadFile,wfe as loadRelativeFileAsMagicast,Fo as parseModule,Tfe as transformAndGenerate,Xfe as which,Gfe as withIcon};
1873
+ deps: ${n}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:r)[n]=e[n]}return[t,r]}(e);s(e,t),a(e,r)}};function s(e,r=e.schema){const{gen:i,data:s,it:a}=e;if(0===Object.keys(r).length)return;const o=i.let("missing");for(const u in r){const l=r[u];if(0===l.length)continue;const c=(0,n.propertyInData)(i,s,u,a.opts.ownProperties);e.setParams({property:u,depsCount:l.length,deps:l.join(", ")}),a.allErrors?i.if(c,(()=>{for(const t of l)(0,n.checkReportMissingProp)(e,t)})):(i.if(t._`${c} && (${(0,n.checkMissingProp)(e,l,o)})`),(0,n.reportMissingProp)(e,o),i.else())}}function a(e,t=e.schema){const{gen:i,data:s,keyword:a,it:o}=e,u=i.name("valid");for(const l in t)(0,r.alwaysValidSchema)(o,t[l])||(i.if((0,n.propertyInData)(i,s,l,o.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:l},u);e.mergeValidEvaluated(t,u)}),(()=>i.var(u,!0))),e.ok(u))}e.validatePropertyDeps=s,e.validateSchemaDeps=a,e.default=i}(C6);var P6={};Object.defineProperty(P6,"__esModule",{value:!0});const w6=h4(),k6=f4,F6={message:"property name must be valid",params:({params:e})=>w6._`{propertyName: ${e.propertyName}}`},I6={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:F6,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,k6.alwaysValidSchema)(i,r))return;const s=t.name("valid");t.forIn("key",n,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,w6.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};P6.default=I6;var _6={};Object.defineProperty(_6,"__esModule",{value:!0});const N6=N4(),O6=h4(),B6=v4(),L6=f4,M6={message:"must NOT have additional properties",params:({params:e})=>O6._`{additionalProperty: ${e.additionalProperty}}`},j6={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:M6,code(e){const{gen:t,schema:r,parentSchema:n,data:i,errsCount:s,it:a}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:o,opts:u}=a;if(a.props=!0,"all"!==u.removeAdditional&&(0,L6.alwaysValidSchema)(a,r))return;const l=(0,N6.allSchemaProperties)(n.properties),c=(0,N6.allSchemaProperties)(n.patternProperties);function p(e){t.code(O6._`delete ${i}[${e}]`)}function d(n){if("all"===u.removeAdditional||u.removeAdditional&&!1===r)p(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(o||t.break());if("object"==typeof r&&!(0,L6.alwaysValidSchema)(a,r)){const r=t.name("valid");"failing"===u.removeAdditional?(h(n,r,!1),t.if((0,O6.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,O6.not)(r),(()=>t.break())))}}}function h(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:L6.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",i,(r=>{l.length||c.length?t.if(function(r){let i;if(l.length>8){const e=(0,L6.schemaRefOrVal)(a,n.properties,"properties");i=(0,N6.isOwnProperty)(t,e,r)}else i=l.length?(0,O6.or)(...l.map((e=>O6._`${r} === ${e}`))):O6.nil;return c.length&&(i=(0,O6.or)(i,...c.map((t=>O6._`${(0,N6.usePattern)(e,t)}.test(${r})`)))),(0,O6.not)(i)}(r),(()=>d(r))):d(r)})),e.ok(O6._`${s} === ${B6.default.errors}`)}};_6.default=j6;var R6={};Object.defineProperty(R6,"__esModule",{value:!0});const $6=r8(),U6=N4(),V6=f4,z6=_6,K6={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:i,it:s}=e;"all"===s.opts.removeAdditional&&void 0===n.additionalProperties&&z6.default.code(new $6.KeywordCxt(s,z6.default,"additionalProperties"));const a=(0,U6.allSchemaProperties)(r);for(const e of a)s.definedProperties.add(e);s.opts.unevaluated&&a.length&&!0!==s.props&&(s.props=V6.mergeEvaluated.props(t,(0,V6.toHash)(a),s.props));const o=a.filter((e=>!(0,V6.alwaysValidSchema)(s,r[e])));if(0===o.length)return;const u=t.name("valid");for(const r of o)l(r)?c(r):(t.if((0,U6.propertyInData)(t,i,r,s.opts.ownProperties)),c(r),s.allErrors||t.else().var(u,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(u);function l(e){return s.opts.useDefaults&&!s.compositeRule&&void 0!==r[e].default}function c(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},u)}}};R6.default=K6;var q6={};Object.defineProperty(q6,"__esModule",{value:!0});const W6=N4(),J6=h4(),H6=f4,X6=f4,G6={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:i,it:s}=e,{opts:a}=s,o=(0,W6.allSchemaProperties)(r),u=o.filter((e=>(0,H6.alwaysValidSchema)(s,r[e])));if(0===o.length||u.length===o.length&&(!s.opts.unevaluated||!0===s.props))return;const l=a.strictSchema&&!a.allowMatchingProperties&&i.properties,c=t.name("valid");!0===s.props||s.props instanceof J6.Name||(s.props=(0,X6.evaluatedPropsToName)(t,s.props));const{props:p}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,H6.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(J6._`${(0,W6.usePattern)(e,r)}.test(${n})`,(()=>{const i=u.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:X6.Type.Str},c),s.opts.unevaluated&&!0!==p?t.assign(J6._`${p}[${n}]`,!0):i||s.allErrors||t.if((0,J6.not)(c),(()=>t.break()))}))}))}!function(){for(const e of o)l&&d(e),s.allErrors?h(e):(t.var(c,!0),h(e),t.if(c))}()}};q6.default=G6;var Y6={};Object.defineProperty(Y6,"__esModule",{value:!0});const Q6=f4,Z6={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Q6.alwaysValidSchema)(n,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};Y6.default=Z6;var e7={};Object.defineProperty(e7,"__esModule",{value:!0});const t7={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:N4().validateUnion,error:{message:"must match a schema in anyOf"}};e7.default=t7;var r7={};Object.defineProperty(r7,"__esModule",{value:!0});const n7=h4(),i7=f4,s7={message:"must match exactly one schema in oneOf",params:({params:e})=>n7._`{passingSchemas: ${e.passing}}`},a7={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:s7,code(e){const{gen:t,schema:r,parentSchema:n,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(i.opts.discriminator&&n.discriminator)return;const s=r,a=t.let("valid",!1),o=t.let("passing",null),u=t.name("_valid");e.setParams({passing:o}),t.block((function(){s.forEach(((r,n)=>{let s;(0,i7.alwaysValidSchema)(i,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(n7._`${u} && ${a}`).assign(a,!1).assign(o,n7._`[${o}, ${n}]`).else(),t.if(u,(()=>{t.assign(a,!0),t.assign(o,n),s&&e.mergeEvaluated(s,n7.Name)}))}))})),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}};r7.default=a7;var o7={};Object.defineProperty(o7,"__esModule",{value:!0});const u7=f4,l7={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,u7.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};o7.default=l7;var c7={};Object.defineProperty(c7,"__esModule",{value:!0});const p7=h4(),d7=f4,h7={message:({params:e})=>p7.str`must match "${e.ifClause}" schema`,params:({params:e})=>p7._`{failingKeyword: ${e.ifClause}}`},f7={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:h7,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,d7.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=m7(n,"then"),s=m7(n,"else");if(!i&&!s)return;const a=t.let("valid",!0),o=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);e.mergeEvaluated(t)}(),e.reset(),i&&s){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(o,u("then",r),u("else",r))}else i?t.if(o,u("then")):t.if((0,p7.not)(o),u("else"));function u(r,n){return()=>{const i=e.subschema({keyword:r},o);t.assign(a,o),e.mergeValidEvaluated(i,a),n?t.assign(n,p7._`${r}`):e.setParams({ifClause:r})}}e.pass(a,(()=>e.error(!0)))}};function m7(e,t){const r=e.schema[t];return void 0!==r&&!(0,d7.alwaysValidSchema)(e,r)}c7.default=f7;var y7={};Object.defineProperty(y7,"__esModule",{value:!0});const g7=f4,b7={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,g7.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};y7.default=b7,Object.defineProperty(t6,"__esModule",{value:!0});const v7=r6,x7=o6,E7=u6,S7=y6,D7=S6,T7=C6,A7=P6,C7=_6,P7=R6,w7=q6,k7=Y6,F7=e7,I7=r7,_7=o7,N7=c7,O7=y7;t6.default=function(e=!1){const t=[k7.default,F7.default,I7.default,_7.default,N7.default,O7.default,A7.default,C7.default,T7.default,P7.default,w7.default];return e?t.push(x7.default,S7.default):t.push(v7.default,E7.default),t.push(D7.default),t};var B7={},L7={};Object.defineProperty(L7,"__esModule",{value:!0});const M7=h4(),j7={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>M7.str`must match format "${e}"`,params:({schemaCode:e})=>M7._`{format: ${e}}`},code(e,t){const{gen:r,data:n,$data:i,schema:s,schemaCode:a,it:o}=e,{opts:u,errSchemaPath:l,schemaEnv:c,self:p}=o;u.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:p.formats,code:u.code.formats}),s=r.const("fDef",M7._`${i}[${a}]`),o=r.let("fType"),l=r.let("format");r.if(M7._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(o,M7._`${s}.type || "string"`).assign(l,M7._`${s}.validate`)),(()=>r.assign(o,M7._`"string"`).assign(l,s))),e.fail$data((0,M7.or)(!1===u.strictSchema?M7.nil:M7._`${a} && !${l}`,function(){const e=c.$async?M7._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:M7._`${l}(${n})`,r=M7._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return M7._`${l} && ${l} !== true && ${o} === ${t} && !${r}`}()))}():function(){const i=p.formats[s];if(!i)return void function(){if(!1===u.strictSchema)return void p.logger.warn(e());throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}}();if(!0===i)return;const[a,o,d]=function(e){const t=e instanceof RegExp?(0,M7.regexpCode)(e):u.code.formats?M7._`${u.code.formats}${(0,M7.getProperty)(s)}`:void 0,n=r.scopeValue("formats",{key:s,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,M7._`${n}.validate`];return["string",e,n]}(i);a===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!c.$async)throw new Error("async format in sync schema");return M7._`await ${d}(${n})`}return"function"==typeof o?M7._`${d}(${n})`:M7._`${d}.test(${n})`}())}())}};L7.default=j7,Object.defineProperty(B7,"__esModule",{value:!0});const R7=[L7.default];B7.default=R7;var $7={};Object.defineProperty($7,"__esModule",{value:!0}),$7.contentVocabulary=$7.metadataVocabulary=void 0,$7.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],$7.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(k8,"__esModule",{value:!0});const U7=q8,V7=t6,z7=B7,K7=$7,q7=[F8.default,U7.default,(0,V7.default)(),z7.default,K7.metadataVocabulary,K7.contentVocabulary];k8.default=q7;var W7,J7,H7={},X7={};W7=X7,Object.defineProperty(W7,"__esModule",{value:!0}),W7.DiscrError=void 0,(J7=W7.DiscrError||(W7.DiscrError={})).Tag="tag",J7.Mapping="mapping",Object.defineProperty(H7,"__esModule",{value:!0});const G7=h4(),Y7=X7,Q7=l8,Z7=f4,e9={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Y7.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>G7._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:n,parentSchema:i,it:s}=e,{oneOf:a}=i;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const o=n.propertyName;if("string"!=typeof o)throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const u=t.let("valid",!1),l=t.const("tag",G7._`${r}${(0,G7.getProperty)(o)}`);function c(r){const n=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(i,G7.Name),n}t.if(G7._`typeof ${l} == "string"`,(()=>function(){const r=function(){var e;const t={},r=u(i);let n=!0;for(let t=0;t<a.length;t++){let i=a[t];(null==i?void 0:i.$ref)&&!(0,Z7.schemaHasRulesButRef)(i,s.self.RULES)&&(i=Q7.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==i?void 0:i.$ref),i instanceof Q7.SchemaEnv&&(i=i.schema));const c=null===(e=null==i?void 0:i.properties)||void 0===e?void 0:e[o];if("object"!=typeof c)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);n=n&&(r||u(i)),l(c,t)}if(!n)throw new Error(`discriminator: "${o}" must be required`);return t;function u({required:e}){return Array.isArray(e)&&e.includes(o)}function l(e,t){if(e.const)c(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`);for(const r of e.enum)c(r,t)}}function c(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${o}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(G7._`${l} === ${e}`),t.assign(u,c(r[e]));t.else(),e.error(!1,{discrError:Y7.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:Y7.DiscrError.Tag,tag:l,tagName:o}))),e.ok(u)}};H7.default=e9;var t9={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=r4,n=k8,i=H7,s=t9,a=["/properties"],o="http://json-schema.org/draft-07/schema";class u extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u;var l=r8();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=h4();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var p=s8();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=u8();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(t4,t4.exports);const r9={$schema:"http://json-schema.org/draft-07/schema#",type:"object",additionalProperties:!1,definitions:{rule:{oneOf:[{$ref:"#/definitions/ruleToggle"},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"object"}],minItems:2,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"},{type:"object"}],minItems:3,additionalItems:!1},{type:"array",items:[{$ref:"#/definitions/ruleToggle"},{type:"string"}],minItems:2,additionalItems:!1}]},rules:{description:"🐊Putout comes with a large number of rules. You can modify which rules your project uses.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rule"}}},ruleToggle:{oneOf:[{description:'🐊Putout rule\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]},{enum:[!0,!1]}]},processorToggle:{type:"array",items:[{type:"string"},{description:'🐊Putout processor\n\n"off" means rule is off\n"on" means it is a on\n',enum:["on","off"]}],minItems:2,maxItems:2}},properties:{parser:{description:"Tell 🐊Putout which parser to use",type:"string"},printer:{description:"Tell 🐊Putout which printer to use",type:"string"},formatter:{description:"Choose the way to show information about errors found",type:["string","array"]},processors:{description:"Tell 🐊Putout which processors to use to support file types other then JavaScript",type:"array",uniqueItems:!0,items:{oneOf:[{$ref:"#/definitions/processorToggle"},{type:"string"}]}},ignore:{description:"Tell 🐊Putout to ignore specific files and directories.",type:"array",uniqueItems:!0,items:{type:"string"}},match:{description:"Allows to match rules for files and folders, specified by glob patterns.",type:"object",patternProperties:{"^.*$":{$ref:"#/definitions/rules"}}},plugins:{description:"Tell 🐊Putout which plugins to load",type:"array",uniqueItems:!0},rules:{$ref:"#/definitions/rules"}}};new(0,t4.exports)({strict:!0,allowUnionTypes:!0}).compile(r9);const{homedir:n9}=r,{readdirSync:i9}=i,{dirname:s9,join:a9}=a,o9=rT,u9=GD,l9=n9(),c9=e=>"."!==e[0]&&!/(^not-rule-.*|^node_modules$)/.test(e);o9((()=>{const e=a9(l9,".putout.json"),[,t={}]=u9(SB,e);return t})),o9((()=>function(e,t){if(!t)return{};let r=a9(e,t);r.startsWith("/")||(r=a9(process.cwd(),t));const[n,i]=u9(i9,r);if(n)return{};const s=[];for(const e of i.filter(c9)){const t=SB(a9(r,e)),n=e.replace("putout-plugin-","");s.push([n,t])}return{plugins:s}}(l9,".putout"))),process.cwd();var p9={},d9={};const{isIdentifier:h9,isObjectExpression:f9,isObjectPattern:m9,isTemplateLiteral:y9,isAssignmentPattern:g9}=G2().types,b9=({use:e,declare:t})=>{const r=S9({use:e});return e=>{for(const n of e){if(n.isRestElement())continue;const{key:e,value:i}=n.node,s=n.get("value");switch(i.type){case"Identifier":t(n,i.name);break;case"AssignmentPattern":n.node.shorthand?t(n,e.name):t(n,s.node.left.name),r(s)}}}};d9.traverseObjectPattern=b9;const v9=({use:e,declare:t})=>r=>{for(const n of r){const{key:r,value:i,computed:s}=n.node;if(s&&h9(r)&&e(n,r.name),h9(i))t(n,i.name);else if(m9(i)){v9({use:e,declare:t})(n.get("value.properties"))}else if(g9(i)){S9({use:e})(n.get("value.right"));const r=n.get("value.left");if("Identifier"===r.type){t(n,r.node.name);continue}}}};d9.processObjectPattern=v9;const x9=e=>{const t=E9(e);return r=>{for(const n of r){const{node:r}=n,{key:i,value:s,computed:a}=r;if(a&&h9(i)&&e(n,i.name),h9(s))e(n,s.name);else if(y9(s))t(n,s.expressions);else if(f9(s)){x9(e)(n.get("value.properties"))}else;}}};d9.traverseObjectExpression=x9;d9.traverseArrayExpression=e=>{const t=x9(e);return e=>{for(const r of e){const{node:e}=r;f9(e)&&t(r.get("properties"))}}};d9.traverseAssignmentExpression=({use:e,declare:t})=>{const r=b9({use:e,declare:t});return n=>{const i=n.get("left"),s=n.get("right");if(i.isIdentifier()){const{parentPath:e}=i.parentPath,{name:r}=i.node;e.isObjectProperty()&&t(e,r),e.isFunction()&&t(i.parentPath,r)}s.isIdentifier()&&e(s,s.node.name),i.isObjectPattern()&&r(i.get("properties"))}};const E9=e=>(t,r)=>{for(const n of r)h9(n)&&e(t,n.name)};d9.traverseTemplateLiteral=E9;const S9=({use:e})=>t=>{const{node:r}=t,{right:n}=r;h9(r)&&e(t.parentPath,r.name),h9(n)&&e(t,n.name)};d9.traverseAssignmentPattern=S9;const{types:D9}=G2(),{isIdentifier:T9,isJSXIdentifier:A9}=D9;const{types:C9}=G2(),{isIdentifier:P9}=C9;const{types:w9}=G2(),{isIdentifier:k9,isTSModuleDeclaration:F9}=w9;const{isAssignmentPattern:I9,isClassDeclaration:_9,isIdentifier:N9,isSpreadElement:O9,isObjectPattern:B9,isObjectExpression:L9,isFunctionDeclaration:M9,isArrayExpression:j9,isVariableDeclaration:R9,isRestElement:$9}=G2().types,{traverseObjectExpression:U9,processObjectPattern:V9,traverseArrayExpression:z9,traverseAssignmentExpression:K9,traverseTemplateLiteral:q9}=d9,W9=e=>({JSXOpeningElement(t){const{node:r}=t,{name:n}=r;/^[A-Z]/.test(n.name)&&e(t,n.name),e(t,"React")},JSXFragment(t){e(t,"React")},JSXSpreadAttribute(t){const r=t.get("argument");if(r.isIdentifier())return e(t,r.node.name)},JSXMemberExpression(t){const{node:r}=t,{object:n}=r;A9(n)&&e(t,n.name)},JSXExpressionContainer(t){const{node:r}=t,{expression:n}=r;T9(n)&&e(t,n.name)}}),J9=({use:e,declare:t})=>({GenericTypeAnnotation(t){const{node:r}=t,{id:n}=r;P9(n)&&e(t,n.name)},QualifiedTypeIdentifier(t){const{qualification:r}=t.node,{type:n}=r;if("Identifier"===n)return e(t,r.name)},InterfaceDeclaration(e){t(e,e.node.id.name)}}),H9=({use:e,declare:t})=>({TSExpressionWithTypeArguments(t){const{expression:r}=t.node,{type:n}=r;if("Identifier"===n)e(t,r.name)},TSFunctionType(r){const{node:n}=r,{params:i}=n;for(const n of i){const{type:i}=n;switch(i){case"Identifier":t(r,n.name),e(r,n.name);break;case"RestElement":k9(n.argument)&&(t(r,n.argument.name),e(r,n.argument.name))}}},TSTypeReference(t){const{node:r}=t,{typeName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSTypeAliasDeclaration(e){const{node:r}=e,{id:n}=r,{type:i}=n;if("Identifier"===i)t(e,n.name)},TSTypeQuery(t){const{node:r}=t,{exprName:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSAsExpression(t){const{node:r}=t,{expression:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSQualifiedName(t){const{node:r}=t,{left:n}=r,{type:i}=n;if("Identifier"===i)e(t,n.name)},TSInterfaceDeclaration(r){t(r,r.node.id.name),r.findParent(F9)&&e(r,r.node.id.name)},TSMethodSignature(r){const n=r.get("params");for(const r of n){if(r.isIdentifier()){t(r,r.node.name),e(r,r.node.name);continue}const{type:n}=r;"RestElement"!==n||(t(r,r.node.argument.name),e(r,r.node.argument.name))}},TSDeclareFunction(t){if(!t.get("params").length)return;const[r]=t.get("params");r.isRestElement()&&e(r,r.node.argument.name)}}),{assign:X9}=Object;const G9=e=>{const{remove:t}=e;return()=>{const r=e.node,{elements:n}=e.parentPath.node,i=n.length-1;if(n.indexOf(r)===i)return t.call(e)}};var Y9={};const{types:Q9}=G2(),{isIdentifier:Z9,isObjectPattern:eee,isRestElement:tee}=Q9;function ree(e,t,r){const{length:n}=r,i=r[n-1];if(tee(i))for(let i=0;i<n-1;i++){const{value:n}=r[i],{type:s}=n;"Identifier"!==s||e(t,n.name)}}Y9.usePropertiesBeforeRest=({use:e})=>({path:t,params:r})=>{for(const n of r)eee(n)&&ree(e,t,n.properties)},Y9.useParamsBeforeLastUsed=({use:e,isUsed:t})=>({path:r,params:n})=>{let i=n.length;for(;--i>0;){const e=n[i];if(nee(t,r,e))break}for(;--i>=0;)Z9(n[i])&&e(r,n[i].name);return{path:r,params:n}};const nee=(e,t,r)=>{const{type:n}=r;switch(n){case"Identifier":return e(t,r.name);case"ObjectPattern":return see(e,t,r);case"AssignmentPattern":return iee(e,t,r)}},iee=(e,t,r)=>{const{left:n}=r,{type:i}=n;switch(i){case"Identifier":return e(t,n.name);case"ObjectPattern":return see(e,t,n)}},see=(e,t,r)=>{for(const{value:n}of r.properties)if(Z9(n)){if(e(t,n.name))return!0}else;return!1},{types:aee}=G2(),oee=({use:e,declare:t,addParams:r})=>{const n=U9(e),i=V9({use:e,declare:t}),s=K9({use:e,declare:t}),a=q9(e),o=z9(e);return{"ObjectExpression|RecordExpression"(e){n(e.get("properties"))},SequenceExpression(t){for(const r of t.get("expressions"))r.isIdentifier()&&e(r,r.node.name)},"AwaitExpression|YieldExpression|SpreadElement"(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},CatchClause(r){const n=r.get("param");if(!n.isIdentifier())return;const{name:i}=n.node;t(n,i);r.scope.getOwnBinding(i).referenced&&e(n,i)},Decorator(t){const r=t.get("expression");if(!r.isIdentifier())return;const{name:n}=r.node;e(r,n)},RestElement(e){const{argument:r}=e.node;N9(r)&&t(e,r.name)},VariableDeclarator(r){const{node:n}=r,{init:a}=n,u=r.get("id"),l=r.parentPath.parentPath.isForInStatement();if(N9(n.id))t(r,n.id.name),l&&e(r,n.id.name);else if(B9(n.id))u.traverse({ObjectProperty(i){if(I9(i.node.value)&&s(i.get("value")),i.node.computed&&N9(i.node.key)&&e(i.get("key"),i.node.key.name),!N9(i.node.value))return;const{properties:a}=n.id,o=1===a.length?r:i,{name:u}=i.node.value;t(o,u),$9(i.parentPath.node.properties.at(-1))&&e(o,u)}});else if(u.isArrayPattern()){const r=u.get("elements");for(const n of r)if(n.isObjectPattern())i(n.get("properties"));else{if(n.isAssignmentPattern()){const r=n.get("left"),i=n.get("right");t(r,n.node.left.name),e(i,n.node.right.name),X9(r,{remove:G9(n)})}n.isIdentifier()&&(X9(n,{remove:G9(n)}),t(n,n.node.name))}}const c=r.get("init");N9(a)?e(r,a.name):j9(a)&&o(c.get("elements"))},ClassProperty(t){const r=t.get("value");r.isIdentifier()&&e(r,r.node.name)},"ClassDeclaration|ClassExpression"(r){const{node:n}=r,{id:i,superClass:s}=n;s&&e(r,s.name),i&&t(r,i.name),i&&r.isClassExpression()&&e(r,i.name)},AssignmentExpression(t){const r=t.get("left"),n=t.get("right");r.isIdentifier()&&e(r,r.node.name),n.isIdentifier()&&e(n,n.node.name)},"ArrayExpression|TupleExpression"(t){const{elements:r}=t.node;for(const n of r)N9(n)?e(t,n.name):O9(n)&&e(t,n.argument.name)},ConditionalExpression(t){const{test:r,consequent:n,alternate:i}=t.node,s=t.get("alternate"),a=t.get("consequent");N9(r)&&e(t,r.name),N9(n)&&e(t,n.name),N9(i)&&e(t,i.name),s.isFunction()&&i.id&&e(s,i.id.name),a.isFunction()&&n.id&&e(a,n.id.name)},DoWhileStatement(t){const r=t.get("test");r.isIdentifier()&&e(r,r.node.name)},TemplateLiteral(e){a(e,e.node.expressions)},LogicalExpression(t){const{left:r,right:n}=t.node;N9(r)&&e(t,r.name),N9(n)&&e(t,n.name)},MemberExpression(t){const{property:r,object:n,computed:i}=t.node;N9(n)&&e(t,n.name),i&&N9(r)&&e(t,r.name)},OptionalMemberExpression(t){const{object:r,property:n,computed:i}=t.node;N9(r)&&e(t,r.name),i&&N9(n)&&e(t,n.name)},NewExpression(t){const r=t.get("callee"),{node:n}=t;r.isIdentifier()?e(t,n.callee.name):r.isFunction()&&e(r,r.node.id.name);const i=t.get("arguments");for(const{node:r}of i)N9(r)&&e(t,r.name)},TaggedTemplateExpression(t){const{tag:r}=t.node;N9(r)&&e(t,r.name)},UnaryExpression(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},UpdateExpression(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},ThrowStatement(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},IfStatement(t){const{node:r}=t,{test:n}=r;if(N9(n))return e(t,n.name)},ForInStatement(t){const{node:r}=t,{left:n,right:i}=r;N9(n)&&e(t,n.name),N9(i)&&e(t,i.name)},ForOfStatement(r){const{node:n}=r,{left:i,right:s}=n;N9(s)&&e(r,s.name),N9(i)?e(r,i.name):r.get("left").traverse({Identifier(e){t(r,e.node.name)}}),r.get("left").traverse({Identifier(t){e(t,t.node.name)}})},ExpressionStatement(t){const{node:r}=t;N9(r.expression)&&e(t,r.expression.name)},SwitchStatement(t){const{node:r}=t;N9(r.discriminant)&&e(t,r.discriminant.name);for(const{test:n}of r.cases)N9(n)&&e(t,n.name)},ReturnStatement(t){const{node:r}=t,{argument:n}=r,i=t.get("argument");return i.isIdentifier()?e(t,n.name):i.isFunction()&&n.id?e(i,n.id.name):void 0},ObjectMethod(e){const{params:n}=e.node,i=e.get("params");for(const e of i){const{node:r}=e;N9(r)&&t(e,r.name)}r({path:e,params:n})},"CallExpression|OptionalCallExpression"(t){const{node:r}=t,{callee:n}=r;N9(n)&&e(t,r.callee.name),t.traverse({SpreadElement(t){const{argument:r}=t.node;N9(r)&&e(t,r.name)},Identifier(t){r.arguments.includes(t.node)&&e(t,t.node.name)}})},BinaryExpression(t){const{left:r,right:n}=t.node;N9(r)&&e(t,r.name),N9(n)&&e(t,n.name)},ImportDeclaration(e){const r=e.get("specifiers");for(const e of r){const{local:r}=e.node;N9(r)&&t(e,r.name)}},ExportDefaultDeclaration(t){const r=t.get("declaration"),{declaration:i}=t.node,{id:s}=i;s&&M9(i)?e(t,i.id.name):N9(i)?e(t,i.name):s&&_9(i)?e(t,i.id.name):L9(i)&&n(r.get("properties"))},ExportNamedDeclaration(t){const r=t.get("declaration"),{declaration:n,specifiers:i}=t.node;if(r.isFunctionDeclaration())return e(t,n.id.name);if(r.isClassDeclaration())return e(t,n.id.name);if(r.isTSInterfaceDeclaration())return e(t,n.id.name);if(r.isTSTypeAliasDeclaration())return e(t,n.id.name);if(r.isInterfaceDeclaration())return e(t,n.id.name);if(R9(n)){const{declarations:r}=n;for(const{id:n}of r)N9(n)&&e(t,n.name)}else for(const{local:r}of i)N9(r)&&e(t,r.name)},Function(n){const{node:a,parentPath:o}=n,{id:u,body:l,params:c}=a,p=n.get("params");u&&(t(n,a.id.name),o.isBlock()||o.isProgram()||e(n,a.id.name));for(const e of p){const{node:r}=e;N9(r)?t(e,r.name):I9(r)?s(e):B9(r)&&i(e.get("properties"))}N9(l)&&e(n,l.name),r({path:n,params:c})},...W9(e),...J9({use:e,declare:t}),...H9({use:e,declare:t})}},{useParamsBeforeLastUsed:uee,usePropertiesBeforeRest:lee}=Y9,{isClassDeclaration:cee,isFunctionDeclaration:pee}=aee;const dee=e=>({path:t,params:r})=>{e.push({path:t,params:r})};function hee({name:e,scope:t}){if(t.hasOwnBinding(e))return t.uid;for(;t.parent;)if((t=t.parent).hasOwnBinding(e))return t.uid;return t.uid}const fee=({vars:e})=>(t,r)=>{const{scope:n}=t,i=hee({name:r,scope:n}),s=e[i],{used:a}=s[r];return a};const mee=({vars:e,setPath:t})=>(r,n)=>{const i=function(e){const{node:t,scope:r}=e;return pee(t)||cee(t)?e.parentPath.scope:r}(r),s=hee({name:n,scope:i});e[s]||(e[s]={});const a=e[s];a[n]?a[n].declared=!0:a[n]={declared:!0,used:!1},t&&(a[n].path=r)},yee=({vars:e})=>(t,r)=>{const{scope:n}=t,i=hee({name:r,scope:n});e[i]||(e[i]={});const s=e[i];s[r]?s[r].used=!0:s[r]={declared:!1,used:!0}};function gee([e,t]){return{name:e,...t}}const bee=({declared:e,used:t})=>e&&!t;const{operator:vee}=G2(),xee=(e,t)=>{const r={},n=[],{setPath:i,traverse:s}=t,a=yee({vars:r}),o=mee({vars:r,setPath:i}),u=fee({vars:r}),l=dee(n);return s(e,oee({use:a,declare:o,addParams:l})),n.map(uee({use:a,isUsed:u})).map(lee({use:a})),Object.values(r)},Eee=e=>{const t=[];for(const r of e){const e=Object.entries(r);for(const r of e)t.push(gee(r))}return t},See=e=>e.filter(bee),{replaceWith:Dee,compare:Tee,remove:Aee}=vee;p9.report=({name:e})=>`'${e}' is defined but never used`,p9.fix=({path:e})=>Tee(e,"const __a = __b = __c")?Dee(e.parentPath,e.node.init):function({parentPath:e}){return!!e.isImportDeclaration()&&1===e.node.specifiers.length}(e)?Aee(e.parentPath):void Aee(e),p9.find=(e,{traverse:t})=>{const r=xee(e,{setPath:!0,traverse:t}),n=Eee(r);return See(n)};var Cee,Pee,wee=Object.create,kee=Object.defineProperty,Fee=Object.getOwnPropertyDescriptor,Iee=Object.getOwnPropertyNames,_ee=Object.getPrototypeOf,Nee=Object.prototype.hasOwnProperty,Oee=(e,t)=>()=>(e&&(t=e(e=0)),t),Bee=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lee=(e,t)=>{for(var r in t)kee(e,r,{get:t[r],enumerable:!0})},Mee=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Iee(t))!Nee.call(e,i)&&i!==r&&kee(e,i,{get:()=>t[i],enumerable:!(n=Fee(t,i))||n.enumerable});return e},jee=(e,t,r)=>(r=null!=e?wee(_ee(e)):{},Mee(!t&&e&&e.__esModule?r:kee(r,"default",{value:e,enumerable:!0}),e)),Ree=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},$ee=(e,t,r)=>(((e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)})(e,t,"access private method"),r),Uee=Bee((e=>{function t(){}function r(e,t,r,n,i){for(var s=0,a=t.length,o=0,u=0;s<a;s++){var l=t[s];if(l.removed){if(l.value=e.join(n.slice(u,u+l.count)),u+=l.count,s&&t[s-1].added){var c=t[s-1];t[s-1]=t[s],t[s]=c}}else{if(!l.added&&i){var p=r.slice(o,o+l.count);p=p.map((function(e,t){var r=n[u+t];return r.length>e.length?r:e})),l.value=e.join(p)}else l.value=e.join(r.slice(o,o+l.count));o+=l.count,l.added||(u+=l.count)}}var d=t[a-1];return a>1&&"string"==typeof d.value&&(d.added||d.removed)&&e.equals("",d.value)&&(t[a-2].value+=d.value,t.pop()),t}Object.defineProperty(e,"__esModule",{value:!0}),e.default=t,t.prototype={diff:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.callback;"function"==typeof n&&(i=n,n={}),this.options=n;var s=this;function a(e){return i?(setTimeout((function(){i(void 0,e)}),0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e));var o=(t=this.removeEmpty(this.tokenize(t))).length,u=e.length,l=1,c=o+u;n.maxEditLength&&(c=Math.min(c,n.maxEditLength));var p=[{newPos:-1,components:[]}],d=this.extractCommon(p[0],t,e,0);if(p[0].newPos+1>=o&&d+1>=u)return a([{value:this.join(t),count:t.length}]);function h(){for(var n=-1*l;n<=l;n+=2){var i=void 0,c=p[n-1],d=p[n+1],h=(d?d.newPos:0)-n;c&&(p[n-1]=void 0);var f=c&&c.newPos+1<o,m=d&&0<=h&&h<u;if(f||m){if(!f||m&&c.newPos<d.newPos?(i={newPos:(y=d).newPos,components:y.components.slice(0)},s.pushComponent(i.components,void 0,!0)):((i=c).newPos++,s.pushComponent(i.components,!0,void 0)),h=s.extractCommon(i,t,e,n),i.newPos+1>=o&&h+1>=u)return a(r(s,i.components,t,e,s.useLongestToken));p[n]=i}else p[n]=void 0}var y;l++}if(i)!function e(){setTimeout((function(){if(l>c)return i();h()||e()}),0)}();else for(;l<=c;){var f=h();if(f)return f}},pushComponent:function(e,t,r){var n=e[e.length-1];n&&n.added===t&&n.removed===r?e[e.length-1]={count:n.count+1,added:t,removed:r}:e.push({count:1,added:t,removed:r})},extractCommon:function(e,t,r,n){for(var i=t.length,s=r.length,a=e.newPos,o=a-n,u=0;a+1<i&&o+1<s&&this.equals(t[a+1],r[o+1]);)a++,o++,u++;return u&&e.components.push({count:u}),e.newPos=a,o},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],r=0;r<e.length;r++)e[r]&&t.push(e[r]);return t},castInput:function(e){return e},tokenize:function(e){return e.split("")},join:function(e){return e.join("")}}})),Vee=Bee((e=>{var t;Object.defineProperty(e,"__esModule",{value:!0}),e.diffArrays=function(e,t,n){return r.diff(e,t,n)},e.arrayDiff=void 0;var r=new(((t=Uee())&&t.__esModule?t:{default:t}).default);e.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}})),zee=Oee((()=>{(Cee=e=>e).grey=Cee,Cee.red=Cee,Cee.bold=Cee,Cee.yellow=Cee,Cee.blue=Cee,Cee.default=Cee,Pee=Cee})),Kee={};Lee(Kee,{getChalk:()=>Wee,shouldHighlight:()=>qee});var qee,Wee,Jee=Oee((()=>{zee(),qee=()=>!1,Wee=()=>Pee})),Hee=Bee((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.codeFrameColumns=s,e.default=function(e,t,r,i={}){if(!n){n=!0;let e="Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.";new Error(e).name="DeprecationWarning",console.warn(new Error(e))}return r=Math.max(r,0),s(e,{start:{column:r,line:t}},i)};var t,r=(Jee(),t=Kee,Mee(kee({},"__esModule",{value:!0}),t)),n=!1;var i=/\r\n|[\n\r\u2028\u2029]/;function s(e,t,n={}){let s=(n.highlightCode||n.forceColor)&&(0,r.shouldHighlight)(n),a=(0,r.getChalk)(n),o=function(e){return{gutter:e.grey,marker:e.red.bold,message:e.red.bold}}(a),u=(e,t)=>s?e(t):t,l=e.split(i),{start:c,end:p,markerLines:d}=function(e,t,r){let n=Object.assign({column:0,line:-1},e.start),i=Object.assign({},n,e.end),{linesAbove:s=2,linesBelow:a=3}=r||{},o=n.line,u=n.column,l=i.line,c=i.column,p=Math.max(o-(s+1),0),d=Math.min(t.length,l+a);-1===o&&(p=0),-1===l&&(d=t.length);let h=l-o,f={};if(h)for(let e=0;e<=h;e++){let r=e+o;if(u)if(0===e){let e=t[r-1].length;f[r]=[u,e-u+1]}else if(e===h)f[r]=[0,c];else{let n=t[r-e].length;f[r]=[0,n]}else f[r]=!0}else f[o]=u===c?!u||[u,0]:[u,c-u];return{start:p,end:d,markerLines:f}}(t,l,n),h=t.start&&"number"==typeof t.start.column,f=String(p).length,m=(s?(0,r.default)(e,n):e).split(i,p).slice(c,p).map(((e,t)=>{let r=c+1+t,i=` ${` ${r}`.slice(-f)} |`,s=d[r],a=!d[r+1];if(s){let t="";if(Array.isArray(s)){let r=e.slice(0,Math.max(s[0]-1,0)).replace(/[^\t]/g," "),l=s[1]||1;t=["\n ",u(o.gutter,i.replace(/\d/g," "))," ",r,u(o.marker,"^").repeat(l)].join(""),a&&n.message&&(t+=" "+u(o.message,n.message))}return[u(o.marker,">"),u(o.gutter,i),e.length>0?` ${e}`:"",t].join("")}return` ${u(o.gutter,i)}${e.length>0?` ${e}`:""}`})).join("\n");return n.message&&!h&&(m=`${" ".repeat(f+1)}${n.message}\n${m}`),s?a.reset(m):m}}));Lee({},{__debug:()=>jie,check:()=>Lie,doc:()=>wie,format:()=>Bie,formatWithCursor:()=>Oie,getSupportInfo:()=>Mie,util:()=>fie,version:()=>_ie});var Xee=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)},Gee=jee(Vee(),1),Yee="string",Qee="array",Zee="cursor",ete="indent",tte="align",rte="trim",nte="group",ite="fill",ste="if-break",ate="indent-if-break",ote="line-suffix",ute="line-suffix-boundary",lte="line",cte="label",pte="break-parent",dte=new Set([Zee,ete,tte,rte,nte,ite,ste,ate,ote,ute,lte,cte,pte]);var hte=function(e){if("string"==typeof e)return Yee;if(Array.isArray(e))return Qee;if(!e)return;let{type:t}=e;return dte.has(t)?t:void 0};function fte(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(hte(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...dte].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var mte=class extends Error{name="InvalidDocError";constructor(e){super(fte(e)),this.doc=e}},yte=mte,gte={};var bte=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===gte){r(i.pop());continue}r&&i.push(e,gte);let s=hte(e);if(!s)throw new yte(e);if(!1!==(null==t?void 0:t(e)))switch(s){case Qee:case ite:{let t=s===Qee?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case ste:i.push(e.flatContents,e.breakContents);break;case nte:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case tte:case ete:case ate:case cte:case ote:i.push(e.contents);break;case Yee:case Zee:case rte:case ute:case lte:case pte:break;default:throw new yte(e)}}},vte=()=>{};function xte(e){return{type:ete,contents:e}}function Ete(e,t){return{type:tte,contents:t,n:e}}function Ste(e,t={}){return vte(t.expandedStates),{type:nte,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Dte(e){return{type:ite,parts:e}}function Tte(e){return{type:ote,contents:e}}var Ate={type:ute},Cte={type:pte},Pte={type:rte},wte={type:lte,hard:!0},kte={type:lte,hard:!0,literal:!0},Fte={type:lte},Ite={type:lte,soft:!0},_te=[wte,Cte],Nte=[kte,Cte],Ote={type:Zee};function Bte(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function Lte(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=xte(n);n=Ete(t%r,n),n=Ete(Number.NEGATIVE_INFINITY,n)}return n}var Mte=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};function jte(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}function Rte(e,t){let r;switch(t){case"\n":r=/\n/g;break;case"\r":r=/\r/g;break;case"\r\n":r=/\r\n/g;break;default:throw new Error(`Unexpected "eol" ${JSON.stringify(t)}.`)}let n=e.match(r);return n?n.length:0}var $te={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},Ute=/[^\x20-\x7F]/;var Vte=function(e){if(!e)return 0;if(!Ute.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=$te.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t},zte=e=>{if(Array.isArray(e))return e;if(e.type!==ite)throw new Error(`Expect doc to be 'array' or '${ite}'.`);return e.parts};function Kte(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(hte(e)){case Qee:return t(e.map(n));case ite:return t({...e,parts:e.parts.map(n)});case ste:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case nte:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case tte:case ete:case ate:case cte:case ote:return t({...e,contents:n(e.contents)});case Yee:case Zee:case rte:case ute:case lte:case pte:return t(e);default:throw new yte(e)}}(e);return r.set(e,i),i}}function qte(e,t,r){let n=r,i=!1;return bte(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function Wte(e){if(e.type===nte&&e.break||e.type===lte&&e.hard||e.type===pte)return!0}function Jte(e){if(e.length>0){let t=Mte(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Hte(e){return e.type!==lte||e.hard?e.type===ste?e.flatContents:e:e.soft?"":" "}function Xte(e){for(e=[...e];e.length>=2&&Mte(!1,e,-2).type===lte&&Mte(!1,e,-1).type===pte;)e.length-=2;if(e.length>0){let t=Gte(Mte(!1,e,-1));e[e.length-1]=t}return e}function Gte(e){switch(hte(e)){case tte:case ete:case ate:case nte:case ote:case cte:{let t=Gte(e.contents);return{...e,contents:t}}case ste:return{...e,breakContents:Gte(e.breakContents),flatContents:Gte(e.flatContents)};case ite:return{...e,parts:Xte(e.parts)};case Qee:return Xte(e);case Yee:return e.replace(/[\n\r]*$/,"");case Zee:case rte:case ute:case lte:case pte:break;default:throw new yte(e)}return e}function Yte(e){return Gte(function(e){return Kte(e,(e=>function(e){switch(hte(e)){case ite:if(e.parts.every((e=>""===e)))return"";break;case nte:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===nte&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case tte:case ete:case ate:case ote:if(!e.contents)return"";break;case ste:if(!e.flatContents&&!e.breakContents)return"";break;case Qee:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof Mte(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case Yee:case Zee:case rte:case ute:case lte:case cte:case pte:break;default:throw new yte(e)}return e}(e)))}(e))}function Qte(e){if(e.type===lte)return!0}function Zte(e,t){return e.type===cte?{...e,contents:t(e.contents)}:t(e)}var ere=Symbol("MODE_BREAK"),tre=Symbol("MODE_FLAT"),rre=Symbol("cursor");function nre(e,t){return sre(e,{type:"indent"},t)}function ire(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?sre(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:sre(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function sre(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function are(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==rre)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(rre);return t}function ore(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(hte(l)){case Yee:u.push(l),r-=Vte(l);break;case Qee:case ite:{let t=zte(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case ete:case tte:case ate:case cte:o.push({mode:e,doc:l.contents});break;case rte:r+=are(u);break;case nte:{if(s&&l.break)return!1;let t=l.break?ere:e,r=l.expandedStates&&t===ere?Mte(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case ste:{let t=(l.groupId?i[l.groupId]||tre:e)===ere?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case lte:if(e===ere||l.hard)return!0;l.soft||(u.push(" "),r--);break;case ote:n=!0;break;case ute:if(n)return!1}}return!1}function ure(e,t){let r={},n=t.printWidth,i=jte(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:ere,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];bte(e,(function(e){if(e.type===pte&&Jte(r),e.type===nte){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===nte&&r.pop().break&&Jte(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(hte(d)){case Yee:{let e="\n"!==i?Xee(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=Vte(e));break}case Qee:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case Zee:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(rre),c++;break;case ete:a.push({ind:nre(e,t),mode:p,doc:d.contents});break;case tte:a.push({ind:ire(e,d.n,t),mode:p,doc:d.contents});break;case rte:s-=are(o);break;case nte:switch(p){case tre:if(!u){a.push({ind:e,mode:d.break?ere:tre,doc:d.contents});break}case ere:{u=!1;let t={ind:e,mode:tre,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&ore(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=Mte(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:ere,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:ere,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:tre,doc:t};if(ore(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:ere,doc:d.contents});break}}d.id&&(r[d.id]=Mte(!1,a,-1).mode);break;case ite:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:tre,doc:o},h={ind:e,mode:ere,doc:o},f=ore(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:tre,doc:u},y={ind:e,mode:ere,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:Dte(i)},b=i[0];ore({ind:e,mode:tre,doc:[o,u,b]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case ste:case ate:{let t=d.groupId?r[d.groupId]:p;if(t===ere){let t=d.type===ste?d.breakContents:d.negate?d.contents:xte(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===tre){let t=d.type===ste?d.flatContents:d.negate?xte(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case ote:l.push({ind:e,mode:p,doc:d.contents});break;case ute:l.length>0&&a.push({ind:e,mode:p,doc:wte});break;case lte:switch(p){case tre:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case ere:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=are(o),o.push(i+e.value),s=e.length)}break;case cte:a.push({ind:e,mode:p,doc:d.contents});break;case pte:break;default:throw new yte(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(rre);if(-1!==p){let e=o.indexOf(rre,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function lre(e){var t;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...lre(r));else{let e=lre(r);""!==e&&t.push(e)}return t}return e.type===ste?{...e,breakContents:lre(e.breakContents),flatContents:lre(e.flatContents)}:e.type===nte?{...e,contents:lre(e.contents),expandedStates:null==(t=e.expandedStates)?void 0:t.map(lre)}:e.type===ite?{type:"fill",parts:e.parts.map(lre)}:e.contents?{...e,contents:lre(e.contents)}:e}var cre=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n},pre=class extends Error{name="ConfigError"},dre=class extends Error{name="UndefinedParserError"},hre={cursorOffset:{category:"Special",type:"int",default:-1,range:{start:-1,end:1/0,step:1},description:"Print (to stderr) where a cursor at the given position would move to after formatting.\nThis option cannot be used with --range-start and --range-end.",cliCategory:"Editor"},endOfLine:{category:"Global",type:"choice",default:"lf",description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:"Maintain existing\n(mixed values within one file are normalised by looking at what's used after the first line)"}]},filepath:{category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{category:"Global",type:"choice",default:void 0,description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",description:"JavaScript"},{value:"babel-flow",description:"Flow"},{value:"babel-ts",description:"TypeScript"},{value:"typescript",description:"TypeScript"},{value:"acorn",description:"JavaScript"},{value:"espree",description:"JavaScript"},{value:"meriyah",description:"JavaScript"},{value:"css",description:"CSS"},{value:"less",description:"Less"},{value:"scss",description:"SCSS"},{value:"json",description:"JSON"},{value:"json5",description:"JSON5"},{value:"json-stringify",description:"JSON.stringify"},{value:"graphql",description:"GraphQL"},{value:"markdown",description:"Markdown"},{value:"mdx",description:"MDX"},{value:"vue",description:"Vue"},{value:"yaml",description:"YAML"},{value:"glimmer",description:"Ember / Handlebars"},{value:"html",description:"HTML"},{value:"angular",description:"Angular"},{value:"lwc",description:"Lightning Web Components"}]},plugins:{type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},printWidth:{category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:1/0,step:1}},rangeEnd:{category:"Special",type:"int",default:1/0,range:{start:0,end:1/0,step:1},description:"Format code ending at a given character offset (exclusive).\nThe range will extend forwards to the end of the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},rangeStart:{category:"Special",type:"int",default:0,range:{start:0,end:1/0,step:1},description:"Format code starting at a given character offset.\nThe range will extend backwards to the start of the first line containing the selected statement.\nThis option cannot be used with --cursor-offset.",cliCategory:"Editor"},requirePragma:{category:"Special",type:"boolean",default:!1,description:"Require either '@prettier' or '@format' to be present in the file's first docblock comment\nin order for it to be formatted.",cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:1/0,step:1}},useTabs:{category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{category:"Global",type:"choice",default:"auto",description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};function fre({plugins:e=[],showDeprecated:t=!1}={}){let r=e.flatMap((e=>e.languages??[])),n=[];for(let i of function(e){let t=[];for(let[r,n]of Object.entries(e)){let e={name:r,...n};Array.isArray(e.default)&&(e.default=Mte(!1,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map((({options:e})=>e)),hre)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter((e=>!e.deprecated))),"parser"===i.name&&(i.choices=[...i.choices,...mre(i.choices,r,e)])),i.pluginDefaults=Object.fromEntries(e.filter((e=>{var t;return void 0!==(null==(t=e.defaultOptions)?void 0:t[i.name])})).map((e=>[e.name,e.defaultOptions[i.name]]))),n.push(i));return{languages:r,options:n}}function*mre(e,t,r){let n=new Set(e.map((e=>e.value)));for(let e of t)if(e.parsers)for(let t of e.parsers)if(!n.has(t)){n.add(t);let i=r.find((e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t))),s=e.name;null!=i&&i.name&&(s+=` (plugin: ${i.name})`),yield{value:t,description:s}}}var yre=e=>e.split(/[/\\]/).pop();function gre(e,t){if(!t)return;let r=yre(t).toLowerCase();return e.find((e=>{var t,n;return(null==(t=e.extensions)?void 0:t.some((e=>r.endsWith(e))))||(null==(n=e.filenames)?void 0:n.some((e=>e.toLowerCase()===r)))}))}var bre=function(e,t){let r=e.plugins.flatMap((e=>e.languages??[])),n=function(e,t){if(t)return e.find((({name:e})=>e.toLowerCase()===t))??e.find((({aliases:e})=>null==e?void 0:e.includes(t)))??e.find((({extensions:e})=>null==e?void 0:e.includes(`.${t}`)))}(r,t.language)??gre(r,t.physicalFile)??gre(r,t.file)??void t.physicalFile;return null==n?void 0:n.parsers[0]},vre={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map((e=>vre.value(e))).join(", ")}]`;let t=Object.keys(e);return 0===t.length?"{}":`{ ${t.map((t=>`${vre.key(t)}: ${vre.value(e[t])}`)).join(", ")} }`},pair:({key:e,value:t})=>vre.value({[e]:t})};zee();zee();var xre=Symbol.for("vnopts.VALUE_NOT_EXIST"),Ere=Symbol.for("vnopts.VALUE_UNCHANGED"),Sre=" ".repeat(2);function Dre(e,t,r,n){return[`Invalid ${Pee.red(n.key(e))} value.`,`Expected ${Pee.blue(r)},`,`but received ${t===xre?Pee.gray("nothing"):Pee.red(n.value(t))}.`].join(" ")}function Tre({text:e,list:t},r){let n=[];return e&&n.push(`- ${Pee.blue(e)}`),t&&n.push([`- ${Pee.blue(t.title)}:`].concat(t.values.map((e=>Tre(e,r-Sre.length).replace(/^|\n/g,`$&${Sre}`)))).join("\n")),Are(n,r)}function Are(e,t){if(1===e.length)return e[0];let[r,n]=e,[i,s]=e.map((e=>e.split("\n",1)[0].length));return i>t&&i>s?n:r}zee();var Cre=[],Pre=[];var wre=(e,t,{descriptor:r,logger:n,schemas:i})=>{let s=[`Ignored unknown option ${Pee.yellow(r.pair({key:e,value:t}))}.`],a=Object.keys(i).sort().find((t=>function(e,t){if(e===t)return 0;let r=e;e.length>t.length&&(e=t,t=r);let n=e.length,i=t.length;for(;n>0&&e.charCodeAt(~-n)===t.charCodeAt(~-i);)n--,i--;let s=0;for(;s<n&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(n-=s,i-=s,0===n)return i;let a,o,u,l,c=0,p=0;for(;c<n;)Pre[c]=e.charCodeAt(s+c),Cre[c]=++c;for(;p<i;)for(a=t.charCodeAt(s+p),u=p++,o=p,c=0;c<n;c++)l=a===Pre[c]?u:u+1,u=Cre[c],o=Cre[c]=u>o?l>o?o+1:l:l>u?u+1:l;return o}(e,t)<3));a&&s.push(`Did you mean ${Pee.blue(r.key(a))}?`),n.warn(s.join(" "))},kre=["default","expected","validate","deprecated","forward","redirect","overlap","preprocess","postprocess"];var Fre=class{static create(e){return function(e,t){let r=new e(t),n=Object.create(r);for(let e of kre)e in t&&(n[e]=Ire(t[e],r,Fre.prototype[e].length));return n}(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return"nothing"}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,r){return e}preprocess(e,t){return e}postprocess(e,t){return Ere}};function Ire(e,t,r){return"function"==typeof e?(...n)=>e(...n.slice(0,r-1),t,...n.slice(r-1)):()=>e}var _re=class extends Fre{constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},Nre=class extends Fre{expected(){return"anything"}validate(){return!0}},Ore=class extends Fre{constructor({valueSchema:e,name:t=e.name,...r}){super({...r,name:t}),this._valueSchema=e}expected(e){let{text:t,list:r}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:r&&{title:"an array of the following values",values:[{list:r}]}}}validate(e,t){if(!Array.isArray(e))return!1;let r=[];for(let n of e){let e=t.normalizeValidateResult(this._valueSchema.validate(n,t),n);!0!==e&&r.push(e.value)}return 0===r.length||{value:r}}deprecated(e,t){let r=[];for(let n of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(n,t),n);!1!==e&&r.push(...e.map((({value:e})=>({value:[e]}))))}return r}forward(e,t){let r=[];for(let n of e){let e=t.normalizeForwardResult(this._valueSchema.forward(n,t),n);r.push(...e.map(Bre))}return r}redirect(e,t){let r=[],n=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);"remain"in e&&r.push(e.remain),n.push(...e.redirect.map(Bre))}return 0===r.length?{redirect:n}:{redirect:n,remain:r}}overlap(e,t){return e.concat(t)}};function Bre({from:e,to:t}){return{from:[e],to:t}}var Lre=class extends Fre{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};function Mre(e,t){let r=Object.create(null);for(let n of e){let e=n[t];if(r[e])throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r[e]=n}return r}function jre(e,t){if(e===t)return 0;let r=typeof e,n=typeof t,i=["undefined","object","boolean","number","string"];return r!==n?i.indexOf(r)-i.indexOf(n):"string"!==r?Number(e)-Number(t):e.localeCompare(t)}function Rre(e){return void 0===e?{}:e}function $re(e){if("string"==typeof e)return{text:e};let{text:t,list:r}=e;return function(e,t){if(!e)throw new Error(t)}(void 0!==(t||r),"Unexpected `expected` result, there should be at least one field."),r?{text:t,list:{title:r.title,values:r.values.map($re)}}:{text:t}}function Ure(e,t){return!0===e||(!1===e?{value:t}:e)}function Vre(e,t,r=!1){return!1!==e&&(!0===e?!!r||[{value:t}]:"value"in e?[e]:0!==e.length&&e)}function zre(e,t){return"string"==typeof e||"key"in e?{from:t,to:e}:"from"in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function Kre(e,t){return void 0===e?[]:Array.isArray(e)?e.map((e=>zre(e,t))):[zre(e,t)]}function qre(e,t){let r=Kre("object"==typeof e&&"redirect"in e?e.redirect:e,t);return 0===r.length?{remain:t,redirect:r}:"object"==typeof e&&"remain"in e?{remain:e.remain,redirect:r}:{redirect:r}}var Wre,Jre=class extends Fre{constructor(e){super(e),this._choices=function(e,t){let r=new Map;for(let n of e){let e=n[t];if(r.has(e))throw new Error(`Duplicate ${t} ${JSON.stringify(e)}`);r.set(e,n)}return r}(e.choices.map((e=>e&&"object"==typeof e?e:{value:e})),"value")}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map((e=>this._choices.get(e))).filter((({hidden:e})=>!e)).map((e=>e.value)).sort(jre).map(e.value),r=t.slice(0,-2),n=t.slice(-2);return{text:r.concat(n.join(" or ")).join(", "),list:{title:"one of the following values",values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return!(!t||!t.deprecated)&&{value:e}}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},Hre=class extends Fre{expected(){return"a number"}validate(e,t){return"number"==typeof e}},Xre=class extends Hre{expected(){return"an integer"}validate(e,t){return!0===t.normalizeValidateResult(super.validate(e,t),e)&&(r=e)===Math.floor(r);var r}},Gre=class extends Fre{expected(){return"a string"}validate(e){return"string"==typeof e}},Yre=vre,Qre=wre,Zre=(e,t,r)=>{let{text:n,list:i}=r.normalizeExpectedResult(r.schemas[e].expected(r)),s=[];return n&&s.push(Dre(e,t,n,r.descriptor)),i&&s.push([Dre(e,t,i.title,r.descriptor)].concat(i.values.map((e=>Tre(e,r.loggerPrintWidth)))).join("\n")),Are(s,r.loggerPrintWidth)},ene=(e,t,{descriptor:r})=>{let n=[`${Pee.yellow("string"==typeof e?r.key(e):r.pair(e))} is deprecated`];return t&&n.push(`we now treat it as ${Pee.blue("string"==typeof t?r.key(t):r.pair(t))}`),n.join("; ")+"."};function tne(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let i,{name:s}=e,a={name:s},o={};switch(e.type){case"int":i=Xre,t&&(a.preprocess=Number);break;case"string":case"path":i=Gre;break;case"choice":i=Jre,a.choices=e.choices.map((t=>null!=t&&t.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t));break;case"boolean":i=Lre;break;case"flag":i=n,a.flags=r.flatMap((e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean)));break;default:throw new Error(`Unexpected type ${e.type}`)}if(e.exception?a.validate=(t,r,n)=>e.exception(t)||r.validate(t,n):a.validate=(e,t,r)=>void 0===e||t.validate(e,r),e.redirect&&(o.redirect=t=>t?{to:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(o.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,r,n)=>r.preprocess(e(Array.isArray(t)?Mte(!1,t,-1):t),n)}return e.array?Ore.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:i.create(a)}):i.create({...a,...o})}var rne=function(e,t,{logger:r=!1,isCLI:n=!1,passThrough:i=!1,FlagSchema:s,descriptor:a}={}){if(n){if(!s)throw new Error("'FlagSchema' option is required.");if(!a)throw new Error("'descriptor' option is required.")}else a=vre;let o=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,r)=>{let{_:n,...i}=r.schemas;return wre(e,t,{...r,schemas:i})},u=function(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(Nre.create({name:"_"}));for(let i of e)n.push(tne(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(_re.create({name:i.alias,sourceName:i.name}));return n}(t,{isCLI:n,FlagSchema:s}),l=new class{constructor(e,t){let{logger:r=console,loggerPrintWidth:n=80,descriptor:i=Yre,unknown:s=Qre,invalid:a=Zre,deprecated:o=ene,missing:u=(()=>!1),required:l=(()=>!1),preprocess:c=(e=>e),postprocess:p=(()=>Ere)}=t||{};var d;this._utils={descriptor:i,logger:r||{warn:()=>{}},loggerPrintWidth:n,schemas:Mre(e,"name"),normalizeDefaultResult:Rre,normalizeExpectedResult:$re,normalizeDeprecatedResult:Vre,normalizeForwardResult:Kre,normalizeRedirectResult:qre,normalizeValidateResult:Ure},this._unknownHandler=s,this._invalidHandler=(d=a,(...e)=>{let t=d(...e);return"string"==typeof t?new Error(t):t}),this._deprecatedHandler=o,this._identifyMissing=(e,t)=>!(e in t)||u(e,t),this._identifyRequired=l,this._preprocess=c,this._postprocess=p,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=function(){let e=Object.create(null);return t=>{let r=JSON.stringify(t);return!!e[r]||(e[r]=!0,!1)}}()}normalize(e){let t={},r=[this._preprocess(e,this._utils)],n=()=>{for(;0!==r.length;){let e=r.shift(),n=this._applyNormalization(e,t);r.push(...n)}};n();for(let e of Object.keys(this._utils.schemas)){let n=this._utils.schemas[e];if(!(e in t)){let t=Rre(n.default(this._utils));"value"in t&&r.push({[e]:t.value})}}n();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let r=this._utils.schemas[e],n=t[e],i=r.postprocess(n,this._utils);i!==Ere&&(this._applyValidation(i,e,r),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let r=[],{knownKeys:n,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of n){let n=this._utils.schemas[i],s=n.preprocess(e[i],this._utils);this._applyValidation(s,i,n);let a=({from:e,to:t})=>{r.push("string"==typeof t?{[t]:e}:{[t.key]:t.value})},o=({value:e,redirectTo:t})=>{let r=Vre(n.deprecated(e,this._utils),s,!0);if(!1!==r)if(!0===r)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of r){let r={key:i,value:e};if(!this._hasDeprecationWarned(r)){let n="string"==typeof t?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(r,n,this._utils))}}};Kre(n.forward(s,this._utils),s).forEach(a);let u=qre(n.redirect(s,this._utils),s);if(u.redirect.forEach(a),"remain"in u){let e=u.remain;t[i]=i in t?n.overlap(t[i],e,this._utils):e,o({value:e})}for(let{from:e,to:t}of u.redirect)o({value:e,redirectTo:t})}for(let n of i){let i=e[n];this._applyUnknownHandler(n,i,t,((e,t)=>{r.push({[e]:t})}))}return r}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,xre,this._utils)}_partitionOptionKeys(e){let[t,r]=function(e,t){let r=[],n=[];for(let i of e)t(i)?r.push(i):n.push(i);return[r,n]}(Object.keys(e).filter((t=>!this._identifyMissing(t,e))),(e=>e in this._utils.schemas));return{knownKeys:t,unknownKeys:r}}_applyValidation(e,t,r){let n=Ure(r.validate(e,this._utils),e);if(!0!==n)throw this._invalidHandler(t,n.value,this._utils)}_applyUnknownHandler(e,t,r,n){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?n(e,t):r[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Ere){if(t.delete)for(let r of t.delete)delete e[r];if(t.override){let{knownKeys:r,unknownKeys:n}=this._partitionOptionKeys(t.override);for(let n of r){let r=t.override[n];this._applyValidation(r,n,this._utils.schemas[n]),e[n]=r}for(let r of n){let n=t.override[r];this._applyUnknownHandler(r,n,e,((t,r)=>{let n=this._utils.schemas[t];this._applyValidation(r,t,n),e[t]=r}))}}}}}(u,{logger:r,unknown:o,descriptor:a}),c=!1!==r;c&&Wre&&(l._hasDeprecationWarned=Wre);let p=l.normalize(e);return c&&(Wre=l._hasDeprecationWarned),p};function nne(e,t){if(!t)throw new Error("parserName is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.parsers&&Object.prototype.hasOwnProperty.call(n.parsers,t))return n}let r=`Couldn't resolve parser "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new pre(r)}function ine({plugins:e,parser:t}){return sne(nne(e,t),t)}function sne(e,t){let r=e.parsers[t];return"function"==typeof r?r():r}var ane={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};var one=async function(e,t={}){var r;let n={...e};if(!n.parser){if(!n.filepath)throw new dre("No parser and no file path given, couldn't infer a parser.");if(n.parser=bre(n,{physicalFile:n.filepath}),!n.parser)throw new dre(`No parser could be inferred for file "${n.filepath}".`)}let i=fre({plugins:e.plugins,showDeprecated:!0}).options,s={...ane,...Object.fromEntries(i.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default])))},a=nne(n.plugins,n.parser),o=await sne(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let u=null!=(r=a.printers)&&r[o.astFormat]?a:function(e,t){if(!t)throw new Error("astFormat is required.");for(let r=e.length-1;r>=0;r--){let n=e[r];if(n.printers&&Object.prototype.hasOwnProperty.call(n.printers,t))return n}let r=`Couldn't find plugin for AST format "${t}".`;throw r+=" Plugins must be explicitly added to the standalone bundle.",new pre(r)}(n.plugins,o.astFormat),l=await function(e,t){let r=e.printers[t];return"function"==typeof r?r():r}(u,o.astFormat);n.printer=l;let c={...s,...u.defaultOptions?Object.fromEntries(Object.entries(u.defaultOptions).filter((([,e])=>void 0!==e))):{}};for(let[e,t]of Object.entries(c))(null===n[e]||void 0===n[e])&&(n[e]=t);return"json"===n.parser&&(n.trailingComma="none"),rne(n,i,{passThrough:Object.keys(ane),...t})},une=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),lne=e=>Object.keys(e).filter((e=>!une.has(e)));var cne=function(e){return e?t=>e(t,une):lne};var pne=function(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=cne(n),s=r.ignoredProperties??new Set;return function e(t,n){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map((t=>e(t,n))).filter(Boolean);let a={},o=new Set(i(t));for(let r in t)!Object.prototype.hasOwnProperty.call(t,r)||s.has(r)||(o.has(r)?a[r]=e(t[r],t):a[r]=t[r]);let u=r(t,a,n);if(null!==u)return u??a}(e)},dne=jee(Hee(),1);var hne,fne,mne,yne,gne=async function(e,t){let r,n=await ine(t),i=n.preprocess?n.preprocess(e,t):e;t.originalText=i;try{r=await n.parse(i,t,t)}catch(t){!function(e,t){let{loc:r}=e;if(r){let n=(0,dne.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+="\n"+n,e.codeFrame=n,e}throw e}(t,e)}return{text:i,ast:r}};hne=new WeakSet,fne=function(e){let{stack:t}=this;for(let r=t.length-1;r>=0;r-=2)if(!Array.isArray(t[r])&&--e<0)return r;return-1},mne=new WeakSet,yne=function*(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let r=e[t];Array.isArray(r)||(yield r)}};var bne=class{constructor(e){Ree(this,hne),Ree(this,mne),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return Mte(!1,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:Mte(!1,this.stack,-2)}get node(){return Mte(!1,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return null!==this.siblings}get siblings(){let{stack:e}=this,t=Mte(!1,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return null===e?null:e[this.index+1]}get previous(){let{siblings:e}=this;return null===e?null:e[this.index-1]}get isFirst(){return 0===this.index}get isLast(){let{siblings:e,index:t}=this;return null!==e&&t===e.length-1}get isRoot(){return 1===this.stack.length}get root(){return this.stack[0]}get ancestors(){return[...$ee(this,mne,yne).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?Mte(!1,e,-2):null}getValue(){return Mte(!1,this.stack,-1)}getNode(e=0){let t=$ee(this,hne,fne).call(this,e);return-1===t?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}call(e,...t){let{stack:r}=this,{length:n}=r,i=Mte(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{return e(this)}finally{r.length=n}}callParent(e,t=0){let r=$ee(this,hne,fne).call(this,t+1),n=this.stack.splice(r+1);try{return e(this)}finally{this.stack.push(...n)}}each(e,...t){let{stack:r}=this,{length:n}=r,i=Mte(!1,r,-1);for(let e of t)i=i[e],r.push(e,i);try{for(let t=0;t<i.length;++t)r.push(t,i[t]),e(this,t,i),r.length-=2}finally{r.length=n}}map(e,...t){let r=[];return this.each(((t,n,i)=>{r[n]=e(t,n,i)}),...t),r}match(...e){let t=this.stack.length-1,r=null,n=this.stack[t--];for(let i of e){if(void 0===n)return!1;let e=null;if("number"==typeof r&&(e=r,r=this.stack[t--],n=this.stack[t--]),i&&!i(n,r,e))return!1;r=this.stack[t--],n=this.stack[t--]}return!0}findAncestor(e){for(let t of $ee(this,mne,yne).call(this))if(e(t))return t}hasAncestor(e){for(let t of $ee(this,mne,yne).call(this))if(e(t))return!0;return!1}},vne=()=>{};vne.ok=vne,vne.strictEqual=vne;var xne=vne;function Ene(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var Sne=Ene(/\s/),Dne=Ene(" \t"),Tne=Ene(",; \t"),Ane=Ene(/[^\n\r]/);var Cne=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var Pne=function(e,t,r={}){let n=Dne(e,r.backwards?t-1:t,r);return n!==Cne(e,n,r)};var wne=function(e){return Array.isArray(e)&&e.length>0};var kne=function(e){return null!==e&&"object"==typeof e};function*Fne(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>kne(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function Ine(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function _ne(e,t){t.leading=!0,t.trailing=!1,Ine(e,t)}function Nne(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Ine(e,t)}function One(e,t){t.leading=!1,t.trailing=!0,Ine(e,t)}var Bne=new WeakMap;function Lne(e,t){if(Bne.has(e))return Bne.get(e);let{printer:{getCommentChildNodes:r,canAttachComment:n,getVisitorKeys:i},locStart:s,locEnd:a}=t;if(!n)return[];let o=((null==r?void 0:r(e,t))??[...Fne(e,{getVisitorKeys:cne(i)})]).flatMap((e=>n(e)?[e]:Lne(e,t)));return o.sort(((e,t)=>s(e)-s(t)||a(e)-a(t))),Bne.set(e,o),o}function Mne(e,t,r,n){let i,s,{locStart:a,locEnd:o}=r,u=a(t),l=o(t),c=Lne(e,r),p=0,d=c.length;for(;p<d;){let e=p+d>>1,n=c[e],h=a(n),f=o(n);if(h<=u&&l<=f)return Mne(n,t,r,n);if(f<=u)i=n,p=e+1;else{if(!(l<=h))throw new Error("Comment location overlaps with node location");s=n,d=e}}if("TemplateLiteral"===(null==n?void 0:n.type)){let{quasis:e}=n,a=zne(e,t,r);i&&zne(e,i,r)!==a&&(i=null),s&&zne(e,s,r)!==a&&(s=null)}return{enclosingNode:n,precedingNode:i,followingNode:s}}var jne=()=>!1;var Rne=e=>!/[\S\n\u2028\u2029]/.test(e);function $ne(e,t,r,n){let{comment:i,precedingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=a(i);if(s)for(let t=n-1;t>=0;t--){let{comment:n,precedingNode:i}=r[t];if(i!==s||!Rne(e.slice(o(n),u)))break;u=a(n)}return Pne(e,u,{backwards:!0})}function Une(e,t,r,n){let{comment:i,followingNode:s}=r[n],{locStart:a,locEnd:o}=t,u=o(i);if(s)for(let t=n+1;t<r.length;t++){let{comment:n,followingNode:i}=r[t];if(i!==s||!Rne(e.slice(u,a(n))))break;u=o(n)}return Pne(e,u)}function Vne(e,t){var r,n;let i=e.length;if(0===i)return;let s,{precedingNode:a,followingNode:o}=e[0],u=t.locStart(o);for(s=i;s>0;--s){let{comment:i,precedingNode:l,followingNode:c}=e[s-1];xne.strictEqual(l,a),xne.strictEqual(c,o);let p=t.originalText.slice(t.locEnd(i),u);if(!((null==(n=(r=t.printer).isGap)?void 0:n.call(r,p,t))??/^[\s(]*$/.test(p)))break;u=t.locStart(i)}for(let[t,{comment:r}]of e.entries())t<s?One(a,r):_ne(o,r);for(let e of[a,o])e.comments&&e.comments.length>1&&e.comments.sort(((e,r)=>t.locStart(e)-t.locStart(r)));e.length=0}function zne(e,t,r){let n=r.locStart(t)-1;for(let t=1;t<e.length;++t)if(n<r.locStart(e[t]))return t-1;return 0}var Kne=function(e,t){let r=t-1;return r=Dne(e,r,{backwards:!0}),r=Cne(e,r,{backwards:!0}),r=Dne(e,r,{backwards:!0}),r!==Cne(e,r,{backwards:!0})};function qne(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function Wne(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[qne(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=Pne(a,u(n))?Pne(a,o(n),{backwards:!0})?_te:Fte:" ";i.push(e)}else i.push(_te);let l=Cne(a,Dne(a,u(n)));return!1!==l&&Pne(a,l)&&i.push(_te),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=qne(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||Pne(o,u(i),{backwards:!0})){let e=Kne(o,u(i));return{doc:Tte([_te,e?_te:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[Tte([" ",s]),Cte],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}async function Jne(e,t,r,n,i){let{embeddedLanguageFormatting:s,printer:{embed:a,hasPrettierIgnore:o=(()=>!1),getVisitorKeys:u}}=r;if(!a||"auto"!==s)return;if(a.length>2)throw new Error("printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/en/plugins.html#optional-embed");let l=cne(a.getVisitorKeys??u),c=[];!function t(){let{node:n}=e;if(null===n||"object"!=typeof n||o(e))return;for(let r of l(n))Array.isArray(n[r])?e.each(t,r):e.call(t,r);let s=a(e,r);if(s){if("function"==typeof s)return void c.push({print:s,node:n,pathStack:[...e.stack]});i.set(n,s)}}();let p=e.stack;for(let{print:n,node:s,pathStack:a}of c)try{e.stack=a;let o=await n(d,t,e,r);o&&i.set(s,o)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}function d(e,t){return async function(e,t,r,n){let i=await one({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await gne(e,i),a=await n(s,i);return Yte(a)}(e,t,r,n)}e.stack=p}var Hne=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)};async function Xne(e,t){({ast:e}=await Yne(e,t));let r=new Map,n=new bne(e),i=new Map;await Jne(n,a,t,Xne,i);let s=await Gne(n,t,a,void 0,i);return function(e){let{[Symbol.for("comments")]:t,[Symbol.for("printedComments")]:r}=e;for(let e of t){if(!e.printed&&!r.has(e))throw new Error('Comment "'+e.value.trim()+'" was not printed. Please report this error!');delete e.printed}}(t),s;function a(e,t){return void 0===e||e===n?o(t):Array.isArray(e)?n.call((()=>o(t)),...e):n.call((()=>o(t)),e)}function o(e){let s=n.node;if(null==s)return"";let o=s&&"object"==typeof s&&void 0===e;if(o&&r.has(s))return r.get(s);let u=Gne(n,t,a,e,i);return o&&r.set(s,u),u}}function Gne(e,t,r,n,i){var s;let a,{node:o}=e,{printer:u}=t;return a=null!=(s=u.hasPrettierIgnore)&&s.call(u,e)?Hne(e,t):i.has(o)?i.get(o):u.print(e,t,r,n),o===t.cursorNode&&(a=Zte(a,(e=>[Ote,e,Ote]))),u.printComment&&(!u.willPrintOwnComments||!u.willPrintOwnComments(e,t))&&(a=function(e,t,r){let{leading:n,trailing:i}=Wne(e,r);return n||i?Zte(t,(e=>[n,e,i])):t}(e,a,t)),a}async function Yne(e,t){let r=e.comments??[];t[Symbol.for("comments")]=r,t[Symbol.for("tokens")]=e.tokens??[],t[Symbol.for("printedComments")]=new Set,function(e,t){let{comments:r}=e;if(delete e.comments,!wne(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:o={}},originalText:u}=t,{ownLine:l=jne,endOfLine:c=jne,remaining:p=jne}=o,d=r.map(((n,i)=>({...Mne(e,n,t),comment:n,text:u,options:t,ast:e,isLastComment:r.length-1===i})));for(let[e,t]of d.entries()){let r,{comment:o,precedingNode:u,enclosingNode:h,followingNode:f,text:m,options:y,ast:g,isLastComment:b}=t;if("json"===y.parser||"json5"===y.parser||"__js_expression"===y.parser||"__ts_expression"===y.parser||"__vue_expression"===y.parser||"__vue_ts_expression"===y.parser){if(i(o)-i(g)<=0){_ne(g,o);continue}if(s(o)-s(g)>=0){One(g,o);continue}}if(a?r=[t]:(o.enclosingNode=h,o.precedingNode=u,o.followingNode=f,r=[o,m,y,g,b]),$ne(m,y,d,e))o.placement="ownLine",l(...r)||(f?_ne(f,o):u?One(u,o):Nne(h||g,o));else if(Une(m,y,d,e))o.placement="endOfLine",c(...r)||(u?One(u,o):f?_ne(f,o):Nne(h||g,o));else if(o.placement="remaining",!p(...r))if(u&&f){let e=n.length;e>0&&n[e-1].followingNode!==f&&Vne(n,y),n.push(t)}else u?One(u,o):f?_ne(f,o):Nne(h||g,o)}if(Vne(n,t),!a)for(let e of r)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}(e,t);let{printer:{preprocess:n}}=t;return{ast:e=n?await n(e,t):e,comments:r}}var Qne=({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e;function Zne(e){let t=e.length-1;for(;;){let r=e[t];if("Program"!==(null==r?void 0:r.type)&&"File"!==(null==r?void 0:r.type))break;t--}return e.slice(0,t+1)}function eie(e,t,r,n,i=[],s){let{locStart:a,locEnd:o}=r,u=a(e),l=o(e);if(!(t>l||t<u||"rangeEnd"===s&&t===u||"rangeStart"===s&&t===l)){for(let a of Lne(e,r)){let o=eie(a,t,r,n,[e,...i],s);if(o)return o}if(!n||n(e,i[0]))return{node:e,parentNodes:i}}}var tie=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),rie=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function nie(e,t,r){if(!t)return!1;switch(e.parser){case"flow":case"babel":case"babel-flow":case"babel-ts":case"typescript":case"acorn":case"espree":case"meriyah":case"__babel_estree":return function(e,t){return"DeclareExportDeclaration"!==t&&"TypeParameterDeclaration"!==e&&("Directive"===e||"TypeAlias"===e||"TSExportAssignment"===e||e.startsWith("Declare")||e.startsWith("TSDeclare")||e.endsWith("Statement")||e.endsWith("Declaration"))}(t.type,null==r?void 0:r.type);case"json":case"json5":case"json-stringify":return tie.has(t.type);case"graphql":return rie.has(t.kind);case"vue":return"root"!==t.tag}return!1}function iie(e,t,r){let{rangeStart:n,rangeEnd:i,locStart:s,locEnd:a}=t;xne.ok(i>n);let o=e.slice(n,i).search(/\S/),u=-1===o;if(!u)for(n+=o;i>n&&!/\S/.test(e[i-1]);--i);let l,c,p=eie(r,n,t,((e,r)=>nie(t,e,r)),[],"rangeStart"),d=u?p:eie(r,i,t,(e=>nie(t,e)),[],"rangeEnd");if(!p||!d)return{rangeStart:0,rangeEnd:0};if(Qne(t)){let e=function(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find((e=>tie.has(e.type)&&n.has(e)))}(p,d);l=e,c=e}else({startNode:l,endNode:c}=function(e,t,{locStart:r,locEnd:n}){let i=e.node,s=t.node;if(i===s)return{startNode:i,endNode:s};let a=r(e.node);for(let e of Zne(t.parentNodes)){if(!(r(e)>=a))break;s=e}let o=n(t.node);for(let t of Zne(e.parentNodes)){if(!(n(t)<=o))break;if(i=t,i===s)break}return{startNode:i,endNode:s}}(p,d,t));return{rangeStart:Math.min(s(l),s(c)),rangeEnd:Math.max(a(l),a(c))}}var sie=function(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=cne(t.printer.getVisitorKeys),a=e=>n(e)<=r&&i(e)>=r,o=e;for(let t of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of Fne(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:s,filter:a}))o=t;return o},aie="\ufeff",oie=Symbol("cursor");async function uie(e,t,r=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await gne(e,t);t.cursorOffset>=0&&(t.cursorNode=sie(n,t));let s=await Xne(n,t);r>0&&(s=Lte([_te,s],r,t.tabWidth));let a=ure(s,t);if(r>0){let e=a.formatted.trim();void 0!==a.cursorNodeStart&&(a.cursorNodeStart-=a.formatted.indexOf(e)),a.formatted=e+jte(t.endOfLine)}let o=t[Symbol.for("comments")];if(t.cursorOffset>=0){let e,r,n,s,u;if(t.cursorNode&&a.cursorNodeText?(e=t.locStart(t.cursorNode),r=i.slice(e,t.locEnd(t.cursorNode)),n=t.cursorOffset-e,s=a.cursorNodeStart,u=a.cursorNodeText):(e=0,r=i,n=t.cursorOffset,s=0,u=a.formatted),r===u)return{formatted:a.formatted,cursorOffset:s+n,comments:o};let l=r.split("");l.splice(n,0,oie);let c=u.split(""),p=(0,Gee.diffArrays)(l,c),d=s;for(let e of p)if(e.removed){if(e.value.includes(oie))break}else d+=e.count;return{formatted:a.formatted,cursorOffset:d,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}function lie(e,t,r){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?r:t}function cie(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=lie(e,r,-1),n=lie(e,n,0),i=lie(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function pie(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=cie(e,t),a=e.charAt(0)===aie;if(a&&(e=e.slice(1),r--,n--,i--),"auto"===s&&(s=function(e){let t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"}(e)),e.includes("\r")){let t=t=>Rte(e.slice(0,Math.max(t,0)),"\r\n");r-=t(r),n-=t(n),i-=t(i),e=function(e){return Xee(!1,e,/\r\n?/g,"\n")}(e)}return{hasBOM:a,text:e,options:cie(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function die(e,t){let r=await ine(t);return!r.hasPragma||r.hasPragma(e)}async function hie(e,t){let r,{hasBOM:n,text:i,options:s}=pie(e,await one(t));return s.rangeStart>=s.rangeEnd&&""!==i||s.requirePragma&&!await die(i,s)?{formatted:e,cursorOffset:t.cursorOffset,comments:[]}:(s.rangeStart>0||s.rangeEnd<i.length?r=await async function(e,t){let{ast:r,text:n}=await gne(e,t),{rangeStart:i,rangeEnd:s}=iie(n,t,r),a=n.slice(i,s),o=Math.min(i,n.lastIndexOf("\n",i)+1),u=n.slice(o,i).match(/^\s*/)[0],l=cre(u,t.tabWidth),c=await uie(a,{...t,rangeStart:0,rangeEnd:Number.POSITIVE_INFINITY,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=s?t.cursorOffset-i:-1,endOfLine:"lf"},l),p=c.formatted.trimEnd(),{cursorOffset:d}=t;d>s?d+=p.length-a.length:c.cursorOffset>=0&&(d=c.cursorOffset+i);let h=n.slice(0,i)+p+n.slice(s);if("lf"!==t.endOfLine){let e=jte(t.endOfLine);d>=0&&"\r\n"===e&&(d+=Rte(h.slice(0,d),"\n")),h=Xee(!1,h,"\n",e)}return{formatted:h,cursorOffset:d,comments:c.comments}}(i,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await die(i,s)&&(i=s.printer.insertPragma(i)),r=await uie(i,s)),n&&(r.formatted=aie+r.formatted,r.cursorOffset>=0&&r.cursorOffset++),r)}var fie={};Lee(fie,{addDanglingComment:()=>Nne,addLeadingComment:()=>_ne,addTrailingComment:()=>One,getAlignmentSize:()=>cre,getIndentSize:()=>xie,getMaxContinuousCount:()=>vie,getNextNonSpaceNonCommentCharacter:()=>Die,getNextNonSpaceNonCommentCharacterIndex:()=>Aie,getStringWidth:()=>Vte,hasNewline:()=>Pne,hasNewlineInRange:()=>Eie,hasSpaces:()=>Sie,isNextLineEmpty:()=>Pie,isNextLineEmptyAfterIndex:()=>bie,isPreviousLineEmpty:()=>Cie,makeString:()=>Tie,skip:()=>Ene,skipEverythingButNewLine:()=>Ane,skipInlineComment:()=>mie,skipNewline:()=>Cne,skipSpaces:()=>Dne,skipToLineEnd:()=>Tne,skipTrailingComment:()=>yie,skipWhitespace:()=>Sne});var mie=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var yie=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Ane(e,t):t)};var gie=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Dne(e,n),n=mie(e,n),n=yie(e,n),n=Cne(e,n);return n};var bie=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Tne(e,n),n=mie(e,n),n=Dne(e,n);return n=yie(e,n),n=Cne(e,n),!1!==n&&Pne(e,n)};var vie=function(e,t){let r=e.match(new RegExp(`(${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(t)})+`,"g"));return null===r?0:r.reduce(((e,r)=>Math.max(e,r.length/t.length)),0)};var xie=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:cre(e.slice(r+1).match(/^[\t ]*/)[0],t)};var Eie=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};var Sie=function(e,t,r={}){return Dne(e,r.backwards?t-1:t,r)!==t};var Die=function(e,t){let r=gie(e,t);return!1===r?"":e.charAt(r)};var Tie=function(e,t,r){let n='"'===t?"'":'"',i=Xee(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};function Aie(e,t){return 2===arguments.length||"number"==typeof t?gie(e,t):function(e,t,r){return gie(e,r(t))}(...arguments)}function Cie(e,t){return 2===arguments.length||"number"==typeof t?Kne(e,t):function(e,t,r){return Kne(e,r(t))}(...arguments)}function Pie(e,t){return 2===arguments.length||"number"==typeof t?bie(e,t):function(e,t,r){return bie(e,r(t))}(...arguments)}var wie={};Lee(wie,{builders:()=>kie,printer:()=>Fie,utils:()=>Iie});var kie={join:Bte,line:Fte,softline:Ite,hardline:_te,literalline:Nte,group:Ste,conditionalGroup:function(e,t){return Ste(e[0],{...t,expandedStates:e})},fill:Dte,lineSuffix:Tte,lineSuffixBoundary:Ate,cursor:Ote,breakParent:Cte,ifBreak:function(e,t="",r={}){return{type:ste,breakContents:e,flatContents:t,groupId:r.groupId}},trim:Pte,indent:xte,indentIfBreak:function(e,t){return{type:ate,contents:e,groupId:t.groupId,negate:t.negate}},align:Ete,addAlignmentToDoc:Lte,markAsRoot:function(e){return Ete({type:"root"},e)},dedentToRoot:function(e){return Ete(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return Ete(-1,e)},hardlineWithoutBreakParent:wte,literallineWithoutBreakParent:kte,label:function(e,t){return e?{type:cte,label:e,contents:t}:t},concat:e=>e},Fie={printDocToString:ure},Iie={willBreak:function(e){return qte(e,Wte,!1)},traverseDoc:bte,findInDoc:qte,mapDoc:Kte,removeLines:function(e){return Kte(e,Hte)},stripTrailingHardline:Yte,replaceEndOfLine:function(e,t=Nte){return Kte(e,(e=>"string"==typeof e?Bte(t,e.split("\n")):e))},canBreak:function(e){return qte(e,Qte,!1)}},_ie="3.0.1";function Nie(e,t=1){return async(...r)=>{let n=r[t]??{},i=n.plugins??[];return r[t]={...n,plugins:Array.isArray(i)?i:Object.values(i)},e(...r)}}var Oie=Nie(hie);async function Bie(e,t){let{formatted:r}=await Oie(e,{...t,cursorOffset:-1});return r}async function Lie(e,t){return await Bie(e,t)===e}var Mie=Nie(fre,0),jie={parse:Nie((async function(e,t,r){let{text:n,options:i}=pie(e,await one(t)),s=await gne(n,i);return r&&(r.preprocessForPrint&&(s.ast=await Yne(s.ast,i)),r.massage&&(s.ast=pne(s.ast,i))),s})),formatAST:Nie((async function(e,t){return t=await one(t),ure(await Xne(e,t),t)})),formatDoc:Nie((async function(e,t){let r=function(e){let t=Object.create(null),r=new Set;return function e(t,r,i){var s,a;if("string"==typeof t)return JSON.stringify(t);if(Array.isArray(t)){let r=t.map(e).filter(Boolean);return 1===r.length?r[0]:`[${r.join(", ")}]`}if(t.type===lte){let e=(null==(s=null==i?void 0:i[r+1])?void 0:s.type)===pte;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===pte)return(null==(a=null==i?void 0:i[r-1])?void 0:a.type)===lte&&i[r-1].hard?void 0:"breakParent";if(t.type===rte)return"trim";if(t.type===ete)return"indent("+e(t.contents)+")";if(t.type===tte)return t.n===Number.NEGATIVE_INFINITY?"dedentToRoot("+e(t.contents)+")":t.n<0?"dedent("+e(t.contents)+")":"root"===t.n.type?"markAsRoot("+e(t.contents)+")":"align("+JSON.stringify(t.n)+", "+e(t.contents)+")";if(t.type===ste)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if(t.type===ate){let r=[];t.negate&&r.push("negate: true"),t.groupId&&r.push(`groupId: ${n(t.groupId)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return`indentIfBreak(${e(t.contents)}${i})`}if(t.type===nte){let r=[];t.break&&"propagated"!==t.break&&r.push("shouldBreak: true"),t.id&&r.push(`id: ${n(t.id)}`);let i=r.length>0?`, { ${r.join(", ")} }`:"";return t.expandedStates?`conditionalGroup([${t.expandedStates.map((t=>e(t))).join(",")}]${i})`:`group(${e(t.contents)}${i})`}if(t.type===ite)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if(t.type===ote)return"lineSuffix("+e(t.contents)+")";if(t.type===ute)return"lineSuffixBoundary";if(t.type===cte)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(lre(e));function n(e){if("symbol"!=typeof e)return JSON.stringify(String(e));if(e in t)return t[e];let n=e.description||"symbol";for(let i=0;;i++){let s=n+(i>0?` #${i}`:"");if(!r.has(s))return r.add(s),t[e]=`Symbol.for(${JSON.stringify(s)})`}}}(e),{formatted:n}=await hie(r,{...t,parser:"__js_expression"});return n})),printToDoc:Nie((async function(e,t){t=await one(t);let{ast:r}=await gne(e,t);return Xne(r,t)})),printDocToString:Nie((async function(e,t){return ure(e,await one(t))}))},Rie=Object.create,$ie=Object.defineProperty,Uie=Object.getOwnPropertyDescriptor,Vie=Object.getOwnPropertyNames,zie=Object.getPrototypeOf,Kie=Object.prototype.hasOwnProperty,qie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wie=(e,t,r)=>(r=null!=e?Rie(zie(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Vie(t))!Kie.call(e,i)&&i!==r&&$ie(e,i,{get:()=>t[i],enumerable:!(n=Uie(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:$ie(r,"default",{value:e,enumerable:!0}),e)),Jie=qie((e=>{function t(e,t){if(null==e)return{};var r,n,i={},s=Object.keys(e);for(n=0;n<s.length;n++)r=s[n],!(t.indexOf(r)>=0)&&(i[r]=e[r]);return i}Object.defineProperty(e,"__esModule",{value:!0});var r=class{constructor(e,t,r){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=r}},n=class{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}};function i(e,t){let{line:n,column:i,index:s}=e;return new r(n,i+t,s+t)}var s="BABEL_PARSER_SYNTAX_ERROR",a="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",o=(e,t=e.length-1)=>({get(){return e.reduce(((e,t)=>e[t]),this)},set(r){e.reduce(((e,n,i)=>i===t?e[n]=r:e[n]),this)}}),u=(e,t,r)=>Object.keys(r).map((e=>[e,r[e]])).filter((([,e])=>!!e)).map((([e,t])=>[e,"function"==typeof t?{value:t,enumerable:!1}:"string"==typeof t.reflect?Object.assign({},t,o(t.reflect.split("."))):t])).reduce(((e,[t,r])=>Object.defineProperty(e,t,Object.assign({configurable:!0},r))),Object.assign(new e,t)),l={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:a},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:a}},c={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"},p=({type:e,prefix:t})=>"UpdateExpression"===e?c.UpdateExpression[String(t)]:c[e],d={AccessorIsGenerator:({kind:e})=>`A ${e}ter cannot be a generator.`,ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:({kind:e})=>`Missing initializer in ${e} 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.",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:e})=>`\`${e}\` 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:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"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:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedAssertSyntax: true` option in the import attributes plugin to suppress this error.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${1===e?"one argument":"one or two arguments"}.`,ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${p(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${p(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} 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:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.map((e=>JSON.stringify(e))).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:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' 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:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,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.",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:e})=>`Unexpected keyword '${e}'.`,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:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script`.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:({target:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},h=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),f={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:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${p({type:e})}; 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.'},m=["toMessage"],y=["message"];function g(e){let{toMessage:n}=e,i=t(e,m);return function e({loc:t,details:s}){return u(SyntaxError,Object.assign({},i,{loc:t}),{clone(t={}){let n=t.loc||{};return e({loc:new r("line"in n?n.line:this.loc.line,"column"in n?n.column:this.loc.column,"index"in n?n.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:s,enumerable:!1},message:{get(){return`${n(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:"loc.index",enumerable:!0},missingPlugin:"missingPlugin"in s&&{reflect:"details.missingPlugin",enumerable:!0}})}}function b(e,r){if(Array.isArray(e))return t=>b(t,e[0]);let n={};for(let i of Object.keys(e)){let a=e[i],o="string"==typeof a?{message:()=>a}:"function"==typeof a?{message:a}:a,{message:u}=o,l=t(o,y),c="string"==typeof u?()=>u:u;n[i]=g(Object.assign({code:s,reasonCode:i,toMessage:c},r?{syntaxPlugin:r}:{},l))}return n}var v=Object.assign({},b(l),b(d),b({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' 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."}),b`pipelineOperator`(f)),{defineProperty:x}=Object,E=(e,t)=>x(e,t,{enumerable:!1,value:e[t]});function S(e){return e.loc.start&&E(e.loc.start,"index"),e.loc.end&&E(e.loc.end,"index"),e}var D=class{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}},T={brace:new D("{"),j_oTag:new D("<tag"),j_cTag:new D("</tag"),j_expr:new D("<tag>...</tag>",!0)};T.template=new D("`",!0);var A=!0,C=!0,P=!0,w=!0,k=!0,F=class{constructor(e,t={}){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=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}},I=new Map;function _(e,t={}){t.keyword=e;let r=U(e,t);return I.set(e,r),r}function N(e,t){return U(e,{beforeExpr:A,binop:t})}var O=-1,B=[],L=[],M=[],j=[],R=[],$=[];function U(e,t={}){var r,n,i,s;return++O,L.push(e),M.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),$.push(null!=(s=t.prefix)&&s),B.push(new F(e,t)),O}function V(e,t={}){var r,n,i,s;return++O,I.set(e,O),L.push(e),M.push(null!=(r=t.binop)?r:-1),j.push(null!=(n=t.beforeExpr)&&n),R.push(null!=(i=t.startsExpr)&&i),$.push(null!=(s=t.prefix)&&s),B.push(new F("name",t)),O}var z={bracketL:U("[",{beforeExpr:A,startsExpr:C}),bracketHashL:U("#[",{beforeExpr:A,startsExpr:C}),bracketBarL:U("[|",{beforeExpr:A,startsExpr:C}),bracketR:U("]"),bracketBarR:U("|]"),braceL:U("{",{beforeExpr:A,startsExpr:C}),braceBarL:U("{|",{beforeExpr:A,startsExpr:C}),braceHashL:U("#{",{beforeExpr:A,startsExpr:C}),braceR:U("}"),braceBarR:U("|}"),parenL:U("(",{beforeExpr:A,startsExpr:C}),parenR:U(")"),comma:U(",",{beforeExpr:A}),semi:U(";",{beforeExpr:A}),colon:U(":",{beforeExpr:A}),doubleColon:U("::",{beforeExpr:A}),dot:U("."),question:U("?",{beforeExpr:A}),questionDot:U("?."),arrow:U("=>",{beforeExpr:A}),template:U("template"),ellipsis:U("...",{beforeExpr:A}),backQuote:U("`",{startsExpr:C}),dollarBraceL:U("${",{beforeExpr:A,startsExpr:C}),templateTail:U("...`",{startsExpr:C}),templateNonTail:U("...${",{beforeExpr:A,startsExpr:C}),at:U("@"),hash:U("#",{startsExpr:C}),interpreterDirective:U("#!..."),eq:U("=",{beforeExpr:A,isAssign:w}),assign:U("_=",{beforeExpr:A,isAssign:w}),slashAssign:U("_=",{beforeExpr:A,isAssign:w}),xorAssign:U("_=",{beforeExpr:A,isAssign:w}),moduloAssign:U("_=",{beforeExpr:A,isAssign:w}),incDec:U("++/--",{prefix:k,postfix:!0,startsExpr:C}),bang:U("!",{beforeExpr:A,prefix:k,startsExpr:C}),tilde:U("~",{beforeExpr:A,prefix:k,startsExpr:C}),doubleCaret:U("^^",{startsExpr:C}),doubleAt:U("@@",{startsExpr:C}),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:A,binop:9,prefix:k,startsExpr:C}),modulo:U("%",{binop:10,startsExpr:C}),star:U("*",{binop:10}),slash:N("/",10),exponent:U("**",{beforeExpr:A,binop:11,rightAssociative:!0}),_in:_("in",{beforeExpr:A,binop:7}),_instanceof:_("instanceof",{beforeExpr:A,binop:7}),_break:_("break"),_case:_("case",{beforeExpr:A}),_catch:_("catch"),_continue:_("continue"),_debugger:_("debugger"),_default:_("default",{beforeExpr:A}),_else:_("else",{beforeExpr:A}),_finally:_("finally"),_function:_("function",{startsExpr:C}),_if:_("if"),_return:_("return",{beforeExpr:A}),_switch:_("switch"),_throw:_("throw",{beforeExpr:A,prefix:k,startsExpr:C}),_try:_("try"),_var:_("var"),_const:_("const"),_with:_("with"),_new:_("new",{beforeExpr:A,startsExpr:C}),_this:_("this",{startsExpr:C}),_super:_("super",{startsExpr:C}),_class:_("class",{startsExpr:C}),_extends:_("extends",{beforeExpr:A}),_export:_("export"),_import:_("import",{startsExpr:C}),_null:_("null",{startsExpr:C}),_true:_("true",{startsExpr:C}),_false:_("false",{startsExpr:C}),_typeof:_("typeof",{beforeExpr:A,prefix:k,startsExpr:C}),_void:_("void",{beforeExpr:A,prefix:k,startsExpr:C}),_delete:_("delete",{beforeExpr:A,prefix:k,startsExpr:C}),_do:_("do",{isLoop:P,beforeExpr:A}),_for:_("for",{isLoop:P}),_while:_("while",{isLoop:P}),_as:V("as",{startsExpr:C}),_assert:V("assert",{startsExpr:C}),_async:V("async",{startsExpr:C}),_await:V("await",{startsExpr:C}),_from:V("from",{startsExpr:C}),_get:V("get",{startsExpr:C}),_let:V("let",{startsExpr:C}),_meta:V("meta",{startsExpr:C}),_of:V("of",{startsExpr:C}),_sent:V("sent",{startsExpr:C}),_set:V("set",{startsExpr:C}),_static:V("static",{startsExpr:C}),_using:V("using",{startsExpr:C}),_yield:V("yield",{startsExpr:C}),_asserts:V("asserts",{startsExpr:C}),_checks:V("checks",{startsExpr:C}),_exports:V("exports",{startsExpr:C}),_global:V("global",{startsExpr:C}),_implements:V("implements",{startsExpr:C}),_intrinsic:V("intrinsic",{startsExpr:C}),_infer:V("infer",{startsExpr:C}),_is:V("is",{startsExpr:C}),_mixins:V("mixins",{startsExpr:C}),_proto:V("proto",{startsExpr:C}),_require:V("require",{startsExpr:C}),_satisfies:V("satisfies",{startsExpr:C}),_keyof:V("keyof",{startsExpr:C}),_readonly:V("readonly",{startsExpr:C}),_unique:V("unique",{startsExpr:C}),_abstract:V("abstract",{startsExpr:C}),_declare:V("declare",{startsExpr:C}),_enum:V("enum",{startsExpr:C}),_module:V("module",{startsExpr:C}),_namespace:V("namespace",{startsExpr:C}),_interface:V("interface",{startsExpr:C}),_type:V("type",{startsExpr:C}),_opaque:V("opaque",{startsExpr:C}),name:U("name",{startsExpr:C}),string:U("string",{startsExpr:C}),num:U("num",{startsExpr:C}),bigint:U("bigint",{startsExpr:C}),decimal:U("decimal",{startsExpr:C}),regexp:U("regexp",{startsExpr:C}),privateName:U("#name",{startsExpr:C}),eof:U("eof"),jsxName:U("jsxName"),jsxText:U("jsxText",{beforeExpr:!0}),jsxTagStart:U("jsxTagStart",{startsExpr:!0}),jsxTagEnd:U("jsxTagEnd"),placeholder:U("%%",{startsExpr:!0})};function K(e){return e>=93&&e<=130}function q(e){return e>=58&&e<=130}function W(e){return e>=58&&e<=134}function J(e){return R[e]}function H(e){return e>=127&&e<=129}function X(e){return e>=58&&e<=92}function G(e){return L[e]}function Y(e){return M[e]}function Q(e){return e>=24&&e<=25}function Z(e){return B[e]}B[8].updateContext=e=>{e.pop()},B[5].updateContext=B[7].updateContext=B[23].updateContext=e=>{e.push(T.brace)},B[22].updateContext=e=>{e[e.length-1]===T.template?e.pop():e.push(T.template)},B[140].updateContext=e=>{e.push(T.j_expr,T.j_oTag)};var ee="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",te="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_",re=new RegExp("["+ee+"]"),ne=new RegExp("["+ee+te+"]");ee=te=null;var ie=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191],se=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];function ae(e,t){let r=65536;for(let n=0,i=t.length;n<i;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function oe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&re.test(String.fromCharCode(e)):ae(e,ie)))}function ue(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ne.test(String.fromCharCode(e)):ae(e,ie)||ae(e,se))))}var le=["implements","interface","let","package","private","protected","public","static","yield"],ce=["eval","arguments"],pe=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"]),de=new Set(le),he=new Set(ce);function fe(e,t){return t&&"await"===e||"enum"===e}function me(e,t){return fe(e,t)||de.has(e)}function ye(e){return he.has(e)}function ge(e,t){return me(e,t)||ye(e)}var be=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"]);var ve=64,xe=128,Ee=256,Se=387,De=128,Te=1024,Ae=2048,Ce=4096,Pe=8192,we=8201,ke=64,Fe=class{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}},Ie=class{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}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 inClass(){return(this.currentThisScopeFlags()&ve)>0}get inClassAndNotInNonArrowFunction(){let e=this.currentThisScopeFlags();return(e&ve)>0&&0==(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&xe)return!0;if(451&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Fe(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,r){let n=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(n,e,t,r),16&t?n.functions.add(e):n.lexical.add(e),8&t&&this.maybeExportDefined(n,e);else if(4&t)for(let i=this.scopeStack.length-1;i>=0&&(n=this.scopeStack[i],this.checkRedeclarationInScope(n,e,t,r),n.var.add(e),this.maybeExportDefined(n,e),!(n.flags&Se));--i);this.parser.inModule&&1&n.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,r,n){this.isRedeclaredInScope(e,t,r)&&this.parser.raise(v.VarRedeclaration,{at:n,identifierName:t})}isRedeclaredInScope(e,t,r){return!!(1&r)&&(8&r?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&r?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){let{name:t}=e,r=this.scopeStack[0];!r.lexical.has(t)&&!r.var.has(t)&&!r.functions.has(t)&&this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(t&Se)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){let{flags:t}=this.scopeStack[e];if(451&t&&!(4&t))return t}}},_e=class extends Fe{constructor(...e){super(...e),this.declareFunctions=new Set}},Ne=class extends Ie{createScope(e){return new _e(e)}declareName(e,t,r){let n=this.currentScope();if(t&Ae)return this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e),void n.declareFunctions.add(e);super.declareName(e,t,r)}isRedeclaredInScope(e,t,r){return!!super.isRedeclaredInScope(e,t,r)||!!(r&Ae)&&(!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t)))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}},Oe=class{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{let[t,r]=e;if(!this.hasPlugin(t))return!1;let n=this.plugins.get(t);for(let e of Object.keys(r))if((null==n?void 0:n[e])!==r[e])return!1;return!0}}getPluginOption(e,t){var r;return null==(r=this.plugins.get(e))?void 0:r[t]}};function Be(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Le(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Me(e,t,r){let n=null,i=t.length;for(;null===n&&i>0;)n=t[--i];null===n||n.start>r.start?Le(e,r.comments):Be(n,r.comments)}var je=class extends Oe{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){let{commentStack:t}=this.state,r=t.length;if(0===r)return;let n=r-1,i=t[n];i.start===e.end&&(i.leadingNode=e,n--);let{start:s}=e;for(;n>=0;n--){let r=t[n],i=r.end;if(!(i>s)){i===s&&(r.trailingNode=e);break}r.containingNode=e,this.finalizeComment(r),t.splice(n,1)}}finalizeComment(e){let{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Be(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{let{containingNode:r,start:n}=e;if(44===this.input.charCodeAt(n-1))switch(r.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Me(r,r.properties,e);break;case"CallExpression":case"OptionalCallExpression":Me(r,r.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Me(r,r.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Me(r,r.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Me(r,r.specifiers,e);break;default:Le(r,t)}else Le(r,t)}}finalizeRemainingComments(){let{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){let{commentStack:t}=this.state,{length:r}=t;if(0===r)return;let n=t[r-1];n.leadingNode===e&&(n.leadingNode=null)}resetPreviousIdentifierLeadingComments(e){let{commentStack:t}=this.state,{length:r}=t;0!==r&&(t[r-1].trailingNode===e?t[r-1].trailingNode=null:r>=2&&t[r-2].trailingNode===e&&(t[r-2].trailingNode=null))}takeSurroundingComments(e,t,r){let{commentStack:n}=this.state,i=n.length;if(0===i)return;let s=i-1;for(;s>=0;s--){let i=n[s],a=i.end;if(i.start===r)i.leadingNode=e;else if(a===t)i.trailingNode=e;else if(a<t)break}}},Re=/\r\n?|[\n\u2028\u2029]/,$e=new RegExp(Re.source,"g");function Ue(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}var Ve=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ze=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,Ke=new RegExp("(?=("+ze.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function qe(e){switch(e){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}}var We=function(e){return e>=48&&e<=57},Je={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},He={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Xe(e,t,r,n,i,s){let a=r,o=n,u=i,l="",c=null,p=r,{length:d}=t;for(;;){if(r>=d){s.unterminated(a,o,u),l+=t.slice(p,r);break}let h=t.charCodeAt(r);if(Ge(e,h,t,r)){l+=t.slice(p,r);break}if(92===h){l+=t.slice(p,r);let a=Ye(t,r,n,i,"template"===e,s);null!==a.ch||c?l+=a.ch:c={pos:r,lineStart:n,curLine:i},({pos:r,lineStart:n,curLine:i}=a),p=r}else 8232===h||8233===h?(++i,n=++r):10===h||13===h?"template"===e?(l+=t.slice(p,r)+"\n",++r,13===h&&10===t.charCodeAt(r)&&++r,++i,p=n=r):s.unterminated(a,o,u):++r}return{pos:r,str:l,firstInvalidLoc:c,lineStart:n,curLine:i,containsInvalid:!!c}}function Ge(e,t,r,n){return"template"===e?96===t||36===t&&123===r.charCodeAt(n+1):t===("double"===e?34:39)}function Ye(e,t,r,n,i,s){let a=!i;t++;let o=e=>({pos:t,ch:e,lineStart:r,curLine:n}),u=e.charCodeAt(t++);switch(u){case 110:return o("\n");case 114:return o("\r");case 120:{let i;return({code:i,pos:t}=Qe(e,t,r,n,2,!1,a,s)),o(null===i?null:String.fromCharCode(i))}case 117:{let i;return({code:i,pos:t}=et(e,t,r,n,a,s)),o(null===i?null:String.fromCodePoint(i))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:r=t,++n;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);s.strictNumericEscape(t-1,r,n);default:if(u>=48&&u<=55){let a=t-1,u=e.slice(a,t+2).match(/^[0-7]+/)[0],l=parseInt(u,8);l>255&&(u=u.slice(0,-1),l=parseInt(u,8)),t+=u.length-1;let c=e.charCodeAt(t);if("0"!==u||56===c||57===c){if(i)return o(null);s.strictNumericEscape(a,r,n)}return o(String.fromCharCode(l))}return o(String.fromCharCode(u))}}function Qe(e,t,r,n,i,s,a,o){let u,l=t;return({n:u,pos:t}=Ze(e,t,r,n,16,i,s,!1,o,!a)),null===u&&(a?o.invalidEscapeSequence(l,r,n):t=l-1),{code:u,pos:t}}function Ze(e,t,r,n,i,s,a,o,u,l){let c=t,p=16===i?Je.hex:Je.decBinOct,d=16===i?He.hex:10===i?He.dec:8===i?He.oct:He.bin,h=!1,f=0;for(let c=0,m=s??1/0;c<m;++c){let s,c=e.charCodeAt(t);if(95!==c||"bail"===o){if(s=c>=97?c-97+10:c>=65?c-65+10:We(c)?c-48:1/0,s>=i){if(s<=9&&l)return{n:null,pos:t};if(s<=9&&u.invalidDigit(t,r,n,i))s=0;else{if(!a)break;s=0,h=!0}}++t,f=f*i+s}else{let i=e.charCodeAt(t-1),s=e.charCodeAt(t+1);if(o){if(Number.isNaN(s)||!d(s)||p.has(i)||p.has(s)){if(l)return{n:null,pos:t};u.unexpectedNumericSeparator(t,r,n)}}else{if(l)return{n:null,pos:t};u.numericSeparatorInEscapeSequence(t,r,n)}++t}}return t===c||null!=s&&t-c!==s||h?{n:null,pos:t}:{n:f,pos:t}}function et(e,t,r,n,i,s){let a;if(123===e.charCodeAt(t)){if(++t,({code:a,pos:t}=Qe(e,t,r,n,e.indexOf("}",t)-t,!0,i,s)),++t,null!==a&&a>1114111){if(!i)return{code:null,pos:t};s.invalidCodePoint(t,r,n)}}else({code:a,pos:t}=Qe(e,t,r,n,4,!1,i,s));return{code:a,pos:t}}var tt=["at"],rt=["at"];function nt(e,t,n){return new r(n,e-t,e)}var it=new Set([103,109,115,105,121,117,100,118]),st=class{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new n(e.startLoc,e.endLoc)}},at=class extends je{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,r,n)=>!!this.options.errorRecovery&&(this.raise(v.InvalidDigit,{at:nt(e,t,r),radix:n}),!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:(e,t,r)=>{this.recordStrictModeErrors(v.StrictNumericEscape,{at:nt(e,t,r)})},unterminated:(e,t,r)=>{throw this.raise(v.UnterminatedString,{at:nt(e-1,t,r)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(v.StrictNumericEscape),unterminated:(e,t,r)=>{throw this.raise(v.UnterminatedTemplate,{at:nt(e,t,r)})}}),this.state=new class e{constructor(){this.strict=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.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[T.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:n,startColumn:i}){this.strict=!1!==e&&(!0===e||"module"===t),this.curLine=n,this.lineStart=-i,this.startLoc=this.endLoc=new r(n,i,0)}curPosition(){return new r(this.curLine,this.pos-this.lineStart,this.pos)}clone(t){let r=new e,n=Object.keys(this);for(let e=0,i=n.length;e<i;e++){let i=n[e],s=this[i];!t&&Array.isArray(s)&&(s=s.slice()),r[i]=s}return r}},this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new st(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){let e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Ve.lastIndex=e,Ve.test(this.input)?Ve.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return ze.lastIndex=e,ze.test(this.input)?ze.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){let r=this.input.charCodeAt(e);56320==(64512&r)&&(t=65536+((1023&t)<<10)+(1023&r))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,{at:t}))),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(137):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());let r=this.state.pos,i=this.input.indexOf(e,r+2);if(-1===i)throw this.raise(v.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+e.length,$e.lastIndex=r+2;$e.test(this.input)&&$e.lastIndex<=i;)++this.state.curLine,this.state.lineStart=$e.lastIndex;if(this.isLookahead)return;let s={type:"CommentBlock",value:this.input.slice(r+2,i),start:r,end:i+e.length,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(s),s}skipLineComment(e){let t,r=this.state.pos;this.isLookahead||(t=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Ue(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let s=this.state.pos,a={type:"CommentLine",value:this.input.slice(r+e,s),start:r,end:s,loc:new n(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipSpace(){let e=this.state.pos,t=[];e:for(;this.state.pos<this.length;){let r=this.input.charCodeAt(this.state.pos);switch(r){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:{let e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}case 47:{let e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}default:break e}break;default:if(qe(r))++this.state.pos;else if(45===r&&!this.inModule&&this.options.annexB){let r=this.state.pos;if(45!==this.input.charCodeAt(r+1)||62!==this.input.charCodeAt(r+2)||!(0===e||this.state.lineStart>e))break e;{let e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}else{if(60!==r||this.inModule||!this.options.annexB)break e;{let e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{let e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}}}}if(t.length>0){let r={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(r)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let r=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(r)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;let e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(v.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?v.RecordExpressionHashIncorrectStartSyntaxType:v.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else oe(t)?(++this.state.pos,this.finishToken(136,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&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 e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;let t=this.state.pos;for(this.state.pos+=1;!Ue(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);let r=this.input.slice(t+2,this.state.pos);return this.finishToken(28,r),!0}readToken_mult_modulo(e){let t=42===e?55:54,r=1,n=this.input.charCodeAt(this.state.pos+1);42===e&&42===n&&(r++,n=this.input.charCodeAt(this.state.pos+2),t=57),61===n&&!this.state.inType&&(r++,t=37===e?33:30),this.finishOp(t,r)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(v.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){let e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&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(e){let t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){let{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){let t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){let t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){let e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){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,{at: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,{at: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:{let e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)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(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);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(oe(e))return void this.readWord(e)}throw this.raise(v.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){let r=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,r)}readRegexp(){let e,t,r=this.state.startLoc,n=this.state.start+1,{pos:s}=this.state;for(;;++s){if(s>=this.length)throw this.raise(v.UnterminatedRegExp,{at:i(r,1)});let n=this.input.charCodeAt(s);if(Ue(n))throw this.raise(v.UnterminatedRegExp,{at:i(r,1)});if(e)e=!1;else{if(91===n)t=!0;else if(93===n&&t)t=!1;else if(47===n&&!t)break;e=92===n}}let a=this.input.slice(n,s);++s;let o="",u=()=>i(r,s+2-n);for(;s<this.length;){let e=this.codePointAtPos(s),t=String.fromCharCode(e);if(it.has(e))118===e?o.includes("u")&&this.raise(v.IncompatibleRegExpUVFlags,{at:u()}):117===e&&o.includes("v")&&this.raise(v.IncompatibleRegExpUVFlags,{at:u()}),o.includes(t)&&this.raise(v.DuplicateRegExpFlags,{at:u()});else{if(!ue(e)&&92!==e)break;this.raise(v.MalformedRegExpFlags,{at:u()})}++s,o+=t}this.state.pos=s,this.finishToken(135,{pattern:a,flags:o})}readInt(e,t,r=!1,n=!0){let{n:i,pos:s}=Ze(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,r,n,this.errorHandlers_readInt,!1);return this.state.pos=s,i}readRadixNumber(e){let t=this.state.curPosition(),r=!1;this.state.pos+=2;let n=this.readInt(e);null==n&&this.raise(v.InvalidDigit,{at:i(t,2),radix:e});let s=this.input.charCodeAt(this.state.pos);if(110===s)++this.state.pos,r=!0;else if(109===s)throw this.raise(v.InvalidDecimal,{at:t});if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,{at:this.state.curPosition()});if(r){let e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,e)}else this.finishToken(132,n)}readNumber(e){let t=this.state.pos,r=this.state.curPosition(),n=!1,s=!1,a=!1,o=!1,u=!1;!e&&null===this.readInt(10)&&this.raise(v.InvalidNumber,{at:this.state.curPosition()});let l=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(l){let e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(v.StrictOctalLiteral,{at:r}),!this.state.strict){let t=e.indexOf("_");t>0&&this.raise(v.ZeroDigitNumericSeparator,{at:i(r,t)})}u=l&&!/[89]/.test(e)}let c=this.input.charCodeAt(this.state.pos);if(46===c&&!u&&(++this.state.pos,this.readInt(10),n=!0,c=this.input.charCodeAt(this.state.pos)),(69===c||101===c)&&!u&&(c=this.input.charCodeAt(++this.state.pos),(43===c||45===c)&&++this.state.pos,null===this.readInt(10)&&this.raise(v.InvalidOrMissingExponent,{at:r}),n=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((n||l)&&this.raise(v.InvalidBigIntLiteral,{at:r}),++this.state.pos,s=!0),109===c&&(this.expectPlugin("decimal",this.state.curPosition()),(o||l)&&this.raise(v.InvalidDecimal,{at:r}),++this.state.pos,a=!0),oe(this.codePointAtPos(this.state.pos)))throw this.raise(v.NumberIdentifier,{at:this.state.curPosition()});let p=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(s)return void this.finishToken(133,p);if(a)return void this.finishToken(134,p);let d=u?parseInt(p,8):parseFloat(p);this.finishToken(132,d)}readCodePoint(e){let{code:t,pos:r}=et(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=r,t}readString(e){let{str:t,pos:r,curLine:n,lineStart:i}=Xe(34===e?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=r+1,this.state.lineStart=i,this.state.curLine=n,this.finishToken(131,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let e=this.input[this.state.pos],{str:t,firstInvalidLoc:n,pos:i,curLine:s,lineStart:a}=Xe("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=a,this.state.curLine=s,n&&(this.state.firstInvalidTemplateEscapePos=new r(n.curLine,n.pos-n.lineStart,n.pos)),96===this.input.codePointAt(i)?this.finishToken(24,n?null:e+t+"`"):(this.state.pos++,this.finishToken(25,n?null:e+t+"${"))}recordStrictModeErrors(e,{at:t}){let r=t.index;this.state.strict&&!this.state.strictErrors.has(r)?this.raise(e,{at:t}):this.state.strictErrors.set(r,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="",r=this.state.pos,n=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){let e=this.codePointAtPos(this.state.pos);if(ue(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(n,this.state.pos);let e=this.state.curPosition(),i=this.state.pos===r?oe:ue;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(v.MissingUnicodeEscape,{at:this.state.curPosition()}),n=this.state.pos-1;continue}++this.state.pos;let s=this.readCodePoint(!0);null!==s&&(i(s)||this.raise(v.EscapedCharNotAnIdentifier,{at:e}),t+=String.fromCodePoint(s)),n=this.state.pos}}}return t+this.input.slice(n,this.state.pos)}readWord(e){let t=this.readWord1(e),r=I.get(t);void 0!==r?this.finishToken(r,G(r)):this.finishToken(130,t)}checkKeywordEscapes(){let{type:e}=this.state;X(e)&&this.state.containsEsc&&this.raise(v.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:G(e)})}raise(e,n){let{at:i}=n,s=t(n,tt),a=e({loc:i instanceof r?i:i.loc.start,details:s});if(!this.options.errorRecovery)throw a;return this.isLookahead||this.state.errors.push(a),a}raiseOverwrite(e,n){let{at:i}=n,s=t(n,rt),a=i instanceof r?i:i.loc.start,o=a.index,u=this.state.errors;for(let t=u.length-1;t>=0;t--){let r=u[t];if(r.loc.index===o)return u[t]=e({loc:a,details:s});if(r.loc.index<o)break}return this.raise(e,n)}updateContext(e){}unexpected(e,t){throw this.raise(v.UnexpectedToken,{expected:t?G(t):null,at:e??this.state.startLoc})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(v.MissingPlugin,{at:t??this.state.startLoc,missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(v.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}errorBuilder(e){return(t,r,n)=>{this.raise(e,{at:nt(t,r,n)})}}},ot=class{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}},ut=class extends ot{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,{at:t}){let r=t.index;this.declarationErrors.set(r,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}};function lt(){return new ot}function ct(e,t){return(e?2:0)|(t?1:0)}var pt=class extends at{addExtra(e,t,r,n=!0){if(!e)return;let i=e.extra=e.extra||{};n?i[t]=r:Object.defineProperty(i,t,{enumerable:n,value:r})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){let r=e+t.length;if(this.input.slice(e,r)===t){let e=this.input.charCodeAt(r);return!(ue(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){let t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,{at:this.state.startLoc});this.unexpected(null,e)}}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Re.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Ke.lastIndex=this.state.end,Ke.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(v.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){let r={node:null};try{let n=e(((e=null)=>{throw r.node=e,r}));if(this.state.errors.length>t.errors.length){let e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:n,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:n,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){let n=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:n};if(e===r)return{node:r.node,error:null,thrown:!1,aborted:!0,failState:n};throw e}}checkExpressionErrors(e,t){if(!e)return!1;let{shorthandAssignLoc:r,doubleProtoLoc:n,privateKeyLoc:i,optionalParametersLoc:s}=e;if(!t)return!!(r||n||s||i);null!=r&&this.raise(v.InvalidCoverInitializedName,{at:r}),null!=n&&this.raise(v.DuplicateProto,{at:n}),null!=i&&this.raise(v.UnexpectedPrivateField,{at:i}),null!=s&&this.unexpected(s)}isLiteralPropertyName(){return W(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){let t=this.state.labels;this.state.labels=[];let r=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let n=this.inModule;this.inModule=e;let i=this.scope,s=this.getScopeHandler();this.scope=new s(this,e);let a=this.prodParam;this.prodParam=new class{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}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}};let o=this.classScope;this.classScope=new class{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}})}exit(){let e=this.stack.pop(),t=this.current();for(let[r,n]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(r)||t.undefinedPrivateNames.set(r,n):this.parser.raise(v.InvalidPrivateFieldResolution,{at:n,identifierName:r})}declarePrivateName(e,t,r){let{privateNames:n,loneAccessors:i,undefinedPrivateNames:s}=this.current(),a=n.has(e);if(3&t){let r=a&&i.get(e);r?(a=(3&r)==(3&t)||(4&r)!=(4&t),a||i.delete(e)):a||i.set(e,t)}a&&this.parser.raise(v.PrivateNameRedeclaration,{at:r,identifierName:e}),n.add(e),s.delete(e)}usePrivateName(e,t){let r;for(r of this.stack)if(r.privateNames.has(e))return;r?r.undefinedPrivateNames.set(e,t):this.parser.raise(v.InvalidPrivateFieldResolution,{at:t,identifierName:e})}}(this);let u=this.expressionScope;return this.expressionScope=new class{constructor(e){this.parser=void 0,this.stack=[new ot],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){let r={at:t.loc.start},{stack:n}=this,i=n.length-1,s=n[i];for(;!s.isCertainlyParameterDeclaration();){if(!s.canBeArrowParameterDeclaration())return;s.recordDeclarationError(e,r),s=n[--i]}this.parser.raise(e,r)}recordArrowParameterBindingError(e,{at:t}){let{stack:r}=this,n=r[r.length-1],i={at:t.loc.start};if(n.isCertainlyParameterDeclaration())this.parser.raise(e,i);else{if(!n.canBeArrowParameterDeclaration())return;n.recordDeclarationError(e,i)}}recordAsyncArrowParametersError({at:e}){let{stack:t}=this,r=t.length-1,n=t[r];for(;n.canBeArrowParameterDeclaration();)2===n.type&&n.recordDeclarationError(v.AwaitBindingIdentifier,{at:e}),n=t[--r]}validateAsPattern(){let{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,r])=>{this.parser.raise(t,{at:r});let n=e.length-2,i=e[n];for(;i.canBeArrowParameterDeclaration();)i.clearDeclarationError(r.index),i=e[--n]}))}}(this),()=>{this.state.labels=t,this.exportedIdentifiers=r,this.inModule=n,this.scope=i,this.prodParam=a,this.classScope=o,this.expressionScope=u}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){let{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}},dt=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},ht=class{constructor(e,t,r){this.type="",this.start=t,this.end=0,this.loc=new n(r),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}},ft=ht.prototype;function mt(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a,name:o}=e,u=Object.create(ft);return u.type=t,u.start=r,u.end=n,u.loc=i,u.range=s,u.extra=a,u.name=o,"Placeholder"===t&&(u.expectedNode=e.expectedNode),u}function yt(e){let{type:t,start:r,end:n,loc:i,range:s,extra:a}=e;if("Placeholder"===t)return function(e){return mt(e)}(e);let o=Object.create(ft);return o.type=t,o.start=r,o.end=n,o.loc=i,o.range=s,void 0!==e.raw?o.raw=e.raw:o.extra=a,o.value=e.value,o}ft.__clone=function(){let e=new ht(void 0,this.start,this.loc.start),t=Object.keys(this);for(let r=0,n=t.length;r<n;r++){let n=t[r];"leadingComments"!==n&&"trailingComments"!==n&&"innerComments"!==n&&(e[n]=this[n])}return e};var gt=class extends pt{startNode(){return new ht(this,this.state.start,this.state.startLoc)}startNodeAt(e){return new ht(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,r){return e.type=t,e.end=r.index,e.loc.end=r,this.options.ranges&&(e.range[1]=r.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.options.ranges&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}},bt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),vt=b`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:({reservedType:e})=>`Cannot overwrite reserved type ${e}.`,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:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:r})=>`Enum \`${e}\` has type \`${r}\`, so the initializer of \`${t}\` needs to be a ${r} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:r})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${r}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitailized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,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:e})=>`Unexpected reserved type ${e}.`,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:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function xt(e){return"type"===e.importKind||"typeof"===e.importKind}var Et={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};var St=/\*?\s*@((?:no)?flow)\b/,Dt=b`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,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:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,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 Tt(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function At(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return At(e.object)+"."+At(e.property);throw new Error("Node had unexpected type: "+e.type)}var Ct=class extends Fe{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}},Pt=class extends Ie{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new Ct(e)}enter(e){e==Ee&&this.importsStack.push(new Set),super.enter(e)}exit(){let e=super.exit();return e==Ee&&this.importsStack.pop(),e}hasImport(e,t){let r=this.importsStack.length;if(this.importsStack[r-1].has(e))return!0;if(!t&&r>1)for(let t=0;t<r-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,r){if(t&Ce)return this.hasImport(e,!0)&&this.parser.raise(v.VarRedeclaration,{at:r,identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);let n=this.currentScope();if(t&Te)return this.maybeExportDefined(n,e),void n.exportOnlyBindings.add(e);super.declareName(e,t,r),2&t&&(1&t||(this.checkRedeclarationInScope(n,e,t,r),this.maybeExportDefined(n,e)),n.types.add(e)),256&t&&n.enums.add(e),512&t&&n.constEnums.add(e),t&De&&n.classes.add(e)}isRedeclaredInScope(e,t,r){if(e.enums.has(t)){if(256&r){return!!(512&r)!==e.constEnums.has(t)}return!0}return r&De&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&r):!!(2&r&&e.types.has(t))||super.isRedeclaredInScope(e,t,r)}checkLocalExport(e){let{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){let r=this.scopeStack[e];if(r.types.has(t)||r.exportOnlyBindings.has(t))return}super.checkLocalExport(e)}}},wt=e=>"ParenthesizedExpression"===e.type?wt(e.expression):e,kt=class extends gt{toAssignable(e,t=!1){var r,n;let i;switch(("ParenthesizedExpression"===e.type||null!=(r=e.extra)&&r.parenthesized)&&(i=wt(e),t?"Identifier"===i.type?this.expressionScope.recordArrowParameterBindingError(v.InvalidParenthesizedAssignment,{at:e}):"MemberExpression"!==i.type&&this.raise(v.InvalidParenthesizedAssignment,{at:e}):this.raise(v.InvalidParenthesizedAssignment,{at:e})),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let r=0,n=e.properties.length,i=n-1;r<n;r++){var s;let n=e.properties[r],a=r===i;this.toAssignableObjectExpressionProp(n,a,t),a&&"RestElement"===n.type&&null!=(s=e.extra)&&s.trailingCommaLoc&&this.raise(v.RestTrailingComma,{at:e.extra.trailingCommaLoc})}break;case"ObjectProperty":{let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t);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":e.type="ArrayPattern",this.toAssignableList(e.elements,null==(n=e.extra)?void 0:n.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(v.MissingEqInAssignment,{at:e.left.loc.end}),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(i,t)}}toAssignableObjectExpressionProp(e,t,r){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?v.PatternHasAccessor:v.PatternHasMethod,{at:e.key});else if("SpreadElement"===e.type){e.type="RestElement";let n=e.argument;this.checkToRestConversion(n,!1),this.toAssignable(n,r),t||this.raise(v.RestTrailingComma,{at:e})}else this.toAssignable(e,r)}toAssignableList(e,t,r){let n=e.length-1;for(let i=0;i<=n;i++){let s=e[i];if(s){if("SpreadElement"===s.type){s.type="RestElement";let e=s.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,r)}else this.toAssignable(s,r);"RestElement"===s.type&&(i<n?this.raise(v.RestTrailingComma,{at:s}):t&&this.raise(v.RestTrailingComma,{at:t}))}}}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let t=e.properties.length-1;return e.properties.every(((e,r)=>"ObjectMethod"!==e.type&&(r===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(let t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){let t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){let e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,r){let n=1&r,i=[],s=!0;for(;!this.eat(e);)if(s?s=!1:this.expect(12),n&&this.match(12))i.push(null);else{if(this.eat(e))break;if(this.match(21)){if(i.push(this.parseAssignableListItemTypes(this.parseRestBinding(),r)),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{let e=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(v.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());i.push(this.parseAssignableListItem(r,e))}}return i}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){let e=this.startNode(),{type:t,startLoc:r}=this.state;return 21===t?this.parseBindingRestProperty(e):(136===t?(this.expectPlugin("destructuringPrivate",r),this.classScope.usePrivateName(this.state.value,r),e.key=this.parsePrivateName()):this.parsePropertyName(e),e.method=!1,this.parseObjPropValue(e,r,!1,!1,!0,!1))}parseAssignableListItem(e,t){let r=this.parseMaybeDefault();this.parseAssignableListItemTypes(r,e);let n=this.parseMaybeDefault(r.loc.start,r);return t.length&&(r.decorators=t),n}parseAssignableListItemTypes(e,t){return e}parseMaybeDefault(e,t){var r;if(null!=e||(e=this.state.startLoc),t=null!=(r=t)?r:this.parseBindingAtom(),!this.eat(29))return t;let n=this.startNodeAt(e);return n.left=t,n.right=this.parseMaybeAssignAllowIn(),this.finishNode(n,"AssignmentPattern")}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},e)}checkLVal(e,{in:t,binding:r=ke,checkClashes:n=!1,strictModeChanged:i=!1,hasParenthesizedAncestor:s=!1}){var a;let o=e.type;if(this.isObjectMethod(e))return;if("MemberExpression"===o)return void(r!==ke&&this.raise(v.InvalidPropertyBindingPattern,{at:e}));if("Identifier"===o){this.checkIdentifier(e,r,i);let{name:t}=e;return void(n&&(n.has(t)?this.raise(v.ParamDupe,{at:e}):n.add(t)))}let u=this.isValidLVal(o,!(s||null!=(a=e.extra)&&a.parenthesized)&&"AssignmentExpression"===t.type,r);if(!0===u)return;if(!1===u){let n=r===ke?v.InvalidLhs:v.InvalidLhsBinding;return void this.raise(n,{at:e,ancestor:t})}let[l,c]=Array.isArray(u)?u:[u,"ParenthesizedExpression"===o],p="ArrayPattern"===o||"ObjectPattern"===o||"ParenthesizedExpression"===o?{type:o}:t;for(let t of[].concat(e[l]))t&&this.checkLVal(t,{in:p,binding:r,checkClashes:n,strictModeChanged:i,hasParenthesizedAncestor:c})}checkIdentifier(e,t,r=!1){this.state.strict&&(r?ge(e.name,this.inModule):ye(e.name))&&(t===ke?this.raise(v.StrictEvalArguments,{at:e,referenceName:e.name}):this.raise(v.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})),t&Pe&&"let"===e.name&&this.raise(v.LetInLexicalBinding,{at:e}),t&ke||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(v.InvalidRestAssignmentPattern,{at:e})}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?v.RestTrailingComma:v.ElementAfterRest,{at:this.state.startLoc}),!0)}};function Ft(e){if(!e)throw new Error("Assert fail")}var It=b`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' 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:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[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.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,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.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,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:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function _t(e){return"private"===e||"public"===e||"protected"===e}function Nt(e){return"in"===e||"out"===e}function Ot(e){if("MemberExpression"!==e.type)return!1;let{computed:t,property:r}=e;return(!t||"StringLiteral"===r.type||!("TemplateLiteral"!==r.type||r.expressions.length>0))&&Mt(e.object)}function Bt(e,t){var r;let{type:n}=e;if(null!=(r=e.extra)&&r.parenthesized)return!1;if(t){if("Literal"===n){let{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===n||"BooleanLiteral"===n)return!0;return!!(Lt(e,t)||function(e,t){if("UnaryExpression"===e.type){let{operator:r,argument:n}=e;if("-"===r&&Lt(n,t))return!0}return!1}(e,t)||"TemplateLiteral"===n&&0===e.expressions.length||Ot(e))}function Lt(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Mt(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Mt(e.object)}var jt=b`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});function Rt(e,t){let[r,n]="string"==typeof t?[t,{}]:t,i=Object.keys(n),s=0===i.length;return e.some((e=>{if("string"==typeof e)return s&&e===r;{let[t,s]=e;if(t!==r)return!1;for(let e of i)if(s[e]!==n[e])return!1;return!0}}))}function $t(e,t,r){let n=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return n&&Array.isArray(n)&&n.length>1?n[1][r]:null}var Ut=["minimal","fsharp","hack","smart"],Vt=["^^","@@","^","%","#"],zt=["hash","bar"];var Kt={estree:e=>class extends e{parse(){let e=S(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(S)),e}parseRegExpLiteral({pattern:e,flags:t}){let r=null;try{r=new RegExp(e,t)}catch{}let n=this.estreeParseLiteral(r);return n.regex={pattern:e,flags:t},n}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch{t=null}let r=this.estreeParseLiteral(t);return r.bigint=String(r.value||e),r}parseDecimalLiteral(e){let t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}directiveToStmt(e){let t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;let r=e;return r.type="ExpressionStatement",r.expression=t,r.directive=t.extra.rawValue,delete t.extra,r}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,r,n,i){super.parseBlockBody(e,t,r,n,i);let s=e.directives.map((e=>this.directiveToStmt(e)));e.body=s.concat(e.body),delete e.directives}pushClassMethod(e,t,r,n,i,s){this.parseMethod(t,r,n,i,s,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let t=super.getPrivateNameSV(e);return delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){let r=super.parseLiteral(e,t);return r.raw=r.extra.raw,delete r.extra,r}parseFunctionBody(e,t,r=!1){super.parseFunctionBody(e,t,r),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,r,n,i,s,a=!1){let o=this.startNode();return o.kind=e.kind,o=super.parseMethod(o,t,r,n,i,s,a),o.type="FunctionExpression",delete o.kind,e.value=o,"ClassPrivateMethod"===s&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){let t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition"),t}parseClassPrivateProperty(...e){let t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(t.type="PropertyDefinition",t.computed=!1),t}parseObjectMethod(e,t,r,n,i){let s=super.parseObjectMethod(e,t,r,n,i);return s&&(s.type="Property","method"===s.kind&&(s.kind="init"),s.shorthand=!1),s}parseObjectProperty(e,t,r,n){let i=super.parseObjectProperty(e,t,r,n);return i&&(i.kind="init",i.type="Property"),i}isValidLVal(e,t,r){return"Property"===e?"value":super.isValidLVal(e,t,r)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){let{key:r,value:n}=e;this.isPrivateName(r)&&this.classScope.usePrivateName(this.getPrivateNameSV(r),r.loc.start),this.toAssignable(n,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,r){"get"===e.kind||"set"===e.kind?this.raise(v.PatternHasAccessor,{at:e.key}):e.method?this.raise(v.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,r)}finishCallExpression(e,t){let r=super.finishCallExpression(e,t);if("Import"===r.callee.type){var n;if(r.type="ImportExpression",r.source=r.arguments[0],this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))r.attributes=null!=(n=r.arguments[1])?n:null;delete r.arguments,delete r.callee}return r}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){let r=this.state.lastTokStartLoc,n=super.parseExport(e,t);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":1===n.specifiers.length&&"ExportNamespaceSpecifier"===n.specifiers[0].type&&(n.type="ExportAllDeclaration",n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var i;let{declaration:e}=n;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(i=e.decorators)?void 0:i.length)>0&&e.start===n.start&&this.resetStartLocation(n,r)}}return n}parseSubscript(e,t,r,n){let i=super.parseSubscript(e,t,r,n);if(n.optionalChainMember){if(("OptionalMemberExpression"===i.type||"OptionalCallExpression"===i.type)&&(i.type=i.type.substring(8)),n.stop){let e=this.startNodeAtNode(i);return e.expression=i,this.finishNode(e,"ChainExpression")}}else("MemberExpression"===i.type||"CallExpression"===i.type)&&(i.optional=!1);return i}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return e.method||"get"===e.kind||"set"===e.kind}finishNodeAt(e,t,r){return S(super.finishNodeAt(e,t,r))}resetStartLocation(e,t){super.resetStartLocation(e,t),S(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),S(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Dt.UnterminatedJsxContent,{at:this.state.startLoc});let r=this.input.charCodeAt(this.state.pos);switch(r){case 60:case 123:return this.state.pos===this.state.start?void(60===r&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(r)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(139,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:Ue(r)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let t,r=this.input.charCodeAt(this.state.pos);return++this.state.pos,13===r&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),++this.state.curLine,this.state.lineStart=this.state.pos,t}jsxReadString(e){let t="",r=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(v.UnterminatedString,{at:this.state.startLoc});let n=this.input.charCodeAt(this.state.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadEntity(),r=this.state.pos):Ue(n)?(t+=this.input.slice(r,this.state.pos),t+=this.jsxReadNewLine(!1),r=this.state.pos):++this.state.pos}t+=this.input.slice(r,this.state.pos++),this.finishToken(131,t)}jsxReadEntity(){let e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);let t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,r=!1;for(;t++<10&&this.state.pos<this.length&&!(r=59==this.codePointAtPos(this.state.pos));)++this.state.pos;if(r){this.input.slice(e,this.state.pos),++this.state.pos}}return this.state.pos=e,"&"}jsxReadWord(){let e,t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(ue(e)||45===e);this.finishToken(138,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(138)?e.name=this.state.value:X(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;let r=this.startNodeAt(e);return r.namespace=t,r.name=this.jsxParseIdentifier(),this.finishNode(r,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){let r=this.startNodeAt(e);r.object=t,r.property=this.jsxParseIdentifier(),t=this.finishNode(r,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(T.brace),this.next(),e=this.jsxParseExpressionContainer(e,T.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(Dt.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(Dt.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(T.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(T.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(T.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){let t=[];for(;!this.match(56)&&!this.match(141);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(141),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){let t=this.startNodeAt(e),r=[],n=this.jsxParseOpeningElementAt(e),i=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 140:if(e=this.state.startLoc,this.next(),this.eat(56)){i=this.jsxParseClosingElementAt(e);break e}r.push(this.jsxParseElementAt(e));break;case 139:r.push(this.parseExprAtom());break;case 5:{let e=this.startNode();this.setContext(T.brace),this.next(),this.match(21)?r.push(this.jsxParseSpreadChild(e)):r.push(this.jsxParseExpressionContainer(e,T.j_expr));break}default:this.unexpected()}Tt(n)&&!Tt(i)&&null!==i?this.raise(Dt.MissingClosingTagFragment,{at:i}):(!Tt(n)&&Tt(i)||!Tt(n)&&!Tt(i)&&At(i.name)!==At(n.name))&&this.raise(Dt.MissingClosingTagElement,{at:i,openingTagName:At(n.name)})}if(Tt(n)?(t.openingFragment=n,t.closingFragment=i):(t.openingElement=n,t.closingElement=i),t.children=r,this.match(47))throw this.raise(Dt.UnwrappedAdjacentJSXElements,{at:this.state.startLoc});return Tt(n)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(139)?this.parseLiteral(this.state.value,"JSXText"):this.match(140)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(140),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let t=this.curContext();if(t!==T.j_expr){if(t===T.j_oTag||t===T.j_cTag){if(oe(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(141);if((34===e||39===e)&&t===T.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(140);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){let{context:t,type:r}=this.state;if(56===r&&140===e)t.splice(-2,2,T.j_cTag),this.state.canStartJSXElement=!1;else if(140===r)t.push(T.j_oTag);else if(141===r){let r=t[t.length-1];r===T.j_oTag&&56===e||r===T.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===T.j_expr):(this.setContext(T.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=function(e){return j[e]}(r)}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ne}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){131!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){let t=St.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){let t=this.state.inType;this.state.inType=!0,this.expect(e||14);let r=this.flowParseType();return this.state.inType=t,r}flowParsePredicate(){let e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>t.index+1&&this.raise(vt.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,r=null;return this.match(54)?(this.state.inType=e,r=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(r=this.flowParsePredicate())),[t,r]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let t=e.id=this.parseIdentifier(),r=this.startNode(),n=this.startNode();this.match(47)?r.typeParameters=this.flowParseTypeParameterDeclaration():r.typeParameters=null,this.expect(10);let i=this.flowParseFunctionTypeParams();return r.params=i.params,r.rest=i.rest,r.this=i._this,this.expect(11),[r.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(r,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(125)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(vt.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e)):this.isContextual(128)?this.flowParseDeclareTypeAlias(e):this.isContextual(129)?this.flowParseDeclareOpaqueType(e):this.isContextual(127)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(131)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let t=e.body=this.startNode(),r=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),!this.isContextual(128)&&!this.match(87)&&this.raise(vt.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(e)):(this.expectContextual(123,vt.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),r.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let n=null,i=!1;return r.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(i&&this.raise(vt.DuplicateDeclareModuleExports,{at:e}),"ES"===n&&this.raise(vt.AmbiguousDeclareModuleKind,{at:e}),n="CommonJS",i=!0):("CommonJS"===n&&this.raise(vt.AmbiguousDeclareModuleKind,{at:e}),n="ES")})),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(128)||this.isContextual(127))&&!t){let e=this.state.value;throw this.raise(vt.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:Et[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(129)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129)?("ExportNamedDeclaration"===(e=this.parseExport(e,null)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();let t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(115))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(111))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){"_"===e&&this.raise(vt.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,t,r){bt.has(e)&&this.raise(r?vt.AssignReservedType:vt.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,t){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,we,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){let t=this.state.startLoc,r=this.startNode(),n=this.flowParseVariance(),i=this.flowParseTypeAnnotatableIdentifier();return r.name=i.name,r.variance=n,r.bound=i.typeAnnotation,this.match(29)?(this.eat(29),r.default=this.flowParseType()):e&&this.raise(vt.MissingTypeParamDefault,{at:t}),this.finishNode(r,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let r=!1;do{let e=this.flowParseTypeParameter(r);t.params.push(e),e.default&&(r=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){let e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);let r=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=r,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){let e=this.startNode(),t=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(127),e.extends=[],this.eat(81))do{e.extends.push(this.flowParseInterfaceExtends())}while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,r){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=r,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,t){let r=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(r),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:r,allowProto:n,allowInexact:i}){let s=this.state.inType;this.state.inType=!0;let a=this.startNode();a.callProperties=[],a.properties=[],a.indexers=[],a.internalSlots=[];let o,u,l=!1;for(t&&this.match(6)?(this.expect(6),o=9,u=!0):(this.expect(5),o=8,u=!1),a.exact=u;!this.match(o);){let t=!1,s=null,o=null,c=this.startNode();if(n&&this.isContextual(116)){let t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),s=this.state.startLoc,e=!1)}if(e&&this.isContextual(104)){let e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}let p=this.flowParseVariance();if(this.eat(0))null!=s&&this.unexpected(s),this.eat(0)?(p&&this.unexpected(p.loc.start),a.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,t))):a.indexers.push(this.flowParseObjectTypeIndexer(c,t,p));else if(this.match(10)||this.match(47))null!=s&&this.unexpected(s),p&&this.unexpected(p.loc.start),a.callProperties.push(this.flowParseObjectTypeCallProperty(c,t));else{let e="init";if(this.isContextual(98)||this.isContextual(103)){W(this.lookahead().type)&&(e=this.state.value,this.next())}let n=this.flowParseObjectTypeProperty(c,t,s,p,e,r,i??!u);null===n?(l=!0,o=this.state.lastTokStartLoc):a.properties.push(n)}this.flowObjectTypeSemicolon(),o&&!this.match(8)&&!this.match(9)&&this.raise(vt.UnexpectedExplicitInexactInObject,{at:o})}this.expect(o),r&&(a.inexact=l);let c=this.finishNode(a,"ObjectTypeAnnotation");return this.state.inType=s,c}flowParseObjectTypeProperty(e,t,r,n,i,s,a){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(s?a||this.raise(vt.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(vt.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),n&&this.raise(vt.InexactVariance,{at:n}),null):(s||this.raise(vt.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),null!=r&&this.unexpected(r),n&&this.raise(vt.SpreadVariance,{at:n}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=r,e.kind=i;let a=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=r&&this.unexpected(r),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),("get"===i||"set"===i)&&this.flowCheckGetterSetterParams(e),!s&&"constructor"===e.key.name&&e.value.this&&this.raise(vt.ThisParamBannedInConstructor,{at:e.value.this})):("init"!==i&&this.unexpected(),e.method=!1,this.eat(17)&&(a=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=a,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let t="get"===e.kind?0:1,r=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?vt.GetterMayNotHaveThisParam:vt.SetterMayNotHaveThisParam,{at:e.value.this}),r!==t&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,{at:e}),"set"===e.kind&&e.value.rest&&this.raise(v.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let r=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let t=this.startNodeAt(e);t.qualification=r,t.id=this.flowParseRestrictedIdentifier(!0),r=this.finishNode(t,"QualifiedTypeIdentifier")}return r}flowParseGenericType(e,t){let r=this.startNodeAt(e);return r.typeParameters=null,r.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(r.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(r,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let t=null,r=!1,n=null,i=this.startNode(),s=this.lookahead(),a=78===this.state.type;return 14===s.type||17===s.type?(a&&!e&&this.raise(vt.ThisParamMustBeFirst,{at:i}),t=this.parseIdentifier(a),this.eat(17)&&(r=!0,a&&this.raise(vt.ThisParamMayNotBeOptional,{at:i})),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),i.name=t,i.optional=r,i.typeAnnotation=n,this.finishNode(i,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,r=null;for(this.match(78)&&(r=this.flowParseFunctionTypeParam(!0),r.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:r}}flowIdentToTypeAnnotation(e,t,r){switch(r.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(r.name),this.flowParseGenericType(e,r)}}flowParsePrimaryType(){let e,t,r=this.state.startLoc,n=this.startNode(),i=!1,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,t=this.flowParseTupleType(),this.state.noAnonFunctionType=s,t;case 47:return n.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),e=this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),this.finishNode(n,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(K(this.state.type)||this.match(78)){let e=this.lookahead().type;i=17!==e&&14!==e}else i=!0;if(i){if(this.state.noAnonFunctionType=!1,t=this.flowParseType(),this.state.noAnonFunctionType=s,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),t;this.eat(12)}return e=t?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(t)]):this.flowParseFunctionTypeParams(),n.params=e.params,n.rest=e.rest,n.this=e._this,this.expect(11),this.expect(19),n.returnType=this.flowParseType(),n.typeParameters=null,this.finishNode(n,"FunctionTypeAnnotation");case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return n.value=this.match(85),this.next(),this.finishNode(n,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",n);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",n);throw this.raise(vt.UnexpectedSubtractionOperand,{at:this.state.startLoc})}return void this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(n,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(n,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(n,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(n,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(X(this.state.type)){let e=G(this.state.type);return this.next(),super.createIdentifier(n,e)}if(K(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(r,n,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,t=this.flowParsePrimaryType(),r=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let n=this.startNodeAt(e),i=this.eat(18);r=r||i,this.expect(0),!i&&this.match(3)?(n.elementType=t,this.next(),t=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=t,n.indexType=this.flowParseType(),this.expect(3),r?(n.optional=i,t=this.finishNode(n,"OptionalIndexedAccessType")):t=this.finishNode(n,"IndexedAccessType"))}return t}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(130===this.state.type&&"_"===this.state.value){let e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){let t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),"+"===this.state.value?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,t,r=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,r))):super.parseFunctionBody(e,!1,r)}parseFunctionBodyAndFinish(e,t,r=!1){if(this.match(14)){let t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,r)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){if(q(this.lookahead().type)){let e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}let t=super.parseStatementLike(e);return void 0===this.flowPragma&&!this.isValidDirective(t)&&(this.flowPragma=null),t}parseExpressionStatement(e,t,r){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||K(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(K(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return H(e)||this.shouldParseEnums()&&124===e?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,r){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(r),e}this.expect(17);let n=this.state.clone(),i=this.state.noArrowAt,s=this.startNodeAt(t),{consequent:a,failed:o}=this.tryParseConditionalConsequent(),[u,l]=this.getArrowLikeExpressions(a);if(o||l.length>0){let e=[...i];if(l.length>0){this.state=n,this.state.noArrowAt=e;for(let t=0;t<l.length;t++)e.push(l[t].start);({consequent:a,failed:o}=this.tryParseConditionalConsequent()),[u,l]=this.getArrowLikeExpressions(a)}o&&u.length>1&&this.raise(vt.AmbiguousConditionalArrow,{at:n.startLoc}),o&&1===u.length&&(this.state=n,e.push(u[0].start),this.state.noArrowAt=e,({consequent:a,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(a,!0),this.state.noArrowAt=i,this.expect(14),s.test=e,s.consequent=a,s.alternate=this.forwardNoArrowParamsConversionAt(s,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(s,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){let r=[e],n=[];for(;0!==r.length;){let e=r.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):n.push(e),r.push(e.body)):"ConditionalExpression"===e.type&&(r.push(e.consequent),r.push(e.alternate))}return t?(n.forEach((e=>this.finishArrowValidation(e))),[n,[]]):function(e,t){let r=[],n=[];for(let i=0;i<e.length;i++)(t(e[i],i,e)?r:n).push(e[i]);return[r,n]}(n,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let r;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),r=t(),this.state.noArrowParamsConversionAt.pop()):r=t(),r}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind="type";let t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(129)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(127)){e.exportKind="type";let t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind="value";let t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(128)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){let{startLoc:t}=this.state,r=super.maybeParseExportNamespaceSpecifier(e);return r&&"type"===e.exportKind&&this.unexpected(t),r}parseClassId(e,t,r){super.parseClassId(e,t,r),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,r){let{startLoc:n}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,r),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(vt.DeclareClassElement,{at:n}):t.value&&this.raise(vt.DeclareClassFieldInitializer,{at:t.value}))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){let e=super.readWord1(),t="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(v.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(130,t)}getTokenFromCode(e){let t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,r){return 64===e&&64===t&&oe(r)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){!t&&"AssignmentExpression"===e.type&&"TypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}toReferencedList(e,t){for(let n=0;n<e.length;n++){var r;let i=e[n];i&&"TypeCastExpression"===i.type&&(null==(r=i.extra)||!r.parenthesized)&&(e.length>1||!t)&&this.raise(vt.TypeCastInPattern,{at:i.typeAnnotation})}return e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(i.elements),i}isValidLVal(e,t,r){return"TypeCastExpression"===e||super.isValidLVal(e,t,r)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,t,r,n,i,s){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,r,n,i,s),t.params&&i){let e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(vt.ThisParamBannedInConstructor,{at:t})}else if("MethodDefinition"===t.type&&i&&t.value.params){let e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(vt.ThisParamBannedInConstructor,{at:t})}}pushClassPrivateMethod(e,t,r,n){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,r,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();let t=e.implements=[];do{let e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let t=this.getObjectOrClassMethodParams(e);if(t.length>0){let r=t[0];this.isThisParam(r)&&"get"===e.kind?this.raise(vt.GetterMayNotHaveThisParam,{at:r}):this.isThisParam(r)&&this.raise(vt.SetterMayNotHaveThisParam,{at:r})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,r,n,i,s,a){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!s&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,t,r,n,i,s,a);return o&&((u.value||u).typeParameters=o),u}parseAssignableListItemTypes(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(vt.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(vt.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(vt.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(vt.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(vt.TypeBeforeInitializer,{at:r.typeAnnotation}),r}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(vt.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,t,r){t.local=xt(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){if(!e)return!0;let t=this.lookaheadCharCode();return 123===t||42===t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){if(super.applyImportPhase(e,t,r,n),t){if(!r&&this.match(65))return;e.exportKind="type"===r?r:"value"}else"type"===r&&this.match(55)&&this.unexpected(),e.importKind="type"===r||"typeof"===r?r:"value"}parseImportSpecifier(e,t,r,n,i){let s=e.imported,a=null;"Identifier"===s.type&&("type"===s.name?a="type":"typeof"===s.name&&(a="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let t=this.parseIdentifier(!0);null===a||q(this.state.type)?(e.imported=s,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=a,e.local=mt(t))}else{if(null!==a&&q(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=a;else{if(t)throw this.raise(v.ImportBindingIsString,{at:e,importName:s.value});e.imported=s,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=mt(e.imported))}let u=xt(e);return r&&u&&this.raise(vt.ImportTypeShorthandOnlyInPureImport,{at:e}),(r||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),o&&!r&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){let r=e.kind;"get"!==r&&"set"!==r&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var r;let n,i=null;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(i=this.state.clone(),n=this.tryParse((()=>super.parseMaybeAssign(e,t)),i),!n.error)return n.node;let{context:r}=this.state,s=r[r.length-1];(s===T.j_oTag||s===T.j_expr)&&r.pop()}if(null!=(r=n)&&r.error||this.match(47)){var s,a;i=i||this.state.clone();let r,o=this.tryParse((n=>{var i;r=this.flowParseTypeParameterDeclaration();let s=this.forwardNoArrowParamsConversionAt(r,(()=>{let n=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(n,r),n}));null!=(i=s.extra)&&i.parenthesized&&n();let a=this.maybeUnwrapTypeCastExpression(s);return"ArrowFunctionExpression"!==a.type&&n(),a.typeParameters=r,this.resetStartLocationFromNode(a,r),s}),i),u=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(vt.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:r}),o.node;u=o.node}if(null!=(s=n)&&s.node)return this.state=n.failState,n.node;if(u)return this.state=o.failState,u;throw null!=(a=n)&&a.thrown?n.error:o.thrown?o.error:this.raise(vt.UnexpectedTokenAfterTypeParameter,{at:r})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((()=>{let t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,r,n=!0){if(!r||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(vt.ThisParamMustBeFirst,{at:e.params[t]});super.checkParams(e,t,r,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,r){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t.index)){this.next();let r=this.startNodeAt(t);r.callee=e,r.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(r,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){let n=this.state.clone(),i=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),n);if(!i.error&&!i.aborted)return i.node;let s=this.tryParse((()=>super.parseSubscripts(e,t,r)),n);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(e,t,r)}parseSubscript(e,t,r,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,r)return n.stop=!0,e;this.next();let i=this.startNodeAt(t);return i.callee=e,i.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),i.arguments=this.parseCallExpressionArguments(11,!1),i.optional=!0,this.finishCallExpression(i,!0)}if(!r&&this.shouldParseTypes()&&this.match(47)){let r=this.startNodeAt(t);r.callee=e;let i=this.tryParse((()=>(r.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),r.arguments=super.parseCallExpressionArguments(11,!1),n.optionalChainMember&&(r.optional=!1),this.finishCallExpression(r,n.optionalChainMember))));if(i.node)return i.error&&(this.state=i.failState),i.node}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){let t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){let t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){let r=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(vt.UnterminatedFlowComment,{at:this.state.curPosition()}),r}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(vt.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){let{pos:e}=this.state,t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;let r=this.input.charCodeAt(t+e),n=this.input.charCodeAt(t+e+1);return 58===r&&58===n?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===r&&58!==n&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(v.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(vt.EnumBooleanMemberNotInitialized,{at:e,memberName:r,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?vt.EnumInvalidMemberInitializerSymbolType:vt.EnumInvalidMemberInitializerPrimaryType:vt.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:r}){this.raise(vt.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:r})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(vt.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){let e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{let r=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 131:{let r=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}case 85:case 86:{let r=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:r.loc.start,value:r}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,r){let{explicitType:n}=t;null!==n&&n!==r&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){let r=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},i=!1;for(;!this.match(8);){if(this.eat(21)){i=!0;break}let s=this.startNode(),{id:a,init:o}=this.flowEnumMemberRaw(),u=a.name;if(""===u)continue;/^[a-z]/.test(u)&&this.raise(vt.EnumInvalidMemberName,{at:a,memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),r.has(u)&&this.raise(vt.EnumDuplicateMemberName,{at:a,memberName:u,enumName:e}),r.add(u);let l={enumName:e,explicitType:t,memberName:u};switch(s.id=a,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"boolean"),s.init=o.value,n.booleanMembers.push(this.finishNode(s,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"number"),s.init=o.value,n.numberMembers.push(this.finishNode(s,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,l,"string"),s.init=o.value,n.stringMembers.push(this.finishNode(s,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,l);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,l);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,l);break;default:n.defaultedMembers.push(this.finishNode(s,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:i}}flowEnumStringMembers(e,t,{enumName:r}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(let t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:r});return t}for(let e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:r});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!K(this.state.type))throw this.raise(vt.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});let{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(vt.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){let r=t.name,n=t.loc.start,i=this.flowEnumParseExplicitType({enumName:r});this.expect(5);let{members:s,hasUnknownMembers:a}=this.flowEnumMembers({enumName:r,explicitType:i});switch(e.hasUnknownMembers=a,i){case"boolean":return e.explicitType=!0,e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=s.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let i=s.booleanMembers.length,a=s.numberMembers.length,o=s.stringMembers.length,u=s.defaultedMembers.length;if(!(i||a||o||u))return t();if(!i&&!a)return e.members=this.flowEnumStringMembers(s.stringMembers,s.defaultedMembers,{enumName:r}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!a&&!o&&i>=u){for(let e of s.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!i&&!o&&a>=u){for(let e of s.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:r,memberName:e.id.name});return e.members=s.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(vt.EnumInconsistentMemberValues,{at:n,enumName:r}),t()}}}flowParseEnumDeclaration(e){let t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){let e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){let t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:It.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:It.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:It.InvalidModifierOnTypeParameter})}getScopeHandler(){return Pt}tsIsIdentifier(){return K(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(136)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!K(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;let r=this.state.value;if(-1!==e.indexOf(r)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return r}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:r,errorTemplate:n=It.InvalidModifierOnTypeMember},i){let s=(e,t,r,n)=>{t===r&&i[n]&&this.raise(It.InvalidModifiersOrder,{at:e,orderedModifiers:[r,n]})},a=(e,t,r,n)=>{(i[r]&&t===n||i[n]&&t===r)&&this.raise(It.IncompatibleModifiers,{at:e,modifiers:[r,n]})};for(;;){let{startLoc:o}=this.state,u=this.tsParseModifier(e.concat(t??[]),r);if(!u)break;_t(u)?i.accessibility?this.raise(It.DuplicateAccessibilityModifier,{at:o,modifier:u}):(s(o,u,u,"override"),s(o,u,u,"static"),s(o,u,u,"readonly"),i.accessibility=u):Nt(u)?(i[u]&&this.raise(It.DuplicateModifier,{at:o,modifier:u}),i[u]=!0,s(o,u,"in","out")):(Object.hasOwnProperty.call(i,u)?this.raise(It.DuplicateModifier,{at:o,modifier:u}):(s(o,u,"static","readonly"),s(o,u,"static","override"),s(o,u,"override","readonly"),s(o,u,"abstract","override"),a(o,u,"declare","override"),a(o,u,"static","abstract")),i[u]=!0),null!=t&&t.includes(u)&&this.raise(n,{at:o,modifier:u})}}tsIsListTerminator(e){switch(e){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(e,t){let r=[];for(;!this.tsIsListTerminator(e);)r.push(t());return r}tsParseDelimitedList(e,t,r){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,r))}tsParseDelimitedListWorker(e,t,r,n){let i=[],s=-1;for(;!this.tsIsListTerminator(e);){s=-1;let n=t();if(null==n)return;if(i.push(n),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(r&&this.expect(12))}s=this.state.lastTokStart}return n&&(n.value=s),i}tsParseBracketedList(e,t,r,n,i){n||(r?this.expect(0):this.expect(47));let s=this.tsParseDelimitedList(e,t,i);return r?this.expect(3):this.expect(48),s}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(131)||this.raise(It.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){let r=this.startNodeAtNode(t);r.left=t,r.right=this.parseIdentifier(e),t=this.finishNode(r,"TSQualifiedName")}return t}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let t=this.startNode();this.match(47)||this.match(140)?this.next():this.unexpected();let r={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,r),0===t.params.length&&this.raise(It.EmptyTypeParameters,{at:t}),-1!==r.value&&this.addExtra(t,"trailingComma",r.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){let r=19===e,n="typeAnnotation";t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(r||this.match(e))&&(t[n]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let t of e){let{type:e}=t;("AssignmentPattern"===e||"TSParameterProperty"===e)&&this.raise(It.UnsupportedSignatureParameterKind,{at:t,type:e})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!K(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);let t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);let r=e;if(this.match(10)||this.match(47)){t&&this.raise(It.ReadonlyForMethodSignature,{at:e});let n=r;n.kind&&this.match(47)&&this.raise(It.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,n),this.tsParseTypeMemberSemicolon();let i="parameters",s="typeAnnotation";if("get"===n.kind)n[i].length>0&&(this.raise(v.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(n[i][0])&&this.raise(It.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if("set"===n.kind){if(1!==n[i].length)this.raise(v.BadSetterArity,{at:this.state.curPosition()});else{let e=n[i][0];this.isThisParam(e)&&this.raise(It.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),"Identifier"===e.type&&e.optional&&this.raise(It.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),"RestElement"===e.type&&this.raise(It.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}n[s]&&this.raise(It.SetAccesorCannotHaveReturnType,{at:n[s]})}else n.kind="method";return this.finishNode(n,"TSMethodSignature")}{let e=r;t&&(e.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(e.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e),this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(120):(this.isContextual(120)&&this.next(),!(!this.match(0)||(this.next(),!this.tsIsIdentifier()))&&(this.next(),this.match(58)))}tsParseMappedTypeParameter(){let e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){let e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(120)):this.eatContextual(120)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,r=null;return e.elementTypes.forEach((e=>{let{type:n}=e;t&&"TSRestType"!==n&&"TSOptionalType"!==n&&!("TSNamedTupleMember"===n&&e.optional)&&this.raise(It.OptionalTypeBeforeRequired,{at:e}),t||(t="TSNamedTupleMember"===n&&e.optional||"TSOptionalType"===n);let i=n;"TSRestType"===n&&(i=(e=e.typeAnnotation).type);let s="TSNamedTupleMember"===i;null!=r||(r=s),r!==s&&this.raise(It.MixedLabeledAndUnlabeledElements,{at:e})})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e,t,r,n,{startLoc:i}=this.state,s=this.eat(21),a=q(this.state.type)?this.lookaheadCharCode():null;if(58===a)e=!0,r=!1,t=this.parseIdentifier(!0),this.expect(14),n=this.tsParseType();else if(63===a){r=!0;let i=this.state.startLoc,s=this.state.value,a=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(e=!0,t=this.createIdentifier(this.startNodeAt(i),s),this.expect(17),this.expect(14),n=this.tsParseType()):(e=!1,n=a,this.expect(17))}else n=this.tsParseType(),r=this.eat(17),e=this.eat(14);if(e){let e;t?(e=this.startNodeAtNode(t),e.optional=r,e.label=t,e.elementType=n,this.eat(17)&&(e.optional=!0,this.raise(It.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(e=this.startNodeAtNode(n),e.optional=r,this.raise(It.InvalidTupleMemberLabel,{at:n}),e.label=n,e.elementType=this.tsParseType()),n=this.finishNode(e,"TSNamedTupleMember")}else if(r){let e=this.startNodeAtNode(n);e.typeAnnotation=n,n=this.finishNode(e,"TSOptionalType")}if(s){let e=this.startNodeAt(i);e.typeAnnotation=n,n=this.finishNode(e,"TSRestType")}return n}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){let r=this.startNode();return"TSConstructorType"===e&&(r.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,r))),this.finishNode(r,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 132:case 133:case 131:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(114)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){let e=this.startNode(),t=this.lookahead();return 132!==t.type&&133!==t.type&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(K(e)||88===e||84===e){let t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){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!==t&&46!==this.lookaheadCharCode()){let e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{let t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){let e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(It.UnexpectedReadonly,{at:e})}}tsParseInferType(){let e=this.startNode();this.expectContextual(113);let t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return function(e){return e>=119&&e<=121}(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(113)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,r){let n=this.startNode(),i=this.eat(r),s=[];do{s.push(t())}while(this.eat(r));return 1!==s.length||i?(n.types=s,this.finishNode(n,e)):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(K(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{let t=this.startNode();this.expect(e);let r=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(r.parameterName=e,r.asserts=!0,r.typeAnnotation=null,e=this.finishNode(r,"TSTypePredicate")):(this.resetStartLocationFromNode(e,r),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}let i=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!i)return n?(r.parameterName=this.parseIdentifier(),r.asserts=n,r.typeAnnotation=null,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);let s=this.tsParseTypeAnnotation(!1);return r.parameterName=i,r.typeAnnotation=s,r.asserts=n,t.typeAnnotation=this.finishNode(r,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(114)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(107!==this.state.type)return!1;let e=this.state.containsEsc;return this.next(),!(!K(this.state.type)&&!this.match(78))&&(e&&this.raise(v.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Ft(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(122)&&77===this.lookahead().type}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(It.ReservedTypeAssertion,{at:this.state.startLoc});let e=this.startNode();return e.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType()))),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let t=this.state.startLoc,r=this.tsParseDelimitedList("HeritageClauseElement",(()=>{let e=this.startNode();return e.expression=this.tsParseEntityName(),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return r.length||this.raise(It.EmptyHeritageClauseType,{at:t,token:e}),r}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(127),t.declare&&(e.declare=!0),K(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(It.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let r=this.startNode();return r.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(r,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType((()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(112)&&16!==this.lookahead().type){let e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){let t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){let t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){let t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType((()=>(this.expect(e),this.tsParseType())))}tsNextThenParseType(){return this.tsInType((()=>(this.next(),this.tsParseType())))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(124),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){let t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(Ee),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(110)?(e.global=!0,e.id=this.parseIdentifier()):this.match(131)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(Ee),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t,r){e.isExport=r||!1,e.id=t||this.parseIdentifier(),this.checkIdentifier(e.id,Ce),this.expect(29);let n=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==n.type&&this.raise(It.ImportAliasHasImportType,{at:n}),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(117)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(117),this.expect(10),this.match(131)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let t=this.state.clone(),r=e();return this.state=t,r}tsTryParseAndCatch(e){let t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){let t=this.state.clone(),r=e();if(void 0!==r&&!1!==r)return r;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,r=this.state.type;return this.isContextual(99)&&(r=74,t="let"),this.tsInAmbientContext((()=>{switch(r){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 124:return this.tsParseEnumDeclaration(e,{declare:!0});case 110:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,t||this.state.value,!0));case 127:{let t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(K(r))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,r){switch(t.name){case"declare":{let t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(Ee),this.prodParam.enter(0);let r=e;return r.global=!0,r.id=t,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,r)}}tsParseDeclaration(e,t,r,n){switch(t){case"abstract":if(this.tsCheckLineTerminator(r)&&(this.match(80)||K(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case"module":if(this.tsCheckLineTerminator(r)){if(this.match(131))return this.tsParseAmbientExternalModuleDeclaration(e);if(K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(r)&&K(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let r=this.tsTryParseAndCatch((()=>{let t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,r?super.parseArrowExpression(r,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(It.EmptyTypeArguments,{at:e}):!this.state.inType&&this.curContext()===T.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return function(e){return e>=122&&e<=128}(this.state.type)}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){let r=this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);let i=n.accessibility,s=n.override,a=n.readonly;!(4&e)&&(i||a||s)&&this.raise(It.UnexpectedParameterModifier,{at:r});let o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o,e);let u=this.parseMaybeDefault(o.loc.start,o);if(i||a||s){let e=this.startNodeAt(r);return t.length&&(e.decorators=t),i&&(e.accessibility=i),a&&(e.readonly=a),s&&(e.override=s),"Identifier"!==u.type&&"AssignmentPattern"!==u.type&&this.raise(It.UnsupportedParameterPropertyKind,{at:e}),e.parameter=u,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),u}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(It.PatternIsOptional,{at:t})}setArrowFunctionParameters(e,t,r){super.setArrowFunctionParameters(e,t,r),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,r=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let n="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):"TSDeclareFunction"===n&&this.state.isAmbientContext&&(this.raise(It.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,n,r):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,r))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(It.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,r,n){let i=super.parseArrayLike(e,t,r,n);return"ArrayExpression"===i.type&&this.tsCheckForInvalidTypeCasts(i.elements),i}parseSubscript(e,t,r,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let r=this.startNodeAt(t);return r.expression=e,this.finishNode(r,"TSNonNullExpression")}let i=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(r)return n.stop=!0,e;n.optionalChainMember=i=!0,this.next()}if(this.match(47)||this.match(51)){let s,a=this.tsTryParseAndCatch((()=>{if(!r&&this.atPossibleAsyncArrow(e)){let e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}let a=this.tsParseTypeArgumentsInExpression();if(!a)return;if(i&&!this.match(10))return void(s=this.state.curPosition());if(Q(this.state.type)){let r=super.parseTaggedTemplateExpression(e,t,n);return r.typeParameters=a,r}if(!r&&this.eat(10)){let r=this.startNodeAt(t);return r.callee=e,r.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(r.arguments),r.typeParameters=a,n.optionalChainMember&&(r.optional=i),this.finishCallExpression(r,n.optionalChainMember)}let o=this.state.type;if(48===o||52===o||10!==o&&J(o)&&!this.hasPrecedingLineBreak())return;let u=this.startNodeAt(t);return u.expression=e,u.typeParameters=a,this.finishNode(u,"TSInstantiationExpression")}));if(s&&this.unexpected(s,10),a)return"TSInstantiationExpression"===a.type&&(this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(It.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),a}return super.parseSubscript(e,t,r,n)}parseNewCallee(e){var t;super.parseNewCallee(e);let{callee:r}=e;"TSInstantiationExpression"===r.type&&(null==(t=r.extra)||!t.parenthesized)&&(e.typeParameters=r.typeParameters,e.callee=r.expression)}parseExprOp(e,t,r){let n;if(Y(58)>r&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(118)))){let i=this.startNodeAt(t);return i.expression=e,i.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(n&&this.raise(v.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(i,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(i,t,r)}return super.parseExprOp(e,t,r)}checkReservedWord(e,t,r,n){this.state.isAmbientContext||super.checkReservedWord(e,t,r,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(It.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(128)){let t=this.lookaheadCharCode();return e?123===t||42===t:61!==t}return!e&&this.isContextual(87)}applyImportPhase(e,t,r,n){super.applyImportPhase(e,t,r,n),t?e.exportKind="type"===r?"type":"value":e.importKind="type"===r||"typeof"===r?r:"value"}parseImport(e){if(this.match(131))return e.importKind="value",super.parseImport(e);let t;if(K(this.state.type)&&61===this.lookaheadCharCode())return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(128)){let r=this.parseMaybeImportPhase(e,!1);if(61===this.lookaheadCharCode())return this.tsParseImportEqualsDeclaration(e,r);t=super.parseImportSpecifiersAndAfter(e,r)}else t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(It.TypeImportCannotSpecifyDefaultAndNamed,{at:t}),t}parseExport(e,t){if(this.match(83)){this.next();let t=null;return this.isContextual(128)&&this.isPotentialImportPhase(!1)?t=this.parseMaybeImportPhase(e,!1):e.importKind="value",this.tsParseImportEqualsDeclaration(e,t,!0)}if(this.eat(29)){let t=e;return t.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){let t=e;return this.expectContextual(126),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(122)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,r=!1){let{isAmbientContext:n}=this.state,i=super.parseVarStatement(e,t,r||n);if(!n)return i;for(let{id:e,init:r}of i.declarations)r&&("const"!==t||e.typeAnnotation?this.raise(It.InitializerNotAllowedInAmbientContext,{at:r}):Bt(r,this.hasPlugin("estree"))||this.raise(It.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:r}));return i}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){let e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(124))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(127)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>_t(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&123===this.lookaheadCharCode()}parseClassMember(e,t,r){let n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:It.InvalidModifierOnTypeParameterPositions},t);let i=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,n)&&this.raise(It.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,r,!!t.static)};t.declare?this.tsInAmbientContext(i):i()}parseClassMemberWithIsStatic(e,t,r,n){let i=this.tsTryParseIndexSignature(t);if(i)return e.body.push(i),t.abstract&&this.raise(It.IndexSignatureHasAbstract,{at:t}),t.accessibility&&this.raise(It.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility}),t.declare&&this.raise(It.IndexSignatureHasDeclare,{at:t}),void(t.override&&this.raise(It.IndexSignatureHasOverride,{at:t}));!this.state.inAbstractClass&&t.abstract&&this.raise(It.NonAbstractClassHasAbstractMethod,{at:t}),t.override&&(r.hadSuperClass||this.raise(It.OverrideNotInSubClass,{at:t})),super.parseClassMemberWithIsStatic(e,t,r,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(It.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(It.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,t,r){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,r):void 0)||super.parseExpressionStatement(e,t,r)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,r){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,r);let n=this.tryParse((()=>super.parseConditional(e,t)));return n.node?(n.error&&(this.state=n.failState),n.node):(n.error&&super.setOptionalParametersError(r,n.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(123))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));let t=this.state.startLoc,r=this.eatContextual(123);if(r&&(this.isContextual(123)||!this.shouldParseExportDeclaration()))throw this.raise(It.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});let n=K(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return n?(("TSInterfaceDeclaration"===n.type||"TSTypeAliasDeclaration"===n.type||r)&&(e.exportKind="type"),r&&(this.resetStartLocation(n,t),n.declare=!0),n):null}parseClassId(e,t,r,n){if((!t||r)&&this.isContextual(111))return;super.parseClassId(e,t,r,e.declare?1024:8331);let i=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);i&&(e.typeParameters=i)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(It.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){let{key:t}=e;this.raise(It.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(It.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(It.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(It.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,r,n,i,s){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&i&&this.raise(It.ConstructorHasTypeParameters,{at:a});let{declare:o=!1,kind:u}=t;o&&("get"===u||"set"===u)&&this.raise(It.DeclareAccessor,{at:t,kind:u}),a&&(t.typeParameters=a),super.pushClassMethod(e,t,r,n,i,s)}pushClassPrivateMethod(e,t,r,n){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(t.typeParameters=i),super.pushClassPrivateMethod(e,t,r,n)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"===e.type&&!e.value.body||super.declareClassPrivateMethodInScope(e,t))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(111)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,r,n,i,s,a){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,r,n,i,s,a)}parseFunctionParams(e,t){let r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(e.typeParameters=r),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let r=this.tsTryParseTypeAnnotation();r&&(e.id.typeAnnotation=r,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var r,n,i,s,a;let o,u,l;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(o=this.state.clone(),u=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!u.error)return u.node;let{context:r}=this.state,n=r[r.length-1];(n===T.j_oTag||n===T.j_expr)&&r.pop()}if(!(null!=(r=u)&&r.error||this.match(47)))return super.parseMaybeAssign(e,t);(!o||o===this.state)&&(o=this.state.clone());let c,p=this.tryParse((r=>{var n,i;c=this.tsParseTypeParameters(this.tsParseConstModifier);let s=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==s.type||null!=(n=s.extra)&&n.parenthesized)&&r(),0!==(null==(i=c)?void 0:i.params.length)&&this.resetStartLocationFromNode(s,c),s.typeParameters=c,s}),o);if(!p.error&&!p.aborted)return c&&this.reportReservedArrowTypeParam(c),p.node;if(!u&&(Ft(!this.hasPlugin("jsx")),l=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!l.error))return l.node;if(null!=(n=u)&&n.node)return this.state=u.failState,u.node;if(p.node)return this.state=p.failState,c&&this.reportReservedArrowTypeParam(c),p.node;if(null!=(i=l)&&i.node)return this.state=l.failState,l.node;throw(null==(s=u)?void 0:s.error)||p.error||(null==(a=l)?void 0:a.error)}reportReservedArrowTypeParam(e){var t;1===e.params.length&&!e.params[0].constraint&&(null==(t=e.extra)||!t.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(It.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){let t=this.tryParse((e=>{let t=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(2&t))return e;this.eat(17)&&(e.optional=!0);let r=this.tsTryParseTypeAnnotation();return r&&(e.typeAnnotation=r),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(It.UnexpectedTypeCastInParameter,{at:e}):this.raise(It.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,t);break;case"AssignmentExpression":!t&&"TSTypeCastExpression"===e.left.type&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,r){return((e,t)=>Object.hasOwnProperty.call(e,t)&&e[t])({TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(r!==ke||!t)&&["expression",!0],TSSatisfiesExpression:(r!==ke||!t)&&["expression",!0],TSTypeAssertion:(r!==ke||!t)&&["expression",!0]},e)||super.isValidLVal(e,t,r)}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){let t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let r=super.parseMaybeDecoratorArguments(e);return r.typeParameters=t,r}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,t){let r=super.parseMaybeDefault(e,t);return"AssignmentPattern"===r.type&&r.typeAnnotation&&r.right.start<r.typeAnnotation.start&&this.raise(It.TypeAnnotationAfterAssign,{at:r.typeAnnotation}),r}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,r){for(let t=0;t<e.length;t++){let r=e[t];"TSTypeCastExpression"===(null==r?void 0:r.type)&&(e[t]=this.typeCastToParameter(r))}super.toAssignableList(e,t,r)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every((e=>this.isAssignable(e,!0))):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let t=super.getGetterSetterExpectedParamCount(e),r=this.getObjectOrClassMethodParams(e)[0];return r&&this.isThisParam(r)?t+1:t}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){let t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,r){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,r)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(127)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(It.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,r,n,i,s,a){let o=super.parseMethod(e,t,r,n,i,s,a);if(o.abstract&&(this.hasPlugin("estree")?o.value.body:o.body)){let{key:e}=o;this.raise(It.AbstractMethodHasImplementation,{at:o,methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(e.start,e.end)}]`:e.name})}return o}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(e,t,r,n){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,r),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,r,n))}parseImportSpecifier(e,t,r,n,i){return!t&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,r),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,r,n,r?4098:Ce))}parseTypeOnlyImportExportSpecifier(e,t,r){let n,i=t?"imported":"local",s=t?"local":"exported",a=e[i],o=!1,u=!0,l=a.loc.start;if(this.isContextual(93)){let e=this.parseIdentifier();if(this.isContextual(93)){let r=this.parseIdentifier();q(this.state.type)?(o=!0,a=e,n=t?this.parseIdentifier():this.parseModuleExportName(),u=!1):(n=r,u=!1)}else q(this.state.type)?(u=!1,n=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,a=e)}else q(this.state.type)&&(o=!0,t?(a=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(a.name,a.loc.start,!0,!0)):a=this.parseModuleExportName());o&&r&&this.raise(t?It.TypeModifierIsUsedInTypeImports:It.TypeModifierIsUsedInTypeExports,{at:l}),e[i]=a,e[s]=n,e[t?"importKind":"exportKind"]=o?"type":"value",u&&this.eatContextual(93)&&(e[s]=t?this.parseIdentifier():this.parseModuleExportName()),e[s]||(e[s]=mt(e[i])),t&&this.checkIdentifier(e[s],o?4098:Ce)}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,t=this.startNode();if(this.next(),K(this.state.type)){let e=this.parseIdentifierName(),r=this.createIdentifier(t,e);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(142)){let t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(142),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){let r=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,r?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(142,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,r,n){void 0!==e&&super.checkReservedWord(e,t,r,n)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,r){return"Placeholder"===e||super.isValidLVal(e,t,r)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!(!super.chStartsBindingIdentifier(e,t)&&142!==this.lookahead().type)}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){let r=e;return r.label=this.finishPlaceholder(t,"Identifier"),this.next(),r.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(r,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,r){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,r)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,r){let n=t?"ClassDeclaration":"ClassExpression";this.next();let i=this.state.strict,s=this.parsePlaceholder("Identifier");if(s){if(!(this.match(81)||this.match(142)||this.match(5))){if(r||!t)return e.id=null,e.body=this.finishPlaceholder(s,"ClassBody"),this.finishNode(e,n);throw this.raise(jt.ClassNameIsRequired,{at:this.state.startLoc})}e.id=s}else this.parseClassId(e,t,r);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,i),this.finishNode(e,n)}parseExport(e,t){let r=this.parsePlaceholder("Identifier");if(!r)return super.parseExport(e,t);if(!this.isContextual(97)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(r,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let n=this.startNode();return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(142),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,t){var r;return!(null==(r=e.specifiers)||!r.length)||super.maybeParseExportDefaultSpecifier(e,t)}checkExport(e){let{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){let t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(97)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishNode(r,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(97),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(jt.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}},qt=Object.keys(Kt),Wt={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};var Jt=class extends kt{checkProto(e,t,r,n){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;let i=e.key;if("__proto__"===("Identifier"===i.type?i.name:i.value)){if(t)return void this.raise(v.RecordNoProto,{at:i});r.used&&(n?null===n.doubleProtoLoc&&(n.doubleProtoLoc=i.loc.start):this.raise(v.DuplicateProto,{at:i})),r.used=!0}}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}getExpression(){this.enterInitialScopes(),this.nextToken();let e=this.parseExpression();return this.match(137)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){let t=this.state.startLoc,r=this.parseMaybeAssign(e);if(this.match(12)){let n=this.startNodeAt(t);for(n.expressions=[r];this.eat(12);)n.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(n.expressions),this.finishNode(n,"SequenceExpression")}return r}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var r;e.optionalParametersLoc=null!=(r=null==t?void 0:t.loc)?r:this.state.startLoc}parseMaybeAssign(e,t){let r,n=this.state.startLoc;if(this.isContextual(106)&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,n)),e}e?r=!1:(e=new dt,r=!0);let{type:i}=this.state;(10===i||K(i))&&(this.state.potentialArrowAt=this.state.start);let s=this.parseMaybeConditional(e);if(t&&(s=t.call(this,s,n)),(a=this.state.type)>=29&&a<=33){let t=this.startNodeAt(n),r=this.state.value;if(t.operator=r,this.match(29)){this.toAssignable(s,!0),t.left=s;let r=n.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=r&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=r&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=r&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=s;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(s,{in:this.finishNode(t,"AssignmentExpression")}),t}var a;return r&&this.checkExpressionErrors(e,!0),s}parseMaybeConditional(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprOps(e);return this.shouldExitDescending(n,r)?n:this.parseConditional(n,t,e)}parseConditional(e,t,r){if(this.eat(17)){let r=this.startNodeAt(t);return r.test=e,r.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),r.alternate=this.parseMaybeAssign(),this.finishNode(r,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(136)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(n,r)?n:this.parseExprOp(n,t,-1)}parseExprOp(e,t,r){if(this.isPrivateName(e)){let t=this.getPrivateNameSV(e);(r>=Y(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(v.PrivateInExpectedIn,{at:e,identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}let n=this.state.type;if((i=n)>=39&&i<=59&&(this.prodParam.hasIn||!this.match(58))){let i=Y(n);if(i>r){if(39===n){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}let s=this.startNodeAt(t);s.left=e,s.operator=this.state.value;let a=41===n||42===n,o=40===n;if(o&&(i=Y(42)),this.next(),39===n&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(v.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});s.right=this.parseExprOpRightExpr(n,i);let u=this.finishNode(s,a||o?"LogicalExpression":"BinaryExpression"),l=this.state.type;if(o&&(41===l||42===l)||a&&40===l)throw this.raise(v.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(u,t,r)}}var i;return e}parseExprOpRightExpr(e,t){let r=this.state.startLoc;if(39===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(106))throw this.raise(v.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),r)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){let r=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),r,57===e?t-1:t)}parseHackPipeBody(){var e;let{startLoc:t}=this.state,r=this.parseMaybeAssign();return h.has(r.type)&&!(null!=(e=r.extra)&&e.parenthesized)&&this.raise(v.PipeUnparenthesizedBody,{at:t,type:r.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipeTopicUnused,{at:t}),r}checkExponentialAfterUnary(e){this.match(57)&&this.raise(v.UnexpectedTokenUnaryExponentiation,{at:e.argument})}parseMaybeUnary(e,t){let r=this.state.startLoc,n=this.isContextual(96);if(n&&this.isAwaitAllowed()){this.next();let e=this.parseAwait(r);return t||this.checkExponentialAfterUnary(e),e}let i=this.match(34),s=this.startNode();if(a=this.state.type,$[a]){s.operator=this.state.value,s.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let r=this.match(89);if(this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&r){let e=s.argument;"Identifier"===e.type?this.raise(v.StrictDelete,{at:s}):this.hasPropertyAsPrivateName(e)&&this.raise(v.DeletePrivateField,{at:s})}if(!i)return t||this.checkExponentialAfterUnary(s),this.finishNode(s,"UnaryExpression")}var a;let o=this.parseUpdate(s,i,e);if(n){let{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?J(e):J(e)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(v.AwaitNotInAsyncContext,{at:r}),this.parseAwait(r)}return o}parseUpdate(e,t,r){if(t){let t=e;return this.checkLVal(t.argument,{in:this.finishNode(t,"UpdateExpression")}),e}let n=this.state.startLoc,i=this.parseExprSubscripts(r);if(this.checkExpressionErrors(r,!1))return i;for(;34===this.state.type&&!this.canInsertSemicolon();){let e=this.startNodeAt(n);e.operator=this.state.value,e.prefix=!1,e.argument=i,this.next(),this.checkLVal(i,{in:i=this.finishNode(e,"UpdateExpression")})}return i}parseExprSubscripts(e){let t=this.state.startLoc,r=this.state.potentialArrowAt,n=this.parseExprAtom(e);return this.shouldExitDescending(n,r)?n:this.parseSubscripts(n,t)}parseSubscripts(e,t,r){let n={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,r,n),n.maybeAsyncArrow=!1}while(!n.stop);return e}parseSubscript(e,t,r,n){let{type:i}=this.state;if(!r&&15===i)return this.parseBind(e,t,r,n);if(Q(i))return this.parseTaggedTemplateExpression(e,t,n);let s=!1;if(18===i){if(r&&(this.raise(v.OptionalChainingNoNew,{at:this.state.startLoc}),40===this.lookaheadCharCode()))return n.stop=!0,e;n.optionalChainMember=s=!0,this.next()}if(!r&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,n,s);{let r=this.eat(0);return r||s||this.eat(16)?this.parseMember(e,t,n,r,s):(n.stop=!0,e)}}parseMember(e,t,r,n,i){let s=this.startNodeAt(t);return s.object=e,s.computed=n,n?(s.property=this.parseExpression(),this.expect(3)):this.match(136)?("Super"===e.type&&this.raise(v.SuperPrivateField,{at:t}),this.classScope.usePrivateName(this.state.value,this.state.startLoc),s.property=this.parsePrivateName()):s.property=this.parseIdentifier(!0),r.optionalChainMember?(s.optional=i,this.finishNode(s,"OptionalMemberExpression")):this.finishNode(s,"MemberExpression")}parseBind(e,t,r,n){let i=this.startNodeAt(t);return i.object=e,this.next(),i.callee=this.parseNoCallExpr(),n.stop=!0,this.parseSubscripts(this.finishNode(i,"BindExpression"),t,r)}parseCoverCallAndAsyncArrowHead(e,t,r,n){let i=this.state.maybeInArrowParameters,s=null;this.state.maybeInArrowParameters=!0,this.next();let a=this.startNodeAt(t);a.callee=e;let{maybeAsyncArrow:o,optionalChainMember:u}=r;o&&(this.expressionScope.enter(new ut(2)),s=new dt),u&&(a.optional=n),a.arguments=n?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===e.type,"Super"!==e.type,a,s);let l=this.finishCallExpression(a,u);return o&&this.shouldParseAsyncArrow()&&!n?(r.stop=!0,this.checkDestructuringPrivate(s),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),l=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),l)):(o&&(this.checkExpressionErrors(s,!0),this.expressionScope.exit()),this.toReferencedArguments(l)),this.state.maybeInArrowParameters=i,l}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,r){let n=this.startNodeAt(t);return n.tag=e,n.quasi=this.parseTemplate(!0),r.optionalChainMember&&this.raise(v.OptionalChainingNoTemplate,{at:t}),this.finishNode(n,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}expectImportAttributesPlugin(){this.hasPlugin("importAssertions")||this.expectPlugin("importAttributes")}finishCallExpression(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectImportAttributesPlugin()),0===e.arguments.length||e.arguments.length>2)this.raise(v.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(let t of e.arguments)"SpreadElement"===t.type&&this.raise(v.ImportCallSpreadArgument,{at:t});return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,r,n,i){let s=[],a=!0,o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){t&&!this.hasPlugin("importAttributes")&&!this.hasPlugin("importAssertions")&&!this.hasPlugin("moduleAttributes")&&this.raise(v.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),n&&this.addTrailingCommaExtraToNode(n),this.next();break}s.push(this.parseExprListItem(!1,i,r))}return this.state.inFSharpPipelineDirectBody=o,s}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var r;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(r=t.extra)?void 0:r.trailingCommaLoc),t.innerComments&&Le(e,t.innerComments),t.callee.trailingComments&&Le(e,t.callee.trailingComments),e}parseNoCallExpr(){let e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,r=null,{type:n}=this.state;switch(n){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):(this.match(10)||this.raise(v.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseDecimalLiteral(this.state.value);case 131:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);case 68:return this.parseFunctionOrFunctionSent();case 26:r=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(r,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{t=this.startNode(),this.next(),t.object=null;let e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(v.UnsupportedBind,{at:e})}case 136:return this.raise(v.PrivateInExpectedIn,{at:this.state.startLoc,identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{let e=this.input.codePointAt(this.nextTokenStart());oe(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(K(n)){if(this.isContextual(125)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();let e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,r=this.parseIdentifier();if(!t&&"async"===r.name&&!this.canInsertSemicolon()){let{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(r),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(r));if(K(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(r)):r;if(90===e)return this.resetPreviousNodeTrailingComments(r),this.parseDo(this.startNodeAtNode(r),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(r),[r],!1)):r}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){let r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=i(this.state.endLoc,-1),this.parseTopicReference(r);this.unexpected()}parseTopicReference(e){let t=this.startNode(),r=this.state.startLoc,n=this.state.type;return this.next(),this.finishTopicReference(t,r,e,n)}finishTopicReference(e,t,r,n){if(this.testTopicReferenceConfiguration(r,t,n)){let n="smart"===r?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise("smart"===r?v.PrimaryTopicNotAllowed:v.PipeTopicUnbound,{at:t}),this.registerTopicReference(),this.finishNode(e,n)}throw this.raise(v.PipeTopicUnconfiguredToken,{at:t,token:G(n)})}testTopicReferenceConfiguration(e,t,r){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(r)}]);case"smart":return 27===r;default:throw this.raise(v.PipeTopicRequiresHackPipes,{at:t})}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(ct(!0,this.prodParam.hasYield));let t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(v.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();let r=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=r,this.finishNode(e,"DoExpression")}parseSuper(){let e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?!this.scope.allowSuper&&!this.options.allowSuperOutsideMethod&&this.raise(v.UnexpectedSuper,{at:e}):this.raise(v.SuperNotAllowed,{at:e}),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(v.UnsupportedSuper,{at:e}),this.finishNode(e,"Super")}parsePrivateName(){let e=this.startNode(),t=this.startNodeAt(i(this.state.startLoc,1)),r=this.state.value;return this.next(),e.id=this.createIdentifier(t,r),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){let e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(102)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,r){e.meta=t;let n=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==r||n)&&this.raise(v.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:r}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){let t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.next(),this.isContextual(100)&&(this.inModule||this.raise(v.ImportMetaOutsideModule,{at:t}),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,r){return this.addExtra(r,"rawValue",e),this.addExtra(r,"raw",this.input.slice(r.start,this.state.end)),r.value=e,this.next(),this.finishNode(r,t)}parseLiteral(e,t){let r=this.startNode();return this.parseLiteralAtNode(e,t,r)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){let t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){let t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){let e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){let t,r=this.state.startLoc;this.next(),this.expressionScope.enter(new ut(1));let n=this.state.maybeInArrowParameters,i=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let s,a,o=this.state.startLoc,u=[],l=new dt,c=!0;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,null===l.optionalParametersLoc?null:l.optionalParametersLoc),this.match(11)){a=this.state.startLoc;break}if(this.match(21)){let e=this.state.startLoc;if(s=this.state.startLoc,u.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else u.push(this.parseMaybeAssignAllowIn(l,this.parseParenItem))}let p=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=n,this.state.inFSharpPipelineDirectBody=i;let d=this.startNodeAt(r);return e&&this.shouldParseArrow(u)&&(d=this.parseArrow(d))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(d,u,!1),d):(this.expressionScope.exit(),u.length||this.unexpected(this.state.lastTokStartLoc),a&&this.unexpected(a),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(u,!0),u.length>1?(t=this.startNodeAt(o),t.expressions=u,this.finishNode(t,"SequenceExpression"),this.resetEndLocation(t,p)):t=u[0],this.wrapParenthesis(r,t))}wrapParenthesis(e,t){if(!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;let r=this.startNodeAt(e);return r.expression=t,this.finishNode(r,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){let e=this.startNode();if(this.next(),this.match(16)){let t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();let r=this.parseMetaProperty(e,t,"target");return!this.scope.inNonArrowFunction&&!this.scope.inClass&&!this.options.allowNewTargetOutsideFunction&&this.raise(v.UnexpectedNewTarget,{at:r}),r}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){let t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){e.callee=this.parseNoCallExpr(),"Import"===e.callee.type&&this.raise(v.ImportCallNotNewExpression,{at:e.callee})}parseTemplateElement(e){let{start:t,startLoc:r,end:n,value:s}=this.state,a=t+1,o=this.startNodeAt(i(r,1));null===s&&(e||this.raise(v.InvalidEscapeSequenceTemplate,{at:i(this.state.firstInvalidTemplateEscapePos,1)}));let u=this.match(24),l=u?-1:-2,c=n+l;o.value={raw:this.input.slice(a,c).replace(/\r\n?/g,"\n"),cooked:null===s?null:s.slice(1,l)},o.tail=u,this.next();let p=this.finishNode(o,"TemplateElement");return this.resetEndLocation(p,i(this.state.lastTokEndLoc,l)),p}parseTemplate(e){let t=this.startNode();t.expressions=[];let r=this.parseTemplateElement(e);for(t.quasis=[r];!r.tail;)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(r=this.parseTemplateElement(e));return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=Object.create(null),a=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let i;t?i=this.parseBindingProperty():(i=this.parsePropertyDefinition(n),this.checkProto(i,r,s,n)),r&&!this.isObjectProperty(i)&&"SpreadElement"!==i.type&&this.raise(v.InvalidRecordProperty,{at:i}),i.shorthand&&this.addExtra(i,"shorthand",!0),o.properties.push(i)}this.next(),this.state.inFSharpPipelineDirectBody=i;let u="ObjectExpression";return t?u="ObjectPattern":r&&(u="RecordExpression"),this.finishNode(o,u)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStart),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(v.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)t.push(this.parseDecorator());let r,n=this.startNode(),i=!1,s=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(n.decorators=t,t=[]),n.method=!1,e&&(r=this.state.startLoc);let a=this.eat(55);this.parsePropertyNamePrefixOperator(n);let o=this.state.containsEsc,u=this.parsePropertyName(n,e);if(!a&&!o&&this.maybeAsyncOrAccessorProp(n)){let e=u.name;"async"===e&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(u),a=this.eat(55),this.parsePropertyName(n)),("get"===e||"set"===e)&&(s=!0,this.resetPreviousNodeTrailingComments(u),n.kind=e,this.match(55)&&(a=!0,this.raise(v.AccessorIsGenerator,{at:this.state.curPosition(),kind:e}),this.next()),this.parsePropertyName(n))}return this.parseObjPropValue(n,r,a,i,!1,s,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;let r=this.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e);n.length!==r&&this.raise("get"===e.kind?v.BadGetterArity:v.BadSetterArity,{at:e}),"set"===e.kind&&"RestElement"===(null==(t=n[n.length-1])?void 0:t.type)&&this.raise(v.BadSetterRestParameter,{at:e})}parseObjectMethod(e,t,r,n,i){if(i){let r=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(r),r}if(r||t||this.match(10))return n&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,r,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,r,n){if(e.shorthand=!1,this.eat(14))return e.value=r?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(n),this.finishNode(e,"ObjectProperty");if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),r)e.value=this.parseMaybeDefault(t,mt(e.key));else if(this.match(29)){let r=this.state.startLoc;null!=n?null===n.shorthandAssignLoc&&(n.shorthandAssignLoc=r):this.raise(v.InvalidCoverInitializedName,{at:r}),e.value=this.parseMaybeDefault(t,mt(e.key))}else e.value=mt(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,r,n,i,s,a){let o=this.parseObjectMethod(e,r,n,i,s)||this.parseObjectProperty(e,t,i,a);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let r,{type:n,value:i}=this.state;if(q(n))r=this.parseIdentifier(!0);else switch(n){case 132:r=this.parseNumericLiteral(i);break;case 131:r=this.parseStringLiteral(i);break;case 133:r=this.parseBigIntLiteral(i);break;case 134:r=this.parseDecimalLiteral(i);break;case 136:{let e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(v.UnexpectedPrivateField,{at:e}),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,136!==n&&(e.computed=!1)}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,r,n,i,s,a=!1){this.initFunction(e,r),e.generator=t,this.scope.enter(18|(a?ve:0)|(i?32:0)),this.prodParam.enter(ct(r,e.generator)),this.parseFunctionParams(e,n);let o=this.parseFunctionBodyAndFinish(e,s,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,r,n){r&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let s=this.startNode();return this.next(),s.elements=this.parseExprList(e,!r,n,s),this.state.inFSharpPipelineDirectBody=i,this.finishNode(s,r?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,r,n){this.scope.enter(6);let i=ct(r,!1);!this.match(5)&&this.prodParam.hasIn&&(i|=8),this.prodParam.enter(i),this.initFunction(e,r);let s=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,n)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=s,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,r){this.toAssignableList(t,r,!1),e.params=t}parseFunctionBodyAndFinish(e,t,r=!1){return this.parseFunctionBody(e,!1,r),this.finishNode(e,t)}parseFunctionBody(e,t,r=!1){let n=t&&!this.match(5);if(this.expressionScope.enter(lt()),n)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{let n=this.state.strict,i=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(i=>{let s=!this.isSimpleParamList(e.params);i&&s&&this.raise(v.IllegalLanguageModeDirective,{at:"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end});let a=!n&&this.state.strict;this.checkParams(e,!(this.state.strict||t||r||s),t,a),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,a)})),this.prodParam.exit(),this.state.labels=i}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,r=e.length;t<r;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,r,n=!0){let i=!t&&new Set,s={type:"FormalParameters"};for(let t of e.params)this.checkLVal(t,{in:s,binding:5,checkClashes:i,strictModeChanged:n})}parseExprList(e,t,r,n){let i=[],s=!0;for(;!this.eat(e);){if(s)s=!1;else if(this.expect(12),this.match(e)){n&&this.addTrailingCommaExtraToNode(n),this.next();break}i.push(this.parseExprListItem(t,r))}return i}parseExprListItem(e,t,r){let n;if(this.match(12))e||this.raise(v.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),n=null;else if(this.match(21)){let e=this.state.startLoc;n=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),r||this.raise(v.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});let e=this.startNode();this.next(),n=this.finishNode(e,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return n}parseIdentifier(e){let t=this.startNode(),r=this.parseIdentifierName(e);return this.createIdentifier(t,r)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}parseIdentifierName(e){let t,{startLoc:r,type:n}=this.state;q(n)?t=this.state.value:this.unexpected();let i=n<=92;return e?i&&this.replaceToken(130):this.checkReservedWord(t,r,i,!1),this.next(),t}checkReservedWord(e,t,r,n){var i;if(!(e.length>10)&&(i=e,be.has(i)))if(r&&function(e){return pe.has(e)}(e))this.raise(v.UnexpectedKeyword,{at:t,keyword:e});else if((this.state.strict?n?ge:me:fe)(e,this.inModule))this.raise(v.UnexpectedReservedWord,{at:t,reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(v.YieldBindingIdentifier,{at:t})}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(v.AwaitBindingIdentifier,{at:t});if(this.scope.inStaticBlock)return void this.raise(v.AwaitBindingIdentifierInStaticBlock,{at:t});this.expressionScope.recordAsyncArrowParametersError({at:t})}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(v.ArgumentsInClass,{at:t})}isAwaitAllowed(){return!!(this.prodParam.hasAwait||this.options.allowAwaitOutsideFunction&&!this.scope.inFunction)}parseAwait(e){let t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(v.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(v.ObsoleteAwaitStar,{at:t}),!this.scope.inFunction&&!this.options.allowAwaitOutsideFunction&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:e}=this.state;return 53===e||10===e||0===e||Q(e)||101===e&&!this.state.containsEsc||135===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(){let e=this.startNode();this.expressionScope.recordParameterInitializerError(v.YieldInParameter,{at:e}),this.next();let t=!1,r=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:r=this.parseMaybeAssign()}return e.delegate=t,e.argument=r,this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(v.PipelineHeadSequenceExpression,{at:t})}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){let r=this.startNodeAt(t);return r.callee=e,this.finishNode(r,"PipelineBareFunction")}{let r=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),r.expression=e,this.finishNode(r,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(v.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(v.PipelineTopicUnused,{at:e})}withTopicBindingContext(e){let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{let t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){let t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){let t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){let t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}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(e){let t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let n=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=r,n}parseModuleExpression(){this.expectPlugin("moduleBlocks");let e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let t=this.startNodeAt(this.state.endLoc);this.next();let r=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{r()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}},Ht={kind:"loop"},Xt={kind:"switch"},Gt=/[\uD800-\uDFFF]/u,Yt=/in(?:stanceof)?/y;var Qt=class extends Jt{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e,t){for(let r=0;r<e.length;r++){let n=e[r],{type:s}=n;if("number"==typeof s){if(136===s){let{loc:t,start:s,value:a,end:o}=n,u=s+1,l=i(t.start,1);e.splice(r,1,new st({type:Z(27),value:"#",start:s,end:u,startLoc:t.start,endLoc:l}),new st({type:Z(130),value:a,start:u,end:o,startLoc:l,endLoc:t.end})),r++;continue}if(Q(s)){let a,o,u,l,c,{loc:p,start:d,value:h,end:f}=n,m=d+1,y=i(p.start,1);a=96===t.charCodeAt(d)?new st({type:Z(22),value:"`",start:d,end:m,startLoc:p.start,endLoc:y}):new st({type:Z(8),value:"}",start:d,end:m,startLoc:p.start,endLoc:y}),24===s?(u=f-1,l=i(p.end,-1),o=null===h?null:h.slice(1,-1),c=new st({type:Z(22),value:"`",start:u,end:f,startLoc:l,endLoc:p.end})):(u=f-2,l=i(p.end,-2),o=null===h?null:h.slice(1,-2),c=new st({type:Z(23),value:"${",start:u,end:f,startLoc:l,endLoc:p.end})),e.splice(r,1,a,new st({type:Z(20),value:o,start:m,end:u,startLoc:y,endLoc:l}),c),r+=2;continue}n.type=Z(s)}}return e}(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,t=137,r=this.options.sourceType){if(e.sourceType=r,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(let[e,t]of Array.from(this.scope.undefinedExports))this.raise(v.ModuleExportUndefined,{at:t,localName:e});let n;return n=137===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",i(this.state.startLoc,-1)),n}stmtToDirective(e){let t=e;t.type="Directive",t.value=t.expression,delete t.expression;let r=t.value,n=r.value,i=this.input.slice(r.start,r.end),s=r.value=i.slice(1,-1);return this.addExtra(r,"raw",i),this.addExtra(r,"rawValue",s),this.addExtra(r,"expressionValue",n),r.type="DirectiveLiteral",t}parseInterpreterDirective(){if(!this.match(28))return null;let e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(99)&&this.hasFollowingBindingAtom()}chStartsBindingIdentifier(e,t){if(oe(e)){if(Yt.lastIndex=t,Yt.test(this.input)){let e=this.codePointAtPos(Yt.lastIndex);if(!ue(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){let e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifier(){let e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}startsUsingForOf(){let{type:e,containsEsc:t}=this.lookahead();return!(101===e&&!t)&&(K(e)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):void 0)}startsAwaitUsing(){let e=this.nextTokenInLineStart();if(this.isUnparsedContextual(e,"using")){e=this.nextTokenInLineStartSince(e+5);let t=this.codePointAtPos(e);if(this.chStartsBindingIdentifier(t,e))return this.expectPlugin("explicitResourceManagement"),!0}return!1}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){let r=this.state.type,n=this.startNode(),i=!!(2&e),s=!!(4&e),a=1&e;switch(r){case 60:return this.parseBreakContinueStatement(n,!0);case 63:return this.parseBreakContinueStatement(n,!1);case 64:return this.parseDebuggerStatement(n);case 90:return this.parseDoWhileStatement(n);case 91:return this.parseForStatement(n);case 68:if(46===this.lookaheadCharCode())break;return s||this.raise(this.state.strict?v.StrictFunction:this.options.annexB?v.SloppyFunctionAnnexB:v.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(n,!1,!i&&s);case 80:return i||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,n),!0);case 69:return this.parseIfStatement(n);case 70:return this.parseReturnStatement(n);case 71:return this.parseSwitchStatement(n);case 72:return this.parseThrowStatement(n);case 73:return this.parseTryStatement(n);case 96:if(!this.state.containsEsc&&this.startsAwaitUsing())return this.isAwaitAllowed()?i||this.raise(v.UnexpectedLexicalDeclaration,{at:n}):this.raise(v.AwaitUsingNotInAsyncContext,{at:n}),this.next(),this.parseVarStatement(n,"await using");break;case 105:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(v.UnexpectedUsingDeclaration,{at:this.state.startLoc}):i||this.raise(v.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(n,"using");case 99:{if(this.state.containsEsc)break;let e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t&&(!i&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(t,e)&&123!==t))break}case 75:i||this.raise(v.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{let e=this.state.value;return this.parseVarStatement(n,e)}case 92:return this.parseWhileStatement(n);case 76:return this.parseWithStatement(n);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(n);case 83:{let e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return!this.options.allowImportExportEverywhere&&!a&&this.raise(v.UnexpectedImportExport,{at:this.state.startLoc}),this.next(),83===r?(e=this.parseImport(n),"ImportDeclaration"===e.type&&(!e.importKind||"value"===e.importKind)&&(this.sawUnambiguousESM=!0)):(e=this.parseExport(n,t),("ExportNamedDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportAllDeclaration"===e.type&&(!e.exportKind||"value"===e.exportKind)||"ExportDefaultDeclaration"===e.type)&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return i||this.raise(v.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(n,!0,!i&&s)}let o=this.state.value,u=this.parseExpression();return K(r)&&"Identifier"===u.type&&this.eat(14)?this.parseLabeledStatement(n,o,u,e):this.parseExpressionStatement(n,u,t)}assertModuleNodeAllowed(e){!this.options.allowImportExportEverywhere&&!this.inModule&&this.raise(v.ImportOutsideModule,{at:e})}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,r){return e&&(t.decorators&&t.decorators.length>0?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorsBeforeAfterExport,{at:t.decorators[0]}),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),r&&this.resetStartLocationFromNode(r,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){let t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(v.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(v.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let e=this.startNode();if(this.next(),this.hasPlugin("decorators")){let t,r=this.state.startLoc;if(this.match(10)){let r=this.state.startLoc;this.next(),t=this.parseExpression(),this.expect(11),t=this.wrapParenthesis(r,t);let n=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(t),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==t&&this.raise(v.DecoratorArgumentsOutsideParentheses,{at:n})}else{for(t=this.parseIdentifier(!1);this.eat(16);){let e=this.startNodeAt(r);e.object=t,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,t=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(t)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){let t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let r;for(r=0;r<this.state.labels.length;++r){let n=this.state.labels[r];if((null==e.label||n.name===e.label.name)&&(null!=n.kind&&(t||"loop"===n.kind)||e.label&&t))break}if(r===this.state.labels.length){let r=t?"BreakStatement":"ContinueStatement";this.raise(v.IllegalBreakContinue,{at:e,type:r})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push(Ht),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push(Ht);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(t=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);let r=this.isContextual(99);{let n=this.isContextual(96)&&this.startsAwaitUsing(),i=n||this.isContextual(105)&&this.startsUsingForOf(),s=r&&this.hasFollowingBindingAtom()||i;if(this.match(74)||this.match(75)||s){let r,s=this.startNode();n?(r="await using",this.isAwaitAllowed()||this.raise(v.AwaitUsingNotInAsyncContext,{at:this.state.startLoc}),this.next()):r=this.state.value,this.next(),this.parseVar(s,!0,r);let a=this.finishNode(s,"VariableDeclaration"),o=this.match(58);return o&&i&&this.raise(v.ForInUsing,{at:a}),(o||this.isContextual(101))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}}let n=this.isContextual(95),i=new dt,s=this.parseExpression(!0,i),a=this.isContextual(101);if(a&&(r&&this.raise(v.ForOfLet,{at:s}),null===t&&n&&"Identifier"===s.type&&this.raise(v.ForOfAsync,{at:s})),a||this.match(58)){this.checkDestructuringPrivate(i),this.toAssignable(s,!0);let r=a?"ForOfStatement":"ForInStatement";return this.checkLVal(s,{in:{type:r}}),this.parseForIn(e,s,t)}return this.checkExpressionErrors(i,!0),null!==t&&this.unexpected(t),this.parseFor(e,s)}parseFunctionStatement(e,t,r){return this.next(),this.parseFunction(e,1|(r?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return!this.prodParam.hasReturn&&!this.options.allowReturnOutsideFunction&&this.raise(v.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();let t,r=e.cases=[];this.expect(5),this.state.labels.push(Xt),this.scope.enter(0);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){let n=this.match(61);t&&this.finishNode(t,"SwitchCase"),r.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(e&&this.raise(v.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),e=!0,t.test=null),this.expect(14)}else t?t.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(v.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){let e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{in:{type:"CatchClause"},binding:9}),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){let t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(v.NoCatchOrFinally,{at:e}),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,r=!1){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push(Ht),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(v.StrictWith,{at:this.state.startLoc}),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,r,n){for(let e of this.state.labels)e.name===t&&this.raise(v.LabelRedeclaration,{at:r,labelName:t});let i=(s=this.state.type)>=90&&s<=92?"loop":this.match(71)?"switch":null;var s;for(let t=this.state.labels.length-1;t>=0;t--){let r=this.state.labels[t];if(r.statementStart!==e.start)break;r.statementStart=this.state.start,r.kind=i}return this.state.labels.push({name:t,kind:i,statementStart:this.state.start}),e.body=8&n?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,r){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,r){let n=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(n,e,!1,8,r),t&&this.scope.exit(),this.finishNode(n,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,r,n,i){let s=e.body=[],a=e.directives=[];this.parseBlockOrModuleBlockBody(s,t?a:void 0,r,n,i)}parseBlockOrModuleBlockBody(e,t,r,n,i){let s=this.state.strict,a=!1,o=!1;for(;!this.match(n);){let n=r?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(n)){let e=this.stmtToDirective(n);t.push(e),!a&&"use strict"===e.value.value&&(a=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(n)}null==i||i.call(this,a),s||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,r){let n=this.match(58);return this.next(),n?null!==r&&this.unexpected(r):e.await=null!==r,"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!n||!this.options.annexB||this.state.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(v.ForInOfLoopInitializer,{at:t,type:n?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(v.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,n?"ForInStatement":"ForOfStatement")}parseVar(e,t,r,n=!1){let i=e.declarations=[];for(e.kind=r;;){let e=this.startNode();if(this.parseVarId(e,r),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null===e.init&&!n&&("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(101))?"const"===r&&!(this.match(58)||this.isContextual(101))&&this.raise(v.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"}):this.raise(v.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})),i.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){let r=this.parseBindingAtom();this.checkLVal(r,{in:{type:"VariableDeclarator"},binding:"var"===t?5:we}),e.id=r}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){let r=2&t,n=!!(1&t),i=n&&!(4&t),s=!!(8&t);this.initFunction(e,s),this.match(55)&&(r&&this.raise(v.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),e.generator=!0),n&&(e.id=this.parseFunctionId(i));let a=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(ct(s,e.generator)),n||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,n?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),n&&!r&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=a,e}parseFunctionId(e){return e||K(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new ot(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:we:17,e.id.loc.start)}parseClass(e,t,r){this.next();let n=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,r),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,n),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();let r={hadConstructor:!1,hadSuperClass:e},n=[],i=this.startNode();if(i.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext((()=>{for(;!this.match(8);){if(this.eat(13)){if(n.length>0)throw this.raise(v.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){n.push(this.parseDecorator());continue}let e=this.startNode();n.length&&(e.decorators=n,this.resetStartLocationFromNode(e,n[0]),n=[]),this.parseClassMember(i,e,r),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(v.DecoratorConstructor,{at:e})}})),this.state.strict=t,this.next(),n.length)throw this.raise(v.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(i,"ClassBody")}parseClassMemberFromModifier(e,t){let r=this.parseIdentifier(!0);if(this.isClassMethod()){let n=t;return n.kind="method",n.computed=!1,n.key=r,n.static=!1,this.pushClassMethod(e,n,!1,!1,!1,!1),!0}if(this.isClassProperty()){let n=t;return n.computed=!1,n.key=r,n.static=!1,e.body.push(this.parseClassProperty(n)),!0}return this.resetPreviousNodeTrailingComments(r),!1}parseClassMember(e,t,r){let n=this.isContextual(104);if(n){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,r,n)}parseClassMemberWithIsStatic(e,t,r,n){let i=t,s=t,a=t,o=t,u=t,l=i,c=i;if(t.static=n,this.parsePropertyNamePrefixOperator(t),this.eat(55)){l.kind="method";let t=this.match(136);return this.parseClassElementName(l),t?void this.pushClassPrivateMethod(e,s,!0,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsGenerator,{at:i.key}),void this.pushClassMethod(e,i,!0,!1,!1,!1))}let p=K(this.state.type)&&!this.state.containsEsc,d=this.match(136),h=this.parseClassElementName(t),f=this.state.startLoc;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(l.kind="method",d)return void this.pushClassPrivateMethod(e,s,!1,!1);let n=this.isNonstaticConstructor(i),a=!1;n&&(i.kind="constructor",r.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(v.DuplicateConstructor,{at:h}),n&&this.hasPlugin("typescript")&&t.override&&this.raise(v.OverrideOnConstructor,{at:h}),r.hadConstructor=!0,a=r.hadSuperClass),this.pushClassMethod(e,i,!1,!1,n,a)}else if(this.isClassProperty())d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a);else if(p&&"async"===h.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(h);let t=this.eat(55);c.optional&&this.unexpected(f),l.kind="method";let r=this.match(136);this.parseClassElementName(l),this.parsePostMemberNameModifiers(c),r?this.pushClassPrivateMethod(e,s,t,!0):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAsync,{at:i.key}),this.pushClassMethod(e,i,t,!0,!1,!1))}else if(!p||"get"!==h.name&&"set"!==h.name||this.match(55)&&this.isLineTerminator())if(p&&"accessor"===h.name&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(h);let t=this.match(136);this.parseClassElementName(a),this.pushClassAccessorProperty(e,u,t)}else this.isLineTerminator()?d?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,a):this.unexpected();else{this.resetPreviousNodeTrailingComments(h),l.kind=h.name;let t=this.match(136);this.parseClassElementName(i),t?this.pushClassPrivateMethod(e,s,!1,!1):(this.isNonstaticConstructor(i)&&this.raise(v.ConstructorIsAccessor,{at:i.key}),this.pushClassMethod(e,i,!1,!1,!1,!1)),this.checkGetterSetterParams(i)}}parseClassElementName(e){let{type:t,value:r}=this.state;if((130===t||131===t)&&e.static&&"prototype"===r&&this.raise(v.StaticPrototype,{at:this.state.startLoc}),136===t){"constructor"===r&&this.raise(v.ConstructorClassPrivateField,{at:this.state.startLoc});let t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e)}parseClassStaticBlock(e,t){var r;this.scope.enter(208);let n=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let i=t.body=[];this.parseBlockOrModuleBlockBody(i,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=n,e.body.push(this.finishNode(t,"StaticBlock")),null!=(r=t.decorators)&&r.length&&this.raise(v.DecoratorStaticBlock,{at:t})}pushClassProperty(e,t){!t.computed&&("constructor"===t.key.name||"constructor"===t.key.value)&&this.raise(v.ConstructorClassField,{at:t.key}),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){let r=this.parseClassPrivateProperty(t);e.body.push(r),this.classScope.declarePrivateName(this.getPrivateNameSV(r.key),0,r.key.loc.start)}pushClassAccessorProperty(e,t,r){if(!r&&!t.computed){let e=t.key;("constructor"===e.name||"constructor"===e.value)&&this.raise(v.ConstructorClassField,{at:e})}let n=this.parseClassAccessorProperty(t);e.body.push(n),r&&this.classScope.declarePrivateName(this.getPrivateNameSV(n.key),0,n.key.loc.start)}pushClassMethod(e,t,r,n,i,s){e.body.push(this.parseMethod(t,r,n,i,s,"ClassMethod",!0))}pushClassPrivateMethod(e,t,r,n){let i=this.parseMethod(t,r,n,!1,!1,"ClassPrivateMethod",!0);e.body.push(i);let s="get"===i.kind?i.static?6:2:"set"===i.kind?i.static?5:1:0;this.declareClassPrivateMethodInScope(i,s)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(lt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,r,n=8331){if(K(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,n);else{if(!r&&t)throw this.raise(v.MissingClassName,{at:this.state.startLoc});e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){let r=this.parseMaybeImportPhase(e,!0),n=this.maybeParseExportDefaultSpecifier(e,r),i=!n||this.eat(12),s=i&&this.eatExportStar(e),a=s&&this.maybeParseExportNamespaceSpecifier(e),o=i&&(!a||this.eat(12)),u=n||s;if(s&&!a){if(n&&this.unexpected(),t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}let l,c=this.maybeParseExportNamedSpecifiers(e);if(n&&i&&!s&&!c&&this.unexpected(null,5),a&&o&&this.unexpected(null,97),u||c){if(l=!1,t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});this.parseExportFrom(e,u)}else l=this.maybeParseExportDeclaration(e);if(u||c||l){var p;let r=e;if(this.checkExport(r,!0,!1,!!r.source),"ClassDeclaration"===(null==(p=r.declaration)?void 0:p.type))this.maybeTakeDecorators(t,r.declaration,r);else if(t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});return this.finishNode(r,"ExportNamedDeclaration")}if(this.eat(65)){let r=e,n=this.parseExportDefaultExpression();if(r.declaration=n,"ClassDeclaration"===n.type)this.maybeTakeDecorators(t,n,r);else if(t)throw this.raise(v.UnsupportedDecoratorExport,{at:e});return this.checkExport(r,!0,!0),this.finishNode(r,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e,t){if(t||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",null==t?void 0:t.loc.start);let r=t||this.parseIdentifier(!0),n=this.startNodeAtNode(r);return n.exported=r,e.specifiers=[this.finishNode(n,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers||(e.specifiers=[]);let t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){e.specifiers||(e.specifiers=[]);let t="type"===e.exportKind;return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;let e=this.nextTokenInLineStart();return this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){let e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,{at:this.state.startLoc}),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(v.UnsupportedDefaultExport,{at:this.state.startLoc});let t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:e}=this.state;if(K(e)){if(95===e&&!this.state.containsEsc||99===e)return!1;if((128===e||127===e)&&!this.state.containsEsc){let{type:e}=this.lookahead();if(K(e)&&97!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let t=this.nextTokenStart(),r=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||K(this.state.type)&&r)return!0;if(this.match(65)&&r){let e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){this.eatContextual(97)?(e.source=this.parseImportSource(),this.checkExport(e),this.maybeParseImportAttributes(e),this.checkJSONModuleImport(e)):t&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:e}=this.state;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(v.DecoratorBeforeExport,{at:this.state.startLoc}),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,r,n){if(t)if(r){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var i;let t=e.declaration;"Identifier"===t.type&&"from"===t.name&&t.end-t.start==4&&(null==(i=t.extra)||!i.parenthesized)&&this.raise(v.ExportDefaultFromAsIdentifier,{at:t})}}else if(e.specifiers&&e.specifiers.length)for(let t of e.specifiers){let{exported:e}=t,r="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,r),!n&&t.local){let{local:e}=t;"Identifier"!==e.type?this.raise(v.ExportBindingIsString,{at:t,localName:e.value,exportName:r}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){let t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if("VariableDeclaration"===e.declaration.type)for(let t of e.declaration.declarations)this.checkDeclaration(t.id)}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(let t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(let t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(v.DuplicateDefaultExport,{at:e}):this.raise(v.DuplicateExport,{at:e,exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){let t=[],r=!0;for(this.expect(5);!this.eat(8);){if(r)r=!1;else if(this.expect(12),this.eat(8))break;let n=this.isContextual(128),i=this.match(131),s=this.startNode();s.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(s,i,e,n))}return t}parseExportSpecifier(e,t,r,n){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=yt(e.local):e.exported||(e.exported=mt(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){let e=this.parseStringLiteral(this.state.value),t=e.value.match(Gt);return t&&this.raise(v.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){var t;e.module&&((1!==e.specifiers.length||"ImportDefaultSpecifier"!==e.specifiers[0].type)&&this.raise(v.ImportReflectionNotBinding,{at:e.specifiers[0].loc.start}),(null==(t=e.assertions)?void 0:t.length)>0&&this.raise(v.ImportReflectionHasAssertion,{at:e.specifiers[0].loc.start}))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){let{specifiers:t}=e;if(null!=t){let e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(v.ImportJSONBindingNotDefault,{at:e.loc.start})}}}isPotentialImportPhase(e){return!e&&this.isContextual(125)}applyImportPhase(e,t,r,n){t||("module"===r?(this.expectPlugin("importReflection",n),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1))}parseMaybeImportPhase(e,t){if(!this.isPotentialImportPhase(t))return this.applyImportPhase(e,t,null),null;let r=this.parseIdentifier(!0),{type:n}=this.state;return(q(n)?97!==n||102===this.lookaheadCharCode():12!==n)?(this.resetPreviousIdentifierLeadingComments(r),this.applyImportPhase(e,t,r.name,r.loc.start),null):(this.applyImportPhase(e,t,null),r)}isPrecedingIdImportPhase(e){let{type:t}=this.state;return K(t)?97!==t||102===this.lookaheadCharCode():12!==t}parseImport(e){return this.match(131)?this.parseImportSourceAndAttributes(e):this.parseImportSpecifiersAndAfter(e,this.parseMaybeImportPhase(e,!1))}parseImportSpecifiersAndAfter(e,t){e.specifiers=[];let r=!this.maybeParseDefaultImportSpecifier(e,t)||this.eat(12),n=r&&this.maybeParseStarImportSpecifier(e);return r&&!n&&this.parseNamedImportSpecifiers(e),this.expectContextual(97),this.parseImportSourceAndAttributes(e)}parseImportSourceAndAttributes(e){return null!=e.specifiers||(e.specifiers=[]),e.source=this.parseImportSource(),this.maybeParseImportAttributes(e),this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(e,t,r){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,r))}finishImportSpecifier(e,t,r=we){return this.checkLVal(e.local,{in:{type:t},binding:r}),this.finishNode(e,t)}parseImportAttributes(){this.expect(5);let e=[],t=new Set;do{if(this.match(8))break;let r=this.startNode(),n=this.state.value;if(t.has(n)&&this.raise(v.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:n}),t.add(n),this.match(131)?r.key=this.parseStringLiteral(n):r.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(v.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return this.expect(8),e}parseModuleAttributes(){let e=[],t=new Set;do{let r=this.startNode();if(r.key=this.parseIdentifier(!0),"type"!==r.key.name&&this.raise(v.ModuleAttributeDifferentFromType,{at:r.key}),t.has(r.key.name)&&this.raise(v.ModuleAttributesWithDuplicateKeys,{at:r.key,key:r.key.name}),t.add(r.key.name),this.expect(14),!this.match(131))throw this.raise(v.ModuleAttributeInvalidValue,{at:this.state.startLoc});r.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(r,"ImportAttribute"))}while(this.eat(12));return e}maybeParseImportAttributes(e){let t,r=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&40===this.lookaheadCharCode())return;this.next(),this.hasPlugin("moduleAttributes")?t=this.parseModuleAttributes():(this.expectImportAttributesPlugin(),t=this.parseImportAttributes()),r=!0}else if(this.isContextual(94)&&!this.hasPrecedingLineBreak())this.hasPlugin("importAttributes")?(!0!==this.getPluginOption("importAttributes","deprecatedAssertSyntax")&&this.raise(v.ImportAttributesUseAssert,{at:this.state.startLoc}),this.addExtra(e,"deprecatedAssertSyntax",!0)):this.expectOnePlugin(["importAttributes","importAssertions"]),this.next(),t=this.parseImportAttributes();else if(this.hasPlugin("importAttributes")||this.hasPlugin("importAssertions"))t=[];else{if(!this.hasPlugin("moduleAttributes"))return;t=[]}!r&&this.hasPlugin("importAssertions")?e.assertions=t:e.attributes=t}maybeParseDefaultImportSpecifier(e,t){if(t){let r=this.startNodeAtNode(t);return r.local=t,e.specifiers.push(this.finishImportSpecifier(r,"ImportDefaultSpecifier")),!0}return!!q(this.state.type)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){let t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(v.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}let r=this.startNode(),n=this.match(131),i=this.isContextual(128);r.imported=this.parseModuleExportName();let s=this.parseImportSpecifier(r,n,"type"===e.importKind||"typeof"===e.importKind,i,void 0);e.specifiers.push(s)}}parseImportSpecifier(e,t,r,n,i){if(this.eatContextual(93))e.local=this.parseIdentifier();else{let{imported:r}=e;if(t)throw this.raise(v.ImportBindingIsString,{at:e,importName:r.value});this.checkReservedWord(r.name,e.loc.start,!0,!0),e.local||(e.local=mt(r))}return this.finishImportSpecifier(e,"ImportSpecifier",i)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}},Zt=class extends Qt{constructor(e,t){e=function(e){if(e&&null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");let t={};for(let r of Object.keys(Wt))t[r]=e&&null!=e[r]?e[r]:Wt[r];return t}(e),super(e,t),this.options=e,this.initializeScopes(),this.plugins=function(e){let t=new Map;for(let r of e){let[e,n]=Array.isArray(r)?r:[r,{}];t.has(e)||t.set(e,n||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return Ie}parse(){this.enterInitialScopes();let e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}};var er=function(e){let t={};for(let r of Object.keys(e))t[r]=Z(e[r]);return t}(z);function tr(e,t){let r=Zt;return null!=e&&e.plugins&&(function(e){if(Rt(e,"decorators")){if(Rt(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let t=$t(e,"decorators","decoratorsBeforeExport");if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let r=$t(e,"decorators","allowCallParenthesized");if(null!=r&&"boolean"!=typeof r)throw new Error("'allowCallParenthesized' must be a boolean.")}if(Rt(e,"flow")&&Rt(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Rt(e,"placeholders")&&Rt(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Rt(e,"pipelineOperator")){let t=$t(e,"pipelineOperator","proposal");if(!Ut.includes(t)){let e=Ut.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}let r=Rt(e,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===t){if(Rt(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Rt(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let t=$t(e,"pipelineOperator","topicToken");if(!Vt.includes(t)){let e=Vt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if("#"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===t&&r)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Rt(e,"moduleAttributes")){if(Rt(e,"importAssertions")||Rt(e,"importAttributes"))throw new Error("Cannot combine importAssertions, importAttributes and moduleAttributes plugins.");if("may-2020"!==$t(e,"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(Rt(e,"importAssertions")&&Rt(e,"importAttributes"))throw new Error("Cannot combine importAssertions and importAttributes plugins.");if(Rt(e,"recordAndTuple")&&null!=$t(e,"recordAndTuple","syntaxType")&&!zt.includes($t(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+zt.map((e=>`'${e}'`)).join(", "));if(Rt(e,"asyncDoExpressions")&&!Rt(e,"doExpressions")){let e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}}(e.plugins),r=function(e){let t=qt.filter((t=>Rt(e,t))),r=t.join("/"),n=rr[r];if(!n){n=Zt;for(let e of t)n=Kt[e](n);rr[r]=n}return n}(e.plugins)),new r(e,t)}var rr={};e.parse=function(e,t){var r;if("unambiguous"!==(null==(r=t)?void 0:r.sourceType))return tr(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";let r=tr(t,e),n=r.parse();if(r.sawUnambiguousESM)return n;if(r.ambiguousScriptDifferentAst)try{return t.sourceType="script",tr(t,e).parse()}catch{}else n.program.sourceType="script";return n}catch(r){try{return t.sourceType="script",tr(t,e).parse()}catch{}throw r}},e.parseExpression=function(e,t){let r=tr(t,e);return r.options.strictMode&&(r.state.strict=!0),r.getExpression()},e.tokTypes=er})),Hie=qie((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),Xie={};((e,t)=>{for(var r in t)$ie(e,r,{get:t[r],enumerable:!0})})(Xie,{parsers:()=>Hse});var Gie=Wie(Jie(),1);var Yie=function(e){let t=[];for(let r of e)try{return r()}catch(e){t.push(e)}throw Object.assign(new Error("All combinations failed"),{errors:t})};var Qie=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};var Zie=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var ese=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};function tse(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var rse=tse(" \t"),nse=tse(/[^\n\r]/);var ise=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?nse(e,t):t)};var sse=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=rse(e,n),n=Zie(e,n),n=ise(e,n),n=ese(e,n);return n},ase=Wie(Hie(),1);function ose(e){let{pragmas:t}=function(e){let t=Qie(e);t&&(e=e.slice(t.length+1));let r=(0,ase.extract)(e),{pragmas:n,comments:i}=(0,ase.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e);return Object.prototype.hasOwnProperty.call(t,"prettier")||Object.prototype.hasOwnProperty.call(t,"format")}var use=function(e){return Array.isArray(e)&&e.length>0};function lse(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return use(n)?Math.min(lse(n[0]),r):r}function cse(e){return e.range?e.range[1]:e.end}var pse=function(e){return e="function"==typeof e?{parse:e}:e,{astFormat:"estree",hasPragma:ose,locStart:lse,locEnd:cse,...e}};var dse=function(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)};var hse=function(e){let{message:t,loc:r}=e;return dse(t.replace(/ \(.*\)$/,""),{loc:{start:{line:r?r.line:0,column:r?r.column+1:0}},cause:e})},fse=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)};var mse=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)}(["Block","CommentBlock","MultiLine"]);var yse=function(e){return mse(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};var gse=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))},bse=null;function vse(e){if(null!==bse&&(bse.property,1)){let e=bse;return bse=vse.prototype=null,e}return bse=vse.prototype=e??Object.create(null),new vse}for(let e=0;e<=10;e++)vse();var xse=function(e,t="type"){return function(e){vse(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}}({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var Ese=function e(t,r){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t)){for(let n=0;n<t.length;n++)t[n]=e(t[n],r);return t}let n=xse(t);for(let i=0;i<n.length;i++)t[n[i]]=e(t[n[i]],r);return r(t)||t};function Sse(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function Dse(e){return Sse(e)?Dse({type:"LogicalExpression",operator:e.operator,left:Dse({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[lse(e.left),cse(e.right.left)]}),right:e.right.right,range:[lse(e),cse(e)]}):e}var Tse=function(e,t){let{parser:r,text:n}=t;if("File"===e.type&&e.program.interpreter){let{program:{interpreter:t},comments:r}=e;delete e.program.interpreter,r.unshift(t)}if("babel"===r){let t=new Set;e=Ese(e,(e=>{var r;null!=(r=e.leadingComments)&&r.some(yse)&&t.add(lse(e))})),e=Ese(e,(e=>{if("ParenthesizedExpression"===e.type){let{expression:r}=e;if("TypeCastExpression"===r.type)return r.range=e.range,r;let n=lse(e);if(!t.has(n))return r.extra={...r.extra,parenthesized:!0},r}}))}if(e=Ese(e,(t=>{switch(t.type){case"LogicalExpression":if(Sse(t))return Dse(t);break;case"VariableDeclaration":{let e=fse(!1,t.declarations,-1);null!=e&&e.init&&function(e,t){";"!==n[cse(t)]&&(e.range=[lse(e),cse(t)])}(t,e);break}case"TSParenthesizedType":return t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){let e=lse(t);t.name={type:"Identifier",name:t.name,range:[e,e+t.name.length]}}break;case"TopicReference":e.extra={...e.extra,__isUsingHackPipeline:!0};break;case"ExportAllDeclaration":{let{exported:e}=t;if("meriyah"===r&&"Identifier"===(null==e?void 0:e.type)){let r=n.slice(lse(e),cse(e));(r.startsWith('"')||r.startsWith("'"))&&(t.exported={...t.exported,type:"Literal",value:t.exported.name,raw:r})}break}case"TSUnionType":case"TSIntersectionType":if(1===t.types.length)return t.types[0]}})),use(e.comments)){let t=fse(!1,e.comments,-1);for(let r=e.comments.length-2;r>=0;r--){let n=e.comments[r];cse(n)===lse(t)&&mse(n)&&mse(t)&&gse(n)&&gse(t)&&(e.comments.splice(r+1,1),n.value+="*//*"+t.value,n.range=[lse(n),cse(t)]),t=n}}return"Program"===e.type&&(e.range=[0,n.length]),e};var Ase=function(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}};var Cse=function(e,t){let{type:r="JsExpressionRoot",rootMarker:n,text:i}=t,{tokens:s,comments:a}=e;return delete e.tokens,delete e.comments,{tokens:s,comments:a,type:r,node:e,range:[0,i.length],rootMarker:n}},Pse=e=>pse(function({isExpression:e=!1,optionsCombinations:t}){return(r,n={})=>{if(("babel"===n.parser||"__babel_estree"===n.parser)&&function(e,t){var r;if(null!=(r=t.filepath)&&r.endsWith(".js.flow"))return!0;let n=Qie(e);n&&(e=e.slice(n.length));let i=sse(e,0);return!1!==i&&(e=e.slice(0,i)),Nse.test(e)}(r,n))return n.parser="babel-flow",$se.parse(r,n);let i=t;"script"===(n.__babelSourceType??Ase(n))&&(i=i.map((e=>({...e,sourceType:"script"})))),/#[[{]/.test(r)&&(i=i.map((e=>_se([kse],e))));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...Ise,Fse]:Ise).flatMap((e=>i.map((t=>_se([e],t))))):s&&(i=i.map((e=>_se([Fse],e))));let a,o=e?Gie.parseExpression:Gie.parse;try{a=Yie(i.map((e=>()=>function(e,t,r){let n=e(t,r),i=n.errors.find((e=>!Ose.has(e.reasonCode)));if(i)throw i;return n}(o,r,e))))}catch({errors:[e]}){throw hse(e)}return e&&(a=Cse(a,{text:r,rootMarker:n.rootMarker})),Tse(a,{parser:"babel",text:r})}}(e)),wse={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","decimal","moduleBlocks","asyncDoExpressions","regexpUnicodeSets","destructuringPrivate","decoratorAutoAccessors","importReflection","explicitResourceManagement",["importAttributes",{deprecatedAssertSyntax:!0}]],tokens:!0,ranges:!0},kse=["recordAndTuple",{syntaxType:"hash"}],Fse="v8intrinsic",Ise=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],_se=(e,t=wse)=>({...t,plugins:[...t.plugins,...e]}),Nse=/@(?:no)?flow\b/;var Ose=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","MixedLabeledAndUnlabeledElements","DuplicateAccessibilityModifier","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","DeclareFunctionHasImplementation","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport"]),Bse=[_se(["jsx"])],Lse=Pse({optionsCombinations:Bse}),Mse=Pse({optionsCombinations:[_se(["jsx","typescript"]),_se(["typescript"])]}),jse=Pse({isExpression:!0,optionsCombinations:[_se(["jsx"])]}),Rse=Pse({isExpression:!0,optionsCombinations:[_se(["typescript"])]}),$se=Pse({optionsCombinations:[_se(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),Use=Pse({optionsCombinations:Bse.map((e=>_se(["estree"],e)))}),Vse={babel:Lse,"babel-flow":$se,"babel-ts":Mse,__js_expression:jse,__ts_expression:Rse,__vue_expression:jse,__vue_ts_expression:Rse,__vue_event_binding:Lse,__vue_ts_event_binding:Mse,__babel_estree:Use},zse=Wie(Jie(),1);function Kse(e={}){let{allowComments:t=!0}=e;return function(e){let r;try{r=(0,zse.parseExpression)(e,{tokens:!0,ranges:!0})}catch(e){throw"MissingPlugin"===(null==e?void 0:e.reasonCode)||"MissingOneOfPlugins"===(null==e?void 0:e.reasonCode)?hse({message:"Unexpected token",loc:e.loc}):hse(e)}if(!t&&use(r.comments))throw qse(r.comments[0],"Comment");return Wse(r),Cse(r,{type:"JsonRoot",text:e})}}function qse(e,t){let[r,n]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return dse(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function Wse(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)null!==t&&Wse(t);return;case"ObjectExpression":for(let t of e.properties)Wse(t);return;case"ObjectProperty":if(e.computed)throw qse(e.key,"Computed key");if(e.shorthand)throw qse(e.key,"Shorthand property");return"Identifier"!==e.key.type&&Wse(e.key),void Wse(e.value);case"UnaryExpression":{let{operator:t,argument:r}=e;if("+"!==t&&"-"!==t)throw qse(e,`Operator '${e.operator}'`);if("NumericLiteral"===r.type||"Identifier"===r.type&&("Infinity"===r.name||"NaN"===r.name))return;throw qse(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw qse(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(use(e.expressions))throw qse(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)Wse(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw qse(e,`'${e.type}'`)}}var Jse=Kse(),Hse={...Vse,...{json:pse({parse:Jse,hasPragma:()=>!0}),json5:pse(Jse),"json-stringify":pse({parse:Kse({allowComments:!1}),astFormat:"estree-json"})}},Xse=Xie,Gse=Object.freeze({__proto__:null,default:Xse,parsers:Hse}),Yse=Object.create,Qse=Object.defineProperty,Zse=Object.getOwnPropertyDescriptor,eae=Object.getOwnPropertyNames,tae=Object.getPrototypeOf,rae=Object.prototype.hasOwnProperty,nae=(e,t)=>{for(var r in t)Qse(e,r,{get:t[r],enumerable:!0})},iae=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},sae=(e,t,r)=>(iae(e,t,"read from private field"),r?r.call(e):t.get(e)),aae=((e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extract=function(e){let t=e.match(n);return t?t[0].trimLeft():""},e.parse=function(e){return c(e).pragmas},e.parseWithComments=c,e.print=function({comments:e="",pragmas:t={}}){let r="\n",n=" *",i=Object.keys(t),s=i.map((e=>p(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${n} ${e}${r}`)).join("");if(!e){if(0===i.length)return"";if(1===i.length&&!Array.isArray(t[i[0]])){let e=t[i[0]];return`/** ${p(i[0],e)[0]} */`}}let a=e.split(r).map((e=>`${n} ${e}`)).join(r)+r;return"/**\n"+(e?a:"")+(e&&i.length?n+r:"")+s+" */"},e.strip=function(e){let t=e.match(n);return t&&t[0]?e.substring(t[0].length):e};var t=/\*\/$/,r=/^\/\*\*?/,n=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,i=/(^|\s+)\/\/([^\r\n]*)/g,s=/^(\r?\n)+/,a=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g,o=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g,u=/(\r?\n|^) *\* ?/g,l=[];function c(e){e=e.replace(r,"").replace(t,"").replace(u,"$1");let n="";for(;n!==e;)n=e,e=e.replace(a,"\n$1 $2\n");e=e.replace(s,"").trimRight();let c,p=Object.create(null),d=e.replace(o,"").replace(s,"").trimRight();for(;c=o.exec(e);){let e=c[2].replace(i,"");"string"==typeof p[c[1]]||Array.isArray(p[c[1]])?p[c[1]]=l.concat(p[c[1]],e):p[c[1]]=e}return{comments:d,pragmas:p}}function p(e,t){return l.concat(t).map((t=>`@${e} ${t}`.trim()))}})),oae={};nae(oae,{languages:()=>tfe,options:()=>Zhe,printers:()=>efe});var uae={};nae(uae,{canAttachComment:()=>pce,embed:()=>Ihe,experimentalFeatures:()=>Rhe,getCommentChildNodes:()=>dce,getVisitorKeys:()=>Boe,handleComments:()=>mle,insertPragma:()=>jhe,isBlockComment:()=>Moe,isGap:()=>fce,massageAstNode:()=>Bhe,print:()=>fhe,printComment:()=>lce,willPrintOwnComments:()=>hce});var lae=function(e,t){let{originalText:r,[Symbol.for("comments")]:n,locStart:i,locEnd:s,[Symbol.for("printedComments")]:a}=t,{node:o}=e,u=i(o),l=s(o);for(let e of n)i(e)>=u&&s(e)<=l&&a.add(e);return r.slice(u,l)},cae="string",pae="array",dae="cursor",hae="indent",fae="align",mae="trim",yae="group",gae="fill",bae="if-break",vae="indent-if-break",xae="line-suffix",Eae="line-suffix-boundary",Sae="line",Dae="label",Tae="break-parent",Aae=new Set([dae,hae,fae,mae,yae,gae,bae,vae,xae,Eae,Sae,Dae,Tae]);var Cae=function(e){if("string"==typeof e)return cae;if(Array.isArray(e))return pae;if(!e)return;let{type:t}=e;return Aae.has(t)?t:void 0};function Pae(e){let t=null===e?"null":typeof e;if("string"!==t&&"object"!==t)return`Unexpected doc '${t}', \nExpected it to be 'string' or 'object'.`;if(Cae(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if("[object Object]"!==r)return`Unexpected doc '${r}'.`;let n=(e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e))([...Aae].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var wae=class extends Error{name="InvalidDocError";constructor(e){super(Pae(e)),this.doc=e}},kae={};var Fae=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===kae){r(i.pop());continue}r&&i.push(e,kae);let s=Cae(e);if(!s)throw new wae(e);if(!1!==(null==t?void 0:t(e)))switch(s){case pae:case gae:{let t=s===pae?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case bae:i.push(e.flatContents,e.breakContents);break;case yae:if(n&&e.expandedStates)for(let t=e.expandedStates.length-1;t>=0;--t)i.push(e.expandedStates[t]);else i.push(e.contents);break;case fae:case hae:case vae:case Dae:case xae:i.push(e.contents);break;case cae:case dae:case mae:case Eae:case Sae:case Tae:break;default:throw new wae(e)}}},Iae=()=>{};function _ae(e){return{type:hae,contents:e}}function Nae(e,t){return{type:fae,contents:t,n:e}}function Oae(e,t={}){return Iae(t.expandedStates),{type:yae,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Bae(e){return Nae(Number.NEGATIVE_INFINITY,e)}function Lae(e,t){return Oae(e[0],{...t,expandedStates:e})}function Mae(e){return{type:gae,parts:e}}function jae(e,t="",r={}){return{type:bae,breakContents:e,flatContents:t,groupId:r.groupId}}function Rae(e,t){return{type:vae,contents:e,groupId:t.groupId,negate:t.negate}}function $ae(e){return{type:xae,contents:e}}var Uae={type:Eae},Vae={type:Tae},zae={type:Sae,hard:!0},Kae={type:Sae},qae={type:Sae,soft:!0},Wae=[zae,Vae],Jae=[{type:Sae,hard:!0,literal:!0},Vae],Hae={type:dae};function Xae(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function Gae(e,t){return e?{type:Dae,label:e,contents:t}:t}var Yae=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)},Qae=e=>{if(Array.isArray(e))return e;if(e.type!==gae)throw new Error(`Expect doc to be 'array' or '${gae}'.`);return e.parts};function Zae(e,t){if("string"==typeof e)return t(e);let r=new Map;return n(e);function n(e){if(r.has(e))return r.get(e);let i=function(e){switch(Cae(e)){case pae:return t(e.map(n));case gae:return t({...e,parts:e.parts.map(n)});case bae:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case yae:{let{expandedStates:r,contents:i}=e;return r?(r=r.map(n),i=r[0]):i=n(i),t({...e,contents:i,expandedStates:r})}case fae:case hae:case vae:case Dae:case xae:return t({...e,contents:n(e.contents)});case cae:case dae:case mae:case Eae:case Sae:case Tae:return t(e);default:throw new wae(e)}}(e);return r.set(e,i),i}}function eoe(e,t,r){let n=r,i=!1;return Fae(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function toe(e){if(e.type===yae&&e.break||e.type===Sae&&e.hard||e.type===Tae)return!0}function roe(e){return eoe(e,toe,!1)}function noe(e){if(e.length>0){let t=Yae(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function ioe(e){return e.type!==Sae||e.hard?e.type===bae?e.flatContents:e:e.soft?"":" "}function soe(e){return Zae(e,ioe)}function aoe(e){return Zae(e,(e=>function(e){switch(Cae(e)){case gae:if(e.parts.every((e=>""===e)))return"";break;case yae:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===yae&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case fae:case hae:case vae:case xae:if(!e.contents)return"";break;case bae:if(!e.flatContents&&!e.breakContents)return"";break;case pae:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof Yae(!1,t,-1)?t[t.length-1]+=e:t.push(e),t.push(...n)}return 0===t.length?"":1===t.length?t[0]:t}case cae:case dae:case mae:case Eae:case Sae:case Dae:case Tae:break;default:throw new wae(e)}return e}(e)))}function ooe(e,t=Jae){return Zae(e,(e=>"string"==typeof e?Xae(t,e.split("\n")):e))}function uoe(e){if(e.type===Sae)return!0}function loe(e,t){return e.type===Dae?{...e,contents:t(e.contents)}:t(e)}var coe=function(e){return Array.isArray(e)&&e.length>0},poe=/^[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC][\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08B6-\u08BD\u08D4-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFB-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]*$/,doe=e=>poe.test(e);var hoe=function(e){return null!==e&&"object"==typeof e};function*foe(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>hoe(e)&&n(e);for(let t of r(e)){let r=e[t];if(Array.isArray(r))for(let e of r)i(e)&&(yield e);else i(r)&&(yield r)}}function moe(e,{getVisitorKeys:t,predicate:r}){for(let n of function*(e,t){let r=[e];for(let e=0;e<r.length;e++){let n=r[e];for(let e of foe(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}function yoe(e){return(t,r,n)=>{let i=!(null==n||!n.backwards);if(!1===r)return!1;let{length:s}=t,a=r;for(;a>=0&&a<s;){let r=t.charAt(a);if(e instanceof RegExp){if(!e.test(r))return a}else if(!e.includes(r))return a;i?a--:a++}return(-1===a||a===s)&&a}}var goe=yoe(" \t"),boe=yoe(",; \t"),voe=yoe(/[^\n\r]/);var xoe=function(e,t,r){let n=!(null==r||!r.backwards);if(!1===t)return!1;let i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t};var Eoe=function(e,t,r={}){let n=goe(e,r.backwards?t-1:t,r);return n!==xoe(e,n,r)};var Soe=function(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t};var Doe=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?voe(e,t):t)};var Toe=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=boe(e,n),n=Soe(e,n),n=goe(e,n);return n=Doe(e,n),n=xoe(e,n),!1!==n&&Eoe(e,n)},Aoe={eastAsianWidth(e){var t=e.charCodeAt(0),r=2==e.length?e.charCodeAt(1):0,n=t;return 55296<=t&&t<=56319&&56320<=r&&r<=57343&&(n=(t&=1023)<<10|(r&=1023),n+=65536),12288==n||65281<=n&&n<=65376||65504<=n&&n<=65510?"F":4352<=n&&n<=4447||4515<=n&&n<=4519||4602<=n&&n<=4607||9001<=n&&n<=9002||11904<=n&&n<=11929||11931<=n&&n<=12019||12032<=n&&n<=12245||12272<=n&&n<=12283||12289<=n&&n<=12350||12353<=n&&n<=12438||12441<=n&&n<=12543||12549<=n&&n<=12589||12593<=n&&n<=12686||12688<=n&&n<=12730||12736<=n&&n<=12771||12784<=n&&n<=12830||12832<=n&&n<=12871||12880<=n&&n<=13054||13056<=n&&n<=19903||19968<=n&&n<=42124||42128<=n&&n<=42182||43360<=n&&n<=43388||44032<=n&&n<=55203||55216<=n&&n<=55238||55243<=n&&n<=55291||63744<=n&&n<=64255||65040<=n&&n<=65049||65072<=n&&n<=65106||65108<=n&&n<=65126||65128<=n&&n<=65131||110592<=n&&n<=110593||127488<=n&&n<=127490||127504<=n&&n<=127546||127552<=n&&n<=127560||127568<=n&&n<=127569||131072<=n&&n<=194367||177984<=n&&n<=196605||196608<=n&&n<=262141?"W":"N"}},Coe=/[^\x20-\x7F]/;var Poe=function(e){if(!e)return 0;if(!Coe.test(e))return e.length;e=e.replace(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g," ");let t=0;for(let r of e){let e=r.codePointAt(0);if(e<=31||e>=127&&e<=159||e>=768&&e<=879)continue;let n=Aoe.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t};function woe(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return coe(n)?Math.min(woe(n[0]),r):r}function koe(e){return e.range?e.range[1]:e.end}function Foe(e,t){let r=woe(e);return Number.isInteger(r)&&r===woe(t)}function Ioe(e,t){return Foe(e,t)&&function(e,t){let r=koe(e);return Number.isInteger(r)&&r===koe(t)}(e,t)}var _oe=null;function Noe(e){if(null!==_oe&&(_oe.property,1)){let e=_oe;return _oe=Noe.prototype=null,e}return _oe=Noe.prototype=e??Object.create(null),new Noe}for(let e=0;e<=10;e++)Noe();var Ooe=function(e,t="type"){return function(e){Noe(e)}(e),function(r){let n=r[t],i=e[n];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${n}'.`),{node:r});return i}},Boe=Ooe({ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["test","body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters","predicate"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["params","body","returnType","typeParameters","predicate"],ClassBody:["body"],ClassExpression:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ClassDeclaration:["id","body","superClass","mixins","typeParameters","superTypeParameters","implements","decorators","superTypeArguments"],ExportAllDeclaration:["source","attributes","assertions","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes","assertions"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes","assertions"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["local","imported"],MetaProperty:["meta","property"],ClassMethod:["key","params","body","decorators","returnType","typeParameters"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","quasi","typeParameters","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],Import:[],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["key","value","typeAnnotation","decorators","variance"],ClassAccessorProperty:["key","value","typeAnnotation","decorators"],ClassPrivateProperty:["key","value","decorators","typeAnnotation","variance"],ClassPrivateMethod:["key","params","body","decorators","returnType","typeParameters"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source"],DeclareExportAllDeclaration:["source"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","params","rest","returnType","this"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value","optional","static","method"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value","variance"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["id","qualification"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes","typeArguments","typeParameters"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],DecimalLiteral:[],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","typeAnnotation","nameType"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],ImportExpression:["source","attributes"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],TSTemplateLiteralType:["quasis","types"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareEnum:["id","body"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[]});var Loe=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)},Moe=Loe(["Block","CommentBlock","MultiLine"]);var joe=function(e,t){return t.some((t=>function(e,t){let r=t.split(".");for(let t=r.length-1;t>=0;t--){let n=r[t];if(0===t)return"Identifier"===e.type&&e.name===n;if("MemberExpression"!==e.type||e.optional||e.computed||"Identifier"!==e.property.type||e.property.name!==n)return!1;e=e.object}}(e,t)))},Roe=Loe(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]);var $oe=function({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")};function Uoe(e,t){return t(e)||moe(e,{getVisitorKeys:Boe,predicate:t})}function Voe(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||due(e)||hue(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||Gue(e)||"TSNonNullExpression"===e.type||"ChainExpression"===e.type}function zoe(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Koe(e){if(e.expressions)return["expressions",0];if(e.left)return["left"];if(e.test)return["test"];if(e.object)return["object"];if(e.callee)return["callee"];if(e.tag)return["tag"];if(e.argument)return["argument"];if(e.expression)return["expression"];throw new Error("Unexpected node has no left side.")}var qoe=Loe(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),Woe=Loe(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Joe=Loe(["ArrayExpression","TupleExpression"]),Hoe=Loe(["ObjectExpression","RecordExpression"]);function Xoe(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Goe(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&Xoe(e.argument)}function Yoe(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function Qoe(e){return"RegExpLiteral"===e.type||"Literal"===e.type&&!!e.regex}var Zoe=Loe(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),eue=Loe(["FunctionExpression","ArrowFunctionExpression"]);function tue(e){return due(e)&&"Identifier"===e.callee.type&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var rue=Loe(["JSXElement","JSXFragment"]);function nue(e){return"get"===e.kind||"set"===e.kind}function iue(e){return nue(e)||Foe(e,e.value)}function sue(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||iue(e))}var aue=Loe(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function oue(e){return hue(e)||"BindExpression"===e.type&&!!e.object}var uue=Loe(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function lue(e){return $oe(e)||Roe(e)||uue(e)||("GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)&&!e.typeParameters}var cue=["it","it.only","it.skip","describe","describe.only","describe.skip","test","test.only","test.skip","test.step","test.describe","test.describe.only","test.describe.parallel","test.describe.parallel.only","test.describe.serial","test.describe.serial.only","skip","xit","xdescribe","xtest","fit","fdescribe","ftest"];function pue(e,t){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(tue(e)&&t&&pue(t))return eue(e.arguments[0]);if(function(e){return"Identifier"===e.callee.type&&1===e.arguments.length&&/^(?:before|after)(?:Each|All)$/.test(e.callee.name)}(e))return tue(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("TemplateLiteral"===e.arguments[0].type||Yoe(e.arguments[0]))&&function(e){return joe(e,cue)}(e.callee))return!(e.arguments[2]&&!Xoe(e.arguments[2]))&&((2===e.arguments.length?eue(e.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(e.arguments[1])&&Bue(e.arguments[1]).length<=1)||tue(e.arguments[1]));return!1}var due=Loe(["CallExpression","OptionalCallExpression"]),hue=Loe(["MemberExpression","OptionalMemberExpression"]);function fue(e,t){return rue(t)?Uue(t):Kue(t,Vue.Leading,(t=>Eoe(e,koe(t))))}function mue(e,t){return"json"!==t.parser&&Yoe(e.key)&&Due(e.key).slice(1,-1)===e.key.value&&(doe(e.key.value)&&!("babel-ts"===t.parser&&"ClassProperty"===e.type||"typescript"===t.parser&&"PropertyDefinition"===e.type)||yue(e.key.value)&&String(Number(e.key.value))===e.key.value&&("babel"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser))}function yue(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function gue(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function bue(e,t){return("TemplateLiteral"===e.type&&gue(e)||"TaggedTemplateExpression"===e.type&&gue(e.quasi))&&!Eoe(t,woe(e),{backwards:!0})}function vue(e){if(!Kue(e))return!1;let t=Yae(!1,que(e,Vue.Dangling),-1);return t&&!Moe(t)}function xue(e){let{node:t,parent:r,key:n}=e;return"callee"===n&&due(t)&&due(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var Eue=new Set(["!","-","+","~"]);function Sue(e,t=2){if(t<=0)return!1;let r=e=>Sue(e,t-1);if(Qoe(e))return Poe(e.pattern??e.regex.pattern)<=5;if("Literal"===e.type||"BigIntLiteral"===e.type||"DecimalLiteral"===e.type||"BooleanLiteral"===e.type||"NullLiteral"===e.type||"NumericLiteral"===e.type||"StringLiteral"===e.type||"Identifier"===e.type||"ThisExpression"===e.type||"Super"===e.type||"PrivateName"===e.type||"PrivateIdentifier"===e.type||"ArgumentPlaceholder"===e.type||"Import"===e.type)return!0;if("TemplateLiteral"===e.type)return e.quasis.every((e=>!e.value.raw.includes("\n")))&&e.expressions.every(r);if(Hoe(e))return e.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value))));if(Joe(e))return e.elements.every((e=>null===e||r(e)));if(Jue(e)){if("ImportExpression"===e.type||Sue(e.callee,t)){let n=Mue(e);return n.length<=t&&n.every(r)}return!1}return hue(e)?Sue(e.object,t)&&Sue(e.property,t):"UnaryExpression"===e.type&&Eue.has(e.operator)||"UpdateExpression"===e.type?Sue(e.argument,t):"TSNonNullExpression"===e.type&&Sue(e.expression,t)}function Due(e){var t;return(null==(t=e.extra)?void 0:t.raw)??e.raw}function Tue(e){return e}function Aue(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)}function Cue(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Cue(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Cue(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&Cue(e.tag,t);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&Cue(e.callee,t);case"ConditionalExpression":return Cue(e.test,t);case"UpdateExpression":return!e.prefix&&Cue(e.argument,t);case"BindExpression":return e.object&&Cue(e.object,t);case"SequenceExpression":return Cue(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":return Cue(e.expression,t);default:return t(e)}}var Pue={"==":!0,"!=":!0,"===":!0,"!==":!0},wue={"*":!0,"/":!0,"%":!0},kue={">>":!0,">>>":!0,"<<":!0};function Fue(e,t){return!(_ue(t)!==_ue(e)||"**"===e||Pue[e]&&Pue[t]||"%"===t&&wue[e]||"%"===e&&wue[t]||t!==e&&wue[t]&&wue[e]||kue[e]&&kue[t])}var Iue=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap(((e,t)=>e.map((e=>[e,t])))));function _ue(e){return Iue.get(e)}function Nue(e){var t;if(e.rest)return!0;let r=Bue(e);return"RestElement"===(null==(t=Yae(!1,r,-1))?void 0:t.type)}var Oue=new WeakMap;function Bue(e){if(Oue.has(e))return Oue.get(e);let t=[];return e.this&&t.push(e.this),Array.isArray(e.parameters)?t.push(...e.parameters):Array.isArray(e.params)&&t.push(...e.params),e.rest&&t.push(e.rest),Oue.set(e,t),t}var Lue=new WeakMap;function Mue(e){if(Lue.has(e))return Lue.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),Lue.set(e,t),t}function jue(e,t){let{node:r}=e;"ImportExpression"===r.type?(e.call((e=>t(e,0)),"source"),r.attributes&&e.call((e=>t(e,1)),"attributes")):e.each(t,"arguments")}function Rue(e,t){if("ImportExpression"===e.type){if(0===t||t===(e.attributes?-2:-1))return"source";if(e.attributes&&(1===t||-1===t))return"attributes";throw new RangeError("Invalid argument index")}if(t<0&&(t=e.arguments.length+t),t<0||t>=e.arguments.length)throw new RangeError("Invalid argument index");return["arguments",t]}function $ue(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function Uue(e){return(null==e?void 0:e.prettierIgnore)||Kue(e,Vue.PrettierIgnore)}var Vue={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},zue=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(r,n,i)=>!(e&Vue.Leading&&!r.leading||e&Vue.Trailing&&!r.trailing||e&Vue.Dangling&&(r.leading||r.trailing)||e&Vue.Block&&!Moe(r)||e&Vue.Line&&!qoe(r)||e&Vue.First&&0!==n||e&Vue.Last&&n!==i.length-1||e&Vue.PrettierIgnore&&!$ue(r)||t&&!t(r))};function Kue(e,t,r){if(!coe(null==e?void 0:e.comments))return!1;let n=zue(t,r);return!n||e.comments.some(n)}function que(e,t,r){if(!Array.isArray(null==e?void 0:e.comments))return[];let n=zue(t,r);return n?e.comments.filter(n):e.comments}var Wue=(e,{originalText:t})=>Toe(t,koe(e));function Jue(e){return due(e)||"NewExpression"===e.type||"ImportExpression"===e.type}function Hue(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)}var Xue=Symbol("ifWithoutBlockAndSameLineComment"),Gue=Loe(["TSAsExpression","TSSatisfiesExpression"]);function Yue(e,t){var r,n,i,s,a,o,u;if(e.isRoot)return!1;let{node:l,key:c,parent:p}=e;if(t.__isInHtmlInterpolation&&!t.bracketSpacing&&function(e){return Hoe(e)}(l)&&Zue(e))return!0;if(Que(l))return!1;if("Identifier"===l.type){if(null!=(r=l.extra)&&r.parenthesized&&/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(l.name)||"left"===c&&("async"===l.name&&!p.await||"let"===l.name)&&"ForOfStatement"===p.type)return!0;if("let"===l.name){let t=null==(n=e.findAncestor((e=>"ForOfStatement"===e.type)))?void 0:n.left;if(t&&Cue(t,(e=>e===l)))return!0}if("object"===c&&"let"===l.name&&"MemberExpression"===p.type&&p.computed&&!p.optional){let t=e.findAncestor((e=>"ExpressionStatement"===e.type||"ForStatement"===e.type||"ForInStatement"===e.type)),r=t?"ExpressionStatement"===t.type?t.expression:"ForStatement"===t.type?t.init:t.left:void 0;if(r&&Cue(r,(e=>e===l)))return!0}return!1}if("ObjectExpression"===l.type||"FunctionExpression"===l.type||"ClassExpression"===l.type||"DoExpression"===l.type){let t=null==(i=e.findAncestor((e=>"ExpressionStatement"===e.type)))?void 0:i.expression;if(t&&Cue(t,(e=>e===l)))return!0}if("ObjectExpression"===l.type){let t=null==(s=e.findAncestor((e=>"ArrowFunctionExpression"===e.type)))?void 0:s.body;if(t&&"SequenceExpression"!==t.type&&"AssignmentExpression"!==t.type&&Cue(t,(e=>e===l)))return!0}switch(p.type){case"ParenthesizedExpression":return!1;case"ClassDeclaration":case"ClassExpression":if("superClass"===c&&("ArrowFunctionExpression"===l.type||"AssignmentExpression"===l.type||"AwaitExpression"===l.type||"BinaryExpression"===l.type||"ConditionalExpression"===l.type||"LogicalExpression"===l.type||"NewExpression"===l.type||"ObjectExpression"===l.type||"SequenceExpression"===l.type||"TaggedTemplateExpression"===l.type||"UnaryExpression"===l.type||"UpdateExpression"===l.type||"YieldExpression"===l.type||"TSNonNullExpression"===l.type||"ClassExpression"===l.type&&coe(l.decorators)))return!0;break;case"ExportDefaultDeclaration":return ele(e,t)||"SequenceExpression"===l.type;case"Decorator":if("expression"===c){if(hue(l)&&l.computed)return!0;let e=!1,r=!1,n=l;for(;n;)switch(n.type){case"MemberExpression":r=!0,n=n.object;break;case"CallExpression":if(r||e)return"typescript"!==t.parser;e=!0,n=n.callee;break;case"Identifier":return!1;case"TaggedTemplateExpression":return"typescript"!==t.parser;default:return!0}return!0}break;case"TypeAnnotation":if(e.match(void 0,void 0,((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))&&function(e){return Uoe(e,(e=>"ObjectTypeAnnotation"===e.type&&Uoe(e,(e=>"FunctionTypeAnnotation"===e.type))))}(l))return!0}switch(l.type){case"UpdateExpression":if("UnaryExpression"===p.type)return l.prefix&&("++"===l.operator&&"+"===p.operator||"--"===l.operator&&"-"===p.operator);case"UnaryExpression":switch(p.type){case"UnaryExpression":return l.operator===p.operator&&("+"===l.operator||"-"===l.operator);case"BindExpression":case"TaggedTemplateExpression":case"TSNonNullExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"BinaryExpression":return"left"===c&&"**"===p.operator;default:return!1}case"BinaryExpression":if("UpdateExpression"===p.type||"in"===l.operator&&function(e){let t=0,{node:r}=e;for(;r;){let n=e.getParentNode(t++);if("ForStatement"===(null==n?void 0:n.type)&&n.init===r)return!0;r=n}return!1}(e))return!0;if("|>"===l.operator&&null!=(a=l.extra)&&a.parenthesized){let t=e.grandparent;if("BinaryExpression"===t.type&&"|>"===t.operator)return!0}case"TSTypeAssertion":case"TSAsExpression":case"TSSatisfiesExpression":case"LogicalExpression":switch(p.type){case"TSAsExpression":case"TSSatisfiesExpression":return!Gue(l);case"ConditionalExpression":return Gue(l);case"CallExpression":case"NewExpression":case"OptionalCallExpression":return"callee"===c;case"ClassExpression":case"ClassDeclaration":return"superClass"===c;case"TSTypeAssertion":case"TaggedTemplateExpression":case"UnaryExpression":case"JSXSpreadAttribute":case"SpreadElement":case"BindExpression":case"AwaitExpression":case"TSNonNullExpression":case"UpdateExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"AssignmentExpression":case"AssignmentPattern":return"left"===c&&("TSTypeAssertion"===l.type||Gue(l));case"LogicalExpression":if("LogicalExpression"===l.type)return p.operator!==l.operator;case"BinaryExpression":{let{operator:e,type:t}=l;if(!e&&"TSTypeAssertion"!==t)return!0;let r=_ue(e),n=p.operator,i=_ue(n);return i>r||"right"===c&&i===r||i===r&&!Fue(n,e)||(i<r&&"%"===e?"+"===n||"-"===n:!!function(e){return!!kue[e]||"|"===e||"^"===e||"&"===e}(n))}default:return!1}case"SequenceExpression":switch(p.type){case"ReturnStatement":case"ForStatement":return!1;case"ExpressionStatement":return"expression"!==c;case"ArrowFunctionExpression":return"body"!==c;default:return!0}case"YieldExpression":if("AwaitExpression"===p.type)return!0;case"AwaitExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"SpreadElement":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"BinaryExpression":return!(!l.argument&&"|>"===p.operator);default:return!1}case"TSFunctionType":if(e.match((e=>"TSFunctionType"===e.type),((e,t)=>"typeAnnotation"===t&&"TSTypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;case"TSConditionalType":case"TSConstructorType":if("extendsType"===c&&"TSConditionalType"===p.type){if("TSConditionalType"===l.type)return!0;let{typeAnnotation:e}=l.returnType||l.typeAnnotation;if("TSTypePredicate"===e.type&&e.typeAnnotation&&(e=e.typeAnnotation.typeAnnotation),"TSInferType"===e.type&&e.typeParameter.constraint)return!0}if("checkType"===c&&"TSConditionalType"===p.type)return!0;case"TSUnionType":case"TSIntersectionType":if(("TSUnionType"===p.type||"TSIntersectionType"===p.type)&&p.types.length>1&&(!l.types||l.types.length>1))return!0;case"TSInferType":if("TSInferType"===l.type&&"TSRestType"===p.type)return!1;case"TSTypeOperator":return"TSArrayType"===p.type||"TSOptionalType"===p.type||"TSRestType"===p.type||"objectType"===c&&"TSIndexedAccessType"===p.type||"TSTypeOperator"===p.type||"TSTypeAnnotation"===p.type&&e.grandparent.type.startsWith("TSJSDoc");case"TSTypeQuery":return"objectType"===c&&"TSIndexedAccessType"===p.type||"elementType"===c&&"TSArrayType"===p.type;case"TypeofTypeAnnotation":return"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type)||"elementType"===c&&"ArrayTypeAnnotation"===p.type;case"ArrayTypeAnnotation":return"NullableTypeAnnotation"===p.type;case"IntersectionTypeAnnotation":case"UnionTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"NullableTypeAnnotation"===p.type||"IntersectionTypeAnnotation"===p.type||"UnionTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"InferTypeAnnotation":case"NullableTypeAnnotation":return"ArrayTypeAnnotation"===p.type||"objectType"===c&&("IndexedAccessType"===p.type||"OptionalIndexedAccessType"===p.type);case"FunctionTypeAnnotation":{if(e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type))||e.match(void 0,((e,t)=>"typeAnnotation"===t&&"TypePredicate"===e.type),((e,t)=>"typeAnnotation"===t&&"TypeAnnotation"===e.type),((e,t)=>"returnType"===t&&"ArrowFunctionExpression"===e.type)))return!0;let t="NullableTypeAnnotation"===p.type?e.grandparent:p;return"UnionTypeAnnotation"===t.type||"IntersectionTypeAnnotation"===t.type||"ArrayTypeAnnotation"===t.type||"objectType"===c&&("IndexedAccessType"===t.type||"OptionalIndexedAccessType"===t.type)||"checkType"===c&&"ConditionalTypeAnnotation"===p.type||"extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"InferTypeAnnotation"===l.returnType.type&&l.returnType.typeParameter.bound||"NullableTypeAnnotation"===t.type||"FunctionTypeParam"===p.type&&null===p.name&&Bue(l).some((e=>{var t;return"NullableTypeAnnotation"===(null==(t=e.typeAnnotation)?void 0:t.type)}))}case"ConditionalTypeAnnotation":if("extendsType"===c&&"ConditionalTypeAnnotation"===p.type&&"ConditionalTypeAnnotation"===l.type||"checkType"===c&&"ConditionalTypeAnnotation"===p.type)return!0;case"OptionalIndexedAccessType":return"objectType"===c&&"IndexedAccessType"===p.type;case"StringLiteral":case"NumericLiteral":case"Literal":if("string"==typeof l.value&&"ExpressionStatement"===p.type&&!p.directive){let t=e.grandparent;return"Program"===t.type||"BlockStatement"===t.type}return"object"===c&&"MemberExpression"===p.type&&"number"==typeof l.value;case"AssignmentExpression":{let t=e.grandparent;return"body"===c&&"ArrowFunctionExpression"===p.type||("key"!==c||"ClassProperty"!==p.type&&"PropertyDefinition"!==p.type||!p.computed)&&("init"!==c&&"update"!==c||"ForStatement"!==p.type)&&("ExpressionStatement"===p.type?"ObjectPattern"===l.left.type:!("key"===c&&"TSPropertySignature"===p.type||"AssignmentExpression"===p.type||"SequenceExpression"===p.type&&"ForStatement"===t.type&&(t.init===p||t.update===p)||"value"===c&&"Property"===p.type&&"ObjectPattern"===t.type&&t.properties.includes(p)||"NGChainedExpression"===p.type))}case"ConditionalExpression":switch(p.type){case"TaggedTemplateExpression":case"UnaryExpression":case"SpreadElement":case"BinaryExpression":case"LogicalExpression":case"NGPipeExpression":case"ExportDefaultDeclaration":case"AwaitExpression":case"JSXSpreadAttribute":case"TSTypeAssertion":case"TypeCastExpression":case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":return!0;case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"ConditionalExpression":return"test"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;default:return!1}case"FunctionExpression":switch(p.type){case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"TaggedTemplateExpression":return!0;default:return!1}case"ArrowFunctionExpression":switch(p.type){case"BinaryExpression":return"|>"!==p.operator||(null==(o=l.extra)?void 0:o.parenthesized);case"NewExpression":case"CallExpression":case"OptionalCallExpression":return"callee"===c;case"MemberExpression":case"OptionalMemberExpression":return"object"===c;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"BindExpression":case"TaggedTemplateExpression":case"UnaryExpression":case"LogicalExpression":case"AwaitExpression":case"TSTypeAssertion":return!0;case"ConditionalExpression":return"test"===c;default:return!1}case"ClassExpression":return"NewExpression"===p.type&&"callee"===c;case"OptionalMemberExpression":case"OptionalCallExpression":case"CallExpression":case"MemberExpression":if(function(e){let{node:t,parent:r,grandparent:n,key:i}=e;return!!(("OptionalMemberExpression"===t.type||"OptionalCallExpression"===t.type)&&("object"===i&&"MemberExpression"===r.type||"callee"===i&&("CallExpression"===r.type||"NewExpression"===r.type)||"TSNonNullExpression"===r.type&&"MemberExpression"===n.type&&n.object===r)||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type))&&(e.match(void 0,void 0,((e,t)=>"callee"===t&&("CallExpression"===e.type&&!e.optional||"NewExpression"===e.type)||"object"===t&&"MemberExpression"===e.type&&!e.optional))||e.match(void 0,void 0,((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))||e.match((()=>"CallExpression"===t.type||"MemberExpression"===t.type),((e,t)=>"expression"===t&&"TSNonNullExpression"===e.type),((e,t)=>"expression"===t&&"ChainExpression"===e.type),((e,t)=>"object"===t&&"MemberExpression"===e.type)))}(e))return!0;case"TaggedTemplateExpression":case"TSNonNullExpression":if("callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)){let e=l;for(;e;)switch(e.type){case"CallExpression":case"OptionalCallExpression":return!0;case"MemberExpression":case"OptionalMemberExpression":case"BindExpression":e=e.object;break;case"TaggedTemplateExpression":e=e.tag;break;case"TSNonNullExpression":e=e.expression;break;default:return!1}}return!1;case"BindExpression":return"callee"===c&&("BindExpression"===p.type||"NewExpression"===p.type)||"object"===c&&hue(p);case"NGPipeExpression":return!("NGRoot"===p.type||"NGMicrosyntaxExpression"===p.type||"ObjectProperty"===p.type&&(null==(u=l.extra)||!u.parenthesized)||Joe(p)||"arguments"===c&&due(p)||"right"===c&&"NGPipeExpression"===p.type||"property"===c&&"MemberExpression"===p.type||"AssignmentExpression"===p.type);case"JSXFragment":case"JSXElement":return"callee"===c||"left"===c&&"BinaryExpression"===p.type&&"<"===p.operator||!Joe(p)&&"ArrowFunctionExpression"!==p.type&&"AssignmentExpression"!==p.type&&"AssignmentPattern"!==p.type&&"BinaryExpression"!==p.type&&"NewExpression"!==p.type&&"ConditionalExpression"!==p.type&&"ExpressionStatement"!==p.type&&"JsExpressionRoot"!==p.type&&"JSXAttribute"!==p.type&&"JSXElement"!==p.type&&"JSXExpressionContainer"!==p.type&&"JSXFragment"!==p.type&&"LogicalExpression"!==p.type&&!due(p)&&!Hue(p)&&"ReturnStatement"!==p.type&&"ThrowStatement"!==p.type&&"TypeCastExpression"!==p.type&&"VariableDeclarator"!==p.type&&"YieldExpression"!==p.type;case"TSInstantiationExpression":return"object"===c&&hue(p)}return!1}var Que=Loe(["BlockStatement","BreakStatement","ClassBody","ClassDeclaration","ClassMethod","ClassProperty","PropertyDefinition","ClassPrivateProperty","ContinueStatement","DebuggerStatement","DeclareClass","DeclareExportAllDeclaration","DeclareExportDeclaration","DeclareFunction","DeclareInterface","DeclareModule","DeclareModuleExports","DeclareVariable","DeclareEnum","DoWhileStatement","EnumDeclaration","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","IfStatement","ImportDeclaration","InterfaceDeclaration","LabeledStatement","MethodDefinition","ReturnStatement","SwitchStatement","ThrowStatement","TryStatement","TSDeclareFunction","TSEnumDeclaration","TSImportEqualsDeclaration","TSInterfaceDeclaration","TSModuleDeclaration","TSNamespaceExportDeclaration","TypeAlias","VariableDeclaration","WhileStatement","WithStatement"]);function Zue(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if("arguments"===r&&e.isLast)return e.callParent(Zue);break;case"ObjectProperty":if("value"===r)return e.callParent((()=>"properties"===e.key&&e.isLast));break;case"BinaryExpression":case"LogicalExpression":if("right"===r)return e.callParent(Zue);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(Zue);break;case"UnaryExpression":if(t.prefix)return e.callParent(Zue)}return!1}function ele(e,t){let{node:r,parent:n}=e;return"FunctionExpression"===r.type||"ClassExpression"===r.type?"ExportDefaultDeclaration"===n.type||!Yue(e,t):!(!Voe(r)||"ExportDefaultDeclaration"!==n.type&&Yue(e,t))&&e.call((()=>ele(e,t)),...Koe(r))}var tle=Yue,rle=(e,t,r,n)=>{if(!e||null!=t)return t.replaceAll?t.replaceAll(r,n):r.global?t.replace(r,n):t.split(r).join(n)};var nle=function(e,t){let r=t-1;return r=goe(e,r,{backwards:!0}),r=xoe(e,r,{backwards:!0}),r=goe(e,r,{backwards:!0}),r!==xoe(e,r,{backwards:!0})},ile=()=>!0;function sle(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function ale(e,t,r={}){let{node:n}=e;if(!coe(null==n?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:a=ile}=r,o=[];if(e.each((({node:r})=>{r.leading||r.trailing||r.marker!==s||!a(r)||o.push(sle(e,t))}),"comments"),0===o.length)return"";let u=Xae(Wae,o);return i?_ae([Wae,u]):u}function ole(e,t){let r=e.node;if(!r)return{};let n=t[Symbol.for("printedComments")];if(0===(r.comments||[]).filter((e=>!n.has(e))).length)return{leading:"",trailing:""};let i,s=[],a=[];return e.each((()=>{let r=e.node;if(null!=n&&n.has(r))return;let{leading:o,trailing:u}=r;o?s.push(function(e,t){var r;let n=e.node,i=[sle(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=Eoe(a,u(n))?Eoe(a,o(n),{backwards:!0})?Wae:Kae:" ";i.push(e)}else i.push(Wae);let l=xoe(a,goe(a,u(n)));return!1!==l&&Eoe(a,l)&&i.push(Wae),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=sle(e,t),{printer:a,originalText:o,locStart:u}=t,l=null==(n=a.isBlockComment)?void 0:n.call(a,i);if(null!=r&&r.hasLineSuffix&&(null==r||!r.isBlock)||Eoe(o,u(i),{backwards:!0})){let e=nle(o,u(i));return{doc:$ae([Wae,e?Wae:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[$ae([" ",s]),Vae],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}function ule(e,t,r){let{leading:n,trailing:i}=ole(e,r);return n||i?loe(t,(e=>[n,e,i])):t}var lle=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},cle=lle,ple="'";var dle=function(e,t){let r=!0===t||t===ple?ple:'"',n=r===ple?'"':ple,i=0,s=0;for(let t of e)t===r?i++:t===n&&s++;return i>s?n:r};var hle;hle=new WeakMap;var fle=class{constructor(e){((e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)})(this,hle,void 0),((e,t,r,n)=>{iae(e,t,"write to private field"),n?n.call(e,r):t.set(e,r)})(this,hle,new Set(e))}getLeadingWhitespaceCount(e){let t=sae(this,hle),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=sae(this,hle),r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return sae(this,hle).has(e.charAt(0))}hasTrailingWhitespace(e){return sae(this,hle).has(Yae(!1,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}([...sae(this,hle)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=sae(this,hle);return Array.prototype.some.call(e,(e=>t.has(e)))}hasNonWhitespaceCharacter(e){let t=sae(this,hle);return Array.prototype.some.call(e,(e=>!t.has(e)))}isWhitespaceOnly(e){let t=sae(this,hle);return Array.prototype.every.call(e,(e=>t.has(e)))}},mle={};nae(mle,{endOfLine:()=>Ale,ownLine:()=>Tle,remaining:()=>Cle});var yle=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=goe(e,n),n=Soe(e,n),n=Doe(e,n),n=xoe(e,n);return n};var gle=function(e,t){let r=yle(e,t);return!1===r?"":e.charAt(r)};var ble=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};function vle(e,t){(e.comments??(e.comments=[])).push(t),t.printed=!1,t.nodeDescription=function(e){let t=e.type||e.kind||"(unknown type)",r=String(e.name||e.id&&("object"==typeof e.id?e.id.name:e.id)||e.key&&("object"==typeof e.key?e.key.name:e.key)||e.value&&("object"==typeof e.value?"":String(e.value))||e.operator||"");return r.length>20&&(r=r.slice(0,19)+"…"),t+(r?" "+r:"")}(e)}function xle(e,t){t.leading=!0,t.trailing=!1,vle(e,t)}function Ele(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),vle(e,t)}function Sle(e,t){t.leading=!1,t.trailing=!0,vle(e,t)}var Dle=function(e){return Moe(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};function Tle(e){return[ice,Kle,Nle,Fle,Ile,_le,Mle,Yle,Hle,Gle,Qle,Zle,Rle,qle,Wle].some((t=>t(e)))}function Ale(e){return[kle,Kle,Ole,Qle,Fle,Ile,_le,Mle,qle,Jle,Xle,Gle,rce,Wle,ace].some((t=>t(e)))}function Cle(e){return[ice,Fle,Ile,Ble,zle,Rle,Gle,Vle,Ule,sce,Wle,nce].some((t=>t(e)))}function Ple(e,t){let r=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));r?xle(r,t):Ele(e,t)}function wle(e,t){"BlockStatement"===e.type?Ple(e,t):xle(e,t)}function kle({comment:e,followingNode:t}){return!(!t||!Dle(e))&&(xle(t,e),!0)}function Fle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("IfStatement"!==(null==r?void 0:r.type)||!n)return!1;if(")"===gle(i,koe(e)))return Sle(t,e),!0;if(t===r.consequent&&n===r.alternate){if("BlockStatement"===t.type)Sle(t,e);else{let n="SingleLine"===e.type||e.loc.start.line===e.loc.end.line,i=e.loc.start.line===t.loc.start.line;n&&i?Ele(t,e,"ExpressionStatement"===t.type?Xue:void 0):Ele(r,e)}return!0}return"BlockStatement"===n.type?(Ple(n,e),!0):"IfStatement"===n.type?(wle(n.consequent,e),!0):r.consequent===n&&(xle(n,e),!0)}function Ile({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return!("WhileStatement"!==(null==r?void 0:r.type)||!n)&&(")"===gle(i,koe(e))?(Sle(t,e),!0):"BlockStatement"===n.type?(Ple(n,e),!0):r.body===n&&(xle(n,e),!0))}function _le({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return!("TryStatement"!==(null==r?void 0:r.type)&&"CatchClause"!==(null==r?void 0:r.type)||!n)&&("CatchClause"===r.type&&t?(Sle(t,e),!0):"BlockStatement"===n.type?(Ple(n,e),!0):"TryStatement"===n.type?(wle(n.finalizer,e),!0):"CatchClause"===n.type&&(wle(n.body,e),!0))}function Nle({comment:e,enclosingNode:t,followingNode:r}){return!(!hue(t)||"Identifier"!==(null==r?void 0:r.type))&&(xle(t,e),!0)}function Ole({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){let s=t&&!ble(i,koe(t),woe(e));return!(t&&s||"ConditionalExpression"!==(null==r?void 0:r.type)&&"TSConditionalType"!==(null==r?void 0:r.type)||!n)&&(xle(n,e),!0)}function Ble({comment:e,precedingNode:t,enclosingNode:r}){return!(!Hue(r)||!r.shorthand||r.key!==t||"AssignmentPattern"!==r.value.type)&&(Sle(r.value.left,e),!0)}var Lle=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Mle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Lle.has(null==r?void 0:r.type)){if(coe(r.decorators)&&"Decorator"!==(null==n?void 0:n.type))return Sle(Yae(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return Ple(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return Sle(t,e),!0;for(let i of["implements","extends","mixins"])if(r[i]&&n===r[i][0])return!t||t!==r.id&&t!==r.typeParameters&&t!==r.superClass?Ele(r,e,i):Sle(t,e),!0}}return!1}var jle=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Rle({comment:e,precedingNode:t,enclosingNode:r,text:n}){return(r&&t&&"("===gle(n,koe(e))&&("Property"===r.type||"TSDeclareMethod"===r.type||"TSAbstractMethodDefinition"===r.type)&&"Identifier"===t.type&&r.key===t&&":"!==gle(n,koe(t))||!("Decorator"!==(null==t?void 0:t.type)||!jle.has(null==r?void 0:r.type)))&&(Sle(t,e),!0)}var $le=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function Ule({comment:e,precedingNode:t,enclosingNode:r,text:n}){return"("===gle(n,koe(e))&&(!(!t||!$le.has(null==r?void 0:r.type))&&(Sle(t,e),!0))}function Vle({comment:e,enclosingNode:t,text:r}){if("ArrowFunctionExpression"!==(null==t?void 0:t.type))return!1;let n=yle(r,koe(e));return!1!==n&&"=>"===r.slice(n,n+2)&&(Ele(t,e),!0)}function zle({comment:e,enclosingNode:t,text:r}){return")"===gle(r,koe(e))&&(t&&(oce(t)&&0===Bue(t).length||Jue(t)&&0===Mue(t).length)?(Ele(t,e),!0):("MethodDefinition"===(null==t?void 0:t.type)||"TSAbstractMethodDefinition"===(null==t?void 0:t.type))&&0===Bue(t.value).length&&(Ele(t.value,e),!0))}function Kle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("FunctionTypeParam"===(null==t?void 0:t.type)&&"FunctionTypeAnnotation"===(null==r?void 0:r.type)&&"FunctionTypeParam"!==(null==n?void 0:n.type))return Sle(t,e),!0;if(("Identifier"===(null==t?void 0:t.type)||"AssignmentPattern"===(null==t?void 0:t.type)||"ObjectPattern"===(null==t?void 0:t.type)||"ArrayPattern"===(null==t?void 0:t.type)||"RestElement"===(null==t?void 0:t.type))&&r&&oce(r)&&")"===gle(i,koe(e)))return Sle(t,e),!0;if("FunctionDeclaration"===(null==r?void 0:r.type)&&"BlockStatement"===(null==n?void 0:n.type)){let t=(()=>{let e=Bue(r);if(e.length>0)return yle(i,koe(Yae(!1,e,-1)));let t=yle(i,koe(r.id));return!1!==t&&yle(i,t+1)})();if(woe(e)>t)return Ple(n,e),!0}return!1}function qle({comment:e,enclosingNode:t}){return"LabeledStatement"===(null==t?void 0:t.type)&&(xle(t,e),!0)}function Wle({comment:e,enclosingNode:t}){return!("ContinueStatement"!==(null==t?void 0:t.type)&&"BreakStatement"!==(null==t?void 0:t.type)||t.label)&&(Sle(t,e),!0)}function Jle({comment:e,precedingNode:t,enclosingNode:r}){return!!(due(r)&&t&&r.callee===t&&r.arguments.length>0)&&(xle(r.arguments[0],e),!0)}function Hle({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"UnionTypeAnnotation"===(null==r?void 0:r.type)||"TSUnionType"===(null==r?void 0:r.type)?($ue(e)&&(n.prettierIgnore=!0,e.unignore=!0),!!t&&(Sle(t,e),!0)):(("UnionTypeAnnotation"===(null==n?void 0:n.type)||"TSUnionType"===(null==n?void 0:n.type))&&$ue(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Xle({comment:e,enclosingNode:t}){return!!Hue(t)&&(xle(t,e),!0)}function Gle({comment:e,enclosingNode:t,followingNode:r,ast:n,isLastComment:i}){var s;return 0===(null==(s=null==n?void 0:n.body)?void 0:s.length)?(i?Ele(n,e):xle(n,e),!0):"Program"!==(null==t?void 0:t.type)||0!==t.body.length||coe(t.directives)?"Program"===(null==r?void 0:r.type)&&0===r.body.length&&"ModuleExpression"===(null==t?void 0:t.type)&&(Ele(r,e),!0):(i?Ele(t,e):xle(t,e),!0)}function Yle({comment:e,enclosingNode:t}){return("ForInStatement"===(null==t?void 0:t.type)||"ForOfStatement"===(null==t?void 0:t.type))&&(xle(t,e),!0)}function Qle({comment:e,precedingNode:t,enclosingNode:r,text:n}){if("ImportSpecifier"===(null==r?void 0:r.type)||"ExportSpecifier"===(null==r?void 0:r.type))return xle(r,e),!0;let i="ImportSpecifier"===(null==t?void 0:t.type)&&"ImportDeclaration"===(null==r?void 0:r.type),s="ExportSpecifier"===(null==t?void 0:t.type)&&"ExportNamedDeclaration"===(null==r?void 0:r.type);return!(!i&&!s||!Eoe(n,koe(e)))&&(Sle(t,e),!0)}function Zle({comment:e,enclosingNode:t}){return"AssignmentPattern"===(null==t?void 0:t.type)&&(xle(t,e),!0)}var ece=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),tce=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function rce({comment:e,enclosingNode:t,followingNode:r}){return!(!ece.has(null==t?void 0:t.type)||!r||!tce.has(r.type)&&!Moe(e))&&(xle(r,e),!0)}function nce({comment:e,enclosingNode:t,followingNode:r,text:n}){return!(r||"TSMethodSignature"!==(null==t?void 0:t.type)&&"TSDeclareFunction"!==(null==t?void 0:t.type)&&"TSAbstractMethodDefinition"!==(null==t?void 0:t.type)||";"!==gle(n,koe(e)))&&(Sle(t,e),!0)}function ice({comment:e,enclosingNode:t,followingNode:r}){if($ue(e)&&"TSMappedType"===(null==t?void 0:t.type)&&"TSTypeParameter"===(null==r?void 0:r.type)&&r.constraint)return t.prettierIgnore=!0,e.unignore=!0,!0}function sce({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"TSMappedType"===(null==r?void 0:r.type)&&("TSTypeParameter"===(null==n?void 0:n.type)&&n.name?(xle(n.name,e),!0):!("TSTypeParameter"!==(null==t?void 0:t.type)||!t.constraint)&&(Sle(t.constraint,e),!0))}function ace({comment:e,enclosingNode:t,followingNode:r}){return!(!t||"SwitchCase"!==t.type||t.test||!r||r!==t.consequent[0])&&("BlockStatement"===r.type&&qoe(e)?Ple(r,e):Ele(t,e),!0)}var oce=Loe(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var uce=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))};function lce(e,t){let r=e.node;if(qoe(r))return t.originalText.slice(woe(r),koe(r)).trimEnd();if(Moe(r))return uce(r)?function(e){let t=e.value.split("\n");return["/*",Xae(Wae,t.map(((e,r)=>0===r?e.trimEnd():" "+(r<t.length-1?e.trim():e.trimStart())))),"*/"]}(r):["/*",ooe(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}var cce=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function pce(e){return!cce.has(e.type)}function dce(e,t){var r;if(("typescript"===t.parser||"flow"===t.parser||"acorn"===t.parser||"espree"===t.parser||"meriyah"===t.parser||"__babel_estree"===t.parser)&&"MethodDefinition"===e.type&&"FunctionExpression"===(null==(r=e.value)?void 0:r.type)&&0===Bue(e.value).length&&!e.value.returnType&&!coe(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function hce(e){let{node:t,parent:r}=e;return(rue(t)||r&&("JSXSpreadAttribute"===r.type||"JSXSpreadChild"===r.type||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type||("ClassDeclaration"===r.type||"ClassExpression"===r.type)&&r.superClass===t))&&(!Uue(t)||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)}function fce(e,{parser:t}){if("flow"===t||"babel-flow"===t)return""===(e=rle(!1,e,/[\s(]/g,""))||"/*"===e||"/*::"===e}var mce=new fle(" \n\r\t"),yce=e=>""===e||e===Kae||e===Wae||e===qae;function gce(e,t,r){var n,i,s;let{node:a}=e;if("JSXElement"===a.type&&function(e){if(0===e.children.length)return!0;if(e.children.length>1)return!1;let t=e.children[0];return"JSXText"===t.type&&!Tce(t)}(a))return[r("openingElement"),r("closingElement")];let o="JSXElement"===a.type?r("openingElement"):r("openingFragment"),u="JSXElement"===a.type?r("closingElement"):r("closingFragment");if(1===a.children.length&&"JSXExpressionContainer"===a.children[0].type&&("TemplateLiteral"===a.children[0].expression.type||"TaggedTemplateExpression"===a.children[0].expression.type))return[o,...e.map(r,"children"),u];a.children=a.children.map((e=>function(e){return"JSXExpressionContainer"===e.type&&Yoe(e.expression)&&" "===e.expression.value&&!Kue(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));let l=a.children.some(rue),c=a.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,p="JSXElement"===a.type&&a.openingElement.attributes.length>1,d=roe(o)||l||p||c,h="mdx"===e.parent.rootMarker,f=t.singleQuote?"{' '}":'{" "}',m=h?" ":jae([f,qae]," "),y=function(e,t,r,n,i){let s=[];return e.each((({node:e,next:t})=>{if("JSXText"===e.type){let r=Due(e);if(Tce(e)){let a,o=mce.split(r,!0);if(""===o[0]&&(s.push(""),o.shift(),/\n/.test(o[0])?s.push(vce(i,o[1],e,t)):s.push(n),o.shift()),""===Yae(!1,o,-1)&&(o.pop(),a=o.pop()),0===o.length)return;for(let[e,t]of o.entries())e%2==1?s.push(Kae):s.push(t);void 0!==a?/\n/.test(a)?s.push(vce(i,Yae(!1,s,-1),e,t)):s.push(n):s.push(bce(i,Yae(!1,s,-1),e,t))}else/\n/.test(r)?r.match(/\n/g).length>1&&s.push("",Wae):s.push("",n)}else{let n=r();if(s.push(n),t&&Tce(t)){let r=mce.trim(Due(t)),[n]=mce.split(r);s.push(bce(i,n,e,t))}else s.push(Wae)}}),"children"),s}(e,0,r,m,"fbt"===(null==(i=null==(n=a.openingElement)?void 0:n.name)?void 0:i.name)),g=a.children.some((e=>Tce(e)));for(let e=y.length-2;e>=0;e--){let t=""===y[e]&&""===y[e+1],r=y[e]===Wae&&""===y[e+1]&&y[e+2]===Wae,n=(y[e]===qae||y[e]===Wae)&&""===y[e+1]&&y[e+2]===m,i=y[e]===m&&""===y[e+1]&&(y[e+2]===qae||y[e+2]===Wae),s=y[e]===m&&""===y[e+1]&&y[e+2]===m,a=y[e]===qae&&""===y[e+1]&&y[e+2]===Wae||y[e]===Wae&&""===y[e+1]&&y[e+2]===qae;r&&g||t||n||s||a?y.splice(e,2):i&&y.splice(e+1,2)}for(;y.length>0&&yce(Yae(!1,y,-1));)y.pop();for(;y.length>1&&yce(y[0])&&yce(y[1]);)y.shift(),y.shift();let b=[];for(let[e,t]of y.entries()){if(t===m){if(1===e&&""===y[e-1]){if(2===y.length){b.push(f);continue}b.push([f,Wae]);continue}if(e===y.length-1){b.push(f);continue}if(""===y[e-1]&&y[e-2]===Wae){b.push(f);continue}}b.push(t),roe(t)&&(d=!0)}let v=g?Mae(b):Oae(b,{shouldBreak:!0});if("JSXText"===(null==(s=t.cursorNode)?void 0:s.type)&&a.children.includes(t.cursorNode)&&(v=[Hae,v,Hae]),h)return v;let x=Oae([o,_ae([Wae,v]),Wae,u]);return d?x:Lae([Oae([o,...y,u]),x])}function bce(e,t,r,n){return e?"":"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?1===t.length?qae:Wae:qae}function vce(e,t,r,n){return e?Wae:1===t.length?"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?Wae:qae:Wae}var xce=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function Ece(e,t,r){return e.selfClosing?[Kae,"/>"]:function(e,t,r){let n=e.attributes.length>0&&Kue(Yae(!1,e.attributes,-1),Vue.Trailing);return 0===e.attributes.length&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}(e,t,r)?[">"]:[qae,">"]}function Sce(e,t,r){return function(e,t,r){let{parent:n}=e;if(xce.has(n.type))return t;let i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),due,(e=>"JSXExpressionContainer"===e.type)),s=tle(e,r);return Oae([s?"":jae("("),_ae([qae,t]),qae,s?"":jae(")")],{shouldBreak:i})}(e,ule(e,gce(e,t,r),t),t)}function Dce(e,t,r){let{node:n}=e;if(n.type.startsWith("JSX"))switch(n.type){case"JSXAttribute":return function(e,t,r){let{node:n}=e,i=[];if(i.push(r("name")),n.value){let s;if(Yoe(n.value)){let r=Due(n.value),i=rle(!1,rle(!1,r.slice(1,-1),"&apos;","'"),"&quot;",'"'),a=dle(i,t.jsxSingleQuote);i='"'===a?rle(!1,i,'"',"&quot;"):rle(!1,i,"'","&apos;"),s=e.call((()=>ule(e,ooe(a+i+a),t)),"value")}else s=r("value");i.push("=",s)}return i}(e,t,r);case"JSXIdentifier":return n.name;case"JSXNamespacedName":return Xae(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return Xae(".",[r("object"),r("property")]);case"JSXSpreadAttribute":case"JSXSpreadChild":return function(e,t,r){let{node:n}=e;return["{",e.call((({node:n})=>{let i=["...",r()];return Kue(n)&&hce(e)?[_ae([qae,ule(e,i,t)]),qae]:i}),"JSXSpreadAttribute"===n.type?"argument":"expression"),"}"]}(e,t,r);case"JSXExpressionContainer":return function(e,t,r){let{node:n}=e,i=(e,t)=>"JSXEmptyExpression"===e.type||!Kue(e)&&(Joe(e)||Hoe(e)||"ArrowFunctionExpression"===e.type||"AwaitExpression"===e.type&&(i(e.argument,e)||"JSXElement"===e.argument.type)||due(e)||"ChainExpression"===e.type&&due(e.expression)||"FunctionExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||"DoExpression"===e.type||rue(t)&&("ConditionalExpression"===e.type||aue(e)));return i(n.expression,e.parent)?Oae(["{",r("expression"),Uae,"}"]):Oae(["{",_ae([qae,r("expression")]),qae,Uae,"}"])}(e,0,r);case"JSXFragment":case"JSXElement":return Sce(e,t,r);case"JSXOpeningElement":return function(e,t,r){var n,i;let{node:s}=e,a=Kue(s.name)||Kue(s.typeParameters);if(s.selfClosing&&0===s.attributes.length&&!a)return["<",r("name"),r("typeParameters")," />"];if(1===(null==(n=s.attributes)?void 0:n.length)&&s.attributes[0].value&&Yoe(s.attributes[0].value)&&!s.attributes[0].value.value.includes("\n")&&!a&&!Kue(s.attributes[0]))return Oae(["<",r("name"),r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let o=null==(i=s.attributes)?void 0:i.some((e=>e.value&&Yoe(e.value)&&e.value.value.includes("\n"))),u=t.singleAttributePerLine&&s.attributes.length>1?Wae:Kae;return Oae(["<",r("name"),r("typeParameters"),_ae(e.map((()=>[u,r()]),"attributes")),...Ece(s,t,a)],{shouldBreak:o})}(e,t,r);case"JSXClosingElement":return function(e,t,r){let{node:n}=e,i=[];i.push("</");let s=r("name");return Kue(n.name,Vue.Leading|Vue.Line)?i.push(_ae([Wae,s]),Wae):Kue(n.name,Vue.Leading|Vue.Block)?i.push(" ",s):i.push(s),i.push(">"),i}(e,0,r);case"JSXOpeningFragment":case"JSXClosingFragment":return function(e,t){let{node:r}=e,n=Kue(r),i=Kue(r,Vue.Line),s="JSXOpeningFragment"===r.type;return[s?"<":"</",_ae([i?Wae:n&&!s?" ":"",ale(e,t)]),i?Wae:"",">"]}(e,t);case"JSXEmptyExpression":return function(e,t){let{node:r}=e,n=Kue(r,Vue.Line);return[ale(e,t,{indent:n}),n?Wae:""]}(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new cle(n,"JSX")}}function Tce(e){return"JSXText"===e.type&&(mce.hasNonWhitespaceCharacter(Due(e))||!/\n/.test(Due(e)))}var Ace=function(e){return Uue(e.node)||function(e){let{node:t,parent:r}=e;if(!rue(t)||!rue(r))return!1;let n,{index:i,siblings:s}=e;for(let e=i;e>0;e--){let t=s[e-1];if("JSXText"!==t.type||Tce(t)){n=t;break}}return"JSXExpressionContainer"===(null==n?void 0:n.type)&&"JSXEmptyExpression"===n.expression.type&&Uue(n.expression)}(e)},Cce=0;function Pce(e,t,r){var n;let{node:i,parent:s,grandparent:a,key:o}=e,u="body"!==o&&("IfStatement"===s.type||"WhileStatement"===s.type||"SwitchStatement"===s.type||"DoWhileStatement"===s.type),l="|>"===i.operator&&(null==(n=e.root.extra)?void 0:n.__isUsingHackPipeline),c=wce(e,r,t,!1,u);if(u)return c;if(l)return Oae(c);if(due(s)&&s.callee===i||"UnaryExpression"===s.type||hue(s)&&!s.computed)return Oae([_ae([qae,...c]),qae]);let p="ReturnStatement"===s.type||"ThrowStatement"===s.type||"JSXExpressionContainer"===s.type&&"JSXAttribute"===a.type||"|"!==i.operator&&"JsExpressionRoot"===s.type||"NGPipeExpression"!==i.type&&("NGRoot"===s.type&&"__ng_binding"===t.parser||"NGMicrosyntaxExpression"===s.type&&"NGMicrosyntax"===a.type&&1===a.body.length)||i===s.body&&"ArrowFunctionExpression"===s.type||i!==s.body&&"ForStatement"===s.type||"ConditionalExpression"===s.type&&"ReturnStatement"!==a.type&&"ThrowStatement"!==a.type&&!due(a)||"TemplateLiteral"===s.type,d="AssignmentExpression"===s.type||"VariableDeclarator"===s.type||"ClassProperty"===s.type||"PropertyDefinition"===s.type||"TSAbstractPropertyDefinition"===s.type||"ClassPrivateProperty"===s.type||Hue(s),h=aue(i.left)&&Fue(i.operator,i.left.operator);if(p||kce(i)&&!h||!kce(i)&&d)return Oae(c);if(0===c.length)return"";let f=rue(i.right),m=c.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&e.type===yae)),y=c.slice(0,-1===m?1:m+1),g=c.slice(y.length,f?-1:void 0),b=Symbol("logicalChain-"+ ++Cce),v=Oae([...y,_ae(g)],{id:b});return f?Oae([v,Rae(Yae(!1,c,-1),{groupId:b})]):v}function wce(e,t,r,n,i){var s;let{node:a}=e;if(!aue(a))return[Oae(t())];let o=[];Fue(a.operator,a.left.operator)?o=e.call((e=>wce(e,t,r,!0,i)),"left"):o.push(Oae(t("left")));let u,l=kce(a),c=("|>"===a.operator||"NGPipeExpression"===a.type||function(e,t){return("__vue_expression"===t.parser||"__vue_ts_expression"===t.parser)&&Fce(e.node)&&!e.hasAncestor((e=>!Fce(e)&&"JsExpressionRoot"!==e.type))}(e,r))&&!fue(r.originalText,a.right),p="NGPipeExpression"===a.type?"|":a.operator,d="NGPipeExpression"===a.type&&a.arguments.length>0?Oae(_ae([qae,": ",Xae([Kae,": "],e.map((()=>Nae(2,Oae(t()))),"arguments"))])):"";if(l)u=[p," ",t("right"),d];else{let n="|>"===p&&(null==(s=e.root.extra)?void 0:s.__isUsingHackPipeline)?e.call((e=>wce(e,t,r,!0,i)),"right"):t("right");u=[c?Kae:"",p,c?" ":Kae,n,d]}let{parent:h}=e,f=Kue(a.left,Vue.Trailing|Vue.Line),m=f||!(i&&"LogicalExpression"===a.type)&&h.type!==a.type&&a.left.type!==a.type&&a.right.type!==a.type;if(o.push(c?"":" ",m?Oae(u,{shouldBreak:f}):u),n&&Kue(a)){let t=aoe(ule(e,o,r));return Array.isArray(t)||t.type===gae?Qae(t):[t]}return o}function kce(e){return"LogicalExpression"===e.type&&!!(Hoe(e.right)&&e.right.properties.length>0||Joe(e.right)&&e.right.elements.length>0||rue(e.right))}var Fce=e=>"BinaryExpression"===e.type&&"|"===e.operator;var Ice=class extends Error{name="ArgExpansionBailout"};function _ce(e,t,r){let{node:n}=e,i=[],s="TupleExpression"===n.type?"#[":"[",a="TupleTypeAnnotation"===n.type&&n.types?"types":"TSTupleType"===n.type||"TupleTypeAnnotation"===n.type?"elementTypes":"elements",o=n[a];if(0===o.length)i.push(function(e,t,r,n){let{node:i}=e;return Kue(i,Vue.Dangling)?Oae([r,ale(e,t,{indent:!0}),qae,n]):[r,n]}(e,t,s,"]"));else{let u=Yae(!1,o,-1),l="RestElement"!==(null==u?void 0:u.type),c=null===u,p=Symbol("array"),d=!t.__inJestEach&&o.length>1&&o.every(((e,t,r)=>{let n=null==e?void 0:e.type;if(!Joe(e)&&!Hoe(e))return!1;let i=r[t+1];if(i&&n!==i.type)return!1;let s=Joe(e)?"elements":"properties";return e[s]&&e[s].length>1})),h=Nce(n,t),f=l?c?",":Aue(t)?h?jae(",","",{groupId:p}):jae(","):"":"";i.push(Oae([s,_ae([qae,h?Lce(e,t,r,f):[Bce(e,t,a,r),f],ale(e,t)]),qae,"]"],{shouldBreak:d,id:p}))}return i.push(Ape(e),vpe(e,r)),i}function Nce(e,t){return Joe(e)&&e.elements.length>1&&e.elements.every((e=>e&&(Xoe(e)||Goe(e)&&!Kue(e.argument))&&!Kue(e,Vue.Trailing|Vue.Line,(e=>!Eoe(t.originalText,woe(e),{backwards:!0})))))}function Oce({node:e},{originalText:t}){let r=e=>","===t[e]?e:r((e=>Soe(t,Doe(t,e)))(e+1));return Toe(t,r(koe(e)))}function Bce(e,t,r,n){let i=[];return e.each((({node:r,isLast:s})=>{i.push(r?Oae(n()):""),s||i.push([",",Kae,r&&Oce(e,t)?qae:""])}),r),i}function Lce(e,t,r,n){let i=[];return e.each((({isLast:s,next:a})=>{i.push([r(),s?n:","]),s||i.push(Oce(e,t)?[Wae,Wae]:Kue(a,Vue.Leading|Vue.Line)?Wae:Kae)}),"elements"),Mae(i)}function Mce(e,t=!1){return Hoe(e)&&(e.properties.length>0||Kue(e))||Joe(e)&&(e.elements.length>0||Kue(e))||"TSTypeAssertion"===e.type&&Mce(e.expression)||Gue(e)&&Mce(e.expression)||"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&(!e.returnType||!e.returnType.typeAnnotation||"TSTypeReference"!==e.returnType.typeAnnotation.type||function(e){return"BlockStatement"===e.type&&(e.body.some((e=>"EmptyStatement"!==e.type))||Kue(e,Vue.Dangling))}(e.body))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&Mce(e.body,!0)||Hoe(e.body)||Joe(e.body)||!t&&(due(e.body)||"ConditionalExpression"===e.body.type)||rue(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type}function jce(e){var t;if("ParenthesizedExpression"===e.type)return jce(e.expression);if(Gue(e)||"TypeCastExpression"===e.type){let{typeAnnotation:r}=e;return"TypeAnnotation"===r.type&&(r=r.typeAnnotation),"TSArrayType"===r.type&&(r=r.elementType,"TSArrayType"===r.type&&(r=r.elementType)),("GenericTypeAnnotation"===r.type||"TSTypeReference"===r.type)&&1===(null==(t=r.typeParameters)?void 0:t.params.length)&&(r=r.typeParameters.params[0]),lue(r)&&Sue(e.expression,1)}return!(Jue(e)&&Mue(e).length>1)&&(aue(e)?Sue(e.left,1)&&Sue(e.right,1):Qoe(e)||Sue(e))}var Rce=function(e,t,r){let{node:n}=e,i=Mue(n);if(0===i.length)return["(",ale(e,t),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===Bue(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>Kue(e)))}(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,a=i.length-1,o=[];jue(e,(({node:e},n)=>{let i=r();n===a||(Wue(e,t)?(s=!0,i=[i,",",Wae,Wae]):i=[i,",",Kae]),o.push(i)}));let u="ImportExpression"!==n.type&&"Import"!==n.callee.type&&Aue(t,"all")?",":"";function l(){return Oae(["(",_ae([Kae,...o]),u,Kae,")"],{shouldBreak:!0})}if(s||"Decorator"!==e.parent.type&&function(e){if(e.length<=1)return!1;let t=0;for(let r of e)if(eue(r)){if(t+=1,t>1)return!0}else if(due(r))for(let e of r.arguments)if(eue(e))return!0;return!1}(i))return l();if(function(e){if(2!==e.length)return!1;let[t,r]=e;return!("ModuleExpression"!==t.type||!function(e){return"ObjectExpression"===e.type&&1===e.properties.length&&Hue(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&Yoe(e.properties[0].value)&&"module"===e.properties[0].value.value}(r))||!Kue(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==r.type&&"ArrowFunctionExpression"!==r.type&&"ConditionalExpression"!==r.type&&jce(r)&&!Mce(r)}(i)){let e,t=o.slice(1);if(t.some(roe))return l();try{e=r(Rue(n,0),{expandFirstArg:!0})}catch(e){if(e instanceof Ice)return l();throw e}return roe(e)?[Vae,Lae([["(",Oae(e,{shouldBreak:!0}),", ",...t,")"],l()])]:Lae([["(",e,", ",...t,")"],["(",Oae(e,{shouldBreak:!0}),", ",...t,")"],l()])}if(function(e,t,r){var n,i;let s=Yae(!1,e,-1);if(1===e.length){let e=Yae(!1,t,-1);if(null!=(n=e.label)&&n.embed&&!1!==(null==(i=e.label)?void 0:i.hug))return!0}let a=Yae(!1,e,-2);return!Kue(s,Vue.Leading)&&!Kue(s,Vue.Trailing)&&Mce(s)&&(!a||a.type!==s.type)&&(2!==e.length||"ArrowFunctionExpression"!==a.type||!Joe(s))&&!(e.length>1&&Nce(s,r))}(i,o,t)){let e,t=o.slice(0,-1);if(t.some(roe))return l();try{e=r(Rue(n,-1),{expandLastArg:!0})}catch(e){if(e instanceof Ice)return l();throw e}return roe(e)?[Vae,Lae([["(",...t,Oae(e,{shouldBreak:!0}),")"],l()])]:Lae([["(",...t,e,")"],["(",...t,Oae(e,{shouldBreak:!0}),")"],l()])}let c=["(",_ae([qae,...o]),jae(u),qae,")"];return xue(e)?c:Oae(c,{shouldBreak:o.some(roe)||s})};function $ce(e,t,r){let n=r("property"),{node:i}=e,s=Ape(e);return i.computed?!i.property||Xoe(i.property)?[s,"[",n,"]"]:Oae([s,"[",_ae([qae,n]),qae,"]"]):[s,".",n]}var Uce=function(e,t,r){let{parent:n}=e,i=!n||"ExpressionStatement"===n.type,s=[];function a(e){let{originalText:r}=t,n=yle(r,koe(e));return")"===r.charAt(n)?!1!==n&&Toe(r,n+1):Wue(e,t)}function o(e){let{node:n}=e;due(n)&&(oue(n.callee)||due(n.callee))?(s.unshift({node:n,printed:[ule(e,[Ape(e),Ipe(e,t,r),Rce(e,t,r)],t),a(n)?Wae:""]}),e.call((e=>o(e)),"callee")):oue(n)?(s.unshift({node:n,needsParens:tle(e,t),printed:ule(e,hue(n)?$ce(e,0,r):_pe(e,t,r),t)}),e.call((e=>o(e)),"object")):"TSNonNullExpression"===n.type?(s.unshift({node:n,printed:ule(e,"!",t)}),e.call((e=>o(e)),"expression")):s.unshift({node:n,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[Ape(e),Ipe(e,t,r),Rce(e,t,r)]}),u.callee&&e.call((e=>o(e)),"callee");let l=[],c=[s[0]],p=1;for(;p<s.length&&("TSNonNullExpression"===s[p].node.type||due(s[p].node)||hue(s[p].node)&&s[p].node.computed&&Xoe(s[p].node.property));++p)c.push(s[p]);if(!due(s[0].node))for(;p+1<s.length&&oue(s[p].node)&&oue(s[p+1].node);++p)c.push(s[p]);l.push(c),c=[];let d=!1;for(;p<s.length;++p){if(d&&oue(s[p].node)){if(s[p].node.computed&&Xoe(s[p].node.property)){c.push(s[p]);continue}l.push(c),c=[],d=!1}(due(s[p].node)||"ImportExpression"===s[p].node.type)&&(d=!0),c.push(s[p]),Kue(s[p].node,Vue.Trailing)&&(l.push(c),c=[],d=!1)}function h(e){return/^[A-Z]|^[$_]+$/.test(e)}c.length>0&&l.push(c);let f=l.length>=2&&!Kue(l[1][0].node)&&function(e){var r;let n=null==(r=e[1][0])?void 0:r.node.computed;if(1===e[0].length){let r=e[0][0].node;return"ThisExpression"===r.type||"Identifier"===r.type&&(h(r.name)||i&&function(e){return e.length<=t.tabWidth}(r.name)||n)}let s=Yae(!1,e[0],-1).node;return hue(s)&&"Identifier"===s.property.type&&(h(s.property.name)||n)}(l);function m(e){let t=e.map((e=>e.printed));return e.length>0&&Yae(!1,e,-1).needsParens?["(",...t,")"]:t}let y=l.map(m),g=y,b=f?3:2,v=l.flat(),x=v.slice(1,-1).some((e=>Kue(e.node,Vue.Leading)))||v.slice(0,-1).some((e=>Kue(e.node,Vue.Trailing)))||l[b]&&Kue(l[b][0].node,Vue.Leading);if(l.length<=b&&!x)return xue(e)?g:Oae(g);let E,S=Yae(!1,l[f?1:0],-1).node,D=!due(S)&&a(S),T=[m(l[0]),f?l.slice(1,2).map(m):"",D?Wae:"",function(e){return 0===e.length?"":_ae(Oae([Wae,Xae(Wae,e.map(m))]))}(l.slice(f?2:1))],A=s.map((({node:e})=>e)).filter(due);return E=x||A.length>2&&A.some((e=>!e.arguments.every((e=>Sue(e)))))||y.slice(0,-1).some(roe)||function(){let e=Yae(!1,Yae(!1,l,-1),-1).node,t=Yae(!1,y,-1);return due(e)&&roe(t)&&A.slice(0,-1).some((e=>e.arguments.some(eue)))}()?Oae(T):[roe(g)||D?Vae:"",Lae([g,T])],Gae({memberChain:!0},E)};function Vce(e,t,r){var n;let{node:i,parent:s}=e,a="NewExpression"===i.type,o="ImportExpression"===i.type,u=Ape(e),l=Mue(i),c=1===l.length&&bue(l[0],t.originalText);if(c||l.length>0&&!a&&!o&&(function(e,t){if("Identifier"!==e.callee.type)return!1;if("require"===e.callee.name)return!0;if("define"===e.callee.name){let r=Mue(e);return"ExpressionStatement"===t.type&&(1===r.length||2===r.length&&"ArrayExpression"===r[0].type||3===r.length&&Yoe(r[0])&&"ArrayExpression"===r[1].type)}return!1}(i,s)||pue(i,s))){let i=[];if(jue(e,(()=>{i.push(r())})),!c||null==(n=i[0].label)||!n.embed)return[a?"new ":"",r("callee"),u,Ipe(e,t,r),"(",Xae(", ",i),")"]}if(!o&&!a&&oue(i.callee)&&!e.call((e=>tle(e,t)),"callee"))return Uce(e,t,r);let p=[a?"new ":"",o?"import":r("callee"),u,Ipe(e,t,r),Rce(e,t,r)];return o||due(i.callee)?Oae(p):p}var zce=function(e,t,r){let n='"'===t?"'":'"',i=rle(!1,e,/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.test(i)?i:"\\"+i)));return t+i+t};var Kce=function(e,t){let r=e.slice(1,-1),n="json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":dle(r,t.singleQuote);return zce(r,n,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))};var qce=function(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(?=\d)/,"$1$2").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")};function Wce(e){return e.toLowerCase()}function Jce({pattern:e,flags:t}){return`/${e}/${t=[...t].sort().join("")}`}function Hce(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}var Xce=Loe(["Literal","BigIntLiteral","BooleanLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]);function Gce(e,t,r,n,i,s){let a=function(e,t,r,n,i){let{node:s}=e,a=s[i];if(!a)return"only-left";let o=!Yce(a);if(e.match(Yce,Qce,(e=>!o||"ExpressionStatement"!==e.type&&"VariableDeclaration"!==e.type)))return o?"ArrowFunctionExpression"===a.type&&"ArrowFunctionExpression"===a.body.type?"chain-tail-arrow-chain":"chain-tail":"chain";if(!o&&Yce(a.right)||fue(t.originalText,a))return"break-after-operator";if("CallExpression"===a.type&&"require"===a.callee.name||"json5"===t.parser||"json"===t.parser)return"never-break-after-operator";if(function(e){if(Qce(e)){let t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>{var t;return Hue(e)&&(!e.shorthand||"AssignmentPattern"===(null==(t=e.value)?void 0:t.type))}))}return!1}(s)||function(e){let t=function(e){var t;if(Zce(e))return null==(t=e.typeParameters)?void 0:t.params}(e);if(coe(t)){let r="TSTypeAliasDeclaration"===e.type?"constraint":"bound";if(t.length>1&&t.some((e=>e[r]||e.default)))return!0}return!1}(s)||function(e){if("VariableDeclarator"!==e.type)return!1;let{typeAnnotation:t}=e.id;if(!t||!t.typeAnnotation)return!1;let r=rpe(t.typeAnnotation);return coe(r)&&r.length>1&&r.some((e=>coe(rpe(e))||"TSConditionalType"===e.type))}(s)||epe(s)&&function(e){return eoe(e,uoe,!1)}(n))return"break-lhs";let u=function(e,t,r){if(!Hue(e))return!1;t=aoe(t);let n=3;return"string"==typeof t&&Poe(t)<r.tabWidth+n}(s,n,t);return e.call((()=>function(e,t,r,n){let i=e.node;if(aue(i)&&!kce(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{let{test:e}=i;return aue(e)&&!kce(e)}case"ClassExpression":return coe(i.decorators)}if(n)return!1;let s=i,a=[];for(;;)if("UnaryExpression"===s.type)s=s.argument,a.push("argument");else{if("TSNonNullExpression"!==s.type)break;s=s.expression,a.push("expression")}return!(!Yoe(s)&&!e.call((()=>npe(e,t,r)),...a))}(e,t,r,u)),i)?"break-after-operator":u||"TemplateLiteral"===a.type||"TaggedTemplateExpression"===a.type||"BooleanLiteral"===a.type||Xoe(a)||"ClassExpression"===a.type?"never-break-after-operator":"fluid"}(e,t,r,n,s),o=s?r(s,{assignmentLayout:a}):"";switch(a){case"break-after-operator":return Oae([Oae(n),i,Oae(_ae([Kae,o]))]);case"never-break-after-operator":return Oae([Oae(n),i," ",o]);case"fluid":{let e=Symbol("assignment");return Oae([Oae(n),i,Oae(_ae(Kae),{id:e}),Uae,Rae(o,{groupId:e})])}case"break-lhs":return Oae([n,i," ",Oae(o)]);case"chain":return[Oae(n),i,Kae,o];case"chain-tail":return[Oae(n),i,_ae([Kae,o])];case"chain-tail-arrow-chain":return[Oae(n),i,o];case"only-left":return n}}function Yce(e){return"AssignmentExpression"===e.type}function Qce(e){return Yce(e)||"VariableDeclarator"===e.type}var Zce=Loe(["TSTypeAliasDeclaration","TypeAlias"]);function epe(e){var t;return"VariableDeclarator"===e.type&&"ArrowFunctionExpression"===(null==(t=e.init)?void 0:t.type)}var tpe=Loe(["TSTypeReference","GenericTypeAnnotation"]);function rpe(e){var t;if(tpe(e))return null==(t=e.typeParameters)?void 0:t.params}function npe(e,t,r,n=!1){var i;let{node:s}=e,a=()=>npe(e,t,r,!0);if("ChainExpression"===s.type||"TSNonNullExpression"===s.type)return e.call(a,"expression");if(due(s)){if(null!=(i=Vce(e,t,r).label)&&i.memberChain)return!1;let n=Mue(s);return!(!(0===n.length||1===n.length&&function(e,{printWidth:t}){if(Kue(e))return!1;let r=t*ipe;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=r||Goe(e)&&!Kue(e.argument))return!0;let n="Literal"===e.type&&"regex"in e&&e.regex.pattern||"RegExpLiteral"===e.type&&e.pattern;return n?n.length<=r:Yoe(e)?Due(e).length<=r:"TemplateLiteral"===e.type?0===e.expressions.length&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes("\n"):Xce(e)}(n[0],t))||function(e,t){let r=function(e){var t;return null==(t=e.typeParameters??e.typeArguments)?void 0:t.params}(e);if(coe(r)){if(r.length>1)return!0;if(1===r.length){let e=r[0];if("TSUnionType"===e.type||"UnionTypeAnnotation"===e.type||"TSIntersectionType"===e.type||"IntersectionTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"ObjectTypeAnnotation"===e.type)return!0}if(roe(t(e.typeParameters?"typeParameters":"typeArguments")))return!0}return!1}(s,r))&&e.call(a,"callee")}return hue(s)?e.call(a,"object"):n&&("Identifier"===s.type||"ThisExpression"===s.type)}var ipe=.25;function spe(e,t,r,n,i){let s=e.node,a=Bue(s),o=i?Ipe(e,r,t):"";if(0===a.length)return[o,"(",ale(e,r,{filter:e=>")"===gle(r.originalText,koe(e))}),")"];let{parent:u}=e,l=pue(u),c=ape(s),p=[];if(function(e,t){let{node:r}=e,n=0,i=e=>t(e,n++);r.this&&e.call(i,"this"),Array.isArray(r.parameters)?e.each(i,"parameters"):Array.isArray(r.params)&&e.each(i,"params"),r.rest&&e.call(i,"rest")}(e,((e,n)=>{let i=n===a.length-1;i&&s.rest&&p.push("..."),p.push(t()),!i&&(p.push(","),l||c?p.push(" "):Wue(a[n],r)?p.push(Wae,Wae):p.push(Kae))})),n&&!function(e){return e.match((e=>"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type),((e,t)=>{if("CallExpression"===e.type&&"arguments"===t&&1===e.arguments.length&&"CallExpression"===e.callee.type){let t=e.callee.callee;return"Identifier"===t.type||"MemberExpression"===t.type&&!t.computed&&"Identifier"===t.object.type&&"Identifier"===t.property.type}return!1}),((e,t)=>"VariableDeclarator"===e.type&&"init"===t||"ExportDefaultDeclaration"===e.type&&"declaration"===t||"TSExportAssignment"===e.type&&"expression"===t||"AssignmentExpression"===e.type&&"right"===t&&"MemberExpression"===e.left.type&&"Identifier"===e.left.object.type&&"module"===e.left.object.name&&"Identifier"===e.left.property.type&&"exports"===e.left.property.name),(e=>"VariableDeclaration"!==e.type||"const"===e.kind&&1===e.declarations.length))}(e)){if(roe(o)||roe(p))throw new Ice;return Oae([soe(o),"(",soe(p),")"])}let d=a.every((e=>!coe(e.decorators)));return c&&d||l?[o,"(",...p,")"]:(sue(u)||function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||Foe(e,e.typeAnnotation))}(u)||"TypeAlias"===u.type||"UnionTypeAnnotation"===u.type||"TSUnionType"===u.type||"IntersectionTypeAnnotation"===u.type||"FunctionTypeAnnotation"===u.type&&u.returnType===s)&&1===a.length&&null===a[0].name&&s.this!==a[0]&&a[0].typeAnnotation&&null===s.typeParameters&&lue(a[0].typeAnnotation)&&!s.rest?"always"===r.arrowParens?["(",...p,")"]:p:[o,"(",_ae([qae,...p]),jae(!Nue(s)&&Aue(r,"all")?",":""),qae,")"]}function ape(e){if(!e)return!1;let t=Bue(e);if(1!==t.length)return!1;let[r]=t;return!Kue(r)&&("ObjectPattern"===r.type||"ArrayPattern"===r.type||"Identifier"===r.type&&r.typeAnnotation&&("TypeAnnotation"===r.typeAnnotation.type||"TSTypeAnnotation"===r.typeAnnotation.type)&&Zoe(r.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===r.type&&Zoe(r.typeAnnotation)&&r!==e.rest||"AssignmentPattern"===r.type&&("ObjectPattern"===r.left.type||"ArrayPattern"===r.left.type)&&("Identifier"===r.right.type||Hoe(r.right)&&0===r.right.properties.length||Joe(r.right)&&0===r.right.elements.length))}function ope(e,t){var r;let n=function(e){let t;return e.returnType?(t=e.returnType,t.typeAnnotation&&(t=t.typeAnnotation)):e.typeAnnotation&&(t=e.typeAnnotation),t}(e);if(!n)return!1;let i=null==(r=e.typeParameters)?void 0:r.params;if(i){if(i.length>1)return!1;if(1===i.length){let e=i[0];if(e.constraint||e.default)return!1}}return 1===Bue(e).length&&(Zoe(n)||roe(t))}function upe(e){if(lue(e)||Zoe(e))return!0;if("UnionTypeAnnotation"===e.type||"TSUnionType"===e.type){let t=e.types.filter((e=>"VoidTypeAnnotation"===e.type||"TSVoidKeyword"===e.type||"NullLiteralTypeAnnotation"===e.type||"TSNullKeyword"===e.type)).length,r=e.types.some((e=>"ObjectTypeAnnotation"===e.type||"TSTypeLiteral"===e.type||"GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)),n=e.types.some((e=>Kue(e)));if(e.types.length-1===t&&r&&!n)return!0}return!1}function lpe(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[wpe(e)];return s.push("type ",r("id"),r("typeParameters")),[Gce(e,t,r,s," =","TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right"),n]}function cpe(e,t,r){let n=!1;return Oae(e.map((({isFirst:e,previous:t,node:i,index:s})=>{let a=r();if(e)return a;let o=Zoe(i),u=Zoe(t);return u&&o?[" & ",n?_ae(a):a]:u||o?(s>1&&(n=!0),[" & ",s>1?_ae(a):a]):_ae([" &",Kae,a])}),"types"))}function ppe(e,t,r){let{node:n}=e,{parent:i}=e,s=!("TypeParameterInstantiation"===i.type||"TSTypeParameterInstantiation"===i.type||"GenericTypeAnnotation"===i.type||"TSTypeReference"===i.type||"TSTypeAssertion"===i.type||"TupleTypeAnnotation"===i.type||"TSTupleType"===i.type||"FunctionTypeParam"===i.type&&!i.name&&e.grandparent.this!==i||("TypeAlias"===i.type||"VariableDeclarator"===i.type||"TSTypeAliasDeclaration"===i.type)&&fue(t.originalText,n)),a=upe(n),o=e.map((e=>{let n=r();return a||(n=Nae(2,n)),ule(e,n,t)}),"types");if(a)return Xae(" | ",o);let u=[jae([s&&!fue(t.originalText,n)?Kae:"","| "]),Xae([Kae,"| "],o)];return tle(e,t)?Oae([_ae(u),qae]):("TupleTypeAnnotation"===i.type||"TSTupleType"===i.type)&&i["TupleTypeAnnotation"===i.type&&i.types?"types":"elementTypes"].length>1?Oae([_ae([jae(["(",qae]),u]),qae,jae(")")]):Oae(s?_ae(u):u)}function dpe(e,t,r){let{node:n}=e,i=[Fpe(e)];("TSConstructorType"===n.type||"TSConstructSignatureDeclaration"===n.type)&&i.push("new ");let s=spe(e,r,t,!1,!0),a=[];return"FunctionTypeAnnotation"===n.type?a.push(function(e){var t;let{node:r,parent:n}=e;return"FunctionTypeAnnotation"===r.type&&(sue(n)||!(("ObjectTypeProperty"===n.type||"ObjectTypeInternalSlot"===n.type)&&!n.variance&&!n.optional&&Foe(n,r)||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===(null==(t=e.getParentNode(2))?void 0:t.type)))}(e)?" => ":": ",r("returnType")):a.push(vpe(e,r,n.returnType?"returnType":"typeAnnotation")),ope(n,a)&&(s=Oae(s)),i.push(s,a),Oae(i)}function hpe(e,t,r){return[r("objectType"),Ape(e),"[",r("indexType"),"]"]}function fpe(e,t,r){return["infer ",r("typeParameter")]}function mpe(e,t,r){let{node:n}=e;return[n.postfix?"":r,vpe(e,t),n.postfix?r:""]}function ype(e,t,r){let{node:n}=e;return["...",..."TupleTypeSpreadElement"===n.type&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function gpe(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var bpe=new WeakSet;function vpe(e,t,r="typeAnnotation"){let{node:{[r]:n}}=e;if(!n)return"";let i=!1;if("TSTypeAnnotation"===n.type||"TypeAnnotation"===n.type){let t=e.call(xpe,r);("=>"===t||":"===t&&Kue(n,Vue.Leading))&&(i=!0),bpe.add(n)}return i?[" ",t(r)]:t(r)}var xpe=e=>e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>!("returnType"!==t&&"typeAnnotation"!==t||"TSFunctionType"!==e.type&&"TSConstructorType"!==e.type)))?"=>":e.match((e=>"TSTypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&("TSJSDocNullableType"===e.type||"TSJSDocNonNullableType"===e.type||"TSTypePredicate"===e.type)))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"typeAnnotation"===t&&"Identifier"===e.type),((e,t)=>"id"===t&&"DeclareFunction"===e.type))||e.match((e=>"TypeAnnotation"===e.type),((e,t)=>"bound"===t&&"TypeParameter"===e.type&&e.usesExtendsBound))?"":":";function Epe(e,t,r){let n=xpe(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function Spe(e){return[e("elementType"),"[]"]}function Dpe({node:e},t){return["typeof ",..."TSTypeQuery"===e.type?[t("exprName"),t("typeParameters")]:[t("argument")]]}function Tpe(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",vpe(e,t)]:""]}function Ape(e){let{node:t}=e;return!t.optional||"Identifier"===t.type&&t===e.parent.key?"":due(t)||hue(t)&&t.computed||"OptionalIndexedAccessType"===t.type?"?.":"?"}function Cpe(e){return e.node.definite||e.match(void 0,((e,t)=>"id"===t&&"VariableDeclarator"===e.type&&e.definite))?"!":""}var Ppe=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function wpe(e){let{node:t}=e;return t.declare||Ppe.has(t.type)&&"DeclareExportDeclaration"!==e.parent.type?"declare ":""}var kpe=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Fpe({node:e}){return e.abstract||kpe.has(e.type)?"abstract ":""}function Ipe(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function _pe(e,t,r){return["::",r("callee")]}function Npe(e,t,r){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||r?[" ",t]:_ae([Kae,t])}function Ope(e,t){return["...",t("argument"),vpe(e,t)]}function Bpe(e){return e.accessibility?e.accessibility+" ":""}function Lpe(e,t,r){let{node:n}=e;return Oae([Xae(Kae,e.map(r,"decorators")),jpe(n,t)?Wae:Kae])}function Mpe(e,t,r){return Rpe(e.node)?[Xae(Wae,e.map(r,"declaration","decorators")),Wae]:""}function jpe(e,t){return e.decorators.some((e=>Eoe(t.originalText,koe(e))))}function Rpe(e){var t;if("ExportDefaultDeclaration"!==e.type&&"ExportNamedDeclaration"!==e.type&&"DeclareExportDeclaration"!==e.type)return!1;let r=null==(t=e.declaration)?void 0:t.decorators;return coe(r)&&Foe(e,r[0])}var $pe=e=>"ExportDefaultDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&e.default;function Upe(e,t,r){let{node:n}=e,i=[Mpe(e,0,r),wpe(e),"export",$pe(n)?" default":""],{declaration:s,exported:a}=n;return Kue(n,Vue.Dangling)&&(i.push(" ",ale(e,t)),vue(n)&&i.push(Wae)),s?i.push(" ",r("declaration")):(i.push(function(e){return zpe(e.exportKind)}(n)),"ExportAllDeclaration"===n.type||"DeclareExportAllDeclaration"===n.type?(i.push(" *"),a&&i.push(" as ",r("exported"))):i.push(Wpe(e,t,r)),i.push(qpe(e,t,r),Hpe(e,t,r))),i.push(function(e,t){return t.semi&&(!e.declaration||$pe(e)&&!Vpe(e.declaration))?";":""}(n,t)),i}var Vpe=Loe(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function zpe(e,t=!0){return e&&"value"!==e?`${t?" ":""}${e}${t?"":" "}`:""}function Kpe(e,t){return zpe(e.importKind,t)}function qpe(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return Jpe(n,t)||i.push(" from"),i.push(" ",r("source")),i}function Wpe(e,t,r){let{node:n}=e;if(Jpe(n,t))return"";let i=[" "];if(coe(n.specifiers)){let s=[],a=[];e.each((()=>{let t=e.node.type;if("ExportNamespaceSpecifier"===t||"ExportDefaultSpecifier"===t||"ImportNamespaceSpecifier"===t||"ImportDefaultSpecifier"===t)s.push(r());else{if("ExportSpecifier"!==t&&"ImportSpecifier"!==t)throw new cle(n,"specifier");a.push(r())}}),"specifiers"),i.push(Xae(", ",s)),a.length>0&&(s.length>0&&i.push(", "),a.length>1||s.length>0||n.specifiers.some((e=>Kue(e)))?i.push(Oae(["{",_ae([t.bracketSpacing?Kae:qae,Xae([",",Kae],a)]),jae(Aue(t)?",":""),t.bracketSpacing?Kae:qae,"}"])):i.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function Jpe(e,t){let{type:r,importKind:n,source:i,specifiers:s}=e;return"ImportDeclaration"===r&&!coe(s)&&"type"!==n&&!/{\s*}/.test(t.originalText.slice(woe(e),woe(i)))}function Hpe(e,t,r){var n;let{node:i}=e,s=coe(i.attributes)?"attributes":coe(i.assertions)?"assertions":void 0;return s?[` ${"assertions"===s||null!=(n=i.extra)&&n.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",Xae(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Xpe(e,t,r){let{node:n}=e,{type:i}=n,s=i.startsWith("Import"),a=s?"imported":"local",o=s?"local":"exported",u=n[a],l=n[o],c="",p="";return"ExportNamespaceSpecifier"===i||"ImportNamespaceSpecifier"===i?c="*":u&&(c=r(a)),l&&!function(e){if("ImportSpecifier"!==e.type&&"ExportSpecifier"!==e.type)return!1;let{local:t,["ImportSpecifier"===e.type?"imported":"exported"]:r}=e;if(t.type!==r.type||!Ioe(t,r))return!1;if(Yoe(t))return t.value===r.value&&Due(t)===Due(r);if("Identifier"===t.type)return t.name===r.name;return!1}(n)&&(p=r(o)),[zpe("ImportSpecifier"===i?n.importKind:n.exportKind,!1),c,c&&p?" as ":"",p]}function Gpe(e,t,r){let{node:n}=e,i="ConditionalExpression"===n.type,s=i?"alternate":"falseType",{parent:a}=e,o=i?r("test"):[r("checkType")," ","extends"," ",r("extendsType")];return a.type===n.type&&a[s]===n?Nae(2,o):o}var Ype=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function Qpe(e,t,r){let n,i,{node:s}=e,a="ConditionalExpression"===s.type,o=a?"consequent":"trueType",u=a?"alternate":"falseType",l=a?["test"]:["checkType","extendsType"],c=s[o],p=s[u],d=[],h=!1,{parent:f}=e,m=f.type===s.type&&l.some((e=>f[e]===s)),y=f.type===s.type&&!m,g=0;do{i=n||s,n=e.getParentNode(g),g++}while(n&&n.type===s.type&&l.every((e=>n[e]!==i)));let b=n||f,v=i;if(a&&(rue(s[l[0]])||rue(c)||rue(p)||function(e){let t=[e];for(let e=0;e<t.length;e++){let r=t[e];for(let e of["test","consequent","alternate"]){let n=r[e];if(rue(n))return!0;"ConditionalExpression"===n.type&&t.push(n)}}return!1}(v))){h=!0,y=!0;let e=e=>[jae("("),_ae([qae,e]),qae,jae(")")],t=e=>"NullLiteral"===e.type||"Literal"===e.type&&null===e.value||"Identifier"===e.type&&"undefined"===e.name;d.push(" ? ",t(c)?r(o):e(r(o))," : ",p.type===s.type||t(p)?r(u):e(r(u)))}else{let e=[Kae,"? ",c.type===s.type?jae("","("):"",Nae(2,r(o)),c.type===s.type?jae("",")"):"",Kae,": ",p.type===s.type?r(u):Nae(2,r(u))];d.push(f.type!==s.type||f[u]===s||m?e:t.useTabs?function(e){return Nae(-1,e)}(_ae(e)):Nae(Math.max(0,t.tabWidth-2),e))}let x=[o,u,...l].some((e=>Kue(s[e],(e=>Moe(e)&&ble(t.originalText,woe(e),koe(e)))))),E=!h&&(hue(f)||"NGPipeExpression"===f.type&&f.left===s)&&!f.computed,S=function(e){let{node:t}=e;if("ConditionalExpression"!==t.type)return!1;let r,n=t;for(let t=0;!r;t++){let i=e.getParentNode(t);"ChainExpression"===i.type&&i.expression===n||due(i)&&i.callee===n||hue(i)&&i.object===n||"TSNonNullExpression"===i.type&&i.expression===n?n=i:"NewExpression"===i.type&&i.callee===n||Gue(i)&&i.expression===n?(r=e.getParentNode(t+1),n=i):r=i}return n!==t&&r[Ype.get(r.type)]===n}(e),D=(e=>f===b?Oae(e,{shouldBreak:x}):x?[e,Vae]:e)([Gpe(e,0,r),y?d:_ae(d),a&&E&&!S?qae:""]);return m||S?Oae([_ae([qae,D]),qae]):D}var Zpe=function(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n};var ede=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:Zpe(e.slice(r+1).match(/^[\t ]*/)[0],t)};var tde=Symbol("MODE_BREAK"),rde=Symbol("MODE_FLAT"),nde=Symbol("cursor");function ide(e,t){return ade(e,{type:"indent"},t)}function sde(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?ade(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:ade(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function ade(e,t,r){let n="dedent"===t.type?e.queue.slice(0,-1):[...e.queue,t],i="",s=0,a=0,o=0;for(let e of n)switch(e.type){case"indent":c(),r.useTabs?u(1):l(r.tabWidth);break;case"stringAlign":c(),i+=e.n,s+=e.n.length;break;case"numberAlign":a+=1,o+=e.n;break;default:throw new Error(`Unexpected type '${e.type}'`)}return p(),{...e,value:i,length:s,queue:n};function u(e){i+="\t".repeat(e),s+=r.tabWidth*e}function l(e){i+=" ".repeat(e),s+=e}function c(){r.useTabs?(a>0&&u(a),d()):p()}function p(){o>0&&l(o),d()}function d(){a=0,o=0}}function ode(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==nde)for(let r=i.length-1;r>=0;r--){let s=i[r];if(" "!==s&&"\t"!==s){e[n]=i.slice(0,r+1);break e}t++}else r++}if(t>0||r>0)for(e.length=n+1;r-- >0;)e.push(nde);return t}function ude(e,t,r,n,i,s){if(r===Number.POSITIVE_INFINITY)return!0;let a=t.length,o=[e],u=[];for(;r>=0;){if(0===o.length){if(0===a)return!0;o.push(t[--a]);continue}let{mode:e,doc:l}=o.pop();switch(Cae(l)){case cae:u.push(l),r-=Poe(l);break;case pae:case gae:{let t=Qae(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case hae:case fae:case vae:case Dae:o.push({mode:e,doc:l.contents});break;case mae:r+=ode(u);break;case yae:{if(s&&l.break)return!1;let t=l.break?tde:e,r=l.expandedStates&&t===tde?Yae(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case bae:{let t=(l.groupId?i[l.groupId]||rde:e)===tde?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case Sae:if(e===tde||l.hard)return!0;l.soft||(u.push(" "),r--);break;case xae:n=!0;break;case Eae:if(n)return!1}}return!1}function lde(e,t){let r={},n=t.printWidth,i=function(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:tde,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];Fae(e,(function(e){if(e.type===Tae&&noe(r),e.type===yae){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===yae&&r.pop().break&&noe(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(Cae(d)){case cae:{let e="\n"!==i?rle(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=Poe(e));break}case pae:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case dae:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(nde),c++;break;case hae:a.push({ind:ide(e,t),mode:p,doc:d.contents});break;case fae:a.push({ind:sde(e,d.n,t),mode:p,doc:d.contents});break;case mae:s-=ode(o);break;case yae:switch(p){case rde:if(!u){a.push({ind:e,mode:d.break?tde:rde,doc:d.contents});break}case tde:{u=!1;let t={ind:e,mode:rde,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&ude(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=Yae(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:tde,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:tde,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:rde,doc:t};if(ude(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:tde,doc:d.contents});break}}d.id&&(r[d.id]=Yae(!1,a,-1).mode);break;case gae:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:rde,doc:o},h={ind:e,mode:tde,doc:o},f=ude(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:rde,doc:u},y={ind:e,mode:tde,doc:u};if(2===i.length){f?a.push(m,c):a.push(y,h);break}i.splice(0,2);let g={ind:e,mode:p,doc:Mae(i)},b=i[0];ude({ind:e,mode:rde,doc:[o,u,b]},[],t,l.length>0,r,!0)?a.push(g,m,c):f?a.push(g,y,c):a.push(g,y,h);break}case bae:case vae:{let t=d.groupId?r[d.groupId]:p;if(t===tde){let t=d.type===bae?d.breakContents:d.negate?d.contents:_ae(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===rde){let t=d.type===bae?d.flatContents:d.negate?_ae(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case xae:l.push({ind:e,mode:p,doc:d.contents});break;case Eae:l.length>0&&a.push({ind:e,mode:p,doc:zae});break;case Sae:switch(p){case rde:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case tde:if(l.length>0){a.push({ind:e,mode:p,doc:d},...l.reverse()),l.length=0;break}d.literal?e.root?(o.push(i,e.root.value),s=e.root.length):(o.push(i),s=0):(s-=ode(o),o.push(i+e.value),s=e.length)}break;case Dae:a.push({ind:e,mode:p,doc:d.contents});break;case Tae:break;default:throw new wae(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(nde);if(-1!==p){let e=o.indexOf(nde,p+1),t=o.slice(0,p).join(""),r=o.slice(p+1,e).join("");return{formatted:t+r+o.slice(e+1).join(""),cursorNodeStart:t.length,cursorNodeText:r}}return{formatted:o.join("")}}function cde(e,t,r){let{node:n}=e;if("TemplateLiteral"===n.type&&function({node:e,parent:t}){let r=/^[fx]?(?:describe|it|test)$/;return"TaggedTemplateExpression"===t.type&&t.quasi===e&&"MemberExpression"===t.tag.type&&"Identifier"===t.tag.property.type&&"each"===t.tag.property.name&&("Identifier"===t.tag.object.type&&r.test(t.tag.object.name)||"MemberExpression"===t.tag.object.type&&"Identifier"===t.tag.object.property.type&&("only"===t.tag.object.property.name||"skip"===t.tag.object.property.name)&&"Identifier"===t.tag.object.object.type&&r.test(t.tag.object.object.name))}(e)){let n=function(e,t,r){let{node:n}=e,i=n.quasis[0].value.raw.trim().split(/\s*\|\s*/);if(i.length>1||i.some((e=>e.length>0))){t.__inJestEach=!0;let s=e.map(r,"expressions");t.__inJestEach=!1;let a=[],o=s.map((e=>"${"+lde(e,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}")),u=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<n.quasis.length;e++){let t=Yae(!1,u,-1),r=o[e-1];t.cells.push(r),r.includes("\n")&&(t.hasLineBreak=!0),n.quasis[e].value.raw.includes("\n")&&u.push({hasLineBreak:!1,cells:[]})}let l=Math.max(i.length,...u.map((e=>e.cells.length))),c=Array.from({length:l}).fill(0),p=[{cells:i},...u.filter((e=>e.cells.length>0))];for(let{cells:e}of p.filter((e=>!e.hasLineBreak)))for(let[t,r]of e.entries())c[t]=Math.max(c[t],Poe(r));return a.push(Uae,"`",_ae([Wae,Xae(Wae,p.map((e=>Xae(" | ",e.cells.map(((t,r)=>e.hasLineBreak?t:t+" ".repeat(c[r]-Poe(t))))))))]),Wae,"`"),a}}(e,r,t);if(n)return n}let i="expressions";"TSTemplateLiteralType"===n.type&&(i="types");let s=[],a=e.map(t,i),o=function(e){let t="expressions";"TSTemplateLiteralType"===e.type&&(t="types");let r=e[t];return 0!==r.length&&r.every((e=>{if(Kue(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("ChainExpression"===e.type&&(e=e.expression),hue(e)){let t=e;for(;hue(t);)if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type||(t=t.object,Kue(t)))return!1;return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))}(n);o&&(a=a.map((e=>lde(e,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted))),s.push(Uae,"`");let u=0;return e.each((({index:e,node:l})=>{if(s.push(t()),l.tail)return;let{tabWidth:c}=r,p=l.value.raw,d=p.includes("\n")?ede(p,c):u;u=d;let h=a[e];if(!o){let t=n[i][e];(Kue(t)||hue(t)||"ConditionalExpression"===t.type||"SequenceExpression"===t.type||Gue(t)||aue(t))&&(h=[_ae([qae,h]),qae])}let f=0===d&&p.endsWith("\n")?Nae(Number.NEGATIVE_INFINITY,h):function(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=_ae(n);n=Nae(t%r,n),n=Nae(Number.NEGATIVE_INFINITY,n)}return n}(h,d,c);s.push(Oae(["${",f,Uae,"}"]))}),"quasis"),s.push("`"),s}function pde(e,t){return e.map((e=>function(e,t){let{node:r}=e,n=t();return Kue(r)&&(n=Oae([_ae([qae,n]),qae])),["${",n,Uae,"}"]}(e,t)),"expressions")}function dde(e,t){return Zae(e,(e=>"string"==typeof e?t?rle(!1,e,/(\\*)`/g,"$1$1\\`"):hde(e):e))}function hde(e){return rle(!1,e,/([\\`]|\${)/g,"\\$1")}var fde=function(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}};function mde(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function yde(e,t){return"+"===e||"-"===e?e+t:t}var gde=fde("typeParameters");function bde(e,t,r,n){let{node:i}=e;if(!i[n])return"";if(!Array.isArray(i[n]))return r(n);let s=e.getNode(2),a=s&&pue(s),o=e.match((e=>!(1===e[n].length&&Zoe(e[n][0]))),void 0,((e,t)=>"typeAnnotation"===t),(e=>"Identifier"===e.type),epe);if(0===i[n].length||!o&&(a||1===i[n].length&&("NullableTypeAnnotation"===i[n][0].type||upe(i[n][0]))))return["<",Xae(", ",e.map(r,n)),vde(e,t),">"];let u="TSTypeParameterInstantiation"===i.type?"":function(e,t,r){let{node:n}=e;return 1===Bue(n).length&&n.type.startsWith("TS")&&!n[r][0].constraint&&"ArrowFunctionExpression"===e.parent.type&&!(t.filepath&&/\.ts$/.test(t.filepath))}(e,t,n)?",":Aue(t)?jae(","):"";return Oae(["<",_ae([qae,Xae([",",Kae],e.map(r,n))]),u,qae,">"],{id:gde(i)})}function vde(e,t){let{node:r}=e;if(!Kue(r,Vue.Dangling))return"";let n=!Kue(r,Vue.Line),i=ale(e,t,{indent:!n});return n?i:[i,Wae]}function xde(e,t,r){let{node:n,parent:i}=e,s=["TSTypeParameter"===n.type&&n.const?"const ":""],a="TSTypeParameter"===n.type?r("name"):n.name;if("TSMappedType"===i.type)return i.readonly&&s.push(yde(i.readonly,"readonly")," "),s.push("[",a),n.constraint&&s.push(" in ",r("constraint")),i.nameType&&s.push(" as ",e.callParent((()=>r("nameType")))),s.push("]"),s;if(n.variance&&s.push(r("variance")),n.in&&s.push("in "),n.out&&s.push("out "),s.push(a),n.bound&&(n.usesExtendsBound&&s.push(" extends "),s.push(vpe(e,r,"bound"))),n.constraint){let e=Symbol("constraint");s.push(" extends",Oae(_ae(Kae),{id:e}),Uae,Rae(r("constraint"),{groupId:e}))}return n.default&&s.push(" = ",r("default")),Oae(s)}var Ede=()=>{};Ede.ok=Ede,Ede.strictEqual=Ede;var Sde=Ede,Dde=new WeakMap;function Tde(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if("consistent"===t.quoteProps&&!Dde.has(i)){let e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&Yoe(e.key)&&!mue(e,t)));Dde.set(i,e)}if(("Identifier"===s.type||Xoe(s)&&yue(qce(Due(s)))&&String(s.value)===qce(Due(s))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&Dde.get(i))){let r=Kce(JSON.stringify("Identifier"===s.type?s.name:s.value.toString()),t);return e.call((e=>ule(e,r,t)),"key")}return mue(n,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!Dde.get(i))?e.call((e=>ule(e,/^\d/.test(s.value)?qce(s.value):s.value,t)),"key"):r("key")}var Ade=e=>"FunctionExpression"===e.node.type&&"value"===e.key&&(e=>"ObjectMethod"===e.type||"ClassMethod"===e.type||"ClassPrivateMethod"===e.type||"MethodDefinition"===e.type||"TSAbstractMethodDefinition"===e.type||"TSDeclareMethod"===e.type||("Property"===e.type||"ObjectProperty"===e.type)&&(e.method||"get"===e.kind||"set"===e.kind))(e.parent);function Cde(e,t,r,n){if(Ade(e))return wde(e,r,t);let{node:i}=e,s=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&null!=n&&n.expandLastArg){let{parent:t}=e;due(t)&&(Mue(t).length>1||Bue(i).every((e=>"Identifier"===e.type&&!e.typeAnnotation)))&&(s=!0)}let a=[wpe(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],o=spe(e,t,r,s),u=Fde(e,t),l=ope(i,u);return a.push(Ipe(e,0,t),Oae([l?Oae(o):o,u]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&a.push(";"),a}function Pde(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,a=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?(Sde.ok("get"===i||"set"===i),a.push(i," ")):s.async&&a.push("async "),s.generator&&a.push("*"),a.push(Tde(e,t,r),n.optional||n.key.optional?"?":"",n===s?wde(e,t,r):r("value")),a}function wde(e,t,r){let{node:n}=e,i=spe(e,r,t),s=Fde(e,r),a=function(e){let t=Bue(e);return t.length>1&&t.some((e=>"TSParameterProperty"===e.type))}(n),o=ope(n,s),u=[Ipe(e,0,r),Oae([a?Oae(i,{shouldBreak:!0}):o?Oae(i):i,s])];return n.body?u.push(" ",r("body")):u.push(t.semi?";":""),u}function kde(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){let{node:t}=e;return function(e){let t=Bue(e);return!(1!==t.length||e.typeParameters||Kue(e,Vue.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||Kue(t[0])||t[0].optional||e.predicate||e.returnType)}(t)}return!1}function Fde(e,t){let{node:r}=e,n=[vpe(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function Ide(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let e=r("argument");!function(e,t){if(fue(e.originalText,t)||Kue(t,Vue.Leading,(t=>ble(e.originalText,woe(t),koe(t))))&&!rue(t))return!0;if(Voe(t)){let r,n=t;for(;r=zoe(n);)if(n=r,fue(e.originalText,n))return!0}return!1}(t,n.argument)?(aue(n.argument)||"SequenceExpression"===n.argument.type)&&(e=Oae([jae("("),_ae([qae,e]),qae,jae(")")])):e=["(",_ae([Wae,e]),Wae,")"],s.push(" ",e)}let a=Kue(n,Vue.Dangling),o=i&&a&&Kue(n,Vue.Last|Vue.Line);return o&&s.push(i),a&&s.push(" ",ale(e,t)),o||s.push(i),s}var _de=Loe(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Nde(e,t,r){let{node:n}=e,i=[wpe(e),Fpe(e),"class"],s=Kue(n.id,Vue.Trailing)||Kue(n.typeParameters,Vue.Trailing)||Kue(n.superClass)||coe(n.extends)||coe(n.mixins)||coe(n.implements),a=[],o=[];if(n.id&&a.push(" ",r("id")),a.push(r("typeParameters")),n.superClass){let n=[jde(e,t,r),r("superTypeParameters")],i=e.call((e=>["extends ",ule(e,n,t)]),"superClass");s?o.push(Kae,Oae(i)):o.push(" ",i)}else o.push(Mde(e,t,r,"extends"));if(o.push(Mde(e,t,r,"mixins"),Mde(e,t,r,"implements")),s){let e;e=Lde(n)?[...a,_ae(o)]:_ae([...a,o]),i.push(Oae(e,{id:Ode(n)}))}else i.push(...a,...o);return i.push(" ",r("body")),i}var Ode=fde("heritageGroup");function Bde(e){return jae(Wae,"",{groupId:Ode(e)})}function Lde(e){return e.typeParameters&&!Kue(e.typeParameters,Vue.Trailing|Vue.Line)&&!function(e){return["extends","mixins","implements"].reduce(((t,r)=>t+(Array.isArray(e[r])?e[r].length:0)),e.superClass?1:0)>1}(e)}function Mde(e,t,r,n){let{node:i}=e;if(!coe(i[n]))return"";let s=ale(e,t,{marker:n});return[Lde(i)?jae(" ",Kae,{groupId:gde(i.typeParameters)}):Kae,s,s&&Wae,n,Oae(_ae([Kae,Xae([",",Kae],e.map(r,n))]))]}function jde(e,t,r){let n=r("superClass"),{parent:i}=e;return"AssignmentExpression"===i.type?Oae(jae(["(",_ae([qae,n]),qae,")"],n)):n}function Rde(e,t,r){let{node:n}=e,i=[];return coe(n.decorators)&&i.push(Lpe(e,t,r)),i.push(Bpe(n)),n.static&&i.push("static "),i.push(Fpe(e)),n.override&&i.push("override "),i.push(Pde(e,t,r)),i}function $de(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";return coe(n.decorators)&&i.push(Lpe(e,t,r)),i.push(Bpe(n),wpe(e)),n.static&&i.push("static "),i.push(Fpe(e)),n.override&&i.push("override "),n.readonly&&i.push("readonly "),n.variance&&i.push(r("variance")),("ClassAccessorProperty"===n.type||"AccessorProperty"===n.type||"TSAbstractAccessorProperty"===n.type)&&i.push("accessor "),i.push(Tde(e,t,r),Ape(e),Cpe(e),vpe(e,r)),[Gce(e,t,r,i," =","TSAbstractPropertyDefinition"===n.type||"TSAbstractAccessorProperty"===n.type?void 0:"value"),s]}function Ude(e,t,r){let{node:n}=e,i=[];return e.each((({node:e,next:n,isLast:s})=>{i.push(r()),!t.semi&&_de(e)&&function(e,t){var r;let{type:n,name:i}=e.key;if(!(e.computed||"Identifier"!==n||"static"!==i&&"get"!==i&&"set"!==i||e.value||e.typeAnnotation))return!0;if(!t||t.static||t.accessibility)return!1;if(!t.computed){let e=null==(r=t.key)?void 0:r.name;if("in"===e||"instanceof"===e)return!0}if(_de(t)&&t.variance&&!t.static&&!t.declare)return!0;switch(t.type){case"ClassProperty":case"PropertyDefinition":case"TSAbstractPropertyDefinition":return t.computed;case"MethodDefinition":case"TSAbstractMethodDefinition":case"ClassMethod":case"ClassPrivateMethod":{if((t.value?t.value.async:t.async)||"get"===t.kind||"set"===t.kind)return!1;let e=t.value?t.value.generator:t.generator;return!(!t.computed&&!e)}case"TSIndexSignature":return!0}return!1}(e,n)&&i.push(";"),s||(i.push(Wae),Wue(e,t)&&i.push(Wae))}),"body"),Kue(n,Vue.Dangling)&&i.push(ale(e,t)),[coe(n.body)?Bde(e.parent):"","{",i.length>0?[_ae([Wae,i]),Wae]:"","}"]}function Vde(e,t,r){var n;let i=t.semi?";":"",{node:s}=e,a="ObjectTypeAnnotation"===s.type,o="TSEnumDeclaration"===s.type||"EnumBooleanBody"===s.type||"EnumNumberBody"===s.type||"EnumStringBody"===s.type||"EnumSymbolBody"===s.type,u=["TSTypeLiteral"===s.type||o?"members":"TSInterfaceBody"===s.type?"body":"properties"];a&&u.push("indexers","callProperties","internalSlots");let l=u.flatMap((t=>e.map((({node:e})=>({node:e,printed:r(),loc:woe(e)})),t)));u.length>1&&l.sort(((e,t)=>e.loc-t.loc));let{parent:c,key:p}=e,d=a&&"body"===p&&("InterfaceDeclaration"===c.type||"DeclareInterface"===c.type||"DeclareClass"===c.type),h="TSInterfaceBody"===s.type||o||d||"ObjectPattern"===s.type&&"FunctionDeclaration"!==c.type&&"FunctionExpression"!==c.type&&"ArrowFunctionExpression"!==c.type&&"ObjectMethod"!==c.type&&"ClassMethod"!==c.type&&"ClassPrivateMethod"!==c.type&&"AssignmentPattern"!==c.type&&"CatchClause"!==c.type&&s.properties.some((e=>e.value&&("ObjectPattern"===e.value.type||"ArrayPattern"===e.value.type)))||"ObjectPattern"!==s.type&&l.length>0&&ble(t.originalText,woe(s),l[0].loc),f=d?";":"TSInterfaceBody"===s.type||"TSTypeLiteral"===s.type?jae(i,";"):",",m="RecordExpression"===s.type?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",g=[],b=l.map((e=>{let r=[...g,Oae(e.printed)];return g=[f,Kae],("TSPropertySignature"===e.node.type||"TSMethodSignature"===e.node.type||"TSConstructSignatureDeclaration"===e.node.type||"TSCallSignatureDeclaration"===e.node.type)&&Kue(e.node,Vue.PrettierIgnore)&&g.shift(),Wue(e.node,t)&&g.push(Wae),r}));if(s.inexact||s.hasUnknownMembers){let r;if(Kue(s,Vue.Dangling)){let n=Kue(s,Vue.Line);r=[ale(e,t),n||Eoe(t.originalText,koe(Yae(!1,que(s),-1)))?Wae:Kae,"..."]}else r=["..."];b.push([...g,...r])}let v,x=null==(n=Yae(!1,l,-1))?void 0:n.node,E=!(s.inexact||s.hasUnknownMembers||x&&("RestElement"===x.type||("TSPropertySignature"===x.type||"TSCallSignatureDeclaration"===x.type||"TSMethodSignature"===x.type||"TSConstructSignatureDeclaration"===x.type)&&Kue(x,Vue.PrettierIgnore)));if(0===b.length){if(!Kue(s,Vue.Dangling))return[m,y,vpe(e,r)];v=Oae([m,ale(e,t,{indent:!0}),qae,y,Ape(e),vpe(e,r)])}else v=[d&&coe(s.properties)?Bde(c):"",m,_ae([t.bracketSpacing?Kae:qae,...b]),jae(E&&(","!==f||Aue(t))?f:""),t.bracketSpacing?Kae:qae,y,Ape(e),vpe(e,r)];return e.match((e=>"ObjectPattern"===e.type&&!coe(e.decorators)),zde)||Zoe(s)&&(e.match(void 0,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),zde)||e.match(void 0,((e,t)=>"FunctionTypeParam"===e.type&&"typeAnnotation"===t),zde))||!h&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?v:Oae(v,{shouldBreak:h})}function zde(e,t){return("params"===t||"parameters"===t||"this"===t||"rest"===t)&&ape(e)}var Kde=new WeakMap;function qde(e){return Kde.has(e)||Kde.set(e,"ConditionalExpression"===e.type&&!Cue(e,(e=>"ObjectExpression"===e.type))),Kde.get(e)}var Wde=e=>"SequenceExpression"===e.type;function Jde(e,t,r,n={}){let i,s,a=[],o=[],u=!1,l=!n.expandLastArg&&"ArrowFunctionExpression"===e.node.body.type;!function c(){let{node:p}=e,d=function(e,t,r,n){let{node:i}=e,s=[];if(i.async&&s.push("async "),kde(e,t))s.push(r(["params",0]));else{let i=n.expandLastArg||n.expandFirstArg,a=Fde(e,r);if(i){if(roe(a))throw new Ice;a=Oae(soe(a))}s.push(Oae([spe(e,r,t,i,!0),a]))}let a=ale(e,t,{filter(e){let r=yle(t.originalText,koe(e));return!1!==r&&"=>"===t.originalText.slice(r,r+2)}});return a&&s.push(" ",a),s}(e,t,r,n);if(0===a.length)a.push(d);else{let{leading:r,trailing:n}=ole(e,t);a.push([r,d]),o.unshift(n)}l&&(u||(u=p.returnType&&Bue(p).length>0||p.typeParameters||Bue(p).some((e=>"Identifier"!==e.type)))),l&&"ArrowFunctionExpression"===p.body.type?e.call(c,"body"):(i=r("body",n),s=p.body)}();let c,p=!fue(t.originalText,s)&&(Wde(s)||function(e,t,r){var n,i;return Joe(e)||Hoe(e)||"ArrowFunctionExpression"===e.type||"DoExpression"===e.type||"BlockStatement"===e.type||rue(e)||!1!==(null==(n=t.label)?void 0:n.hug)&&((null==(i=t.label)?void 0:i.embed)||bue(e,r.originalText))}(s,i,t)||!u&&qde(s)),d="callee"===e.key&&Jue(e.parent),h=Symbol("arrow-chain"),f=function(e,t,{signatureDocs:r,shouldBreak:n}){if(1===r.length)return r[0];let{parent:i,key:s}=e;return"callee"!==s&&Jue(i)||aue(i)?Oae([r[0]," =>",_ae([Kae,Xae([" =>",Kae],r.slice(1))])],{shouldBreak:n}):"callee"===s&&Jue(i)||t.assignmentLayout?Oae(Xae([" =>",Kae],r),{shouldBreak:n}):Oae(_ae(Xae([" =>",Kae],r)),{shouldBreak:n})}(e,n,{signatureDocs:a,shouldBreak:u}),m=!1;return l&&(d||n.assignmentLayout)&&(m=!0,c="chain-tail-arrow-chain"===n.assignmentLayout||d&&!p),i=function(e,t,r,{bodyDoc:n,bodyComments:i,functionBody:s,shouldPutBodyOnSameLine:a}){let{node:o,parent:u}=e,l=r.expandLastArg&&Aue(t,"all")?jae(","):"",c=!r.expandLastArg&&"JSXExpressionContainer"!==u.type||Kue(o)?"":qae;return a&&qde(s)?[" ",Oae([jae("","("),_ae([qae,n]),jae("",")"),l,c]),i]:(Wde(s)&&(n=Oae(["(",_ae([qae,n]),qae,")"])),a?[" ",n,i]:[_ae([Kae,n,i]),l,c])}(e,t,n,{bodyDoc:i,bodyComments:o,functionBody:s,shouldPutBodyOnSameLine:p}),Oae([Oae(m?_ae([qae,f]):f,{shouldBreak:c,id:h})," =>",l?Rae(i,{groupId:h}):Oae(i),l&&d?jae(qae,"",{groupId:h}):""])}function Hde(e,t,r,n){let{node:i}=e,s=[],a=function(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if("EmptyStatement"!==r.type)return r}}(i[n]);return e.each((({node:e})=>{"EmptyStatement"!==e.type&&(s.push(r()),e!==a&&(s.push(Wae),Wue(e,t)&&s.push(Wae)))}),n),s}function Xde(e,t,r){let{node:n}=e,i=[];"StaticBlock"===n.type&&i.push("static "),i.push("{");let s=Gde(e,t,r);if(s)i.push(_ae([Wae,s]),Wae);else{let{parent:t}=e,r=e.grandparent;"ArrowFunctionExpression"===t.type||"FunctionExpression"===t.type||"FunctionDeclaration"===t.type||"ObjectMethod"===t.type||"ClassMethod"===t.type||"ClassPrivateMethod"===t.type||"ForStatement"===t.type||"WhileStatement"===t.type||"DoWhileStatement"===t.type||"DoExpression"===t.type||"CatchClause"===t.type&&!r.finalizer||"TSModuleDeclaration"===t.type||"TSDeclareFunction"===t.type||"StaticBlock"===n.type||i.push(Wae)}return i.push("}"),i}function Gde(e,t,r){var n;let{node:i}=e,s=coe(i.directives),a=i.body.some((e=>"EmptyStatement"!==e.type)),o=Kue(i,Vue.Dangling);if(!s&&!a&&!o)return"";let u=[];return s&&(u.push(Hde(e,t,r,"directives")),(a||o)&&(u.push(Wae),Wue(Yae(!1,i.directives,-1),t)&&u.push(Wae))),a&&u.push(Hde(e,t,r,"body")),o&&u.push(ale(e,t)),"Program"===i.type&&"ModuleExpression"!==(null==(n=e.parent)?void 0:n.type)&&u.push(Wae),u}function Yde(e,t){if(t.semi||Zde(e,t)||the(e,t))return!1;let{node:r,key:n,parent:i}=e;return!("ExpressionStatement"!==r.type||("body"!==n||"Program"!==i.type&&"BlockStatement"!==i.type&&"StaticBlock"!==i.type&&"TSModuleBlock"!==i.type)&&("consequent"!==n||"SwitchCase"!==i.type)||!e.call((()=>Qde(e,t)),"expression"))}function Qde(e,t){let{node:r}=e;switch(r.type){case"ParenthesizedExpression":case"TypeCastExpression":case"ArrayExpression":case"ArrayPattern":case"TemplateLiteral":case"TemplateElement":case"RegExpLiteral":return!0;case"ArrowFunctionExpression":if(!kde(e,t))return!0;break;case"UnaryExpression":{let{prefix:e,operator:t}=r;if(e&&("+"===t||"-"===t))return!0;break}case"BindExpression":if(!r.object)return!0;break;case"Literal":if(r.regex)return!0;break;default:if(rue(r))return!0}return!!tle(e,t)||!!Voe(r)&&e.call((()=>Qde(e,t)),...Koe(r))}function Zde({node:e,parent:t},r){return("markdown"===r.parentParser||"mdx"===r.parentParser)&&"ExpressionStatement"===e.type&&rue(e.expression)&&"Program"===t.type&&1===t.body.length}function ehe(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return ehe(e.object)}return!1;case"Identifier":return!0;default:return!1}}function the({node:e,parent:t},r){return("__vue_event_binding"===r.parser||"__vue_ts_event_binding"===r.parser)&&"ExpressionStatement"===e.type&&"Program"===t.type&&1===t.body.length}function rhe(e,t,r){let n=[r("expression")];return the(e,t)?ehe(e.node.expression)&&n.push(";"):Zde(e,t)||t.semi&&n.push(";"),Kue(e.node,Vue.Dangling,(({marker:e})=>e===Xue))&&n.push(" ",ale(e,t,{marker:Xue})),n}function nhe(e,t,r,n){let{node:i}=e;if(Xce(i))return function(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return Jce(r);case"BigIntLiteral":return Wce(r.extra.raw);case"NumericLiteral":return qce(r.extra.raw);case"StringLiteral":return ooe(Kce(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return qce(r.value)+"m";case"DirectiveLiteral":return Hce(r.extra.raw,t);case"Literal":{if(r.regex)return Jce(r.regex);if(r.bigint)return Wce(r.raw);if(r.decimal)return qce(r.decimal)+"m";let{value:n}=r;return"number"==typeof n?qce(r.raw):"string"==typeof n?function(e){if("expression"!==e.key)return;let{parent:t}=e;return"ExpressionStatement"===t.type&&t.directive}(e)?Hce(r.raw,t):ooe(Kce(r.raw,t)):String(n)}}}(e,t);let s=t.semi?";":"",a=[];switch(i.type){case"JsExpressionRoot":return r("node");case"JsonRoot":return[r("node"),Wae];case"File":return function(e,t,r){if(t.__isVueBindings||t.__isVueForBindingLeft){let n=e.map(r,"program","body",0,"params");if(1===n.length)return n[0];let i=Xae([",",Kae],n);return t.__isVueForBindingLeft?["(",_ae([qae,Oae(i)]),qae,")"]:i}if(t.__isEmbeddedTypescriptGenericParameters){let t=e.map(r,"program","body",0,"typeParameters","params");return Xae([",",Kae],t)}}(e,t,r)??r("program");case"Program":return Gde(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return rhe(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return Kue(i.expression)||!Hoe(i.expression)&&!Joe(i.expression)?Oae(["(",_ae([qae,r("expression")]),qae,")"]):["(",r("expression"),")"];case"AssignmentExpression":return function(e,t,r){let{node:n}=e;return Gce(e,t,r,r("left"),[" ",n.operator],"right")}(e,t,r);case"VariableDeclarator":return function(e,t,r){return Gce(e,t,r,r("id")," =","init")}(e,t,r);case"BinaryExpression":case"LogicalExpression":return Pce(e,t,r);case"AssignmentPattern":return[r("left")," = ",r("right")];case"OptionalMemberExpression":case"MemberExpression":return function(e,t,r){var n;let i=r("object"),s=$ce(e,0,r),{node:a,parent:o}=e,u=e.findAncestor((e=>!(hue(e)||"TSNonNullExpression"===e.type))),l=u&&("NewExpression"===u.type||"BindExpression"===u.type||"AssignmentExpression"===u.type&&"Identifier"!==u.left.type)||a.computed||"Identifier"===a.object.type&&"Identifier"===a.property.type&&!hue(o)||("AssignmentExpression"===o.type||"VariableDeclarator"===o.type)&&(due(a.object)&&a.object.arguments.length>0||"TSNonNullExpression"===a.object.type&&due(a.object.expression)&&a.object.expression.arguments.length>0||(null==(n=i.label)?void 0:n.memberChain));return Gae(i.label,[i,l?s:Oae(_ae([qae,s]))])}(e,0,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&a.push(r("object")),a.push(Oae(_ae([qae,_pe(0,0,r)]))),a;case"Identifier":return[i.name,Ape(e),Cpe(e),vpe(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Ope(e,r);case"FunctionDeclaration":case"FunctionExpression":return Cde(e,r,t,n);case"ArrowFunctionExpression":return Jde(e,t,r,n);case"YieldExpression":return a.push("yield"),i.delegate&&a.push("*"),i.argument&&a.push(" ",r("argument")),a;case"AwaitExpression":if(a.push("await"),i.argument){a.push(" ",r("argument"));let{parent:t}=e;if(due(t)&&t.callee===i||hue(t)&&t.object===i){a=[_ae([qae,...a]),qae];let t=e.findAncestor((e=>"AwaitExpression"===e.type||"BlockStatement"===e.type));if("AwaitExpression"!==(null==t?void 0:t.type)||!Cue(t.argument,(e=>e===i)))return Oae(a)}}return a;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return Upe(e,t,r);case"ImportDeclaration":return function(e,t,r){let{node:n}=e;return["import",n.module?" module":"",Kpe(n),Wpe(e,t,r),qpe(e,t,r),Hpe(e,t,r),t.semi?";":""]}(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Xpe(e,0,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Xde(e,t,r);case"ClassBody":return Ude(e,t,r);case"ThrowStatement":return function(e,t,r){return["throw",Ide(e,t,r)]}(e,t,r);case"ReturnStatement":return function(e,t,r){return["return",Ide(e,t,r)]}(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Vce(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return Vde(e,t,r);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?Pde(e,t,r):function(e,t,r){let{node:n}=e;return n.shorthand?r("value"):Gce(e,t,r,Tde(e,t,r),":","value")}(e,t,r);case"ObjectMethod":return Pde(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return _ce(e,t,r);case"SequenceExpression":{let{parent:t}=e;if("ExpressionStatement"===t.type||"ForStatement"===t.type){let t=[];return e.each((({isFirst:e})=>{e?t.push(r()):t.push(",",_ae([Kae,r()]))}),"expressions"),Oae(t)}return Oae(Xae([",",Kae],e.map(r,"expressions")))}case"ThisExpression":return"this";case"Super":return"super";case"Directive":return[r("value"),s];case"UnaryExpression":return a.push(i.operator),/[a-z]$/.test(i.operator)&&a.push(" "),Kue(i.argument)?a.push(Oae(["(",_ae([qae,r("argument")]),qae,")"])):a.push(r("argument")),a;case"UpdateExpression":return a.push(r("argument"),i.operator),i.prefix&&a.reverse(),a;case"ConditionalExpression":return Qpe(e,t,r);case"VariableDeclaration":{let t,n=e.map(r,"declarations"),o=e.parent,u="ForStatement"===o.type||"ForInStatement"===o.type||"ForOfStatement"===o.type,l=i.declarations.some((e=>e.init));return 1!==n.length||Kue(i.declarations[0])?n.length>0&&(t=_ae(n[0])):t=n[0],a=[wpe(e),i.kind,t?[" ",t]:"",_ae(n.slice(1).map((e=>[",",l&&!u?Wae:Kae,e])))],u&&o.body!==i||a.push(s),Oae(a)}case"WithStatement":return Oae(["with (",r("object"),")",Npe(i.body,r("body"))]);case"IfStatement":{let n=Npe(i.consequent,r("consequent")),s=Oae(["if (",Oae([_ae([qae,r("test")]),qae]),")",n]);if(a.push(s),i.alternate){let n=Kue(i.consequent,Vue.Trailing|Vue.Line)||vue(i),s="BlockStatement"===i.consequent.type&&!n;a.push(s?" ":Wae),Kue(i,Vue.Dangling)&&a.push(ale(e,t),n?Wae:" "),a.push("else",Oae(Npe(i.alternate,r("alternate"),"IfStatement"===i.alternate.type)))}return a}case"ForStatement":{let n=Npe(i.body,r("body")),s=ale(e,t),a=s?[s,qae]:"";return i.init||i.test||i.update?[a,Oae(["for (",Oae([_ae([qae,r("init"),";",Kae,r("test"),";",Kae,r("update")]),qae]),")",n])]:[a,Oae(["for (;;)",n])]}case"WhileStatement":return Oae(["while (",Oae([_ae([qae,r("test")]),qae]),")",Npe(i.body,r("body"))]);case"ForInStatement":return Oae(["for (",r("left")," in ",r("right"),")",Npe(i.body,r("body"))]);case"ForOfStatement":return Oae(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Npe(i.body,r("body"))]);case"DoWhileStatement":return a=[Oae(["do",Npe(i.body,r("body"))])],"BlockStatement"===i.body.type?a.push(" "):a.push(Wae),a.push("while (",Oae([_ae([qae,r("test")]),qae]),")",s),a;case"DoExpression":return[i.async?"async ":"","do ",r("body")];case"BreakStatement":case"ContinueStatement":return a.push("BreakStatement"===i.type?"break":"continue"),i.label&&a.push(" ",r("label")),a.push(s),a;case"LabeledStatement":return"EmptyStatement"===i.body.type?[r("label"),":;"]:[r("label"),": ",r("body")];case"TryStatement":return["try ",r("block"),i.handler?[" ",r("handler")]:"",i.finalizer?[" finally ",r("finalizer")]:""];case"CatchClause":if(i.param){let e=Kue(i.param,(e=>!Moe(e)||e.leading&&Eoe(t.originalText,koe(e))||e.trailing&&Eoe(t.originalText,woe(e),{backwards:!0}))),n=r("param");return["catch ",e?["(",_ae([qae,n]),qae,") "]:["(",n,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[Oae(["switch (",_ae([qae,r("discriminant")]),qae,")"])," {",i.cases.length>0?_ae([Wae,Xae(Wae,e.map((({node:e,isLast:n})=>[r(),!n&&Wue(e,t)?Wae:""]),"cases"))]):"",Wae,"}"];case"SwitchCase":{i.test?a.push("case ",r("test"),":"):a.push("default:"),Kue(i,Vue.Dangling)&&a.push(" ",ale(e,t));let n=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(n.length>0){let i=Hde(e,t,r,"consequent");a.push(1===n.length&&"BlockStatement"===n[0].type?[" ",i]:_ae([Wae,i]))}return a}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return Nde(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Rde(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return $de(e,t,r);case"TemplateElement":return ooe(i.value.raw);case"TemplateLiteral":return cde(e,r,t);case"TaggedTemplateExpression":return function(e){let t=e("quasi");return Gae(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),Uae,t])}(r);case"PrivateIdentifier":return["#",i.name];case"PrivateName":return["#",r("id")];case"TopicReference":return"%";case"ArgumentPlaceholder":return"?";case"ModuleExpression":{a.push("module {");let e=r("body");return e&&a.push(_ae([Wae,e]),Wae),a.push("}"),a}default:throw new cle(i,"ESTree")}}function ihe(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),Kue(n.node)?" //"+que(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return Pce(e,t,r);case"NGChainedExpression":return Oae(Xae([";",Kae],e.map((()=>function({node:e}){return Uoe(e,ahe)}(e)?r():["(",r(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map((()=>[e.isFirst?"":she(e)?" ":[";",Kae],r()]),"body");case"NGMicrosyntaxKey":return/^[$_a-z][\w$]*(?:-[$_a-z][\w$])*$/i.test(n.name)?n.name:JSON.stringify(n.name);case"NGMicrosyntaxExpression":return[r("expression"),null===n.alias?"":[" as ",r("alias")]];case"NGMicrosyntaxKeyedExpression":{let{index:t,parent:i}=e,s=she(e)||(1===t&&("then"===n.key.name||"else"===n.key.name)||2===t&&"else"===n.key.name&&"NGMicrosyntaxKeyedExpression"===i.body[t-1].type&&"then"===i.body[t-1].key.name)&&"NGMicrosyntaxExpression"===i.body[0].type;return[r("key"),s?" ":": ",r("expression")]}case"NGMicrosyntaxLet":return["let ",r("key"),null===n.value?"":[" = ",r("value")]];case"NGMicrosyntaxAs":return[r("key")," as ",r("alias")];default:throw new cle(n,"Angular")}}function she({node:e,index:t,parent:r}){return"NGMicrosyntaxKeyedExpression"===e.type&&"of"===e.key.name&&1===t&&"NGMicrosyntaxLet"===r.body[0].type&&null===r.body[0].value}var ahe=Loe(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function ohe(e,t,r){let{node:n}=e,i=[wpe(e),"interface"],s=[],a=[];"InterfaceTypeAnnotation"!==n.type&&s.push(" ",r("id"),r("typeParameters"));let o=n.typeParameters&&!Kue(n.typeParameters,Vue.Trailing|Vue.Line);return coe(n.extends)&&a.push(o?jae(" ",Kae,{groupId:gde(n.typeParameters)}):Kae,"extends ",(1===n.extends.length?Tue:_ae)(Xae([",",Kae],e.map(r,"extends")))),Kue(n.id,Vue.Trailing)||coe(n.extends)?o?i.push(Oae([...s,_ae(a)])):i.push(Oae(_ae([...s,...a]))):i.push(...s,...a),i.push(" ",r("body")),Oae(i)}function uhe(e,t,r){return Vde(e,r,t)}function lhe(e,t){let{node:r}=e,n=t("id");r.computed&&(n=["[",n,"]"]);let i="";return r.initializer&&(i=t("initializer")),r.init&&(i=t("init")),i?[n," = ",i]:n}function che(e,t,r){let{node:n}=e;return[wpe(e),n.const?"const ":"","enum ",t("id")," ","TSEnumDeclaration"===n.type?uhe(e,t,r):t("body")]}function phe(e,t,r){let{node:n}=e;if(Roe(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return Nde(e,t,r);case"DeclareFunction":return[wpe(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",vpe(e,r),i];case"DeclareVariable":return[wpe(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return Upe(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return function(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[wpe(e),"opaque type ",r("id"),r("typeParameters")];return i.supertype&&s.push(": ",r("supertype")),i.impltype&&s.push(" = ",r("impltype")),s.push(n),s}(e,t,r);case"DeclareTypeAlias":case"TypeAlias":return lpe(e,t,r);case"IntersectionTypeAnnotation":return cpe(e,0,r);case"UnionTypeAnnotation":return ppe(e,t,r);case"ConditionalTypeAnnotation":return Qpe(e,t,r);case"InferTypeAnnotation":return fpe(0,0,r);case"FunctionTypeAnnotation":return dpe(e,t,r);case"TupleTypeAnnotation":return _ce(e,t,r);case"TupleTypeLabeledElement":return gpe(e,0,r);case"TupleTypeSpreadElement":return ype(e,0,r);case"GenericTypeAnnotation":return[r("id"),bde(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return hpe(e,0,r);case"TypeAnnotation":return Epe(e,0,r);case"TypeParameter":return xde(e,0,r);case"TypeofTypeAnnotation":return Dpe(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return Spe(r);case"DeclareEnum":case"EnumDeclaration":return che(e,r,t);case"EnumBooleanBody":case"EnumNumberBody":case"EnumStringBody":case"EnumSymbolBody":return function(e,t,r){let n,{node:i}=e;if("EnumSymbolBody"===i.type||i.explicitType)switch(i.type){case"EnumBooleanBody":n="boolean";break;case"EnumNumberBody":n="number";break;case"EnumStringBody":n="string";break;case"EnumSymbolBody":n="symbol"}return[n?`of ${n} `:"",uhe(e,t,r)]}(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return lhe(e,r);case"FunctionTypeParam":{let t=n.name?r("name"):e.parent.this===n?"this":"";return[t,Ape(e),t?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return ohe(e,0,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:e}=n;return Sde.ok("plus"===e||"minus"===e),"plus"===e?"+":"-"}case"KeyofTypeAnnotation":return["keyof ",r("argument")];case"ObjectTypeCallProperty":return[n.static?"static ":"",r("value")];case"ObjectTypeMappedTypeProperty":return function(e,t,r){let{node:n}=e;return Oae([n.variance?r("variance"):"","[",_ae([r("keyTparam")," in ",r("sourceType")]),"]",mde(n.optional),": ",r("propType")])}(e,0,r);case"ObjectTypeIndexer":return[n.static?"static ":"",n.variance?r("variance"):"","[",r("id"),n.id?": ":"",r("key"),"]: ",r("value")];case"ObjectTypeProperty":{let i="";return n.proto?i="proto ":n.static&&(i="static "),[i,nue(n)?n.kind+" ":"",n.variance?r("variance"):"",Tde(e,t,r),Ape(e),iue(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return Vde(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",Ape(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Ope(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return ooe(Kce(Due(n),t));case"NumberLiteralTypeAnnotation":return qce(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return Wce(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),vpe(e,r),")"];case"TypePredicate":return Tpe(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return bde(e,t,r,"params");case"InferredPredicate":case"DeclaredPredicate":return["predicate"!==e.key||"DeclareFunction"===e.parent.type||e.parent.returnType?" ":": ","%checks",..."DeclaredPredicate"===n.type?["(",r("value"),")"]:[]]}}function dhe(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if($oe(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",a=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let e=!(Joe(i.expression)||Hoe(i.expression)),t=Oae(["<",_ae([qae,r("typeAnnotation")]),qae,">"]),n=[jae("("),_ae([qae,r("expression")]),qae,jae(")")];return e?Lae([[t,r("expression")],[t,Oae(n,{shouldBreak:!0})],[t,r("expression")]]):Oae([t,r("expression")])}case"TSDeclareFunction":return Cde(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Xde(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Vde(e,t,r);case"TSTypeAliasDeclaration":return lpe(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Rde(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return $de(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return cde(e,r,t);case"TSNamedTupleMember":return gpe(e,0,r);case"TSRestType":return ype(e,0,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return ohe(e,0,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return bde(e,t,r,"params");case"TSTypeParameter":return xde(e,0,r);case"TSAsExpression":case"TSSatisfiesExpression":{let t="TSAsExpression"===i.type?"as":"satisfies";a.push(r("expression"),` ${t} `,r("typeAnnotation"));let{parent:n}=e;return due(n)&&n.callee===i||hue(n)&&n.object===i?Oae([_ae([qae,...a]),qae]):a}case"TSArrayType":return Spe(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",Tde(e,t,r),Ape(e),vpe(e,r)];case"TSParameterProperty":return[Bpe(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return Dpe(e,r);case"TSIndexSignature":{let n=i.parameters.length>1?jae(Aue(t)?",":""):"",a=Oae([_ae([qae,Xae([", ",qae],e.map(r,"parameters"))]),n,qae]),o="ClassBody"===e.parent.type&&"body"===e.key;return[o&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",vpe(e,r),o?s:""]}case"TSTypePredicate":return Tpe(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r("argument"),")",i.qualifier?[".",r("qualifier")]:"",bde(e,t,r,i.typeArguments?"typeArguments":"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return hpe(e,0,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return function(e,t,r){let{node:n}=e,i=ble(t.originalText,woe(n),woe(n.typeParameter));return Oae(["{",_ae([t.bracketSpacing?Kae:qae,Oae([r("typeParameter"),n.optional?yde(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?jae(";"):""]),ale(e,t),t.bracketSpacing?Kae:qae,"}"],{shouldBreak:i})}(e,t,r);case"TSMethodSignature":{let n=i.kind&&"method"!==i.kind?`${i.kind} `:"";a.push(Bpe(i),n,i.computed?"[":"",r("key"),i.computed?"]":"",Ape(e));let s=spe(e,r,t,!1,!0),o=i.returnType?"returnType":"typeAnnotation",u=i[o],l=u?vpe(e,r,o):"",c=ope(i,l);return a.push(c?Oae(s):s),u&&a.push(Oae(l)),Oae(a)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return che(e,r,t);case"TSEnumMember":return lhe(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",Kpe(i,!1),r("id")," = ",r("moduleReference"),t.semi?";":""];case"TSExternalModuleReference":return["require(",r("expression"),")"];case"TSModuleDeclaration":{let{parent:o}=e,u="TSModuleDeclaration"===o.type,l="TSModuleDeclaration"===(null==(n=i.body)?void 0:n.type);if(u)a.push(".");else if(a.push(wpe(e)),"global"!==i.kind&&!i.global){let e=i.kind??(Yoe(i.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(woe(i),woe(i.id)))?"module":"namespace");a.push(e," ")}return a.push(r("id")),l?a.push(r("body")):i.body?a.push(" ",Oae(r("body"))):a.push(s),a}case"TSConditionalType":return Qpe(e,t,r);case"TSInferType":return fpe(0,0,r);case"TSIntersectionType":return cpe(e,0,r);case"TSUnionType":return ppe(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return dpe(e,t,r);case"TSTupleType":return _ce(e,t,r);case"TSTypeReference":return[r("typeName"),bde(e,t,r,"typeParameters")];case"TSTypeAnnotation":return Epe(e,0,r);case"TSEmptyBodyFunctionExpression":return wde(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return mpe(e,r,"?");case"TSJSDocNonNullableType":return mpe(e,r,"!");default:throw new cle(i,"TypeScript")}}var hhe=Loe(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);var fhe=function(e,t,r,n){var i;e.isRoot&&(null==(i=t.__onHtmlBindingRoot)||i.call(t,e.node,t));let s=function(e,t,r,n){if(Ace(e))return lae(e,t);for(let i of[ihe,Dce,phe,dhe,nhe]){let s=i(e,t,r,n);if(void 0!==s)return s}}(e,t,r,n);if(!s)return"";let{node:a}=e;if(hhe(a))return s;let o=coe(a.decorators),u=function(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!coe(s)||Rpe(i)||Ace(e))return"";let a="ClassExpression"===n.type||"ClassDeclaration"===n.type||jpe(n,t);return["declaration"===e.key&&Woe(i)?Wae:a?Vae:"",Xae(Kae,e.map(r,"decorators")),Kae]}(e,t,r),l="ClassExpression"===a.type;if(o&&!l)return loe(s,(e=>Oae([u,e])));let c=tle(e,t),p=Yde(e,t);return u||c||p?loe(s,(e=>[p?";":"",c?"(":"",c&&l&&o?[_ae([Kae,u,e]),Kae]:[u,e],c?")":""])):s},mhe=[(e,t)=>"ObjectExpression"===e.type&&"properties"===t,(e,t)=>"CallExpression"===e.type&&"Identifier"===e.callee.type&&"Component"===e.callee.name&&"arguments"===t,(e,t)=>"Decorator"===e.type&&"expression"===t];function yhe(e,t){return Kue(e,Vue.Block|Vue.Leading,(({value:e})=>e===` ${t} `))}async function ghe(e,t,r){let{node:n}=r,i=n.quasis.map((e=>e.value.raw)),s=0,a=i.reduce(((e,t,r)=>0===r?t:e+"@prettier-placeholder-"+s+++"-id"+t),""),o=function(e,t){if(!coe(t))return e;let r=0,n=Zae(aoe(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,n)=>n%2==0?ooe(e):(r++,t[e]))):e));return t.length===r?n:null}(await e(a,{parser:"scss"}),pde(r,t));if(!o)throw new Error("Couldn't insert all the expressions");return["`",_ae([Wae,o]),qae,"`"]}function bhe(e){return"Identifier"===e.type&&"styled"===e.name}function vhe(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}var xhe=function(e){if(function({node:e,parent:t,grandparent:r}){return r&&e.quasis&&"JSXExpressionContainer"===t.type&&"JSXElement"===r.type&&"style"===r.openingElement.name.name&&r.openingElement.attributes.some((e=>"jsx"===e.name.name))||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"Identifier"===t.tag.type&&"css"===t.tag.name||"TaggedTemplateExpression"===(null==t?void 0:t.type)&&"MemberExpression"===t.tag.type&&"css"===t.tag.object.name&&("global"===t.tag.property.name||"resolve"===t.tag.property.name)}(e)||function({parent:e}){if(!e||"TaggedTemplateExpression"!==e.type)return!1;let t="ParenthesizedExpression"===e.tag.type?e.tag.expression:e.tag;switch(t.type){case"MemberExpression":return bhe(t.object)||vhe(t);case"CallExpression":return bhe(t.callee)||"MemberExpression"===t.callee.type&&("MemberExpression"===t.callee.object.type&&(bhe(t.callee.object.object)||vhe(t.callee.object))||"CallExpression"===t.callee.object.type&&bhe(t.callee.object.callee));case"Identifier":return"css"===t.name;default:return!1}}(e)||function({parent:e,grandparent:t}){return"JSXAttribute"===(null==t?void 0:t.type)&&"JSXExpressionContainer"===e.type&&"JSXIdentifier"===t.name.type&&"css"===t.name.name}(e)||function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>Joe(e)&&"elements"===t),((e,t)=>Hue(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...mhe)}(e))return ghe};async function Ehe(e,t,r){let{node:n}=r,i=n.quasis.length,s=pde(r,t),a=[];for(let t=0;t<i;t++){let r=0===t,o=t===i-1,u=n.quasis[t].value.cooked,l=u.split("\n"),c=l.length,p=s[t],d=c>2&&""===l[0].trim()&&""===l[1].trim(),h=c>2&&""===l[c-1].trim()&&""===l[c-2].trim(),f=l.every((e=>/^\s*(?:#[^\n\r]*)?$/.test(e)));if(!o&&/#[^\n\r]*$/.test(l[c-1]))return null;let m=null;m=f?She(l):await e(u,{parser:"graphql"}),m?(m=dde(m,!1),!r&&d&&a.push(""),a.push(m),!o&&h&&a.push("")):!r&&!o&&d&&a.push(""),p&&a.push(p)}return["`",_ae([Wae,Xae(Wae,a)]),Wae,"`"]}function She(e){let t=[],r=!1,n=e.map((e=>e.trim()));for(let[e,i]of n.entries())""!==i&&(""===n[e-1]&&r?t.push([Wae,i]):t.push(i),r=!0);return 0===t.length?null:Xae(Wae,t)}var Dhe=function(e){if(function({node:e,parent:t}){return yhe(e,"GraphQL")||t&&("TaggedTemplateExpression"===t.type&&("MemberExpression"===t.tag.type&&"graphql"===t.tag.object.name&&"experimental"===t.tag.property.name||"Identifier"===t.tag.type&&("gql"===t.tag.name||"graphql"===t.tag.name))||"CallExpression"===t.type&&"Identifier"===t.callee.type&&"graphql"===t.callee.name)}(e))return Ehe},The=0;async function Ahe(e,t,r,n,i){let{node:s}=n,a=The;The=The+1>>>0;let o=e=>`PRETTIER_HTML_PLACEHOLDER_${e}_${a}_IN_JS`,u=s.quasis.map(((e,t,r)=>t===r.length-1?e.value.cooked:e.value.cooked+o(t))).join(""),l=pde(n,r),c=new RegExp(o("(\\d+)"),"g"),p=0,d=await t(u,{parser:e,__onHtmlRoot(e){p=e.children.length}}),h=Zae(d,(e=>{if("string"!=typeof e)return e;let t=[],r=e.split(c);for(let e=0;e<r.length;e++){let n=r[e];if(e%2==0){n&&(n=hde(n),i.__embeddedInHtml&&(n=rle(!1,n,/<\/(?=script\b)/gi,"<\\/")),t.push(n));continue}let s=Number(n);t.push(l[s])}return t})),f=/^\s/.test(u)?" ":"",m=/\s$/.test(u)?" ":"",y="ignore"===i.htmlWhitespaceSensitivity?Wae:f&&m?Kae:null;return y?Oae(["`",_ae([y,Oae(h)]),y,"`"]):Gae({hug:!1},Oae(["`",f,p>1?_ae(Oae(h)):Oae(h),m,"`"]))}var Che=Ahe.bind(void 0,"html"),Phe=Ahe.bind(void 0,"angular");var whe=function(e){return function(e){return yhe(e.node,"HTML")||e.match((e=>"TemplateLiteral"===e.type),((e,t)=>"TaggedTemplateExpression"===e.type&&"Identifier"===e.tag.type&&"html"===e.tag.name&&"quasi"===t))}(e)?Che:function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>Hue(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...mhe)}(e)?Phe:void 0};async function khe(e,t,r){let{node:n}=r,i=rle(!1,n.quasis[0].value.raw,/((?:\\\\)*)\\`/g,((e,t)=>"\\".repeat(t.length/2)+"`")),s=function(e){let t=e.match(/^([^\S\n]*)\S/m);return null===t?"":t[1]}(i),a=""!==s;a&&(i=rle(!1,i,new RegExp(`^${s}`,"gm"),""));let o=dde(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?_ae([qae,o]):[Jae,Bae(o)],qae,"`"]}var Fhe=function(e){if(function({node:e,parent:t}){return"TaggedTemplateExpression"===(null==t?void 0:t.type)&&1===e.quasis.length&&"Identifier"===t.tag.type&&("md"===t.tag.name||"markdown"===t.tag.name)}(e))return khe};var Ihe=function(e){let t,{node:r}=e;if("TemplateLiteral"===r.type&&!function({quasis:e}){return e.some((({value:{cooked:e}})=>null===e))}(r))for(let n of[xhe,Dhe,whe,Fhe])if(t=n(e),t)return 1===r.quasis.length&&""===r.quasis[0].value.raw.trim()?"``":async(...e)=>{let r=await t(...e);return r&&Gae({embed:!0,...r.label},r)}},_he=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Nhe=e=>{for(let t of e.quasis)delete t.value};function Ohe(e,t,r){var n,i;if("Program"===e.type&&delete t.sourceType,("BigIntLiteral"===e.type||"BigIntLiteralTypeAnnotation"===e.type)&&t.value&&(t.value=t.value.toLowerCase()),("BigIntLiteral"===e.type||"Literal"===e.type)&&t.bigint&&(t.bigint=t.bigint.toLowerCase()),"DecimalLiteral"===e.type&&(t.value=Number(t.value)),"Literal"===e.type&&t.decimal&&(t.decimal=Number(t.decimal)),"EmptyStatement"===e.type||"JSXText"===e.type||"JSXExpressionContainer"===e.type&&("Literal"===e.expression.type||"StringLiteral"===e.expression.type)&&" "===e.expression.value)return null;if(("Property"===e.type||"ObjectProperty"===e.type||"MethodDefinition"===e.type||"ClassProperty"===e.type||"ClassMethod"===e.type||"PropertyDefinition"===e.type||"TSDeclareMethod"===e.type||"TSPropertySignature"===e.type||"ObjectTypeProperty"===e.type)&&"object"==typeof e.key&&e.key&&("Literal"===e.key.type||"NumericLiteral"===e.key.type||"StringLiteral"===e.key.type||"Identifier"===e.key.type)&&delete t.key,"JSXElement"===e.type&&"style"===e.openingElement.name.name&&e.openingElement.attributes.some((e=>"JSXAttribute"===e.type&&"jsx"===e.name.name)))for(let{type:e,expression:r}of t.children)"JSXExpressionContainer"===e&&"TemplateLiteral"===r.type&&Nhe(r);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&Nhe(t.value.expression),"JSXAttribute"===e.type&&"Literal"===(null==(n=e.value)?void 0:n.type)&&/["']|&quot;|&apos;/.test(e.value.value)&&(t.value.value=rle(!1,t.value.value,/["']|&quot;|&apos;/g,'"'));let s=e.expression||e.callee;if("Decorator"===e.type&&"CallExpression"===s.type&&"Component"===s.callee.name&&1===s.arguments.length){let r=e.expression.arguments[0].properties;for(let[e,n]of t.expression.arguments[0].properties.entries())switch(r[e].key.name){case"styles":Joe(n.value)&&Nhe(n.value.elements[0]);break;case"template":"TemplateLiteral"===n.value.type&&Nhe(n.value)}}if("TaggedTemplateExpression"===e.type&&("MemberExpression"===e.tag.type||"Identifier"===e.tag.type&&("gql"===e.tag.name||"graphql"===e.tag.name||"css"===e.tag.name||"md"===e.tag.name||"markdown"===e.tag.name||"html"===e.tag.name)||"CallExpression"===e.tag.type)&&Nhe(t.quasi),"TemplateLiteral"===e.type&&(null!=(i=e.leadingComments)&&i.some((e=>Moe(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===r.type&&"graphql"===r.callee.name||!e.leadingComments)&&Nhe(t),("TSIntersectionType"===e.type||"TSUnionType"===e.type)&&1===e.types.length)return t.types[0];"ChainExpression"===e.type&&"TSNonNullExpression"===e.expression.type&&([t.type,t.expression.type]=[t.expression.type,t.type])}Ohe.ignoredProperties=_he;var Bhe=Ohe,Lhe=((e,t,r)=>(r=null!=e?Yse(tae(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of eae(t))!rae.call(e,i)&&i!==r&&Qse(e,i,{get:()=>t[i],enumerable:!(n=Zse(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:Qse(r,"default",{value:e,enumerable:!0}),e)))(aae(),1);var Mhe=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};function jhe(e){let{shebang:t,text:r,pragmas:n,comments:i}=function(e){let t=Mhe(e);t&&(e=e.slice(t.length+1));let r=(0,Lhe.extract)(e),{pragmas:n,comments:i}=(0,Lhe.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e),s=(0,Lhe.strip)(r);return(t?`${t}\n`:"")+(0,Lhe.print)({pragmas:{format:"",...n},comments:i.trimStart()})+(s.startsWith("\n")?"\n":"\n\n")+s}var Rhe={avoidAstMutation:!0},$he={};nae($he,{getVisitorKeys:()=>Uhe,massageAstNode:()=>qhe,print:()=>Vhe});var Uhe=Ooe({JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]});function Vhe(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),Wae];case"ArrayExpression":{if(0===n.elements.length)return"[]";let t=e.map((()=>null===e.node?"null":r()),"elements");return["[",_ae([Wae,Xae([",",Wae],t)]),Wae,"]"]}case"ObjectExpression":return 0===n.properties.length?"{}":["{",_ae([Wae,Xae([",",Wae],e.map(r,"properties"))]),Wae,"}"];case"ObjectProperty":return[r("key"),": ",r("value")];case"UnaryExpression":return["+"===n.operator?"":n.operator,r("argument")];case"NullLiteral":return"null";case"BooleanLiteral":return n.value?"true":"false";case"StringLiteral":return JSON.stringify(n.value);case"NumericLiteral":return zhe(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return zhe(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new cle(n,"JSON")}}function zhe(e){return"key"===e.key&&"ObjectProperty"===e.parent.type}var Khe=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function qhe(e,t){let{type:r}=e;if("ObjectProperty"!==r){if("UnaryExpression"===r&&"+"===e.operator)return t.argument;if("ArrayExpression"!==r)return"TemplateLiteral"===r?{type:"StringLiteral",value:e.quasis[0].value.cooked}:void 0;for(let[r,n]of e.elements.entries())null===n&&t.elements.splice(r,0,{type:"NullLiteral"})}else{let{key:r}=e;"Identifier"===r.type?t.key={type:"StringLiteral",value:r.name}:"NumericLiteral"===r.type&&(t.key={type:"StringLiteral",value:String(r.value)})}}qhe.ignoredProperties=Khe;var Whe,Jhe,Hhe,Xhe,Ghe,Yhe={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}},Qhe="JavaScript",Zhe={arrowParens:{category:Qhe,type:"choice",default:"always",description:"Include parentheses around a sole arrow function parameter.",choices:[{value:"always",description:"Always include parens. Example: `(x) => x`"},{value:"avoid",description:"Omit parens when possible. Example: `x => x`"}]},bracketSameLine:Yhe.bracketSameLine,bracketSpacing:Yhe.bracketSpacing,jsxBracketSameLine:{category:Qhe,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Qhe,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:Yhe.singleQuote,jsxSingleQuote:{category:Qhe,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Qhe,type:"choice",default:"as-needed",description:"Change when properties in objects are quoted.",choices:[{value:"as-needed",description:"Only add quotes around object properties where required."},{value:"consistent",description:"If at least one property in an object requires quotes, quote all properties."},{value:"preserve",description:"Respect the input use of quotes in object properties."}]},trailingComma:{category:Qhe,type:"choice",default:"all",description:"Print trailing commas wherever possible when multi-line.",choices:[{value:"all",description:"Trailing commas wherever possible (including function arguments)."},{value:"es5",description:"Trailing commas where valid in ES5 (objects, arrays, etc.)"},{value:"none",description:"No trailing commas."}]},singleAttributePerLine:Yhe.singleAttributePerLine},efe={estree:uae,"estree-json":$he},tfe=[{linguistLanguageId:183,name:"JavaScript",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:["js","node"],extensions:[".js","._js",".bones",".cjs",".es",".es6",".frag",".gs",".jake",".javascript",".jsb",".jscad",".jsfl",".jslib",".jsm",".jspre",".jss",".mjs",".njs",".pac",".sjs",".ssjs",".xsjs",".xsjslib",".wxs"],filenames:["Jakefile"],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell","zx"],parsers:["babel","acorn","espree","meriyah","babel-flow","babel-ts","flow","typescript"],vscodeLanguageIds:["javascript","mongo"]},{linguistLanguageId:183,name:"Flow",type:"programming",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",color:"#f1e05a",aliases:[],extensions:[".js.flow"],filenames:[],interpreters:["chakra","d8","gjs","js","node","nodejs","qjs","rhino","v8","v8-shell"],parsers:["flow","babel-flow"],vscodeLanguageIds:["javascript"]},{linguistLanguageId:183,name:"JSX",type:"programming",tmScope:"source.js.jsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",color:void 0,aliases:void 0,extensions:[".jsx"],filenames:void 0,interpreters:void 0,parsers:["babel","babel-flow","babel-ts","flow","typescript","espree","meriyah"],vscodeLanguageIds:["javascriptreact"],group:"JavaScript"},{linguistLanguageId:378,name:"TypeScript",type:"programming",color:"#3178c6",aliases:["ts"],interpreters:["deno","ts-node"],extensions:[".ts",".cts",".mts"],tmScope:"source.ts",aceMode:"typescript",codemirrorMode:"javascript",codemirrorMimeType:"application/typescript",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescript"]},{linguistLanguageId:94901924,name:"TSX",type:"programming",color:"#3178c6",group:"TypeScript",extensions:[".tsx"],tmScope:"source.tsx",aceMode:"javascript",codemirrorMode:"jsx",codemirrorMimeType:"text/jsx",parsers:["typescript","babel-ts"],vscodeLanguageIds:["typescriptreact"]},{linguistLanguageId:174,name:"JSON.stringify",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".importmap"],filenames:["package.json","package-lock.json","composer.json"],parsers:["json-stringify"],vscodeLanguageIds:["json"]},{linguistLanguageId:174,name:"JSON",type:"data",color:"#292929",tmScope:"source.json",aceMode:"json",codemirrorMode:"javascript",codemirrorMimeType:"application/json",aliases:["geojson","jsonl","topojson"],extensions:[".json",".4DForm",".4DProject",".avsc",".geojson",".gltf",".har",".ice",".JSON-tmLanguage",".mcmeta",".tfstate",".tfstate.backup",".topojson",".webapp",".webmanifest",".yy",".yyp"],filenames:[".all-contributorsrc",".arcconfig",".auto-changelog",".c8rc",".htmlhintrc",".imgbotconfig",".nycrc",".tern-config",".tern-project",".watchmanconfig","Pipfile.lock","composer.lock","flake.lock","mcmod.info"],parsers:["json"],vscodeLanguageIds:["json"]},{linguistLanguageId:423,name:"JSON with Comments",type:"data",color:"#292929",group:"JSON",tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"text/javascript",aliases:["jsonc"],extensions:[".jsonc",".code-snippets",".sublime-build",".sublime-commands",".sublime-completions",".sublime-keymap",".sublime-macro",".sublime-menu",".sublime-mousemap",".sublime-project",".sublime-settings",".sublime-theme",".sublime-workspace",".sublime_metrics",".sublime_session"],filenames:[".babelrc",".devcontainer.json",".eslintrc.json",".jscsrc",".jshintrc",".jslintrc",".swcrc","api-extractor.json","devcontainer.json","jsconfig.json","language-configuration.json","tsconfig.json","tslint.json",".eslintrc"],parsers:["json"],vscodeLanguageIds:["jsonc"]},{linguistLanguageId:175,name:"JSON5",type:"data",color:"#267CB9",extensions:[".json5"],tmScope:"source.js",aceMode:"javascript",codemirrorMode:"javascript",codemirrorMimeType:"application/json",parsers:["json5"],vscodeLanguageIds:["json5"]}],rfe=oae,nfe=Object.freeze({__proto__:null,default:rfe,languages:tfe,options:Zhe,printers:efe});function ife(e,t={}){return Bie(function(...e){return Y2(...e)}(e,{isJSX:Boolean(t.filepath?.match(/\.[jt]sx$/)),isTS:!0,printer:"recast",plugins:[["remove-unused-variables",p9]]}).code,{parser:"babel-ts",plugins:[Gse,nfe]})}function sfe(e,t={}){return e=e.replaceAll("import.meta","BATI_META"),e=`var BATI_META = ${JSON.stringify(t)};(${e})`,(0,eval)(e)}function afe(e,t,r={}){const n=function(e,t){return b.visit(e,{visitJSXAttribute(e){const r=e.value.comments?.[0];r&&r.value.includes("import.meta.BATI_")&&(sfe(r.value.replace("# ",""),t)?e.get("comments").prune():e.prune()),this.traverse(e)},visitImportDeclaration(e){if(b.namedTypes.ImportDeclaration.check(e.value)&&e.value.comments&&e.value.comments.some((e=>e.value.includes("import.meta.BATI_")))){const r=e.value.comments.find((e=>e.value.includes("import.meta.BATI_"))).value;sfe(r.replace("# ",""),t)?e.value.comments=[]:e.prune()}this.traverse(e)},visitIdentifier(e){if("BATI_REMOVE"===e.value.name){if(!e.parent)throw new Error("BATI_REMOVE cannot appear at top level");if(!b.namedTypes.ArrayExpression.check(e.parent?.parent?.value))throw new Error("BATI_REMOVE can only be an array element for now");return e.parent.prune(),void this.traverse(e)}this.traverse(e)},visitConditionalExpression(e){this.visitIfStatement(e)},visitIfStatement(e){let r=!1;if(this.traverse(e.get("test"),{visitMemberExpression(e){_o(e.value).code.startsWith("import.meta.BATI_")&&(r=!0),this.traverse(e)}}),this.traverse(e),r)if(sfe(_o(e.value.test).code,t)){let t=e;b.namedTypes.ConditionalExpression.check(e.value)&&b.namedTypes.JSXExpressionContainer.check(e.parent.value)&&(t=e.parent),b.namedTypes.BlockStatement.check(e.value.consequent)?t.replace(...e.value.consequent.body):t.replace(e.value.consequent)}else e.value.alternate?b.namedTypes.BlockStatement.check(e.value.alternate)?e.replace(...e.value.alternate.body):e.replace(e.value.alternate):e.prune()}}),e}(e,t);return ife(_o(n).code,r)}function ofe(e,t){if(!e)throw new Error(t)}async function ufe(e){const t=await(e?.());return ofe("string"==typeof t,"Unable to load previous JSON module"),JSON.parse(t)}async function lfe(e){const t=await(e?.());return ofe("string"==typeof t,"Unable to load previous module"),Fo(t)}async function cfe(e,t){const r=p(t.url),n=d(r);return No(h(n,e))}function pfe(e){return"function-call"===e.$type?e.$args[0]:e}function dfe(e,t){const r=function(e){return pfe(e.exports.default)}(e);return"identifier"===r.$type?function(e,t){const{config:r,declaration:n}=function(e){if("identifier"!==e.exports.default.$type)throw new uo(`Not supported: Cannot modify this kind of default export (${e.exports.default.$type})`);const t=e.exports.default.$name;for(const r of e.$ast.body)if("VariableDeclaration"===r.type)for(const e of r.declarations)if("Identifier"===e.id.type&&e.id.name===t&&e.init)return{declaration:e,config:pfe(Io(_o(e.init).code))};throw new uo("Couldn't find config declaration")}(e);hfe(t,r),n.init&&("ObjectExpression"===n.init.type?n.init=_o(r).code:"CallExpression"===n.init.type&&"Identifier"===n.init.callee.type&&(n.init=_o(Bo.functionCall(n.init.callee.name,r)).code))}(e,t):hfe(t,r),e.imports.$add({from:t.from,local:t.constructor,imported:t.imported||"default"}),!0}function hfe(e,t){const r=e.index??t.plugins?.length??0;t.plugins||(t.plugins=[]),t.plugins.splice(r,0,e.options?Bo.functionCall(e.constructor,e.options):Bo.functionCall(e.constructor))}function*ffe(e,t){for(const r of t){const t=e.get(r);if(!t)throw new Error(`key '${t}' not found in package.json`);yield[r,t]}}function mfe(e,t,r){e.devDependencies??(e.devDependencies={}),e.dependencies??(e.dependencies={});const n=new Map(function*(e){if(e.devDependencies)for(const t in e.devDependencies)yield[t,e.devDependencies[t]];if(e.dependencies)for(const t in e.dependencies)yield[t,e.dependencies[t]]}(t));for(const[t,i]of ffe(n,r.devDependencies??[]))t in e.dependencies||(e.devDependencies[t]=i);for(const[t,i]of ffe(n,r.dependencies??[]))t in e.devDependencies&&delete e.devDependencies[t],e.dependencies[t]=i;return e}Ghe="win32"===process.platform||y.TESTING_WINDOWS?function(){if(Jhe)return Whe;Jhe=1,Whe=r,r.sync=function(r,n){return t(e.statSync(r),r,n)};var e=i;function t(e,t,r){return!(!e.isSymbolicLink()&&!e.isFile())&&function(e,t){var r=void 0!==t.pathExt?t.pathExt:process.env.PATHEXT;if(!r)return!0;if(-1!==(r=r.split(";")).indexOf(""))return!0;for(var n=0;n<r.length;n++){var i=r[n].toLowerCase();if(i&&e.substr(-i.length).toLowerCase()===i)return!0}return!1}(t,r)}function r(r,n,i){e.stat(r,(function(e,s){i(e,!e&&t(s,r,n))}))}return Whe}():function(){if(Xhe)return Hhe;Xhe=1,Hhe=t,t.sync=function(t,n){return r(e.statSync(t),n)};var e=i;function t(t,n,i){e.stat(t,(function(e,t){i(e,!e&&r(t,n))}))}function r(e,t){return e.isFile()&&function(e,t){var r=e.mode,n=e.uid,i=e.gid,s=void 0!==t.uid?t.uid:process.getuid&&process.getuid(),a=void 0!==t.gid?t.gid:process.getgid&&process.getgid(),o=parseInt("100",8),u=parseInt("010",8);return r&parseInt("001",8)||r&u&&i===a||r&o&&n===s||r&(o|u)&&0===s}(e,t)}return Hhe}();var yfe=gfe;function gfe(e,t,r){if("function"==typeof t&&(r=t,t={}),!r){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise((function(r,n){gfe(e,t||{},(function(e,t){e?n(e):r(t)}))}))}Ghe(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}gfe.sync=function(e,t){try{return Ghe.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}};const bfe=yfe,{join:vfe,delimiter:xfe,sep:Efe,posix:Sfe}=a,Dfe="win32"===process.platform,Tfe=new RegExp(`[${Sfe.sep}${Efe===Sfe.sep?"":Efe}]`.replace(/(\\)/g,"\\$1")),Afe=new RegExp(`^\\.${Tfe.source}`),Cfe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),Pfe=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=xfe})=>{const i=e.match(Tfe)?[""]:[...Dfe?[process.cwd()]:[],...(t||"").split(n)];if(Dfe){const t=r||[".EXE",".CMD",".BAT",".COM"].join(n),s=t.split(n).reduce(((e,t)=>(e.push(t),e.push(t.toLowerCase()),e)),[]);return e.includes(".")&&""!==s[0]&&s.unshift(""),{pathEnv:i,pathExt:s,pathExtExe:t}}return{pathEnv:i,pathExt:[""]}},wfe=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&Afe.test(t)?t.slice(0,2):"")+vfe(r,t)},kfe=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=Pfe(e,t),s=[];for(const a of r){const r=wfe(a,e);for(const e of n){const n=r+e;if(await bfe(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Cfe(e)};var Ffe=kfe;kfe.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=Pfe(e,t),s=[];for(const a of r){const r=wfe(a,e);for(const e of n){const n=r+e;if(bfe.sync(n,{pathExt:i,ignoreErrors:!0})){if(!t.all)return n;s.push(n)}}}if(t.all&&s.length)return s;if(t.nothrow)return null;throw Cfe(e)};var Ife=g(Ffe);function _fe(e,t,r=0){const n=`${" ".repeat(2*r)}${t?t(e):e}`;return e=>`${n} ${e}`}export{mfe as addDependency,dfe as addVitePlugin,f as features,m as flags,_o as generateCode,ufe as loadAsJson,lfe as loadAsMagicast,No as loadFile,cfe as loadRelativeFileAsMagicast,Fo as parseModule,afe as transformAndGenerate,Ife as which,_fe as withIcon};