@batijs/core 0.0.52 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/package.json +2 -2
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}(e3);var a3,o3={};var u3,l3,c3={},p3={};function d3(){if(u3)return p3;u3=1,Object.defineProperty(p3,"__esModule",{value:!0}),p3.validateUnion=p3.validateArray=p3.usePattern=p3.callValidateCode=p3.schemaProperties=p3.allSchemaProperties=p3.noPropertyInData=p3.propertyInData=p3.isOwnProperty=p3.hasPropFunc=p3.reportMissingProp=p3.checkMissingProp=p3.checkReportMissingProp=void 0;const e=W2(),t=J2,r=Q2(),n=J2;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)):[]}p3.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()}))},p3.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}`))))},p3.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},p3.hasPropFunc=i,p3.isOwnProperty=s,p3.propertyInData=function(t,r,n,i){const a=e._`${r}${(0,e.getProperty)(n)} !== undefined`;return i?e._`${a} && ${s(t,r,n)}`:a},p3.noPropertyInData=a,p3.allSchemaProperties=o,p3.schemaProperties=function(e,r){return o(r).filter((n=>!(0,t.alwaysValidSchema)(e,r[n])))},p3.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 p3.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})`})},p3.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)}))}},p3.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)))},p3}function h3(){if(l3)return c3;l3=1,Object.defineProperty(c3,"__esModule",{value:!0}),c3.validateKeywordUsage=c3.validSchemaType=c3.funcKeywordCode=c3.macroKeywordCode=void 0;const e=W2(),t=Q2(),r=d3(),n=Z2();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 c3.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)))},c3.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)},c3.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))},c3.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)}}},c3}var f3,m3={};var y3={},g3=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},b3={exports:{}},v3=b3.exports=function(e,t,r){"function"==typeof t&&(r=t,t={}),x3(t,"function"==typeof(r=t.cb||r)?r:r.pre||function(){},r.post||function(){},e,"",e)};function x3(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 v3.arrayKeywords)for(var d=0;d<p.length;d++)x3(e,t,r,p[d],i+"/"+c+"/"+d,s,i,c,n,d)}else if(c in v3.propsKeywords){if(p&&"object"==typeof p)for(var h in p)x3(e,t,r,p[h],i+"/"+c+"/"+h.replace(/~/g,"~0").replace(/\//g,"~1"),s,i,c,n,h)}else(c in v3.keywords||e.allKeys&&!(c in v3.skipKeywords))&&x3(e,t,r,p,i+"/"+c,s,i,c,n)}r(n,i,s,a,o,u,l)}}v3.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},v3.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},v3.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},v3.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 E3=b3.exports;Object.defineProperty(y3,"__esModule",{value:!0}),y3.getSchemaRefs=y3.resolveUrl=y3.normalizeId=y3._getFullPath=y3.getFullPath=y3.inlineRef=void 0;const S3=J2,D3=g3,T3=E3,A3=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);y3.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!P3(e):!!t&&w3(e)<=t)};const C3=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function P3(e){for(const t in e){if(C3.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(P3))return!0;if("object"==typeof r&&P3(r))return!0}return!1}function w3(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!A3.has(r)&&("object"==typeof e[r]&&(0,S3.eachItem)(e[r],(e=>t+=w3(e))),t===1/0))return 1/0}return t}function k3(e,t="",r){!1!==r&&(t=_3(t));const n=e.parse(t);return F3(e,n)}function F3(e,t){return e.serialize(t).split("#")[0]+"#"}y3.getFullPath=k3,y3._getFullPath=F3;const I3=/#\/?$/;function _3(e){return e?e.replace(I3,""):""}y3.normalizeId=_3,y3.resolveUrl=function(e,t,r){return r=_3(r),e.resolve(t,r)};const N3=/^[a-z_][-a-z0-9._]*$/i;var O3;function B3(){if(O3)return L2;O3=1,Object.defineProperty(L2,"__esModule",{value:!0}),L2.getData=L2.KeywordCxt=L2.validateFunctionCode=void 0;const e=function(){if(G2)return M2;G2=1,Object.defineProperty(M2,"__esModule",{value:!0}),M2.boolOrEmptySchema=M2.topBoolOrEmptySchema=void 0;const e=Z2(),t=W2(),r=Q2(),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 M2.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))},M2.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),i(e)):r.var(t,!0)},M2}(),t=e3,r=s3(),n=e3,i=function(){if(a3)return o3;a3=1,Object.defineProperty(o3,"__esModule",{value:!0}),o3.assignDefaults=void 0;const e=W2(),t=J2;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 o3.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)))},o3}(),s=h3(),a=function(){if(f3)return m3;f3=1,Object.defineProperty(m3,"__esModule",{value:!0}),m3.extendSubschemaMode=m3.extendSubschemaData=m3.getSubschema=void 0;const e=W2(),t=J2;return m3.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')},m3.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)},m3.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},m3}(),o=W2(),u=Q2(),l=y3,c=J2,p=Z2();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)}L2.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)}L2.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 L2.getData=k,L2}y3.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,i=_3(e[r]||t),s={"":i},a=k3(n,i,!1),o={},u=new Set;return T3(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=_3(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!==_3(p)&&("#"===t[0]?(l(e,o[t],t),o[t]=e):this.refs[t]=p),t}function f(e){if("string"==typeof e){if(!N3.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&&!D3(e,t))throw c(r)}function c(e){return new Error(`reference "${e}" resolves to more than one schema`)}};var L3,M3={};function j3(){if(L3)return M3;L3=1,Object.defineProperty(M3,"__esModule",{value:!0});class e extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}return M3.default=e,M3}var R3,$3={};function U3(){if(R3)return $3;R3=1,Object.defineProperty($3,"__esModule",{value:!0});const e=y3;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 $3.default=t,$3}var V3={};Object.defineProperty(V3,"__esModule",{value:!0}),V3.resolveSchema=V3.getCompilingSchema=V3.resolveRef=V3.compileSchema=V3.SchemaEnv=void 0;const z3=W2(),K3=j3(),q3=Q2(),W3=y3,J3=J2,H3=B3();class X3{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,W3.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 G3(e){const t=Q3.call(this,e);if(t)return t;const r=(0,W3.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:i}=this.opts.code,{ownProperties:s}=this.opts,a=new z3.CodeGen(this.scope,{es5:n,lines:i,ownProperties:s});let o;e.$async&&(o=a.scopeValue("Error",{ref:K3.default,code:z3._`require("ajv/dist/runtime/validation_error").default`}));const u=a.scopeName("validate");e.validateName=u;const l={gen:a,allErrors:this.opts.allErrors,data:q3.default.data,parentData:q3.default.parentData,parentDataProperty:q3.default.parentDataProperty,dataNames:[q3.default.data],dataPathArr:[z3.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,z3.stringify)(e.schema)}:{ref:e.schema}),validateName:u,ValidationError:o,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:z3.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:z3._`""`,opts:this.opts,self:this};let c;try{this._compilations.add(e),(0,H3.validateFunctionCode)(l),a.optimize(this.opts.code.optimize);const t=a.toString();c=`${a.scopeRefs(q3.default.scope)}return ${t}`,this.opts.code.process&&(c=this.opts.code.process(c,e));const r=new Function(`${q3.default.self}`,`${q3.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 z3.Name?void 0:e,items:t instanceof z3.Name?void 0:t,dynamicProps:e instanceof z3.Name,dynamicItems:t instanceof z3.Name},r.source&&(r.source.evaluated=(0,z3.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 Y3(e){return(0,W3.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:G3.call(this,e)}function Q3(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 Z3(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||e4.call(this,e,t)}function e4(e,t){const r=this.opts.uriResolver.parse(t),n=(0,W3._getFullPath)(this.opts.uriResolver,r);let i=(0,W3.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return r4.call(this,r,e);const s=(0,W3.normalizeId)(n),a=this.refs[s]||this.schemas[s];if("string"==typeof a){const t=e4.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return r4.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||G3.call(this,a),s===(0,W3.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,W3.resolveUrl)(this.opts.uriResolver,i,n)),new X3({schema:t,schemaId:r,root:e,baseId:i})}return r4.call(this,r,a)}}V3.SchemaEnv=X3,V3.compileSchema=G3,V3.resolveRef=function(e,t,r){var n;r=(0,W3.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let s=Z3.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 X3({schema:i,schemaId:a,root:e,baseId:t}))}return void 0!==s?e.refs[r]=Y3.call(this,s):void 0},V3.getCompilingSchema=Q3,V3.resolveSchema=e4;const t4=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function r4(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,J3.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!t4.has(n)&&i&&(t=(0,W3.resolveUrl)(this.opts.uriResolver,t,i))}let s;if("boolean"!=typeof r&&r.$ref&&!(0,J3.schemaHasRulesButRef)(r,this.RULES)){const e=(0,W3.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=e4.call(this,n,e)}const{schemaId:a}=this.opts;return s=s||new X3({schema:r,schemaId:a,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}var n4={$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},i4={},s4={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})}(s4.exports);var a4=s4.exports;Object.defineProperty(i4,"__esModule",{value:!0});const o4=a4;o4.code='require("ajv/dist/runtime/uri").default',i4.default=o4,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=B3();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=W2();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=j3(),i=U3(),s=t3,a=V3,o=W2(),u=y3,l=e3,c=J2,p=n4,d=i4,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,_]}}}(B2);var u4={},l4={},c4={};Object.defineProperty(c4,"__esModule",{value:!0});const p4={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};c4.default=p4;var d4={};Object.defineProperty(d4,"__esModule",{value:!0}),d4.callRef=d4.getValidate=void 0;const h4=U3(),f4=d3(),m4=W2(),y4=Q2(),g4=V3,b4=J2,v4={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 E4(e,a,s,s.$async);const r=t.scopeValue("root",{ref:l});return E4(e,m4._`${r}.validate`,l,l.$async)}();const c=g4.resolveRef.call(u,l,i,r);if(void 0===c)throw new h4.default(n.opts.uriResolver,i,r);return c instanceof g4.SchemaEnv?function(t){const r=x4(e,t);E4(e,r,t,t.$async)}(c):function(n){const i=t.scopeValue("schema",!0===o.code.source?{ref:n,code:(0,m4.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:m4.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(c)}};function x4(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):m4._`${r.scopeValue("wrapper",{ref:t})}.validate`}function E4(e,t,r,n){const{gen:i,it:s}=e,{allErrors:a,schemaEnv:o,opts:u}=s,l=u.passContext?y4.default.this:m4.nil;function c(e){const t=m4._`${e}.errors`;i.assign(y4.default.vErrors,m4._`${y4.default.vErrors} === null ? ${t} : ${y4.default.vErrors}.concat(${t})`),i.assign(y4.default.errors,m4._`${y4.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=b4.mergeEvaluated.props(i,n.props,s.props));else{const t=i.var("props",m4._`${e}.evaluated.props`);s.props=b4.mergeEvaluated.props(i,t,s.props,m4.Name)}if(!0!==s.items)if(n&&!n.dynamicItems)void 0!==n.items&&(s.items=b4.mergeEvaluated.items(i,n.items,s.items));else{const t=i.var("items",m4._`${e}.evaluated.items`);s.items=b4.mergeEvaluated.items(i,t,s.items,m4.Name)}}n?function(){if(!o.$async)throw new Error("async schema referenced by sync schema");const r=i.let("valid");i.try((()=>{i.code(m4._`await ${(0,f4.callValidateCode)(e,t,l)}`),p(t),a||i.assign(r,!0)}),(e=>{i.if(m4._`!(${e} instanceof ${s.ValidationError})`,(()=>i.throw(e))),c(e),a||i.assign(r,!1)})),e.ok(r)}():e.result((0,f4.callValidateCode)(e,t,l),(()=>p(t)),(()=>c(t)))}d4.getValidate=x4,d4.callRef=E4,d4.default=v4,Object.defineProperty(l4,"__esModule",{value:!0});const S4=d4,D4=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",c4.default,S4.default];l4.default=D4;var T4={},A4={};Object.defineProperty(A4,"__esModule",{value:!0});const C4=W2(),P4=C4.operators,w4={maximum:{okStr:"<=",ok:P4.LTE,fail:P4.GT},minimum:{okStr:">=",ok:P4.GTE,fail:P4.LT},exclusiveMaximum:{okStr:"<",ok:P4.LT,fail:P4.GTE},exclusiveMinimum:{okStr:">",ok:P4.GT,fail:P4.LTE}},k4={message:({keyword:e,schemaCode:t})=>C4.str`must be ${w4[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>C4._`{comparison: ${w4[e].okStr}, limit: ${t}}`},F4={keyword:Object.keys(w4),type:"number",schemaType:"number",$data:!0,error:k4,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data(C4._`${r} ${w4[t].fail} ${n} || isNaN(${r})`)}};A4.default=F4;var I4={};Object.defineProperty(I4,"__esModule",{value:!0});const _4=W2(),N4={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>_4.str`must be multiple of ${e}`,params:({schemaCode:e})=>_4._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:n,it:i}=e,s=i.opts.multipleOfPrecision,a=t.let("res"),o=s?_4._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:_4._`${a} !== parseInt(${a})`;e.fail$data(_4._`(${n} === 0 || (${a} = ${r}/${n}, ${o}))`)}};I4.default=N4;var O4={},B4={};function L4(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(B4,"__esModule",{value:!0}),B4.default=L4,L4.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(O4,"__esModule",{value:!0});const M4=W2(),j4=J2,R4=B4,$4={message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return M4.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>M4._`{limit: ${e}}`},U4={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:$4,code(e){const{keyword:t,data:r,schemaCode:n,it:i}=e,s="maxLength"===t?M4.operators.GT:M4.operators.LT,a=!1===i.opts.unicode?M4._`${r}.length`:M4._`${(0,j4.useFunc)(e.gen,R4.default)}(${r})`;e.fail$data(M4._`${a} ${s} ${n}`)}};O4.default=U4;var V4={};Object.defineProperty(V4,"__esModule",{value:!0});const z4=d3(),K4=W2(),q4={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>K4.str`must match pattern "${e}"`,params:({schemaCode:e})=>K4._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:n,schemaCode:i,it:s}=e,a=s.opts.unicodeRegExp?"u":"",o=r?K4._`(new RegExp(${i}, ${a}))`:(0,z4.usePattern)(e,n);e.fail$data(K4._`!${o}.test(${t})`)}};V4.default=q4;var W4={};Object.defineProperty(W4,"__esModule",{value:!0});const J4=W2(),H4={message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return J4.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>J4._`{limit: ${e}}`},X4={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:H4,code(e){const{keyword:t,data:r,schemaCode:n}=e,i="maxProperties"===t?J4.operators.GT:J4.operators.LT;e.fail$data(J4._`Object.keys(${r}).length ${i} ${n}`)}};W4.default=X4;var G4={};Object.defineProperty(G4,"__esModule",{value:!0});const Y4=d3(),Q4=W2(),Z4=J2,e8={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>Q4.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>Q4._`{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(Q4.nil,l);else for(const t of r)(0,Y4.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,Y4.propertyInData)(t,i,r,o.ownProperties)),t.if((0,Q4.not)(s),(()=>{e.error(),t.break()}))}),Q4.nil)}(a,r))),e.ok(r)}else t.if((0,Y4.checkMissingProp)(e,r,a)),(0,Y4.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,Z4.checkStrictMode)(a,t,a.opts.strictRequired)}}function l(){t.forOf("prop",n,(r=>{e.setParams({missingProperty:r}),t.if((0,Y4.noPropertyInData)(t,i,r,o.ownProperties),(()=>e.error()))}))}}};G4.default=e8;var t8={};Object.defineProperty(t8,"__esModule",{value:!0});const r8=W2(),n8={message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return r8.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>r8._`{limit: ${e}}`},i8={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:n8,code(e){const{keyword:t,data:r,schemaCode:n}=e,i="maxItems"===t?r8.operators.GT:r8.operators.LT;e.fail$data(r8._`${r}.length ${i} ${n}`)}};t8.default=i8;var s8={},a8={};Object.defineProperty(a8,"__esModule",{value:!0});const o8=g3;o8.code='require("ajv/dist/runtime/equal").default',a8.default=o8,Object.defineProperty(s8,"__esModule",{value:!0});const u8=e3,l8=W2(),c8=J2,p8=a8,d8={message:({params:{i:e,j:t}})=>l8.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>l8._`{i: ${e}, j: ${t}}`},h8={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:d8,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,u8.getSchemaTypes)(s.items):[];function c(n,i){const s=t.name("item"),a=(0,u8.checkDataTypes)(l,s,o.opts.strictNumbers,u8.DataType.Wrong),c=t.const("indices",l8._`{}`);t.for(l8._`;${n}--;`,(()=>{t.let(s,l8._`${r}[${n}]`),t.if(a,l8._`continue`),l.length>1&&t.if(l8._`typeof ${s} == "string"`,l8._`${s} += "_"`),t.if(l8._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(i,l8._`${c}[${s}]`),e.error(),t.assign(u,!1).break()})).code(l8._`${c}[${s}] = ${n}`)}))}function p(n,i){const s=(0,c8.useFunc)(t,p8.default),a=t.name("outer");t.label(a).for(l8._`;${n}--;`,(()=>t.for(l8._`${i} = ${n}; ${i}--;`,(()=>t.if(l8._`${s}(${r}[${n}], ${r}[${i}])`,(()=>{e.error(),t.assign(u,!1).break(a)}))))))}e.block$data(u,(function(){const n=t.let("i",l8._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(u,!0),t.if(l8._`${n} > 1`,(()=>(l.length>0&&!l.some((e=>"object"===e||"array"===e))?c:p)(n,i)))}),l8._`${a} === false`),e.ok(u)}};s8.default=h8;var f8={};Object.defineProperty(f8,"__esModule",{value:!0});const m8=W2(),y8=J2,g8=a8,b8={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>m8._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:n,schemaCode:i,schema:s}=e;n||s&&"object"==typeof s?e.fail$data(m8._`!${(0,y8.useFunc)(t,g8.default)}(${r}, ${i})`):e.fail(m8._`${s} !== ${r}`)}};f8.default=b8;var v8={};Object.defineProperty(v8,"__esModule",{value:!0});const x8=W2(),E8=J2,S8=a8,D8={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>x8._`{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,E8.useFunc)(t,S8.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(x8._`${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,x8.or)(...i.map(((t,n)=>function(e,t){const n=i[t];return"object"==typeof n&&null!==n?x8._`${l()}(${r}, ${e}[${t}])`:x8._`${r} === ${n}`}(e,n))))}e.pass(c)}};v8.default=D8,Object.defineProperty(T4,"__esModule",{value:!0});const T8=I4,A8=O4,C8=V4,P8=W4,w8=G4,k8=t8,F8=s8,I8=f8,_8=v8,N8=[A4.default,T8.default,A8.default,C8.default,P8.default,w8.default,k8.default,F8.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},I8.default,_8.default];T4.default=N8;var O8={},B8={};Object.defineProperty(B8,"__esModule",{value:!0}),B8.validateAdditionalItems=void 0;const L8=W2(),M8=J2,j8={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>L8.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>L8._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?R8(e,n):(0,M8.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function R8(e,t){const{gen:r,schema:n,data:i,keyword:s,it:a}=e;a.items=!0;const o=r.const("len",L8._`${i}.length`);if(!1===n)e.setParams({len:t.length}),e.pass(L8._`${o} <= ${t.length}`);else if("object"==typeof n&&!(0,M8.alwaysValidSchema)(a,n)){const n=r.var("valid",L8._`${o} <= ${t.length}`);r.if((0,L8.not)(n),(()=>function(n){r.forRange("i",t.length,o,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:M8.Type.Num},n),a.allErrors||r.if((0,L8.not)(n),(()=>r.break()))}))}(n))),e.ok(n)}}B8.validateAdditionalItems=R8,B8.default=j8;var $8={},U8={};Object.defineProperty(U8,"__esModule",{value:!0}),U8.validateTuple=void 0;const V8=W2(),z8=J2,K8=d3(),q8={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return W8(e,"additionalItems",t);r.items=!0,(0,z8.alwaysValidSchema)(r,t)||e.ok((0,K8.validateArray)(e))}};function W8(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,z8.checkStrictMode)(o,e,n.strictTuples)}}(i),o.opts.unevaluated&&r.length&&!0!==o.items&&(o.items=z8.mergeEvaluated.items(n,r.length,o.items));const u=n.name("valid"),l=n.const("len",V8._`${s}.length`);r.forEach(((t,r)=>{(0,z8.alwaysValidSchema)(o,t)||(n.if(V8._`${l} > ${r}`,(()=>e.subschema({keyword:a,schemaProp:r,dataProp:r},u))),e.ok(u))}))}U8.validateTuple=W8,U8.default=q8,Object.defineProperty($8,"__esModule",{value:!0});const J8=U8,H8={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,J8.validateTuple)(e,"items")};$8.default=H8;var X8={};Object.defineProperty(X8,"__esModule",{value:!0});const G8=W2(),Y8=J2,Q8=d3(),Z8=B8,e5={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>G8.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>G8._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:i}=r;n.items=!0,(0,Y8.alwaysValidSchema)(n,t)||(i?(0,Z8.validateAdditionalItems)(e,i):e.ok((0,Q8.validateArray)(e)))}};X8.default=e5;var t5={};Object.defineProperty(t5,"__esModule",{value:!0});const r5=W2(),n5=J2,i5={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?r5.str`must contain at least ${e} valid item(s)`:r5.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?r5._`{minContains: ${e}}`:r5._`{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",r5._`${i}.length`);if(e.setParams({min:a,max:o}),void 0===o&&0===a)return void(0,n5.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==o&&a>o)return(0,n5.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,n5.alwaysValidSchema)(s,r)){let t=r5._`${c} >= ${a}`;return void 0!==o&&(t=r5._`${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(r5._`${e}++`),void 0===o?t.if(r5._`${e} >= ${a}`,(()=>t.assign(p,!0).break())):(t.if(r5._`${e} > ${o}`,(()=>t.assign(p,!1).break())),1===a?t.assign(p,!0):t.if(r5._`${e} >= ${a}`,(()=>t.assign(p,!0))))}(r)))))}function h(r,n){t.forRange("i",0,c,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:n5.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(r5._`${i}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,(()=>e.reset()))}};t5.default=i5;var s5={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=W2(),r=J2,n=d3();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}(s5);var a5={};Object.defineProperty(a5,"__esModule",{value:!0});const o5=W2(),u5=J2,l5={message:"property name must be valid",params:({params:e})=>o5._`{propertyName: ${e.propertyName}}`},c5={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:l5,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,u5.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,o5.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};a5.default=c5;var p5={};Object.defineProperty(p5,"__esModule",{value:!0});const d5=d3(),h5=W2(),f5=Q2(),m5=J2,y5={message:"must NOT have additional properties",params:({params:e})=>h5._`{additionalProperty: ${e.additionalProperty}}`},g5={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:y5,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,m5.alwaysValidSchema)(a,r))return;const l=(0,d5.allSchemaProperties)(n.properties),c=(0,d5.allSchemaProperties)(n.patternProperties);function p(e){t.code(h5._`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,m5.alwaysValidSchema)(a,r)){const r=t.name("valid");"failing"===u.removeAdditional?(h(n,r,!1),t.if((0,h5.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,h5.not)(r),(()=>t.break())))}}}function h(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:m5.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,m5.schemaRefOrVal)(a,n.properties,"properties");i=(0,d5.isOwnProperty)(t,e,r)}else i=l.length?(0,h5.or)(...l.map((e=>h5._`${r} === ${e}`))):h5.nil;return c.length&&(i=(0,h5.or)(i,...c.map((t=>h5._`${(0,d5.usePattern)(e,t)}.test(${r})`)))),(0,h5.not)(i)}(r),(()=>d(r))):d(r)})),e.ok(h5._`${s} === ${f5.default.errors}`)}};p5.default=g5;var b5={};Object.defineProperty(b5,"__esModule",{value:!0});const v5=B3(),x5=d3(),E5=J2,S5=p5,D5={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&&S5.default.code(new v5.KeywordCxt(s,S5.default,"additionalProperties"));const a=(0,x5.allSchemaProperties)(r);for(const e of a)s.definedProperties.add(e);s.opts.unevaluated&&a.length&&!0!==s.props&&(s.props=E5.mergeEvaluated.props(t,(0,E5.toHash)(a),s.props));const o=a.filter((e=>!(0,E5.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,x5.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)}}};b5.default=D5;var T5={};Object.defineProperty(T5,"__esModule",{value:!0});const A5=d3(),C5=W2(),P5=J2,w5=J2,k5={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,A5.allSchemaProperties)(r),u=o.filter((e=>(0,P5.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 C5.Name||(s.props=(0,w5.evaluatedPropsToName)(t,s.props));const{props:p}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,P5.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(C5._`${(0,A5.usePattern)(e,r)}.test(${n})`,(()=>{const i=u.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:w5.Type.Str},c),s.opts.unevaluated&&!0!==p?t.assign(C5._`${p}[${n}]`,!0):i||s.allErrors||t.if((0,C5.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))}()}};T5.default=k5;var F5={};Object.defineProperty(F5,"__esModule",{value:!0});const I5=J2,_5={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,I5.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"}};F5.default=_5;var N5={};Object.defineProperty(N5,"__esModule",{value:!0});const O5={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:d3().validateUnion,error:{message:"must match a schema in anyOf"}};N5.default=O5;var B5={};Object.defineProperty(B5,"__esModule",{value:!0});const L5=W2(),M5=J2,j5={message:"must match exactly one schema in oneOf",params:({params:e})=>L5._`{passingSchemas: ${e.passing}}`},R5={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:j5,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,M5.alwaysValidSchema)(i,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(L5._`${u} && ${a}`).assign(a,!1).assign(o,L5._`[${o}, ${n}]`).else(),t.if(u,(()=>{t.assign(a,!0),t.assign(o,n),s&&e.mergeEvaluated(s,L5.Name)}))}))})),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}};B5.default=R5;var $5={};Object.defineProperty($5,"__esModule",{value:!0});const U5=J2,V5={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,U5.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};$5.default=V5;var z5={};Object.defineProperty(z5,"__esModule",{value:!0});const K5=W2(),q5=J2,W5={message:({params:e})=>K5.str`must match "${e.ifClause}" schema`,params:({params:e})=>K5._`{failingKeyword: ${e.ifClause}}`},J5={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:W5,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,q5.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=H5(n,"then"),s=H5(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,K5.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,K5._`${r}`):e.setParams({ifClause:r})}}e.pass(a,(()=>e.error(!0)))}};function H5(e,t){const r=e.schema[t];return void 0!==r&&!(0,q5.alwaysValidSchema)(e,r)}z5.default=J5;var X5={};Object.defineProperty(X5,"__esModule",{value:!0});const G5=J2,Y5={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,G5.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};X5.default=Y5,Object.defineProperty(O8,"__esModule",{value:!0});const Q5=B8,Z5=$8,e6=U8,t6=X8,r6=t5,n6=s5,i6=a5,s6=p5,a6=b5,o6=T5,u6=F5,l6=N5,c6=B5,p6=$5,d6=z5,h6=X5;O8.default=function(e=!1){const t=[u6.default,l6.default,c6.default,p6.default,d6.default,h6.default,i6.default,s6.default,n6.default,a6.default,o6.default];return e?t.push(Z5.default,t6.default):t.push(Q5.default,e6.default),t.push(r6.default),t};var f6={},m6={};Object.defineProperty(m6,"__esModule",{value:!0});const y6=W2(),g6={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>y6.str`must match format "${e}"`,params:({schemaCode:e})=>y6._`{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",y6._`${i}[${a}]`),o=r.let("fType"),l=r.let("format");r.if(y6._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(o,y6._`${s}.type || "string"`).assign(l,y6._`${s}.validate`)),(()=>r.assign(o,y6._`"string"`).assign(l,s))),e.fail$data((0,y6.or)(!1===u.strictSchema?y6.nil:y6._`${a} && !${l}`,function(){const e=c.$async?y6._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:y6._`${l}(${n})`,r=y6._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return y6._`${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,y6.regexpCode)(e):u.code.formats?y6._`${u.code.formats}${(0,y6.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,y6._`${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 y6._`await ${d}(${n})`}return"function"==typeof o?y6._`${d}(${n})`:y6._`${d}.test(${n})`}())}())}};m6.default=g6,Object.defineProperty(f6,"__esModule",{value:!0});const b6=[m6.default];f6.default=b6;var v6={};Object.defineProperty(v6,"__esModule",{value:!0}),v6.contentVocabulary=v6.metadataVocabulary=void 0,v6.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],v6.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(u4,"__esModule",{value:!0});const x6=T4,E6=O8,S6=f6,D6=v6,T6=[l4.default,x6.default,(0,E6.default)(),S6.default,D6.metadataVocabulary,D6.contentVocabulary];u4.default=T6;var A6,C6,P6={},w6={};A6=w6,Object.defineProperty(A6,"__esModule",{value:!0}),A6.DiscrError=void 0,(C6=A6.DiscrError||(A6.DiscrError={})).Tag="tag",C6.Mapping="mapping",Object.defineProperty(P6,"__esModule",{value:!0});const k6=W2(),F6=w6,I6=V3,_6=J2,N6={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===F6.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>k6._`{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",k6._`${r}${(0,k6.getProperty)(o)}`);function c(r){const n=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(i,k6.Name),n}t.if(k6._`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,_6.schemaHasRulesButRef)(i,s.self.RULES)&&(i=I6.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==i?void 0:i.$ref),i instanceof I6.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(k6._`${l} === ${e}`),t.assign(u,c(r[e]));t.else(),e.error(!1,{discrError:F6.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:F6.DiscrError.Tag,tag:l,tagName:o}))),e.ok(u)}};P6.default=N6;var O6={$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=B2,n=u4,i=P6,s=O6,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=B3();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=W2();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=j3();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=U3();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(O2,O2.exports);const B6={$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,O2.exports)({strict:!0,allowUnionTypes:!0}).compile(B6);const{homedir:L6}=r,{readdirSync:M6}=i,{dirname:j6,join:R6}=a,$6=tT,U6=XD,V6=L6(),z6=e=>"."!==e[0]&&!/(^not-rule-.*|^node_modules$)/.test(e);$6((()=>{const e=R6(V6,".putout.json"),[,t={}]=U6(hO,e);return t})),$6((()=>function(e,t){if(!t)return{};let r=R6(e,t);r.startsWith("/")||(r=R6(process.cwd(),t));const[n,i]=U6(M6,r);if(n)return{};const s=[];for(const e of i.filter(z6)){const t=hO(R6(r,e)),n=e.replace("putout-plugin-","");s.push([n,t])}return{plugins:s}}(V6,".putout"))),process.cwd();var K6={},q6={};const{isIdentifier:W6,isObjectExpression:J6,isObjectPattern:H6,isTemplateLiteral:X6,isAssignmentPattern:G6}=k1().types,Y6=({use:e,declare:t})=>{const r=t7({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)}}}};q6.traverseObjectPattern=Y6;const Q6=({use:e,declare:t})=>r=>{for(const n of r){const{key:r,value:i,computed:s}=n.node;if(s&&W6(r)&&e(n,r.name),W6(i))t(n,i.name);else if(H6(i)){Q6({use:e,declare:t})(n.get("value.properties"))}else if(G6(i)){t7({use:e})(n.get("value.right"));const r=n.get("value.left");if("Identifier"===r.type){t(n,r.node.name);continue}}}};q6.processObjectPattern=Q6;const Z6=e=>{const t=e7(e);return r=>{for(const n of r){const{node:r}=n,{key:i,value:s,computed:a}=r;if(a&&W6(i)&&e(n,i.name),W6(s))e(n,s.name);else if(X6(s))t(n,s.expressions);else if(J6(s)){Z6(e)(n.get("value.properties"))}else;}}};q6.traverseObjectExpression=Z6;q6.traverseArrayExpression=e=>{const t=Z6(e);return e=>{for(const r of e){const{node:e}=r;J6(e)&&t(r.get("properties"))}}};q6.traverseAssignmentExpression=({use:e,declare:t})=>{const r=Y6({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 e7=e=>(t,r)=>{for(const n of r)W6(n)&&e(t,n.name)};q6.traverseTemplateLiteral=e7;const t7=({use:e})=>t=>{const{node:r}=t,{right:n}=r;W6(r)&&e(t.parentPath,r.name),W6(n)&&e(t,n.name)};q6.traverseAssignmentPattern=t7;const{types:r7}=k1(),{isIdentifier:n7,isJSXIdentifier:i7}=r7;const{types:s7}=k1(),{isIdentifier:a7}=s7;const{types:o7}=k1(),{isIdentifier:u7,isTSModuleDeclaration:l7}=o7;const{isAssignmentPattern:c7,isClassDeclaration:p7,isIdentifier:d7,isSpreadElement:h7,isObjectPattern:f7,isObjectExpression:m7,isFunctionDeclaration:y7,isArrayExpression:g7,isVariableDeclaration:b7,isRestElement:v7}=k1().types,{traverseObjectExpression:x7,processObjectPattern:E7,traverseArrayExpression:S7,traverseAssignmentExpression:D7,traverseTemplateLiteral:T7}=q6,A7=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;i7(n)&&e(t,n.name)},JSXExpressionContainer(t){const{node:r}=t,{expression:n}=r;n7(n)&&e(t,n.name)}}),C7=({use:e,declare:t})=>({GenericTypeAnnotation(t){const{node:r}=t,{id:n}=r;a7(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)}}),P7=({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":u7(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(l7)&&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:w7}=Object;const k7=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 F7={};const{types:I7}=k1(),{isIdentifier:_7,isObjectPattern:N7,isRestElement:O7}=I7;function B7(e,t,r){const{length:n}=r,i=r[n-1];if(O7(i))for(let i=0;i<n-1;i++){const{value:n}=r[i],{type:s}=n;"Identifier"!==s||e(t,n.name)}}F7.usePropertiesBeforeRest=({use:e})=>({path:t,params:r})=>{for(const n of r)N7(n)&&B7(e,t,n.properties)},F7.useParamsBeforeLastUsed=({use:e,isUsed:t})=>({path:r,params:n})=>{let i=n.length;for(;--i>0;){const e=n[i];if(L7(t,r,e))break}for(;--i>=0;)_7(n[i])&&e(r,n[i].name);return{path:r,params:n}};const L7=(e,t,r)=>{const{type:n}=r;switch(n){case"Identifier":return e(t,r.name);case"ObjectPattern":return j7(e,t,r);case"AssignmentPattern":return M7(e,t,r)}},M7=(e,t,r)=>{const{left:n}=r,{type:i}=n;switch(i){case"Identifier":return e(t,n.name);case"ObjectPattern":return j7(e,t,n)}},j7=(e,t,r)=>{for(const{value:n}of r.properties)if(_7(n)){if(e(t,n.name))return!0}else;return!1},{types:R7}=k1(),$7=({use:e,declare:t,addParams:r})=>{const n=x7(e),i=E7({use:e,declare:t}),s=D7({use:e,declare:t}),a=T7(e),o=S7(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;d7(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;d7(r)&&t(e,r.name)},VariableDeclarator(r){const{node:n}=r,{init:a}=n,u=r.get("id"),l=r.parentPath.parentPath.isForInStatement();if(d7(n.id))t(r,n.id.name),l&&e(r,n.id.name);else if(f7(n.id))u.traverse({ObjectProperty(i){if(c7(i.node.value)&&s(i.get("value")),i.node.computed&&d7(i.node.key)&&e(i.get("key"),i.node.key.name),!d7(i.node.value))return;const{properties:a}=n.id,o=1===a.length?r:i,{name:u}=i.node.value;t(o,u),v7(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),w7(r,{remove:k7(n)})}n.isIdentifier()&&(w7(n,{remove:k7(n)}),t(n,n.node.name))}}const c=r.get("init");d7(a)?e(r,a.name):g7(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)d7(n)?e(t,n.name):h7(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");d7(r)&&e(t,r.name),d7(n)&&e(t,n.name),d7(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;d7(r)&&e(t,r.name),d7(n)&&e(t,n.name)},MemberExpression(t){const{property:r,object:n,computed:i}=t.node;d7(n)&&e(t,n.name),i&&d7(r)&&e(t,r.name)},OptionalMemberExpression(t){const{object:r,property:n,computed:i}=t.node;d7(r)&&e(t,r.name),i&&d7(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)d7(r)&&e(t,r.name)},TaggedTemplateExpression(t){const{tag:r}=t.node;d7(r)&&e(t,r.name)},UnaryExpression(t){const{argument:r}=t.node;d7(r)&&e(t,r.name)},UpdateExpression(t){const{argument:r}=t.node;d7(r)&&e(t,r.name)},ThrowStatement(t){const{argument:r}=t.node;d7(r)&&e(t,r.name)},IfStatement(t){const{node:r}=t,{test:n}=r;if(d7(n))return e(t,n.name)},ForInStatement(t){const{node:r}=t,{left:n,right:i}=r;d7(n)&&e(t,n.name),d7(i)&&e(t,i.name)},ForOfStatement(r){const{node:n}=r,{left:i,right:s}=n;d7(s)&&e(r,s.name),d7(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;d7(r.expression)&&e(t,r.expression.name)},SwitchStatement(t){const{node:r}=t;d7(r.discriminant)&&e(t,r.discriminant.name);for(const{test:n}of r.cases)d7(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;d7(r)&&t(e,r.name)}r({path:e,params:n})},"CallExpression|OptionalCallExpression"(t){const{node:r}=t,{callee:n}=r;d7(n)&&e(t,r.callee.name),t.traverse({SpreadElement(t){const{argument:r}=t.node;d7(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;d7(r)&&e(t,r.name),d7(n)&&e(t,n.name)},ImportDeclaration(e){const r=e.get("specifiers");for(const e of r){const{local:r}=e.node;d7(r)&&t(e,r.name)}},ExportDefaultDeclaration(t){const r=t.get("declaration"),{declaration:i}=t.node,{id:s}=i;s&&y7(i)?e(t,i.id.name):d7(i)?e(t,i.name):s&&p7(i)?e(t,i.id.name):m7(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(b7(n)){const{declarations:r}=n;for(const{id:n}of r)d7(n)&&e(t,n.name)}else for(const{local:r}of i)d7(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;d7(r)?t(e,r.name):c7(r)?s(e):f7(r)&&i(e.get("properties"))}d7(l)&&e(n,l.name),r({path:n,params:c})},...A7(e),...C7({use:e,declare:t}),...P7({use:e,declare:t})}},{useParamsBeforeLastUsed:U7,usePropertiesBeforeRest:V7}=F7,{isClassDeclaration:z7,isFunctionDeclaration:K7}=R7;const q7=e=>({path:t,params:r})=>{e.push({path:t,params:r})};function W7({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 J7=({vars:e})=>(t,r)=>{const{scope:n}=t,i=W7({name:r,scope:n}),s=e[i],{used:a}=s[r];return a};const H7=({vars:e,setPath:t})=>(r,n)=>{const i=function(e){const{node:t,scope:r}=e;return K7(t)||z7(t)?e.parentPath.scope:r}(r),s=W7({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)},X7=({vars:e})=>(t,r)=>{const{scope:n}=t,i=W7({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 G7([e,t]){return{name:e,...t}}const Y7=({declared:e,used:t})=>e&&!t;const{operator:Q7}=k1(),Z7=(e,t)=>{const r={},n=[],{setPath:i,traverse:s}=t,a=X7({vars:r}),o=H7({vars:r,setPath:i}),u=J7({vars:r}),l=q7(n);return s(e,$7({use:a,declare:o,addParams:l})),n.map(U7({use:a,isUsed:u})).map(V7({use:a})),Object.values(r)},e9=e=>{const t=[];for(const r of e){const e=Object.entries(r);for(const r of e)t.push(G7(r))}return t},t9=e=>e.filter(Y7),{replaceWith:r9,compare:n9,remove:i9}=Q7;K6.report=({name:e})=>`'${e}' is defined but never used`,K6.fix=({path:e})=>n9(e,"const __a = __b = __c")?r9(e.parentPath,e.node.init):function({parentPath:e}){return!!e.isImportDeclaration()&&1===e.node.specifiers.length}(e)?e.parentPath.remove():void i9(e),K6.find=(e,{traverse:t})=>{const r=Z7(e,{setPath:!0,traverse:t}),n=e9(r);return t9(n)};var s9=Object.create,a9=Object.defineProperty,o9=Object.getOwnPropertyDescriptor,u9=Object.getOwnPropertyNames,l9=Object.getPrototypeOf,c9=Object.prototype.hasOwnProperty,p9=(e,t)=>()=>(e&&(t=e(e=0)),t),d9=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h9=(e,t)=>{for(var r in t)a9(e,r,{get:t[r],enumerable:!0})},f9=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of u9(t))!c9.call(e,i)&&i!==r&&a9(e,i,{get:()=>t[i],enumerable:!(n=o9(t,i))||n.enumerable});return e},m9=(e,t,r)=>(r=null!=e?s9(l9(e)):{},f9(!t&&e&&e.__esModule?r:a9(r,"default",{value:e,enumerable:!0}),e)),y9=e=>f9(a9({},"__esModule",{value:!0}),e),g9=(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)},b9=(e,t,r)=>(((e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)})(e,t,"access private method"),r),v9=d9((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("")}}})),x9=d9((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}}(v9());var r=new t.default;e.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}})),E9={};function S9(e,t){function r(){this.constructor=e}K9(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function D9(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 T9(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 A9(e,t){return function(r,n){t(r,n,e)}}function C9(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function P9(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 w9(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 k9(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function F9(e,t){for(var r in e)"default"!==r&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function I9(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 _9(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 N9(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_9(arguments[t]));return e}function O9(){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 B9(e){return this instanceof B9?(this.v=e,this):new B9(e)}function L9(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 B9?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 M9(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:B9(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function j9(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=I9(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 R9(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function $9(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 U9(e){return e&&e.__esModule?e:{default:e}}function V9(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function z9(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}h9(E9,{__assign:()=>q9,__asyncDelegator:()=>M9,__asyncGenerator:()=>L9,__asyncValues:()=>j9,__await:()=>B9,__awaiter:()=>P9,__classPrivateFieldGet:()=>V9,__classPrivateFieldSet:()=>z9,__createBinding:()=>k9,__decorate:()=>T9,__exportStar:()=>F9,__extends:()=>S9,__generator:()=>w9,__importDefault:()=>U9,__importStar:()=>$9,__makeTemplateObject:()=>R9,__metadata:()=>C9,__param:()=>A9,__read:()=>_9,__rest:()=>D9,__spread:()=>N9,__spreadArrays:()=>O9,__values:()=>I9});var K9,q9,W9=p9((()=>{K9=function(e,t){return K9=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])},K9(e,t)},q9=function(){return q9=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},q9.apply(this,arguments)}})),J9=d9((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})}})),H9=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(J9(),e)})),X9={};h9(X9,{default:()=>Y9});var G9,Y9,Q9=p9((()=>{G9=e=>e,G9.grey=G9,G9.red=G9,G9.bold=G9,G9.yellow=G9,G9.blue=G9,G9.default=G9,Y9=G9})),Z9=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Q9(),y9(X9));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("; ")+"."}})),eee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(Z9(),e)})),tee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Q9(),y9(X9));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(" ")})),ree=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(tee(),e)})),nee=d9(((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}})),iee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Q9(),y9(X9)),r=nee();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(" "))}})),see=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(iee(),e)})),aee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9));t.__exportStar(eee(),e),t.__exportStar(ree(),e),t.__exportStar(see(),e)})),oee=d9((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})),uee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),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})),lee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"anything"}validate(){return!0}};e.AnySchema=r})),cee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9)),r=oee(),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})),pee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};e.BooleanSchema=r})),dee=d9((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}}})),hee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=dee(),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})),fee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"a number"}validate(e,t){return"number"==typeof e}};e.NumberSchema=r})),mee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=dee(),r=fee(),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})),yee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"a string"}validate(e){return"string"==typeof e}};e.StringSchema=r})),gee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9));t.__exportStar(uee(),e),t.__exportStar(lee(),e),t.__exportStar(cee(),e),t.__exportStar(pee(),e),t.__exportStar(hee(),e),t.__exportStar(mee(),e),t.__exportStar(fee(),e),t.__exportStar(yee(),e)})),bee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=J9(),r=Z9(),n=ree(),i=iee();e.defaultDescriptor=t.apiDescriptor,e.defaultUnknownHandler=i.levenUnknownHandler,e.defaultInvalidHandler=n.commonInvalidHandler,e.defaultDeprecatedHandler=r.commonDeprecatedHandler})),vee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=bee(),r=dee();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})),xee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9));t.__exportStar(H9(),e),t.__exportStar(aee(),e),t.__exportStar(gee(),e),t.__exportStar(vee(),e),t.__exportStar(oee(),e)})),Eee={};h9(Eee,{getChalk:()=>Dee,shouldHighlight:()=>See});var See,Dee,Tee=p9((()=>{Q9(),See=()=>!1,Dee=()=>Y9})),Aee=d9((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=(Tee(),y9(Eee)),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}}));h9({},{__debug:()=>One,check:()=>_ne,doc:()=>Tne,format:()=>Ine,formatWithCursor:()=>Fne,getSupportInfo:()=>Nne,util:()=>cne,version:()=>wne});var Cee=(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)},Pee=m9(x9(),1),wee="string",kee="array",Fee="cursor",Iee="indent",_ee="align",Nee="trim",Oee="group",Bee="fill",Lee="if-break",Mee="indent-if-break",jee="line-suffix",Ree="line-suffix-boundary",$ee="line",Uee="label",Vee="break-parent",zee=new Set([Fee,Iee,_ee,Nee,Oee,Bee,Lee,Mee,jee,Ree,$ee,Uee,Vee]);var Kee=function(e){if("string"==typeof e)return wee;if(Array.isArray(e))return kee;if(!e)return;let{type:t}=e;return zee.has(t)?t:void 0};function qee(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(Kee(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))([...zee].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var Wee=class extends Error{name="InvalidDocError";constructor(e){super(qee(e)),this.doc=e}},Jee={};var Hee=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Jee){r(i.pop());continue}r&&i.push(e,Jee);let s=Kee(e);if(!s)throw new Wee(e);if(!1!==(null==t?void 0:t(e)))switch(s){case kee:case Bee:{let t=s===kee?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case Lee:i.push(e.flatContents,e.breakContents);break;case Oee: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 _ee:case Iee:case Mee:case Uee:case jee:i.push(e.contents);break;case wee:case Fee:case Nee:case Ree:case $ee:case Vee:break;default:throw new Wee(e)}}},Xee=()=>{};function Gee(e){return{type:Iee,contents:e}}function Yee(e,t){return{type:_ee,contents:t,n:e}}function Qee(e,t={}){return Xee(t.expandedStates),{type:Oee,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Zee(e){return{type:Bee,parts:e}}function ete(e){return{type:jee,contents:e}}var tte={type:Ree},rte={type:Vee},nte={type:Nee},ite={type:$ee,hard:!0},ste={type:$ee,hard:!0,literal:!0},ate={type:$ee},ote={type:$ee,soft:!0},ute=[ite,rte],lte=[ste,rte],cte={type:Fee};function pte(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function dte(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=Gee(n);n=Yee(t%r,n),n=Yee(Number.NEGATIVE_INFINITY,n)}return n}var hte=(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 fte(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}function mte(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 yte={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"}},gte=/[^\x20-\x7F]/;var bte=function(e){if(!e)return 0;if(!gte.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=yte.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t},vte=e=>{if(Array.isArray(e))return e;if(e.type!==Bee)throw new Error(`Expect doc to be 'array' or '${Bee}'.`);return e.parts};function xte(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(Kee(e)){case kee:return t(e.map(n));case Bee:return t({...e,parts:e.parts.map(n)});case Lee:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case Oee:{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 _ee:case Iee:case Mee:case Uee:case jee:return t({...e,contents:n(e.contents)});case wee:case Fee:case Nee:case Ree:case $ee:case Vee:return t(e);default:throw new Wee(e)}}(e);return r.set(e,i),i}}function Ete(e,t,r){let n=r,i=!1;return Hee(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function Ste(e){if(e.type===Oee&&e.break||e.type===$ee&&e.hard||e.type===Vee)return!0}function Dte(e){if(e.length>0){let t=hte(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Tte(e){return e.type!==$ee||e.hard?e.type===Lee?e.flatContents:e:e.soft?"":" "}function Ate(e){for(e=[...e];e.length>=2&&hte(!1,e,-2).type===$ee&&hte(!1,e,-1).type===Vee;)e.length-=2;if(e.length>0){let t=Cte(hte(!1,e,-1));e[e.length-1]=t}return e}function Cte(e){switch(Kee(e)){case _ee:case Iee:case Mee:case Oee:case jee:case Uee:{let t=Cte(e.contents);return{...e,contents:t}}case Lee:return{...e,breakContents:Cte(e.breakContents),flatContents:Cte(e.flatContents)};case Bee:return{...e,parts:Ate(e.parts)};case kee:return Ate(e);case wee:return e.replace(/[\n\r]*$/,"");case Fee:case Nee:case Ree:case $ee:case Vee:break;default:throw new Wee(e)}return e}function Pte(e){return Cte(function(e){return xte(e,(e=>function(e){switch(Kee(e)){case Bee:if(e.parts.every((e=>""===e)))return"";break;case Oee:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===Oee&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case _ee:case Iee:case Mee:case jee:if(!e.contents)return"";break;case Lee:if(!e.flatContents&&!e.breakContents)return"";break;case kee:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof hte(!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 wee:case Fee:case Nee:case Ree:case $ee:case Uee:case Vee:break;default:throw new Wee(e)}return e}(e)))}(e))}function wte(e){if(e.type===$ee)return!0}function kte(e,t){return e.type===Uee?{...e,contents:t(e.contents)}:t(e)}var Fte=Symbol("MODE_BREAK"),Ite=Symbol("MODE_FLAT"),_te=Symbol("cursor");function Nte(e,t){return Bte(e,{type:"indent"},t)}function Ote(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?Bte(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:Bte(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function Bte(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 Lte(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==_te)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(_te);return t}function Mte(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(Kee(l)){case wee:u.push(l),r-=bte(l);break;case kee:case Bee:{let t=vte(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case Iee:case _ee:case Mee:case Uee:o.push({mode:e,doc:l.contents});break;case Nee:r+=Lte(u);break;case Oee:{if(s&&l.break)return!1;let t=l.break?Fte:e,r=l.expandedStates&&t===Fte?hte(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case Lee:{let t=(l.groupId?i[l.groupId]||Ite:e)===Fte?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case $ee:if(e===Fte||l.hard)return!0;l.soft||(u.push(" "),r--);break;case jee:n=!0;break;case Ree:if(n)return!1}}return!1}function jte(e,t){let r={},n=t.printWidth,i=fte(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:Fte,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];Hee(e,(function(e){if(e.type===Vee&&Dte(r),e.type===Oee){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===Oee&&r.pop().break&&Dte(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(Kee(d)){case wee:{let e="\n"!==i?Cee(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=bte(e));break}case kee:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case Fee:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(_te),c++;break;case Iee:a.push({ind:Nte(e,t),mode:p,doc:d.contents});break;case _ee:a.push({ind:Ote(e,d.n,t),mode:p,doc:d.contents});break;case Nee:s-=Lte(o);break;case Oee:switch(p){case Ite:if(!u){a.push({ind:e,mode:d.break?Fte:Ite,doc:d.contents});break}case Fte:{u=!1;let t={ind:e,mode:Ite,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&Mte(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=hte(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Fte,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Fte,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Ite,doc:t};if(Mte(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Fte,doc:d.contents});break}}d.id&&(r[d.id]=hte(!1,a,-1).mode);break;case Bee:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Ite,doc:o},h={ind:e,mode:Fte,doc:o},f=Mte(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Ite,doc:u},y={ind:e,mode:Fte,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:Zee(i)},b=i[0];Mte({ind:e,mode:Ite,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 Lee:case Mee:{let t=d.groupId?r[d.groupId]:p;if(t===Fte){let t=d.type===Lee?d.breakContents:d.negate?d.contents:Gee(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Ite){let t=d.type===Lee?d.flatContents:d.negate?Gee(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case jee:l.push({ind:e,mode:p,doc:d.contents});break;case Ree:l.length>0&&a.push({ind:e,mode:p,doc:ite});break;case $ee:switch(p){case Ite:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Fte: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-=Lte(o),o.push(i+e.value),s=e.length)}break;case Uee:a.push({ind:e,mode:p,doc:d.contents});break;case Vee:break;default:throw new Wee(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(_te);if(-1!==p){let e=o.indexOf(_te,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 Rte(e){var t;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...Rte(r));else{let e=Rte(r);""!==e&&t.push(e)}return t}return e.type===Lee?{...e,breakContents:Rte(e.breakContents),flatContents:Rte(e.flatContents)}:e.type===Oee?{...e,contents:Rte(e.contents),expandedStates:null==(t=e.expandedStates)?void 0:t.map(Rte)}:e.type===Bee?{type:"fill",parts:e.parts.map(Rte)}:e.contents?{...e,contents:Rte(e.contents)}:e}var $te=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},Ute=class extends Error{name="ConfigError"},Vte=class extends Error{name="UndefinedParserError"},zte={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 Kte({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=hte(!1,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map((({options:e})=>e)),zte)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter((e=>!e.deprecated))),"parser"===i.name&&(i.choices=[...i.choices,...qte(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*qte(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 Wte=e=>e.split(/[/\\]/).pop();function Jte(e,t){if(!t)return;let r=Wte(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 Hte,Xte=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)??Jte(r,t.physicalFile)??Jte(r,t.file)??void t.physicalFile;return null==n?void 0:n.parsers[0]},Gte=m9(xee(),1);function Yte(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let i,{name:s}=e,a={name:s},o={};switch(e.type){case"int":i=Gte.default.IntegerSchema,t&&(a.preprocess=Number);break;case"string":case"path":i=Gte.default.StringSchema;break;case"choice":i=Gte.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=Gte.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)?hte(!1,t,-1):t),n)}return e.array?Gte.default.ArraySchema.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:i.create(a)}):i.create({...a,...o})}var Qte=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=Gte.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 Gte.default.levenUnknownHandler(e,t,{...r,schemas:i})},u=function(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(Gte.default.AnySchema.create({name:"_"}));for(let i of e)n.push(Yte(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(Gte.default.AliasSchema.create({name:i.alias,sourceName:i.name}));return n}(t,{isCLI:n,FlagSchema:s}),l=new Gte.default.Normalizer(u,{logger:r,unknown:o,descriptor:a}),c=!1!==r;c&&Hte&&(l._hasDeprecationWarned=Hte);let p=l.normalize(e);return c&&(Hte=l._hasDeprecationWarned),p};function Zte(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 Ute(r)}function ere({plugins:e,parser:t}){return tre(Zte(e,t),t)}function tre(e,t){let r=e.parsers[t];return"function"==typeof r?r():r}var rre={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};var nre=async function(e,t={}){var r;let n={...e};if(!n.parser){if(!n.filepath)throw new Vte("No parser and no file path given, couldn't infer a parser.");if(n.parser=Xte(n,{physicalFile:n.filepath}),!n.parser)throw new Vte(`No parser could be inferred for file "${n.filepath}".`)}let i=Kte({plugins:e.plugins,showDeprecated:!0}).options,s={...rre,...Object.fromEntries(i.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default])))},a=Zte(n.plugins,n.parser),o=await tre(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 Ute(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"),Qte(n,i,{passThrough:Object.keys(rre),...t})},ire=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),sre=e=>Object.keys(e).filter((e=>!ire.has(e)));var are=function(e){return e?t=>e(t,ire):sre};var ore=function(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=are(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)},ure=m9(Aee(),1);var lre,cre,pre,dre,hre=async function(e,t){let r,n=await ere(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,ure.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+="\n"+n,e.codeFrame=n,e}throw e}(t,e)}return{text:i,ast:r}};lre=new WeakSet,cre=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},pre=new WeakSet,dre=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 fre=class{constructor(e){g9(this,lre),g9(this,pre),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return hte(!1,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:hte(!1,this.stack,-2)}get node(){return hte(!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=hte(!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[...b9(this,pre,dre).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?hte(!1,e,-2):null}getValue(){return hte(!1,this.stack,-1)}getNode(e=0){let t=b9(this,lre,cre).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=hte(!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=b9(this,lre,cre).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=hte(!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 b9(this,pre,dre).call(this))if(e(t))return t}hasAncestor(e){for(let t of b9(this,pre,dre).call(this))if(e(t))return!0;return!1}},mre=()=>{};mre.ok=mre,mre.strictEqual=mre;var yre=mre;function gre(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 bre=gre(/\s/),vre=gre(" \t"),xre=gre(",; \t"),Ere=gre(/[^\n\r]/);var Sre=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 Dre=function(e,t,r={}){let n=vre(e,r.backwards?t-1:t,r);return n!==Sre(e,n,r)};var Tre=function(e){return Array.isArray(e)&&e.length>0};var Are=function(e){return null!==e&&"object"==typeof e};function*Cre(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>Are(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 Pre(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 wre(e,t){t.leading=!0,t.trailing=!1,Pre(e,t)}function kre(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Pre(e,t)}function Fre(e,t){t.leading=!1,t.trailing=!0,Pre(e,t)}var Ire=new WeakMap;function _re(e,t){if(Ire.has(e))return Ire.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))??[...Cre(e,{getVisitorKeys:are(i)})]).flatMap((e=>n(e)?[e]:_re(e,t)));return o.sort(((e,t)=>s(e)-s(t)||a(e)-a(t))),Ire.set(e,o),o}function Nre(e,t,r,n){let i,s,{locStart:a,locEnd:o}=r,u=a(t),l=o(t),c=_re(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 Nre(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=Rre(e,t,r);i&&Rre(e,i,r)!==a&&(i=null),s&&Rre(e,s,r)!==a&&(s=null)}return{enclosingNode:n,precedingNode:i,followingNode:s}}var Ore=()=>!1;var Bre=e=>!/[\S\n\u2028\u2029]/.test(e);function Lre(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||!Bre(e.slice(o(n),u)))break;u=a(n)}return Dre(e,u,{backwards:!0})}function Mre(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||!Bre(e.slice(u,a(n))))break;u=o(n)}return Dre(e,u)}function jre(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];yre.strictEqual(l,a),yre.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?Fre(a,r):wre(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 Rre(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 $re=function(e,t){let r=t-1;return r=vre(e,r,{backwards:!0}),r=Sre(e,r,{backwards:!0}),r=vre(e,r,{backwards:!0}),r!==Sre(e,r,{backwards:!0})};function Ure(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function Vre(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=[Ure(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=Dre(a,u(n))?Dre(a,o(n),{backwards:!0})?ute:ate:" ";i.push(e)}else i.push(ute);let l=Sre(a,vre(a,u(n)));return!1!==l&&Dre(a,l)&&i.push(ute),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=Ure(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)||Dre(o,u(i),{backwards:!0})){let e=$re(o,u(i));return{doc:ete([ute,e?ute:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[ete([" ",s]),rte],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}async function zre(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=are(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 nre({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await hre(e,i),a=await n(s,i);return Pte(a)}(e,t,r,n)}e.stack=p}var Kre=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 qre(e,t){({ast:e}=await Jre(e,t));let r=new Map,n=new fre(e),i=new Map;await zre(n,a,t,qre,i);let s=await Wre(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=Wre(n,t,a,e,i);return o&&r.set(s,u),u}}function Wre(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)?Kre(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}=Vre(e,r);return n||i?kte(t,(e=>[n,e,i])):t}(e,a,t)),o===t.cursorNode&&(a=kte(a,(e=>[cte,e,cte]))),a}async function Jre(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,!Tre(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:o={}},originalText:u}=t,{ownLine:l=Ore,endOfLine:c=Ore,remaining:p=Ore}=o,d=r.map(((n,i)=>({...Nre(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){wre(g,o);continue}if(s(o)-s(g)>=0){Fre(g,o);continue}}if(a?r=[t]:(o.enclosingNode=h,o.precedingNode=u,o.followingNode=f,r=[o,m,y,g,b]),Lre(m,y,d,e))o.placement="ownLine",l(...r)||(f?wre(f,o):u?Fre(u,o):kre(h||g,o));else if(Mre(m,y,d,e))o.placement="endOfLine",c(...r)||(u?Fre(u,o):f?wre(f,o):kre(h||g,o));else if(o.placement="remaining",!p(...r))if(u&&f){let e=n.length;e>0&&n[e-1].followingNode!==f&&jre(n,y),n.push(t)}else u?Fre(u,o):f?wre(f,o):kre(h||g,o)}if(jre(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 Hre=({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e;function Xre(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 Gre(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 _re(e,r)){let o=Gre(a,t,r,n,[e,...i],s);if(o)return o}if(!n||n(e,i[0]))return{node:e,parentNodes:i}}}var Yre=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Qre=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Zre(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 Yre.has(t.type);case"graphql":return Qre.has(t.kind);case"vue":return"root"!==t.tag}return!1}function ene(e,t,r){let{rangeStart:n,rangeEnd:i,locStart:s,locEnd:a}=t;yre.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=Gre(r,n,t,((e,r)=>Zre(t,e,r)),[],"rangeStart"),d=u?p:Gre(r,i,t,(e=>Zre(t,e)),[],"rangeEnd");if(!p||!d)return{rangeStart:0,rangeEnd:0};if(Hre(t)){let e=function(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find((e=>Yre.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 Xre(t.parentNodes)){if(!(r(e)>=a))break;s=e}let o=n(t.node);for(let t of Xre(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 tne=function(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=are(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 Cre(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:s,filter:a}))o=t;return o},rne="\ufeff",nne=Symbol("cursor");async function ine(e,t,r=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await hre(e,t);t.cursorOffset>=0&&(t.cursorNode=tne(n,t));let s=await qre(n,t);r>0&&(s=dte([ute,s],r,t.tabWidth));let a=jte(s,t);if(r>0){let e=a.formatted.trim();void 0!==a.cursorNodeStart&&(a.cursorNodeStart-=a.formatted.indexOf(e)),a.formatted=e+fte(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,nne);let c=u.split(""),p=(0,Pee.diffArrays)(l,c),d=s;for(let e of p)if(e.removed){if(e.value.includes(nne))break}else d+=e.count;return{formatted:a.formatted,cursorOffset:d,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}function sne(e,t,r){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?r:t}function ane(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=sne(e,r,-1),n=sne(e,n,0),i=sne(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function one(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=ane(e,t),a=e.charAt(0)===rne;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=>mte(e.slice(0,Math.max(t,0)),"\r\n");r-=t(r),n-=t(n),i-=t(i),e=function(e){return Cee(!1,e,/\r\n?/g,"\n")}(e)}return{hasBOM:a,text:e,options:ane(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function une(e,t){let r=await ere(t);return!r.hasPragma||r.hasPragma(e)}async function lne(e,t){let r,{hasBOM:n,text:i,options:s}=one(e,await nre(t));return s.rangeStart>=s.rangeEnd&&""!==i||s.requirePragma&&!await une(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 hre(e,t),{rangeStart:i,rangeEnd:s}=ene(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=$te(u,t.tabWidth),c=await ine(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=fte(t.endOfLine);d>=0&&"\r\n"===e&&(d+=mte(h.slice(0,d),"\n")),h=Cee(!1,h,"\n",e)}return{formatted:h,cursorOffset:d,comments:c.comments}}(i,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await une(i,s)&&(i=s.printer.insertPragma(i)),r=await ine(i,s)),n&&(r.formatted=rne+r.formatted,r.cursorOffset>=0&&r.cursorOffset++),r)}var cne={};h9(cne,{addDanglingComment:()=>kre,addLeadingComment:()=>wre,addTrailingComment:()=>Fre,getAlignmentSize:()=>$te,getIndentSize:()=>yne,getMaxContinuousCount:()=>mne,getNextNonSpaceNonCommentCharacter:()=>vne,getNextNonSpaceNonCommentCharacterIndex:()=>Ene,getStringWidth:()=>bte,hasNewline:()=>Dre,hasNewlineInRange:()=>gne,hasSpaces:()=>bne,isNextLineEmpty:()=>Dne,isNextLineEmptyAfterIndex:()=>fne,isPreviousLineEmpty:()=>Sne,makeString:()=>xne,skip:()=>gre,skipEverythingButNewLine:()=>Ere,skipInlineComment:()=>pne,skipNewline:()=>Sre,skipSpaces:()=>vre,skipToLineEnd:()=>xre,skipTrailingComment:()=>dne,skipWhitespace:()=>bre});var pne=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 dne=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Ere(e,t):t)};var hne=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=vre(e,n),n=pne(e,n),n=dne(e,n),n=Sre(e,n);return n};var fne=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=xre(e,n),n=pne(e,n),n=vre(e,n);return n=dne(e,n),n=Sre(e,n),!1!==n&&Dre(e,n)};var mne=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 yne=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:$te(e.slice(r+1).match(/^[\t ]*/)[0],t)};var gne=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};var bne=function(e,t,r={}){return vre(e,r.backwards?t-1:t,r)!==t};var vne=function(e,t){let r=hne(e,t);return!1===r?"":e.charAt(r)};var xne=function(e,t,r){let n='"'===t?"'":'"',i=Cee(!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 Ene(e,t){return 2===arguments.length||"number"==typeof t?hne(e,t):function(e,t,r){return hne(e,r(t))}(...arguments)}function Sne(e,t){return 2===arguments.length||"number"==typeof t?$re(e,t):function(e,t,r){return $re(e,r(t))}(...arguments)}function Dne(e,t){return 2===arguments.length||"number"==typeof t?fne(e,t):function(e,t,r){return fne(e,r(t))}(...arguments)}var Tne={};h9(Tne,{builders:()=>Ane,printer:()=>Cne,utils:()=>Pne});var Ane={join:pte,line:ate,softline:ote,hardline:ute,literalline:lte,group:Qee,conditionalGroup:function(e,t){return Qee(e[0],{...t,expandedStates:e})},fill:Zee,lineSuffix:ete,lineSuffixBoundary:tte,cursor:cte,breakParent:rte,ifBreak:function(e,t="",r={}){return{type:Lee,breakContents:e,flatContents:t,groupId:r.groupId}},trim:nte,indent:Gee,indentIfBreak:function(e,t){return{type:Mee,contents:e,groupId:t.groupId,negate:t.negate}},align:Yee,addAlignmentToDoc:dte,markAsRoot:function(e){return Yee({type:"root"},e)},dedentToRoot:function(e){return Yee(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return Yee(-1,e)},hardlineWithoutBreakParent:ite,literallineWithoutBreakParent:ste,label:function(e,t){return e?{type:Uee,label:e,contents:t}:t},concat:e=>e},Cne={printDocToString:jte},Pne={willBreak:function(e){return Ete(e,Ste,!1)},traverseDoc:Hee,findInDoc:Ete,mapDoc:xte,removeLines:function(e){return xte(e,Tte)},stripTrailingHardline:Pte,replaceEndOfLine:function(e,t=lte){return xte(e,(e=>"string"==typeof e?pte(t,e.split("\n")):e))},canBreak:function(e){return Ete(e,wte,!1)}},wne="3.0.0";function kne(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 Fne=kne(lne);async function Ine(e,t){let{formatted:r}=await Fne(e,{...t,cursorOffset:-1});return r}async function _ne(e,t){return await Ine(e,t)===e}var Nne=kne(Kte,0),One={parse:kne((async function(e,t,r){let{text:n,options:i}=one(e,await nre(t)),s=await hre(n,i);return r&&(r.preprocessForPrint&&(s.ast=await Jre(s.ast,i)),r.massage&&(s.ast=ore(s.ast,i))),s})),formatAST:kne((async function(e,t){return t=await nre(t),jte(await qre(e,t),t)})),formatDoc:kne((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===$ee){let e=(null==(s=null==i?void 0:i[r+1])?void 0:s.type)===Vee;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===Vee)return(null==(a=null==i?void 0:i[r-1])?void 0:a.type)===$ee&&i[r-1].hard?void 0:"breakParent";if(t.type===Nee)return"trim";if(t.type===Iee)return"indent("+e(t.contents)+")";if(t.type===_ee)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===Lee)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if(t.type===Mee){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===Oee){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===Bee)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if(t.type===jee)return"lineSuffix("+e(t.contents)+")";if(t.type===Ree)return"lineSuffixBoundary";if(t.type===Uee)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(Rte(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 lne(r,{...t,parser:"__js_expression"});return n})),printToDoc:kne((async function(e,t){t=await nre(t);let{ast:r}=await hre(e,t);return qre(r,t)})),printDocToString:kne((async function(e,t){return jte(e,await nre(t))}))},Bne=Object.create,Lne=Object.defineProperty,Mne=Object.getOwnPropertyDescriptor,jne=Object.getOwnPropertyNames,Rne=Object.getPrototypeOf,$ne=Object.prototype.hasOwnProperty,Une=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vne=(e,t,r)=>(r=null!=e?Bne(Rne(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of jne(t))!$ne.call(e,i)&&i!==r&&Lne(e,i,{get:()=>t[i],enumerable:!(n=Mne(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:Lne(r,"default",{value:e,enumerable:!0}),e)),zne=Une((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})),Kne=Une((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()))}})),qne={};((e,t)=>{for(var r in t)Lne(e,r,{get:t[r],enumerable:!0})})(qne,{parsers:()=>qie});var Wne=Vne(zne(),1);var Jne=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 Hne=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};var Xne=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 Gne=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 Yne(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 Qne=Yne(" \t"),Zne=Yne(/[^\n\r]/);var eie=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Zne(e,t):t)};var tie=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Qne(e,n),n=Xne(e,n),n=eie(e,n),n=Gne(e,n);return n},rie=Vne(Kne(),1);function nie(e){let{pragmas:t}=function(e){let t=Hne(e);t&&(e=e.slice(t.length+1));let r=(0,rie.extract)(e),{pragmas:n,comments:i}=(0,rie.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 iie=function(e){return Array.isArray(e)&&e.length>0};function sie(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return iie(n)?Math.min(sie(n[0]),r):r}function aie(e){return e.range?e.range[1]:e.end}var oie=function(e){return e="function"==typeof e?{parse:e}:e,{astFormat:"estree",hasPragma:nie,locStart:sie,locEnd:aie,...e}};var uie=function(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)};var lie=function(e){let{message:t,loc:r}=e;return uie(t.replace(/ \(.*\)$/,""),{loc:{start:{line:r?r.line:0,column:r?r.column+1:0}},cause:e})},cie=(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 pie=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)}(["Block","CommentBlock","MultiLine"]);var die=function(e){return pie(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};var hie=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))},fie=null;function mie(e){if(null!==fie&&(fie.property,1)){let e=fie;return fie=mie.prototype=null,e}return fie=mie.prototype=e??Object.create(null),new mie}for(let e=0;e<=10;e++)mie();var yie=function(e,t="type"){return function(e){mie(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 gie=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=yie(t);for(let i=0;i<n.length;i++)t[n[i]]=e(t[n[i]],r);return r(t)||t};var bie=function(e,t){let{start:r,end:n}=e.loc;throw uie(t,{loc:{start:{line:r.line,column:r.column+1},end:{line:n.line,column:n.column+1}}})};function vie(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function xie(e){return vie(e)?xie({type:"LogicalExpression",operator:e.operator,left:xie({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[sie(e.left),aie(e.right.left)]}),right:e.right.right,range:[sie(e),aie(e)]}):e}var Eie=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=gie(e,(e=>{var r;null!=(r=e.leadingComments)&&r.some(die)&&t.add(sie(e))})),e=gie(e,(e=>{if("ParenthesizedExpression"===e.type){let{expression:r}=e;if("TypeCastExpression"===r.type)return r.range=e.range,r;let n=sie(e);if(!t.has(n))return r.extra={...r.extra,parenthesized:!0},r}}))}if(e=gie(e,(t=>{switch(t.type){case"LogicalExpression":if(vie(t))return xie(t);break;case"VariableDeclaration":{let e=cie(!1,t.declarations,-1);null!=e&&e.init&&function(e,t){";"!==n[aie(t)]&&(e.range=[sie(e),aie(t)])}(t,e);break}case"TSParenthesizedType":return t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){let e=sie(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&&bie(e.value,"Unexpected token.")}break;case"TSInterfaceDeclaration":iie(t.implements)&&bie(t.implements[0],"Interface declaration cannot have 'implements' clause.");break;case"TSPropertySignature":t.initializer&&bie(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(sie(e),aie(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]}})),iie(e.comments)){let t=cie(!1,e.comments,-1);for(let r=e.comments.length-2;r>=0;r--){let n=e.comments[r];aie(n)===sie(t)&&pie(n)&&pie(t)&&hie(n)&&hie(t)&&(e.comments.splice(r+1,1),n.value+="*//*"+t.value,n.range=[sie(n),aie(t)]),t=n}}return"Program"===e.type&&(e.range=[0,n.length]),e};var Sie=function(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}};var Die=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}},Tie=e=>oie(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=Hne(e);n&&(e=e.slice(n.length));let i=tie(e,0);return!1!==i&&(e=e.slice(0,i)),Fie.test(e)}(r,n))return n.parser="babel-flow",Mie.parse(r,n);let i=t;"script"===(n.__babelSourceType??Sie(n))&&(i=i.map((e=>({...e,sourceType:"script"})))),/#[[{]/.test(r)&&(i=i.map((e=>kie([Cie],e))));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...wie,Pie]:wie).flatMap((e=>i.map((t=>kie([e],t))))):s&&(i=i.map((e=>kie([Pie],e))));let a,o=e?Wne.parseExpression:Wne.parse;try{a=Jne(i.map((e=>()=>function(e,t,r){let n=e(t,r),i=n.errors.find((e=>!Iie.has(e.reasonCode)));if(i)throw i;return n}(o,r,e))))}catch({errors:[e]}){throw lie(e)}return e&&(a=Die(a,{text:r,rootMarker:n.rootMarker})),Eie(a,{parser:"babel",text:r})}}(e)),Aie={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},Cie=["recordAndTuple",{syntaxType:"hash"}],Pie="v8intrinsic",wie=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],kie=(e,t=Aie)=>({...t,plugins:[...t.plugins,...e]}),Fie=/@(?:no)?flow\b/;var Iie=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"]),_ie=[kie(["jsx"])],Nie=Tie({optionsCombinations:_ie}),Oie=Tie({optionsCombinations:[kie(["jsx","typescript"]),kie(["typescript"])]}),Bie=Tie({isExpression:!0,optionsCombinations:[kie(["jsx"])]}),Lie=Tie({isExpression:!0,optionsCombinations:[kie(["typescript"])]}),Mie=Tie({optionsCombinations:[kie(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),jie=Tie({optionsCombinations:_ie.map((e=>kie(["estree"],e)))}),Rie={babel:Nie,"babel-flow":Mie,"babel-ts":Oie,__js_expression:Bie,__ts_expression:Lie,__vue_expression:Bie,__vue_ts_expression:Lie,__vue_event_binding:Nie,__vue_ts_event_binding:Oie,__babel_estree:jie},$ie=Vne(zne(),1);function Uie(e={}){let{allowComments:t=!0}=e;return function(e){let r;try{r=(0,$ie.parseExpression)(e,{tokens:!0,ranges:!0})}catch(e){throw"MissingPlugin"===(null==e?void 0:e.reasonCode)||"MissingOneOfPlugins"===(null==e?void 0:e.reasonCode)?lie({message:"Unexpected token",loc:e.loc}):lie(e)}if(!t&&iie(r.comments))throw Vie(r.comments[0],"Comment");return zie(r),Die(r,{type:"JsonRoot",text:e})}}function Vie(e,t){let[r,n]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return uie(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function zie(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)null!==t&&zie(t);return;case"ObjectExpression":for(let t of e.properties)zie(t);return;case"ObjectProperty":if(e.computed)throw Vie(e.key,"Computed key");if(e.shorthand)throw Vie(e.key,"Shorthand property");return"Identifier"!==e.key.type&&zie(e.key),void zie(e.value);case"UnaryExpression":{let{operator:t,argument:r}=e;if("+"!==t&&"-"!==t)throw Vie(e,`Operator '${e.operator}'`);if("NumericLiteral"===r.type||"Identifier"===r.type&&("Infinity"===r.name||"NaN"===r.name))return;throw Vie(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw Vie(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(iie(e.expressions))throw Vie(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)zie(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Vie(e,`'${e.type}'`)}}var Kie=Uie(),qie={...Rie,...{json:oie({parse:Kie,hasPragma:()=>!0}),json5:oie(Kie),"json-stringify":oie({parse:Uie({allowComments:!1}),astFormat:"estree-json"})}},Wie=qne,Jie=Object.freeze({__proto__:null,default:Wie,parsers:qie}),Hie=Object.create,Xie=Object.defineProperty,Gie=Object.getOwnPropertyDescriptor,Yie=Object.getOwnPropertyNames,Qie=Object.getPrototypeOf,Zie=Object.prototype.hasOwnProperty,ese=(e,t)=>{for(var r in t)Xie(e,r,{get:t[r],enumerable:!0})},tse=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rse=(e,t,r)=>(tse(e,t,"read from private field"),r?r.call(e):t.get(e)),nse=((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()))}})),ise={};ese(ise,{languages:()=>Qde,options:()=>Gde,printers:()=>Yde});var sse={};ese(sse,{canAttachComment:()=>ule,embed:()=>wde,experimentalFeatures:()=>Lde,getCommentChildNodes:()=>lle,getVisitorKeys:()=>_ae,handleComments:()=>due,insertPragma:()=>Bde,isBlockComment:()=>Oae,isGap:()=>ple,massageAstNode:()=>_de,print:()=>pde,printComment:()=>ale,willPrintOwnComments:()=>cle});var ase=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)},ose="string",use="array",lse="cursor",cse="indent",pse="align",dse="trim",hse="group",fse="fill",mse="if-break",yse="indent-if-break",gse="line-suffix",bse="line-suffix-boundary",vse="line",xse="label",Ese="break-parent",Sse=new Set([lse,cse,pse,dse,hse,fse,mse,yse,gse,bse,vse,xse,Ese]);var Dse=function(e){if("string"==typeof e)return ose;if(Array.isArray(e))return use;if(!e)return;let{type:t}=e;return Sse.has(t)?t:void 0};function Tse(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(Dse(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))([...Sse].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var Ase=class extends Error{name="InvalidDocError";constructor(e){super(Tse(e)),this.doc=e}},Cse={};var Pse=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Cse){r(i.pop());continue}r&&i.push(e,Cse);let s=Dse(e);if(!s)throw new Ase(e);if(!1!==(null==t?void 0:t(e)))switch(s){case use:case fse:{let t=s===use?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case mse:i.push(e.flatContents,e.breakContents);break;case hse: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 pse:case cse:case yse:case xse:case gse:i.push(e.contents);break;case ose:case lse:case dse:case bse:case vse:case Ese:break;default:throw new Ase(e)}}},wse=()=>{};function kse(e){return{type:cse,contents:e}}function Fse(e,t){return{type:pse,contents:t,n:e}}function Ise(e,t={}){return wse(t.expandedStates),{type:hse,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _se(e){return Fse(Number.NEGATIVE_INFINITY,e)}function Nse(e,t){return Ise(e[0],{...t,expandedStates:e})}function Ose(e){return{type:fse,parts:e}}function Bse(e,t="",r={}){return{type:mse,breakContents:e,flatContents:t,groupId:r.groupId}}function Lse(e,t){return{type:yse,contents:e,groupId:t.groupId,negate:t.negate}}function Mse(e){return{type:gse,contents:e}}var jse={type:bse},Rse={type:Ese},$se={type:vse,hard:!0},Use={type:vse},Vse={type:vse,soft:!0},zse=[$se,Rse],Kse=[{type:vse,hard:!0,literal:!0},Rse],qse={type:lse};function Wse(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function Jse(e,t){return e?{type:xse,label:e,contents:t}:t}var Hse=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)},Xse=e=>{if(Array.isArray(e))return e;if(e.type!==fse)throw new Error(`Expect doc to be 'array' or '${fse}'.`);return e.parts};function Gse(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(Dse(e)){case use:return t(e.map(n));case fse:return t({...e,parts:e.parts.map(n)});case mse:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case hse:{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 pse:case cse:case yse:case xse:case gse:return t({...e,contents:n(e.contents)});case ose:case lse:case dse:case bse:case vse:case Ese:return t(e);default:throw new Ase(e)}}(e);return r.set(e,i),i}}function Yse(e,t,r){let n=r,i=!1;return Pse(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function Qse(e){if(e.type===hse&&e.break||e.type===vse&&e.hard||e.type===Ese)return!0}function Zse(e){return Yse(e,Qse,!1)}function eae(e){if(e.length>0){let t=Hse(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function tae(e){return e.type!==vse||e.hard?e.type===mse?e.flatContents:e:e.soft?"":" "}function rae(e){return Gse(e,tae)}function nae(e){return Gse(e,(e=>function(e){switch(Dse(e)){case fse:if(e.parts.every((e=>""===e)))return"";break;case hse:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===hse&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case pse:case cse:case yse:case gse:if(!e.contents)return"";break;case mse:if(!e.flatContents&&!e.breakContents)return"";break;case use:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof Hse(!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 ose:case lse:case dse:case bse:case vse:case xse:case Ese:break;default:throw new Ase(e)}return e}(e)))}function iae(e,t=Kse){return Gse(e,(e=>"string"==typeof e?Wse(t,e.split("\n")):e))}function sae(e){if(e.type===vse)return!0}function aae(e,t){return e.type===xse?{...e,contents:t(e.contents)}:t(e)}var oae=function(e){return Array.isArray(e)&&e.length>0},uae=/^[\$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]*$/,lae=e=>uae.test(e);var cae=function(e){return null!==e&&"object"==typeof e};function*pae(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>cae(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 dae(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 pae(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}function hae(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 fae=hae(" \t"),mae=hae(",; \t"),yae=hae(/[^\n\r]/);var gae=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 bae=function(e,t,r={}){let n=fae(e,r.backwards?t-1:t,r);return n!==gae(e,n,r)};var vae=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 xae=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?yae(e,t):t)};var Eae=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=mae(e,n),n=vae(e,n),n=fae(e,n);return n=xae(e,n),n=gae(e,n),!1!==n&&bae(e,n)},Sae={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"}},Dae=/[^\x20-\x7F]/;var Tae=function(e){if(!e)return 0;if(!Dae.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=Sae.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t};function Aae(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return oae(n)?Math.min(Aae(n[0]),r):r}function Cae(e){return e.range?e.range[1]:e.end}function Pae(e,t){let r=Aae(e);return Number.isInteger(r)&&r===Aae(t)}function wae(e,t){return Pae(e,t)&&function(e,t){let r=Cae(e);return Number.isInteger(r)&&r===Cae(t)}(e,t)}var kae=null;function Fae(e){if(null!==kae&&(kae.property,1)){let e=kae;return kae=Fae.prototype=null,e}return kae=Fae.prototype=e??Object.create(null),new Fae}for(let e=0;e<=10;e++)Fae();var Iae=function(e,t="type"){return function(e){Fae(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}},_ae=Iae({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 Nae=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)},Oae=Nae(["Block","CommentBlock","MultiLine"]);var Bae=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)))},Lae=Nae(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]);var Mae=function({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")};function jae(e,t){return t(e)||dae(e,{getVisitorKeys:_ae,predicate:t})}function Rae(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||loe(e)||coe(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||Joe(e)||"TSNonNullExpression"===e.type||"ChainExpression"===e.type}function $ae(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Uae(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 Vae=Nae(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),zae=Nae(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Kae=Nae(["ArrayExpression","TupleExpression"]),qae=Nae(["ObjectExpression","RecordExpression"]);function Wae(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Jae(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&Wae(e.argument)}function Hae(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function Xae(e){return"RegExpLiteral"===e.type||"Literal"===e.type&&!!e.regex}var Gae=Nae(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),Yae=Nae(["FunctionExpression","ArrowFunctionExpression"]);function Qae(e){return loe(e)&&"Identifier"===e.callee.type&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var Zae=Nae(["JSXElement","JSXFragment"]);function eoe(e){return"get"===e.kind||"set"===e.kind}function toe(e){return eoe(e)||Pae(e,e.value)}function roe(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||toe(e))}var noe=Nae(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function ioe(e){return coe(e)||"BindExpression"===e.type&&!!e.object}var soe=Nae(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function aoe(e){return Mae(e)||Lae(e)||soe(e)||("GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)&&!e.typeParameters}var ooe=["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 uoe(e,t){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(Qae(e)&&t&&uoe(t))return Yae(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 Qae(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("TemplateLiteral"===e.arguments[0].type||Hae(e.arguments[0]))&&function(e){return Bae(e,ooe)}(e.callee))return!(e.arguments[2]&&!Wae(e.arguments[2]))&&((2===e.arguments.length?Yae(e.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(e.arguments[1])&&_oe(e.arguments[1]).length<=1)||Qae(e.arguments[1]));return!1}var loe=Nae(["CallExpression","OptionalCallExpression"]),coe=Nae(["MemberExpression","OptionalMemberExpression"]);function poe(e,t){return Zae(t)?joe(t):Uoe(t,Roe.Leading,(t=>bae(e,Cae(t))))}function doe(e,t){return"json"!==t.parser&&Hae(e.key)&&xoe(e.key).slice(1,-1)===e.key.value&&(lae(e.key.value)&&!("babel-ts"===t.parser&&"ClassProperty"===e.type||"typescript"===t.parser&&"PropertyDefinition"===e.type)||hoe(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 hoe(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function foe(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function moe(e,t){return("TemplateLiteral"===e.type&&foe(e)||"TaggedTemplateExpression"===e.type&&foe(e.quasi))&&!bae(t,Aae(e),{backwards:!0})}function yoe(e){if(!Uoe(e))return!1;let t=Hse(!1,Voe(e,Roe.Dangling),-1);return t&&!Oae(t)}function goe(e){let{node:t,parent:r,key:n}=e;return"callee"===n&&loe(t)&&loe(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var boe=new Set(["!","-","+","~"]);function voe(e,t=2){if(t<=0)return!1;let r=e=>voe(e,t-1);if(Xae(e))return Tae(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(qae(e))return e.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value))));if(Kae(e))return e.elements.every((e=>null===e||r(e)));if(Koe(e)){if("ImportExpression"===e.type||voe(e.callee,t)){let n=Ooe(e);return n.length<=t&&n.every(r)}return!1}return coe(e)?voe(e.object,t)&&voe(e.property,t):"UnaryExpression"===e.type&&boe.has(e.operator)||"UpdateExpression"===e.type?voe(e.argument,t):"TSNonNullExpression"===e.type&&voe(e.expression,t)}function xoe(e){var t;return(null==(t=e.extra)?void 0:t.raw)??e.raw}function Eoe(e){return e}function Soe(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)}function Doe(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Doe(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Doe(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&Doe(e.tag,t);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&Doe(e.callee,t);case"ConditionalExpression":return Doe(e.test,t);case"UpdateExpression":return!e.prefix&&Doe(e.argument,t);case"BindExpression":return e.object&&Doe(e.object,t);case"SequenceExpression":return Doe(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":return Doe(e.expression,t);default:return t(e)}}var Toe={"==":!0,"!=":!0,"===":!0,"!==":!0},Aoe={"*":!0,"/":!0,"%":!0},Coe={">>":!0,">>>":!0,"<<":!0};function Poe(e,t){return!(koe(t)!==koe(e)||"**"===e||Toe[e]&&Toe[t]||"%"===t&&Aoe[e]||"%"===e&&Aoe[t]||t!==e&&Aoe[t]&&Aoe[e]||Coe[e]&&Coe[t])}var woe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap(((e,t)=>e.map((e=>[e,t])))));function koe(e){return woe.get(e)}function Foe(e){var t;if(e.rest)return!0;let r=_oe(e);return"RestElement"===(null==(t=Hse(!1,r,-1))?void 0:t.type)}var Ioe=new WeakMap;function _oe(e){if(Ioe.has(e))return Ioe.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),Ioe.set(e,t),t}var Noe=new WeakMap;function Ooe(e){if(Noe.has(e))return Noe.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),Noe.set(e,t),t}function Boe(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 Loe(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 Moe(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function joe(e){return(null==e?void 0:e.prettierIgnore)||Uoe(e,Roe.PrettierIgnore)}var Roe={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},$oe=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(r,n,i)=>!(e&Roe.Leading&&!r.leading||e&Roe.Trailing&&!r.trailing||e&Roe.Dangling&&(r.leading||r.trailing)||e&Roe.Block&&!Oae(r)||e&Roe.Line&&!Vae(r)||e&Roe.First&&0!==n||e&Roe.Last&&n!==i.length-1||e&Roe.PrettierIgnore&&!Moe(r)||t&&!t(r))};function Uoe(e,t,r){if(!oae(null==e?void 0:e.comments))return!1;let n=$oe(t,r);return!n||e.comments.some(n)}function Voe(e,t,r){if(!Array.isArray(null==e?void 0:e.comments))return[];let n=$oe(t,r);return n?e.comments.filter(n):e.comments}var zoe=(e,{originalText:t})=>Eae(t,Cae(e));function Koe(e){return loe(e)||"NewExpression"===e.type||"ImportExpression"===e.type}function qoe(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)}var Woe=Symbol("ifWithoutBlockAndSameLineComment"),Joe=Nae(["TSAsExpression","TSSatisfiesExpression"]);function Hoe(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 qae(e)}(l)&&Goe(e))return!0;if(Xoe(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&&Doe(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&&Doe(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&&Doe(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&&Doe(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&&oae(l.decorators)))return!0;break;case"ExportDefaultDeclaration":return Yoe(e,t)||"SequenceExpression"===l.type;case"Decorator":if("expression"===c){if(coe(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 jae(e,(e=>"ObjectTypeAnnotation"===e.type&&jae(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!Joe(l);case"ConditionalExpression":return Joe(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||Joe(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=koe(e),n=p.operator,i=koe(n);return i>r||"right"===c&&i===r||i===r&&!Poe(n,e)||(i<r&&"%"===e?"+"===n||"-"===n:!!function(e){return!!Coe[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&&_oe(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&&coe(p);case"NGPipeExpression":return!("NGRoot"===p.type||"NGMicrosyntaxExpression"===p.type||"ObjectProperty"===p.type&&(null==(u=l.extra)||!u.parenthesized)||Kae(p)||"arguments"===c&&loe(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||!Kae(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&&!loe(p)&&!qoe(p)&&"ReturnStatement"!==p.type&&"ThrowStatement"!==p.type&&"TypeCastExpression"!==p.type&&"VariableDeclarator"!==p.type&&"YieldExpression"!==p.type;case"TSInstantiationExpression":return"object"===c&&coe(p)}return!1}var Xoe=Nae(["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 Goe(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if("arguments"===r&&e.isLast)return e.callParent(Goe);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(Goe);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(Goe);break;case"UnaryExpression":if(t.prefix)return e.callParent(Goe)}return!1}function Yoe(e,t){let{node:r,parent:n}=e;return"FunctionExpression"===r.type||"ClassExpression"===r.type?"ExportDefaultDeclaration"===n.type||!Hoe(e,t):!(!Rae(r)||"ExportDefaultDeclaration"!==n.type&&Hoe(e,t))&&e.call((()=>Yoe(e,t)),...Uae(r))}var Qoe=Hoe,Zoe=(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 eue=function(e,t){let r=t-1;return r=fae(e,r,{backwards:!0}),r=gae(e,r,{backwards:!0}),r=fae(e,r,{backwards:!0}),r!==gae(e,r,{backwards:!0})},tue=()=>!0;function rue(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function nue(e,t,r={}){let{node:n}=e;if(!oae(null==n?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:a=tue}=r,o=[];if(e.each((({node:r})=>{r.leading||r.trailing||r.marker!==s||!a(r)||o.push(rue(e,t))}),"comments"),0===o.length)return"";let u=Wse(zse,o);return i?kse([zse,u]):u}function iue(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=[rue(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=bae(a,u(n))?bae(a,o(n),{backwards:!0})?zse:Use:" ";i.push(e)}else i.push(zse);let l=gae(a,fae(a,u(n)));return!1!==l&&bae(a,l)&&i.push(zse),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=rue(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)||bae(o,u(i),{backwards:!0})){let e=eue(o,u(i));return{doc:Mse([zse,e?zse:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[Mse([" ",s]),Rse],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}function sue(e,t,r){let{leading:n,trailing:i}=iue(e,r);return n||i?aae(t,(e=>[n,e,i])):t}var aue=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},oue=aue,uue="'";var lue=function(e,t){let r=!0===t||t===uue?uue:'"',n=r===uue?'"':uue,i=0,s=0;for(let t of e)t===r?i++:t===n&&s++;return i>s?n:r};var cue;cue=new WeakMap;var pue=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,cue,void 0),((e,t,r,n)=>{tse(e,t,"write to private field"),n?n.call(e,r):t.set(e,r)})(this,cue,new Set(e))}getLeadingWhitespaceCount(e){let t=rse(this,cue),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=rse(this,cue),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 rse(this,cue).has(e.charAt(0))}hasTrailingWhitespace(e){return rse(this,cue).has(Hse(!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")}([...rse(this,cue)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=rse(this,cue);return Array.prototype.some.call(e,(e=>t.has(e)))}hasNonWhitespaceCharacter(e){let t=rse(this,cue);return Array.prototype.some.call(e,(e=>!t.has(e)))}isWhitespaceOnly(e){let t=rse(this,cue);return Array.prototype.every.call(e,(e=>t.has(e)))}},due={};ese(due,{endOfLine:()=>Sue,ownLine:()=>Eue,remaining:()=>Due});var hue=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=fae(e,n),n=vae(e,n),n=xae(e,n),n=gae(e,n);return n};var fue=function(e,t){let r=hue(e,t);return!1===r?"":e.charAt(r)};var mue=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};function yue(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 gue(e,t){t.leading=!0,t.trailing=!1,yue(e,t)}function bue(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),yue(e,t)}function vue(e,t){t.leading=!1,t.trailing=!0,yue(e,t)}var xue=function(e){return Oae(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};function Eue(e){return[tle,Uue,Fue,Pue,wue,kue,Oue,Hue,que,Jue,Xue,Gue,Lue,Vue,zue].some((t=>t(e)))}function Sue(e){return[Cue,Uue,Iue,Xue,Pue,wue,kue,Oue,Vue,Kue,Wue,Jue,Zue,zue,nle].some((t=>t(e)))}function Due(e){return[tle,Pue,wue,_ue,$ue,Lue,Jue,Rue,jue,rle,zue,ele].some((t=>t(e)))}function Tue(e,t){let r=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));r?gue(r,t):bue(e,t)}function Aue(e,t){"BlockStatement"===e.type?Tue(e,t):gue(e,t)}function Cue({comment:e,followingNode:t}){return!(!t||!xue(e))&&(gue(t,e),!0)}function Pue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("IfStatement"!==(null==r?void 0:r.type)||!n)return!1;if(")"===fue(i,Cae(e)))return vue(t,e),!0;if(t===r.consequent&&n===r.alternate){if("BlockStatement"===t.type)vue(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?bue(t,e,Woe):bue(r,e)}return!0}return"BlockStatement"===n.type?(Tue(n,e),!0):"IfStatement"===n.type?(Aue(n.consequent,e),!0):r.consequent===n&&(gue(n,e),!0)}function wue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return!("WhileStatement"!==(null==r?void 0:r.type)||!n)&&(")"===fue(i,Cae(e))?(vue(t,e),!0):"BlockStatement"===n.type?(Tue(n,e),!0):r.body===n&&(gue(n,e),!0))}function kue({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?(vue(t,e),!0):"BlockStatement"===n.type?(Tue(n,e),!0):"TryStatement"===n.type?(Aue(n.finalizer,e),!0):"CatchClause"===n.type&&(Aue(n.body,e),!0))}function Fue({comment:e,enclosingNode:t,followingNode:r}){return!(!coe(t)||"Identifier"!==(null==r?void 0:r.type))&&(gue(t,e),!0)}function Iue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){let s=t&&!mue(i,Cae(t),Aae(e));return!(t&&s||"ConditionalExpression"!==(null==r?void 0:r.type)&&"TSConditionalType"!==(null==r?void 0:r.type)||!n)&&(gue(n,e),!0)}function _ue({comment:e,precedingNode:t,enclosingNode:r}){return!(!qoe(r)||!r.shorthand||r.key!==t||"AssignmentPattern"!==r.value.type)&&(vue(r.value.left,e),!0)}var Nue=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Oue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Nue.has(null==r?void 0:r.type)){if(oae(r.decorators)&&"Decorator"!==(null==n?void 0:n.type))return vue(Hse(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return Tue(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return vue(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?bue(r,e,i):vue(t,e),!0}}return!1}var Bue=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Lue({comment:e,precedingNode:t,enclosingNode:r,text:n}){return(r&&t&&"("===fue(n,Cae(e))&&("Property"===r.type||"TSDeclareMethod"===r.type||"TSAbstractMethodDefinition"===r.type)&&"Identifier"===t.type&&r.key===t&&":"!==fue(n,Cae(t))||!("Decorator"!==(null==t?void 0:t.type)||!Bue.has(null==r?void 0:r.type)))&&(vue(t,e),!0)}var Mue=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function jue({comment:e,precedingNode:t,enclosingNode:r,text:n}){return"("===fue(n,Cae(e))&&(!(!t||!Mue.has(null==r?void 0:r.type))&&(vue(t,e),!0))}function Rue({comment:e,enclosingNode:t,text:r}){if("ArrowFunctionExpression"!==(null==t?void 0:t.type))return!1;let n=hue(r,Cae(e));return!1!==n&&"=>"===r.slice(n,n+2)&&(bue(t,e),!0)}function $ue({comment:e,enclosingNode:t,text:r}){return")"===fue(r,Cae(e))&&(t&&(ile(t)&&0===_oe(t).length||Koe(t)&&0===Ooe(t).length)?(bue(t,e),!0):("MethodDefinition"===(null==t?void 0:t.type)||"TSAbstractMethodDefinition"===(null==t?void 0:t.type))&&0===_oe(t.value).length&&(bue(t.value,e),!0))}function Uue({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 vue(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&&ile(r)&&")"===fue(i,Cae(e)))return vue(t,e),!0;if("FunctionDeclaration"===(null==r?void 0:r.type)&&"BlockStatement"===(null==n?void 0:n.type)){let t=(()=>{let e=_oe(r);if(e.length>0)return hue(i,Cae(Hse(!1,e,-1)));let t=hue(i,Cae(r.id));return!1!==t&&hue(i,t+1)})();if(Aae(e)>t)return Tue(n,e),!0}return!1}function Vue({comment:e,enclosingNode:t}){return"LabeledStatement"===(null==t?void 0:t.type)&&(gue(t,e),!0)}function zue({comment:e,enclosingNode:t}){return!("ContinueStatement"!==(null==t?void 0:t.type)&&"BreakStatement"!==(null==t?void 0:t.type)||t.label)&&(vue(t,e),!0)}function Kue({comment:e,precedingNode:t,enclosingNode:r}){return!!(loe(r)&&t&&r.callee===t&&r.arguments.length>0)&&(gue(r.arguments[0],e),!0)}function que({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"UnionTypeAnnotation"===(null==r?void 0:r.type)||"TSUnionType"===(null==r?void 0:r.type)?(Moe(e)&&(n.prettierIgnore=!0,e.unignore=!0),!!t&&(vue(t,e),!0)):(("UnionTypeAnnotation"===(null==n?void 0:n.type)||"TSUnionType"===(null==n?void 0:n.type))&&Moe(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Wue({comment:e,enclosingNode:t}){return!!qoe(t)&&(gue(t,e),!0)}function Jue({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?bue(n,e):gue(n,e),!0):"Program"!==(null==t?void 0:t.type)||0!==t.body.length||oae(t.directives)?"Program"===(null==r?void 0:r.type)&&0===r.body.length&&"ModuleExpression"===(null==t?void 0:t.type)&&(bue(r,e),!0):(i?bue(t,e):gue(t,e),!0)}function Hue({comment:e,enclosingNode:t}){return("ForInStatement"===(null==t?void 0:t.type)||"ForOfStatement"===(null==t?void 0:t.type))&&(gue(t,e),!0)}function Xue({comment:e,precedingNode:t,enclosingNode:r,text:n}){if("ImportSpecifier"===(null==r?void 0:r.type)||"ExportSpecifier"===(null==r?void 0:r.type))return gue(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||!bae(n,Cae(e)))&&(vue(t,e),!0)}function Gue({comment:e,enclosingNode:t}){return"AssignmentPattern"===(null==t?void 0:t.type)&&(gue(t,e),!0)}var Yue=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),Que=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Zue({comment:e,enclosingNode:t,followingNode:r}){return!(!Yue.has(null==t?void 0:t.type)||!r||!Que.has(r.type)&&!Oae(e))&&(gue(r,e),!0)}function ele({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)||";"!==fue(n,Cae(e)))&&(vue(t,e),!0)}function tle({comment:e,enclosingNode:t,followingNode:r}){if(Moe(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 rle({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?(gue(n.name,e),!0):!("TSTypeParameter"!==(null==t?void 0:t.type)||!t.constraint)&&(vue(t.constraint,e),!0))}function nle({comment:e,enclosingNode:t,followingNode:r}){return!(!t||"SwitchCase"!==t.type||t.test||!r||r!==t.consequent[0])&&("BlockStatement"===r.type&&Vae(e)?Tue(r,e):bue(t,e),!0)}var ile=Nae(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var sle=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))};function ale(e,t){let r=e.node;if(Vae(r))return t.originalText.slice(Aae(r),Cae(r)).trimEnd();if(Oae(r))return sle(r)?function(e){let t=e.value.split("\n");return["/*",Wse(zse,t.map(((e,r)=>0===r?e.trimEnd():" "+(r<t.length-1?e.trim():e.trimStart())))),"*/"]}(r):["/*",iae(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}var ole=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function ule(e){return!ole.has(e.type)}function lle(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===_oe(e.value).length&&!e.value.returnType&&!oae(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function cle(e){let{node:t,parent:r}=e;return(Zae(t)||r&&("JSXSpreadAttribute"===r.type||"JSXSpreadChild"===r.type||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type||("ClassDeclaration"===r.type||"ClassExpression"===r.type)&&r.superClass===t))&&(!joe(t)||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)}function ple(e,{parser:t}){if("flow"===t||"babel-flow"===t)return""===(e=Zoe(!1,e,/[\s(]/g,""))||"/*"===e||"/*::"===e}var dle=new pue(" \n\r\t"),hle=e=>""===e||e===Use||e===zse||e===Vse;function fle(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&&!Ele(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&&Hae(e.expression)&&" "===e.expression.value&&!Uoe(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));let l=a.children.some(Zae),c=a.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,p="JSXElement"===a.type&&a.openingElement.attributes.length>1,d=Zse(o)||l||p||c,h="mdx"===e.parent.rootMarker,f=t.singleQuote?"{' '}":'{" "}',m=h?" ":Bse([f,Vse]," "),y=function(e,t,r,n,i){let s=[];return e.each((({node:e,next:t})=>{if("JSXText"===e.type){let r=xoe(e);if(Ele(e)){let a,o=dle.split(r,!0);if(""===o[0]&&(s.push(""),o.shift(),/\n/.test(o[0])?s.push(yle(i,o[1],e,t)):s.push(n),o.shift()),""===Hse(!1,o,-1)&&(o.pop(),a=o.pop()),0===o.length)return;for(let[e,t]of o.entries())e%2==1?s.push(Use):s.push(t);void 0!==a?/\n/.test(a)?s.push(yle(i,Hse(!1,s,-1),e,t)):s.push(n):s.push(mle(i,Hse(!1,s,-1),e,t))}else/\n/.test(r)?r.match(/\n/g).length>1&&s.push("",zse):s.push("",n)}else{let n=r();if(s.push(n),t&&Ele(t)){let r=dle.trim(xoe(t)),[n]=dle.split(r);s.push(mle(i,n,e,t))}else s.push(zse)}}),"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=>Ele(e)));for(let e=y.length-2;e>=0;e--){let t=""===y[e]&&""===y[e+1],r=y[e]===zse&&""===y[e+1]&&y[e+2]===zse,n=(y[e]===Vse||y[e]===zse)&&""===y[e+1]&&y[e+2]===m,i=y[e]===m&&""===y[e+1]&&(y[e+2]===Vse||y[e+2]===zse),s=y[e]===m&&""===y[e+1]&&y[e+2]===m,a=y[e]===Vse&&""===y[e+1]&&y[e+2]===zse||y[e]===zse&&""===y[e+1]&&y[e+2]===Vse;r&&g||t||n||s||a?y.splice(e,2):i&&y.splice(e+1,2)}for(;y.length>0&&hle(Hse(!1,y,-1));)y.pop();for(;y.length>1&&hle(y[0])&&hle(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,zse]);continue}if(e===y.length-1){b.push(f);continue}if(""===y[e-1]&&y[e-2]===zse){b.push(f);continue}}b.push(t),Zse(t)&&(d=!0)}let v=g?Ose(b):Ise(b,{shouldBreak:!0});if("JSXText"===(null==(s=t.cursorNode)?void 0:s.type)&&a.children.includes(t.cursorNode)&&(v=[qse,v,qse]),h)return v;let x=Ise([o,kse([zse,v]),zse,u]);return d?x:Nse([Ise([o,...y,u]),x])}function mle(e,t,r,n){return e?"":"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?1===t.length?Vse:zse:Vse}function yle(e,t,r,n){return e?zse:1===t.length?"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?zse:Vse:zse}var gle=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function ble(e,t,r){return e.selfClosing?[Use,"/>"]:function(e,t,r){let n=e.attributes.length>0&&Uoe(Hse(!1,e.attributes,-1),Roe.Trailing);return 0===e.attributes.length&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}(e,t,r)?[">"]:[Vse,">"]}function vle(e,t,r){return function(e,t,r){let{parent:n}=e;if(gle.has(n.type))return t;let i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),loe,(e=>"JSXExpressionContainer"===e.type)),s=Qoe(e,r);return Ise([s?"":Bse("("),kse([Vse,t]),Vse,s?"":Bse(")")],{shouldBreak:i})}(e,sue(e,fle(e,t,r),t),t)}function xle(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(Hae(n.value)){let r=xoe(n.value),i=Zoe(!1,Zoe(!1,r.slice(1,-1),"'","'"),""",'"'),a=lue(i,t.jsxSingleQuote);i='"'===a?Zoe(!1,i,'"',"""):Zoe(!1,i,"'","'"),s=e.call((()=>sue(e,iae(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 Wse(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return Wse(".",[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 Uoe(n)&&cle(e)?[kse([Vse,sue(e,i,t)]),Vse]: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||!Uoe(e)&&(Kae(e)||qae(e)||"ArrowFunctionExpression"===e.type||"AwaitExpression"===e.type&&(i(e.argument,e)||"JSXElement"===e.argument.type)||loe(e)||"ChainExpression"===e.type&&loe(e.expression)||"FunctionExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||"DoExpression"===e.type||Zae(t)&&("ConditionalExpression"===e.type||noe(e)));return i(n.expression,e.parent)?Ise(["{",r("expression"),jse,"}"]):Ise(["{",kse([Vse,r("expression")]),Vse,jse,"}"])}(e,0,r);case"JSXFragment":case"JSXElement":return vle(e,t,r);case"JSXOpeningElement":return function(e,t,r){var n,i;let{node:s}=e,a=Uoe(s.name)||Uoe(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&&Hae(s.attributes[0].value)&&!s.attributes[0].value.value.includes("\n")&&!a&&!Uoe(s.attributes[0]))return Ise(["<",r("name"),r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let o=null==(i=s.attributes)?void 0:i.some((e=>e.value&&Hae(e.value)&&e.value.value.includes("\n"))),u=t.singleAttributePerLine&&s.attributes.length>1?zse:Use;return Ise(["<",r("name"),r("typeParameters"),kse(e.map((()=>[u,r()]),"attributes")),...ble(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 Uoe(n.name,Roe.Leading|Roe.Line)?i.push(kse([zse,s]),zse):Uoe(n.name,Roe.Leading|Roe.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=Uoe(r),i=Uoe(r,Roe.Line),s="JSXOpeningFragment"===r.type;return[s?"<":"</",kse([i?zse:n&&!s?" ":"",nue(e,t)]),i?zse:"",">"]}(e,t);case"JSXEmptyExpression":return function(e,t){let{node:r}=e,n=Uoe(r,Roe.Line);return[nue(e,t,{indent:n}),n?zse:""]}(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new oue(n,"JSX")}}function Ele(e){return"JSXText"===e.type&&(dle.hasNonWhitespaceCharacter(xoe(e))||!/\n/.test(xoe(e)))}var Sle=function(e){return joe(e.node)||function(e){let{node:t,parent:r}=e;if(!Zae(t)||!Zae(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||Ele(t)){n=t;break}}return"JSXExpressionContainer"===(null==n?void 0:n.type)&&"JSXEmptyExpression"===n.expression.type&&joe(n.expression)}(e)},Dle=0;function Tle(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=Ale(e,r,t,!1,u);if(u)return c;if(l)return Ise(c);if(loe(s)&&s.callee===i||"UnaryExpression"===s.type||coe(s)&&!s.computed)return Ise([kse([Vse,...c]),Vse]);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&&!loe(a)||"TemplateLiteral"===s.type,d="AssignmentExpression"===s.type||"VariableDeclarator"===s.type||"ClassProperty"===s.type||"PropertyDefinition"===s.type||"TSAbstractPropertyDefinition"===s.type||"ClassPrivateProperty"===s.type||qoe(s),h=noe(i.left)&&Poe(i.operator,i.left.operator);if(p||Cle(i)&&!h||!Cle(i)&&d)return Ise(c);if(0===c.length)return"";let f=Zae(i.right),m=c.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&e.type===hse)),y=c.slice(0,-1===m?1:m+1),g=c.slice(y.length,f?-1:void 0),b=Symbol("logicalChain-"+ ++Dle),v=Ise([...y,kse(g)],{id:b});return f?Ise([v,Lse(Hse(!1,c,-1),{groupId:b})]):v}function Ale(e,t,r,n,i){var s;let{node:a}=e;if(!noe(a))return[Ise(t())];let o=[];Poe(a.operator,a.left.operator)?o=e.call((e=>Ale(e,t,r,!0,i)),"left"):o.push(Ise(t("left")));let u,l=Cle(a),c=("|>"===a.operator||"NGPipeExpression"===a.type||function(e,t){return("__vue_expression"===t.parser||"__vue_ts_expression"===t.parser)&&Ple(e.node)&&!e.hasAncestor((e=>!Ple(e)&&"JsExpressionRoot"!==e.type))}(e,r))&&!poe(r.originalText,a.right),p="NGPipeExpression"===a.type?"|":a.operator,d="NGPipeExpression"===a.type&&a.arguments.length>0?Ise(kse([Vse,": ",Wse([Use,": "],e.map((()=>Fse(2,Ise(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=>Ale(e,t,r,!0,i)),"right"):t("right");u=[c?Use:"",p,c?" ":Use,n,d]}let{parent:h}=e,f=Uoe(a.left,Roe.Trailing|Roe.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?Ise(u,{shouldBreak:f}):u),n&&Uoe(a)){let t=nae(sue(e,o,r));return Array.isArray(t)||t.type===fse?Xse(t):[t]}return o}function Cle(e){return"LogicalExpression"===e.type&&!!(qae(e.right)&&e.right.properties.length>0||Kae(e.right)&&e.right.elements.length>0||Zae(e.right))}var Ple=e=>"BinaryExpression"===e.type&&"|"===e.operator;var wle=class extends Error{name="ArgExpansionBailout"};function kle(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 Uoe(i,Roe.Dangling)?Ise([r,nue(e,t,{indent:!0}),Vse,n]):[r,n]}(e,t,s,"]"));else{let u=Hse(!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(!Kae(e)&&!qae(e))return!1;let i=r[t+1];if(i&&n!==i.type)return!1;let s=Kae(e)?"elements":"properties";return e[s]&&e[s].length>1})),h=Fle(n,t),f=l?c?",":Soe(t)?h?Bse(",","",{groupId:p}):Bse(","):"":"";i.push(Ise([s,kse([Vse,h?Nle(e,t,r,f):[_le(e,t,a,r),f],nue(e,t)]),Vse,"]"],{shouldBreak:d,id:p}))}return i.push(Sce(e),yce(e,r)),i}function Fle(e,t){return Kae(e)&&e.elements.length>1&&e.elements.every((e=>e&&(Wae(e)||Jae(e)&&!Uoe(e.argument))&&!Uoe(e,Roe.Trailing|Roe.Line,(e=>!bae(t.originalText,Aae(e),{backwards:!0})))))}function Ile({node:e},{originalText:t}){let r=e=>","===t[e]?e:r((e=>vae(t,xae(t,e)))(e+1));return Eae(t,r(Cae(e)))}function _le(e,t,r,n){let i=[];return e.each((({node:r,isLast:s})=>{i.push(r?Ise(n()):""),s||i.push([",",Use,r&&Ile(e,t)?Vse:""])}),r),i}function Nle(e,t,r,n){let i=[];return e.each((({isLast:s,next:a})=>{i.push([r(),s?n:","]),s||i.push(Ile(e,t)?[zse,zse]:Uoe(a,Roe.Leading|Roe.Line)?zse:Use)}),"elements"),Ose(i)}function Ole(e,t=!1){return qae(e)&&(e.properties.length>0||Uoe(e))||Kae(e)&&(e.elements.length>0||Uoe(e))||"TSTypeAssertion"===e.type&&Ole(e.expression)||Joe(e)&&Ole(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))||Uoe(e,Roe.Dangling))}(e.body))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&Ole(e.body,!0)||qae(e.body)||Kae(e.body)||!t&&(loe(e.body)||"ConditionalExpression"===e.body.type)||Zae(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type}function Ble(e){var t;if("ParenthesizedExpression"===e.type)return Ble(e.expression);if(Joe(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]),aoe(r)&&voe(e.expression,1)}return!(Koe(e)&&Ooe(e).length>1)&&(noe(e)?voe(e.left,1)&&voe(e.right,1):Xae(e)||voe(e))}var Lle=function(e,t,r){let{node:n}=e,i=Ooe(n);if(0===i.length)return["(",nue(e,t),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===_oe(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>Uoe(e)))}(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,a=i.length-1,o=[];Boe(e,(({node:e},n)=>{let i=r();n===a||(zoe(e,t)?(s=!0,i=[i,",",zse,zse]):i=[i,",",Use]),o.push(i)}));let u="ImportExpression"!==n.type&&"Import"!==n.callee.type&&Soe(t,"all")?",":"";function l(){return Ise(["(",kse([Use,...o]),u,Use,")"],{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(Yae(r)){if(t+=1,t>1)return!0}else if(loe(r))for(let e of r.arguments)if(Yae(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&&qoe(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&Hae(e.properties[0].value)&&"module"===e.properties[0].value.value}(r))||!Uoe(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==r.type&&"ArrowFunctionExpression"!==r.type&&"ConditionalExpression"!==r.type&&Ble(r)&&!Ole(r)}(i)){let e,t=o.slice(1);if(t.some(Zse))return l();try{e=r(Loe(n,0),{expandFirstArg:!0})}catch(e){if(e instanceof wle)return l();throw e}return Zse(e)?[Rse,Nse([["(",Ise(e,{shouldBreak:!0}),", ",...t,")"],l()])]:Nse([["(",e,", ",...t,")"],["(",Ise(e,{shouldBreak:!0}),", ",...t,")"],l()])}if(function(e,t,r){var n,i;let s=Hse(!1,e,-1);if(1===e.length){let e=Hse(!1,t,-1);if(null!=(n=e.label)&&n.embed&&!1!==(null==(i=e.label)?void 0:i.hug))return!0}let a=Hse(!1,e,-2);return!Uoe(s,Roe.Leading)&&!Uoe(s,Roe.Trailing)&&Ole(s)&&(!a||a.type!==s.type)&&(2!==e.length||"ArrowFunctionExpression"!==a.type||!Kae(s))&&!(e.length>1&&Fle(s,r))}(i,o,t)){let e,t=o.slice(0,-1);if(t.some(Zse))return l();try{e=r(Loe(n,-1),{expandLastArg:!0})}catch(e){if(e instanceof wle)return l();throw e}return Zse(e)?[Rse,Nse([["(",...t,Ise(e,{shouldBreak:!0}),")"],l()])]:Nse([["(",...t,e,")"],["(",...t,Ise(e,{shouldBreak:!0}),")"],l()])}let c=["(",kse([Vse,...o]),Bse(u),Vse,")"];return goe(e)?c:Ise(c,{shouldBreak:o.some(Zse)||s})};function Mle(e,t,r){let n=r("property"),{node:i}=e,s=Sce(e);return i.computed?!i.property||Wae(i.property)?[s,"[",n,"]"]:Ise([s,"[",kse([Vse,n]),Vse,"]"]):[s,".",n]}var jle=function(e,t,r){let{parent:n}=e,i=!n||"ExpressionStatement"===n.type,s=[];function a(e){let{originalText:r}=t,n=hue(r,Cae(e));return")"===r.charAt(n)?!1!==n&&Eae(r,n+1):zoe(e,t)}function o(e){let{node:n}=e;loe(n)&&(ioe(n.callee)||loe(n.callee))?(s.unshift({node:n,printed:[sue(e,[Sce(e),wce(e,t,r),Lle(e,t,r)],t),a(n)?zse:""]}),e.call((e=>o(e)),"callee")):ioe(n)?(s.unshift({node:n,needsParens:Qoe(e,t),printed:sue(e,coe(n)?Mle(e,0,r):kce(e,t,r),t)}),e.call((e=>o(e)),"object")):"TSNonNullExpression"===n.type?(s.unshift({node:n,printed:sue(e,"!",t)}),e.call((e=>o(e)),"expression")):s.unshift({node:n,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[Sce(e),wce(e,t,r),Lle(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||loe(s[p].node)||coe(s[p].node)&&s[p].node.computed&&Wae(s[p].node.property));++p)c.push(s[p]);if(!loe(s[0].node))for(;p+1<s.length&&ioe(s[p].node)&&ioe(s[p+1].node);++p)c.push(s[p]);l.push(c),c=[];let d=!1;for(;p<s.length;++p){if(d&&ioe(s[p].node)){if(s[p].node.computed&&Wae(s[p].node.property)){c.push(s[p]);continue}l.push(c),c=[],d=!1}(loe(s[p].node)||"ImportExpression"===s[p].node.type)&&(d=!0),c.push(s[p]),Uoe(s[p].node,Roe.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&&!Uoe(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=Hse(!1,e[0],-1).node;return coe(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&&Hse(!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=>Uoe(e.node,Roe.Leading)))||v.slice(0,-1).some((e=>Uoe(e.node,Roe.Trailing)))||l[b]&&Uoe(l[b][0].node,Roe.Leading);if(l.length<=b&&!x)return goe(e)?g:Ise(g);let E,S=Hse(!1,l[f?1:0],-1).node,D=!loe(S)&&a(S),T=[m(l[0]),f?l.slice(1,2).map(m):"",D?zse:"",function(e){return 0===e.length?"":kse(Ise([zse,Wse(zse,e.map(m))]))}(l.slice(f?2:1))],A=s.map((({node:e})=>e)).filter(loe);return E=x||A.length>2&&A.some((e=>!e.arguments.every((e=>voe(e)))))||y.slice(0,-1).some(Zse)||function(){let e=Hse(!1,Hse(!1,l,-1),-1).node,t=Hse(!1,y,-1);return loe(e)&&Zse(t)&&A.slice(0,-1).some((e=>e.arguments.some(Yae)))}()?Ise(T):[Zse(g)||D?Rse:"",Nse([g,T])],Jse({memberChain:!0},E)};function Rle(e,t,r){var n;let{node:i,parent:s}=e,a="NewExpression"===i.type,o="ImportExpression"===i.type,u=Sce(e),l=Ooe(i),c=1===l.length&&moe(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=Ooe(e);return"ExpressionStatement"===t.type&&(1===r.length||2===r.length&&"ArrayExpression"===r[0].type||3===r.length&&Hae(r[0])&&"ArrayExpression"===r[1].type)}return!1}(i,s)||uoe(i,s))){let i=[];if(Boe(e,(()=>{i.push(r())})),!c||null==(n=i[0].label)||!n.embed)return[a?"new ":"",r("callee"),u,wce(e,t,r),"(",Wse(", ",i),")"]}if(!o&&!a&&ioe(i.callee)&&!e.call((e=>Qoe(e,t)),"callee"))return jle(e,t,r);let p=[a?"new ":"",o?"import":r("callee"),u,wce(e,t,r),Lle(e,t,r)];return o||loe(i.callee)?Ise(p):p}var $le=function(e,t,r){let n='"'===t?"'":'"',i=Zoe(!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 Ule=function(e,t){let r=e.slice(1,-1),n="json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":lue(r,t.singleQuote);return $le(r,n,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))};var Vle=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 zle(e){return e.toLowerCase()}function Kle({pattern:e,flags:t}){return`/${e}/${t=[...t].sort().join("")}`}function qle(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}var Wle=Nae(["Literal","BigIntLiteral","BooleanLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]);function Jle(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=!Hle(a);if(e.match(Hle,Xle,(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&&Hle(a.right)||poe(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(Xle(e)){let t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>{var t;return qoe(e)&&(!e.shorthand||"AssignmentPattern"===(null==(t=e.value)?void 0:t.type))}))}return!1}(s)||function(e){let t=function(e){var t;if(Gle(e))return null==(t=e.typeParameters)?void 0:t.params}(e);if(oae(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=Zle(t.typeAnnotation);return oae(r)&&r.length>1&&r.some((e=>oae(Zle(e))||"TSConditionalType"===e.type))}(s)||Yle(s)&&function(e){return Yse(e,sae,!1)}(n))return"break-lhs";let u=function(e,t,r){if(!qoe(e))return!1;t=nae(t);let n=3;return"string"==typeof t&&Tae(t)<r.tabWidth+n}(s,n,t);return e.call((()=>function(e,t,r,n){let i=e.node;if(noe(i)&&!Cle(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{let{test:e}=i;return noe(e)&&!Cle(e)}case"ClassExpression":return oae(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!(!Hae(s)&&!e.call((()=>ece(e,t,r)),...a))}(e,t,r,u)),i)?"break-after-operator":u||"TemplateLiteral"===a.type||"TaggedTemplateExpression"===a.type||"BooleanLiteral"===a.type||Wae(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 Ise([Ise(n),i,Ise(kse([Use,o]))]);case"never-break-after-operator":return Ise([Ise(n),i," ",o]);case"fluid":{let e=Symbol("assignment");return Ise([Ise(n),i,Ise(kse(Use),{id:e}),jse,Lse(o,{groupId:e})])}case"break-lhs":return Ise([n,i," ",Ise(o)]);case"chain":return[Ise(n),i,Use,o];case"chain-tail":return[Ise(n),i,kse([Use,o])];case"chain-tail-arrow-chain":return[Ise(n),i,o];case"only-left":return n}}function Hle(e){return"AssignmentExpression"===e.type}function Xle(e){return Hle(e)||"VariableDeclarator"===e.type}var Gle=Nae(["TSTypeAliasDeclaration","TypeAlias"]);function Yle(e){var t;return"VariableDeclarator"===e.type&&"ArrowFunctionExpression"===(null==(t=e.init)?void 0:t.type)}var Qle=Nae(["TSTypeReference","GenericTypeAnnotation"]);function Zle(e){var t;if(Qle(e))return null==(t=e.typeParameters)?void 0:t.params}function ece(e,t,r,n=!1){var i;let{node:s}=e,a=()=>ece(e,t,r,!0);if("ChainExpression"===s.type||"TSNonNullExpression"===s.type)return e.call(a,"expression");if(loe(s)){if(null!=(i=Rle(e,t,r).label)&&i.memberChain)return!1;let n=Ooe(s);return!(!(0===n.length||1===n.length&&function(e,{printWidth:t}){if(Uoe(e))return!1;let r=t*tce;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=r||Jae(e)&&!Uoe(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:Hae(e)?xoe(e).length<=r:"TemplateLiteral"===e.type?0===e.expressions.length&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes("\n"):Wle(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(oae(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(Zse(t(e.typeParameters?"typeParameters":"typeArguments")))return!0}return!1}(s,r))&&e.call(a,"callee")}return coe(s)?e.call(a,"object"):n&&("Identifier"===s.type||"ThisExpression"===s.type)}var tce=.25;function rce(e,t,r,n,i){let s=e.node,a=_oe(s),o=i?wce(e,r,t):"";if(0===a.length)return[o,"(",nue(e,r,{filter:e=>")"===fue(r.originalText,Cae(e))}),")"];let{parent:u}=e,l=uoe(u),c=nce(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(" "):zoe(a[n],r)?p.push(zse,zse):p.push(Use))})),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(Zse(o)||Zse(p))throw new wle;return Ise([rae(o),"(",rae(p),")"])}let d=a.every((e=>!e.decorators));return c&&d||l?[o,"(",...p,")"]:(roe(u)||function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||Pae(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&&aoe(a[0].typeAnnotation)&&!s.rest?"always"===r.arrowParens?["(",...p,")"]:p:[o,"(",kse([Vse,...p]),Bse(!Foe(s)&&Soe(r,"all")?",":""),Vse,")"]}function nce(e){if(!e)return!1;let t=_oe(e);if(1!==t.length)return!1;let[r]=t;return!Uoe(r)&&("ObjectPattern"===r.type||"ArrayPattern"===r.type||"Identifier"===r.type&&r.typeAnnotation&&("TypeAnnotation"===r.typeAnnotation.type||"TSTypeAnnotation"===r.typeAnnotation.type)&&Gae(r.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===r.type&&Gae(r.typeAnnotation)&&r!==e.rest||"AssignmentPattern"===r.type&&("ObjectPattern"===r.left.type||"ArrayPattern"===r.left.type)&&("Identifier"===r.right.type||qae(r.right)&&0===r.right.properties.length||Kae(r.right)&&0===r.right.elements.length))}function ice(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===_oe(e).length&&(Gae(n)||Zse(t))}function sce(e){if(aoe(e)||Gae(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=>Uoe(e)));if(e.types.length-1===t&&r&&!n)return!0}return!1}function ace(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Ace(e)];return s.push("type ",r("id"),r("typeParameters")),[Jle(e,t,r,s," =","TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right"),n]}function oce(e,t,r){let n=!1;return Ise(e.map((({isFirst:e,previous:t,node:i,index:s})=>{let a=r();if(e)return a;let o=Gae(i),u=Gae(t);return u&&o?[" & ",n?kse(a):a]:u||o?(s>1&&(n=!0),[" & ",s>1?kse(a):a]):kse([" &",Use,a])}),"types"))}function uce(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)&&poe(t.originalText,n)),a=sce(n),o=e.map((e=>{let n=r();return a||(n=Fse(2,n)),sue(e,n,t)}),"types");if(a)return Wse(" | ",o);let u=[Bse([s&&!poe(t.originalText,n)?Use:"","| "]),Wse([Use,"| "],o)];return Qoe(e,t)?Ise([kse(u),Vse]):("TupleTypeAnnotation"===i.type||"TSTupleType"===i.type)&&i["TupleTypeAnnotation"===i.type&&i.types?"types":"elementTypes"].length>1?Ise([kse([Bse(["(",Vse]),u]),Vse,Bse(")")]):Ise(s?kse(u):u)}function lce(e,t,r){let{node:n}=e,i=[Pce(e)];("TSConstructorType"===n.type||"TSConstructSignatureDeclaration"===n.type)&&i.push("new ");let s=rce(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&&(roe(n)||!(("ObjectTypeProperty"===n.type||"ObjectTypeInternalSlot"===n.type)&&!n.variance&&!n.optional&&Pae(n,r)||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===(null==(t=e.getParentNode(2))?void 0:t.type)))}(e)?" => ":": ",r("returnType")):a.push(yce(e,r,n.returnType?"returnType":"typeAnnotation")),ice(n,a)&&(s=Ise(s)),i.push(s,a),Ise(i)}function cce(e,t,r){return[r("objectType"),Sce(e),"[",r("indexType"),"]"]}function pce(e,t,r){return["infer ",r("typeParameter")]}function dce(e,t,r){let{node:n}=e;return[n.postfix?"":r,yce(e,t),n.postfix?r:""]}function hce(e,t,r){let{node:n}=e;return["...",..."TupleTypeSpreadElement"===n.type&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function fce(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var mce=new WeakSet;function yce(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(gce,r);("=>"===t||":"===t&&Uoe(n,Roe.Leading))&&(i=!0),mce.add(n)}return i?[" ",t(r)]:t(r)}var gce=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 bce(e,t,r){let n=gce(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function vce(e){return[e("elementType"),"[]"]}function xce({node:e},t){return["typeof ",..."TSTypeQuery"===e.type?[t("exprName"),t("typeParameters")]:[t("argument")]]}function Ece(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",yce(e,t)]:""]}function Sce(e){let{node:t}=e;return!t.optional||"Identifier"===t.type&&t===e.parent.key?"":loe(t)||coe(t)&&t.computed||"OptionalIndexedAccessType"===t.type?"?.":"?"}function Dce(e){return e.node.definite||e.match(void 0,((e,t)=>"id"===t&&"VariableDeclarator"===e.type&&e.definite))?"!":""}var Tce=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Ace(e){let{node:t}=e;return t.declare||Tce.has(t.type)&&"DeclareExportDeclaration"!==e.parent.type?"declare ":""}var Cce=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Pce({node:e}){return e.abstract||Cce.has(e.type)?"abstract ":""}function wce(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function kce(e,t,r){return["::",r("callee")]}function Fce(e,t,r){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||r?[" ",t]:kse([Use,t])}function Ice(e,t){return["...",t("argument"),yce(e,t)]}function _ce(e){return e.accessibility?e.accessibility+" ":""}function Nce(e,t,r){let{node:n}=e;return Ise([Wse(Use,e.map(r,"decorators")),Bce(n,t)?zse:Use])}function Oce(e,t,r){return Lce(e.node)?[Wse(zse,e.map(r,"declaration","decorators")),zse]:""}function Bce(e,t){return e.decorators.some((e=>bae(t.originalText,Cae(e))))}function Lce(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 oae(r)&&Pae(e,r[0])}var Mce=e=>"ExportDefaultDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&e.default;function jce(e,t,r){let{node:n}=e,i=[Oce(e,0,r),Ace(e),"export",Mce(n)?" default":""],{declaration:s,exported:a}=n;return Uoe(n,Roe.Dangling)&&(i.push(" ",nue(e,t)),yoe(n)&&i.push(zse)),s?i.push(" ",r("declaration")):(i.push(function(e){return $ce(e.exportKind)}(n)),"ExportAllDeclaration"===n.type||"DeclareExportAllDeclaration"===n.type?(i.push(" *"),a&&i.push(" as ",r("exported"))):i.push(zce(e,t,r)),i.push(Vce(e,t,r),qce(e,t,r))),i.push(function(e,t){return t.semi&&(!e.declaration||Mce(e)&&!Rce(e.declaration))?";":""}(n,t)),i}var Rce=Nae(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function $ce(e,t=!0){return e&&"value"!==e?`${t?" ":""}${e}${t?"":" "}`:""}function Uce(e,t){return $ce(e.importKind,t)}function Vce(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return Kce(n,t)||i.push(" from"),i.push(" ",r("source")),i}function zce(e,t,r){let{node:n}=e;if(Kce(n,t))return"";let i=[" "];if(oae(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 oue(n,"specifier");a.push(r())}}),"specifiers"),i.push(Wse(", ",s)),a.length>0&&(s.length>0&&i.push(", "),a.length>1||s.length>0||n.specifiers.some((e=>Uoe(e)))?i.push(Ise(["{",kse([t.bracketSpacing?Use:Vse,Wse([",",Use],a)]),Bse(Soe(t)?",":""),t.bracketSpacing?Use:Vse,"}"])):i.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function Kce(e,t){let{type:r,importKind:n,source:i,specifiers:s}=e;return"ImportDeclaration"===r&&!oae(s)&&"type"!==n&&!/{\s*}/.test(t.originalText.slice(Aae(e),Aae(i)))}function qce(e,t,r){var n;let{node:i}=e,s=oae(i.attributes)?"attributes":oae(i.assertions)?"assertions":void 0;return s?[` ${"assertions"===s||null!=(n=i.extra)&&n.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",Wse(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Wce(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||!wae(t,r))return!1;if(Hae(t))return t.value===r.value&&xoe(t)===xoe(r);if("Identifier"===t.type)return t.name===r.name;return!1}(n)&&(p=r(o)),[$ce("ImportSpecifier"===i?n.importKind:n.exportKind,!1),c,c&&p?" as ":"",p]}function Jce(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?Fse(2,o):o}var Hce=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function Xce(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&&(Zae(s[l[0]])||Zae(c)||Zae(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(Zae(n))return!0;"ConditionalExpression"===n.type&&t.push(n)}}return!1}(v))){h=!0,y=!0;let e=e=>[Bse("("),kse([Vse,e]),Vse,Bse(")")],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=[Use,"? ",c.type===s.type?Bse("","("):"",Fse(2,r(o)),c.type===s.type?Bse("",")"):"",Use,": ",p.type===s.type?r(u):Fse(2,r(u))];d.push(f.type!==s.type||f[u]===s||m?e:t.useTabs?function(e){return Fse(-1,e)}(kse(e)):Fse(Math.max(0,t.tabWidth-2),e))}let x=[o,u,...l].some((e=>Uoe(s[e],(e=>Oae(e)&&mue(t.originalText,Aae(e),Cae(e)))))),E=!h&&(coe(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||loe(i)&&i.callee===n||coe(i)&&i.object===n||"TSNonNullExpression"===i.type&&i.expression===n?n=i:"NewExpression"===i.type&&i.callee===n||Joe(i)&&i.expression===n?(r=e.getParentNode(t+1),n=i):r=i}return n!==t&&r[Hce.get(r.type)]===n}(e),D=(e=>f===b?Ise(e,{shouldBreak:x}):x?[e,Rse]:e)([Jce(e,0,r),y?d:kse(d),a&&E&&!S?Vse:""]);return m||S?Ise([kse([Vse,D]),Vse]):D}var Gce=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 Yce=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:Gce(e.slice(r+1).match(/^[\t ]*/)[0],t)};var Qce=Symbol("MODE_BREAK"),Zce=Symbol("MODE_FLAT"),epe=Symbol("cursor");function tpe(e,t){return npe(e,{type:"indent"},t)}function rpe(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?npe(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:npe(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function npe(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 ipe(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==epe)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(epe);return t}function spe(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(Dse(l)){case ose:u.push(l),r-=Tae(l);break;case use:case fse:{let t=Xse(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case cse:case pse:case yse:case xse:o.push({mode:e,doc:l.contents});break;case dse:r+=ipe(u);break;case hse:{if(s&&l.break)return!1;let t=l.break?Qce:e,r=l.expandedStates&&t===Qce?Hse(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case mse:{let t=(l.groupId?i[l.groupId]||Zce:e)===Qce?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case vse:if(e===Qce||l.hard)return!0;l.soft||(u.push(" "),r--);break;case gse:n=!0;break;case bse:if(n)return!1}}return!1}function ape(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:Qce,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];Pse(e,(function(e){if(e.type===Ese&&eae(r),e.type===hse){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===hse&&r.pop().break&&eae(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(Dse(d)){case ose:{let e="\n"!==i?Zoe(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=Tae(e));break}case use:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case lse:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(epe),c++;break;case cse:a.push({ind:tpe(e,t),mode:p,doc:d.contents});break;case pse:a.push({ind:rpe(e,d.n,t),mode:p,doc:d.contents});break;case dse:s-=ipe(o);break;case hse:switch(p){case Zce:if(!u){a.push({ind:e,mode:d.break?Qce:Zce,doc:d.contents});break}case Qce:{u=!1;let t={ind:e,mode:Zce,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&spe(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=Hse(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Qce,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Qce,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Zce,doc:t};if(spe(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Qce,doc:d.contents});break}}d.id&&(r[d.id]=Hse(!1,a,-1).mode);break;case fse:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Zce,doc:o},h={ind:e,mode:Qce,doc:o},f=spe(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Zce,doc:u},y={ind:e,mode:Qce,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:Ose(i)},b=i[0];spe({ind:e,mode:Zce,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 mse:case yse:{let t=d.groupId?r[d.groupId]:p;if(t===Qce){let t=d.type===mse?d.breakContents:d.negate?d.contents:kse(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Zce){let t=d.type===mse?d.flatContents:d.negate?kse(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case gse:l.push({ind:e,mode:p,doc:d.contents});break;case bse:l.length>0&&a.push({ind:e,mode:p,doc:$se});break;case vse:switch(p){case Zce:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Qce: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-=ipe(o),o.push(i+e.value),s=e.length)}break;case xse:a.push({ind:e,mode:p,doc:d.contents});break;case Ese:break;default:throw new Ase(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(epe);if(-1!==p){let e=o.indexOf(epe,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 ope(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=>"${"+ape(e,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}")),u=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<n.quasis.length;e++){let t=Hse(!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],Tae(r));return a.push(jse,"`",kse([zse,Wse(zse,p.map((e=>Wse(" | ",e.cells.map(((t,r)=>e.hasLineBreak?t:t+" ".repeat(c[r]-Tae(t))))))))]),zse,"`"),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(Uoe(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("ChainExpression"===e.type&&(e=e.expression),coe(e)){let t=e;for(;coe(t);)if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type||(t=t.object,Uoe(t)))return!1;return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))}(n);o&&(a=a.map((e=>ape(e,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted))),s.push(jse,"`");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")?Yce(p,c):u;u=d;let h=a[e];if(!o){let t=n[i][e];(Uoe(t)||coe(t)||"ConditionalExpression"===t.type||"SequenceExpression"===t.type||Joe(t)||noe(t))&&(h=[kse([Vse,h]),Vse])}let f=0===d&&p.endsWith("\n")?Fse(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=kse(n);n=Fse(t%r,n),n=Fse(Number.NEGATIVE_INFINITY,n)}return n}(h,d,c);s.push(Ise(["${",f,jse,"}"]))}),"quasis"),s.push("`"),s}function upe(e,t){return e.map((e=>function(e,t){let{node:r}=e,n=t();return Uoe(r)&&(n=Ise([kse([Vse,n]),Vse])),["${",n,jse,"}"]}(e,t)),"expressions")}function lpe(e,t){return Gse(e,(e=>"string"==typeof e?t?Zoe(!1,e,/(\\*)`/g,"$1$1\\`"):cpe(e):e))}function cpe(e){return Zoe(!1,e,/([\\`]|\${)/g,"\\$1")}var ppe=function(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}};function dpe(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function hpe(e,t){return"+"===e||"-"===e?e+t:t}var fpe=ppe("typeParameters");function mpe(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&&uoe(s),o=e.match((e=>!(1===e[n].length&&Gae(e[n][0]))),void 0,((e,t)=>"typeAnnotation"===t),(e=>"Identifier"===e.type),Yle);if(0===i[n].length||!o&&(a||1===i[n].length&&("NullableTypeAnnotation"===i[n][0].type||sce(i[n][0]))))return["<",Wse(", ",e.map(r,n)),ype(e,t),">"];let u="TSTypeParameterInstantiation"===i.type?"":function(e,t,r){let{node:n}=e;return 1===_oe(n).length&&n.type.startsWith("TS")&&!n[r][0].constraint&&"ArrowFunctionExpression"===e.parent.type&&!(t.filepath&&/\.ts$/.test(t.filepath))}(e,t,n)?",":Soe(t)?Bse(","):"";return Ise(["<",kse([Vse,Wse([",",Use],e.map(r,n))]),u,Vse,">"],{id:fpe(i)})}function ype(e,t){let{node:r}=e;if(!Uoe(r,Roe.Dangling))return"";let n=!Uoe(r,Roe.Line),i=nue(e,t,{indent:!n});return n?i:[i,zse]}function gpe(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(hpe(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(yce(e,r,"bound"))),n.constraint){let e=Symbol("constraint");s.push(" extends",Ise(kse(Use),{id:e}),jse,Lse(r("constraint"),{groupId:e}))}return n.default&&s.push(" = ",r("default")),Ise(s)}var bpe=()=>{};bpe.ok=bpe,bpe.strictEqual=bpe;var vpe=bpe,xpe=new WeakMap;function Epe(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if("consistent"===t.quoteProps&&!xpe.has(i)){let e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&Hae(e.key)&&!doe(e,t)));xpe.set(i,e)}if(("Identifier"===s.type||Wae(s)&&hoe(Vle(xoe(s)))&&String(s.value)===Vle(xoe(s))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&xpe.get(i))){let r=Ule(JSON.stringify("Identifier"===s.type?s.name:s.value.toString()),t);return e.call((e=>sue(e,r,t)),"key")}return doe(n,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!xpe.get(i))?e.call((e=>sue(e,/^\d/.test(s.value)?Vle(s.value):s.value,t)),"key"):r("key")}var Spe=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 Dpe(e,t,r,n){if(Spe(e))return Ape(e,r,t);let{node:i}=e,s=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&null!=n&&n.expandLastArg){let{parent:t}=e;loe(t)&&(Ooe(t).length>1||_oe(i).every((e=>"Identifier"===e.type&&!e.typeAnnotation)))&&(s=!0)}let a=[Ace(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],o=rce(e,t,r,s),u=Ppe(e,t),l=ice(i,u);return a.push(wce(e,0,t),Ise([l?Ise(o):o,u]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&a.push(";"),a}function Tpe(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,a=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?(vpe.ok("get"===i||"set"===i),a.push(i," ")):s.async&&a.push("async "),s.generator&&a.push("*"),a.push(Epe(e,t,r),n.optional||n.key.optional?"?":"",n===s?Ape(e,t,r):r("value")),a}function Ape(e,t,r){let{node:n}=e,i=rce(e,r,t),s=Ppe(e,r),a=function(e){let t=_oe(e);return t.length>1&&t.some((e=>"TSParameterProperty"===e.type))}(n),o=ice(n,s),u=[wce(e,0,r),Ise([a?Ise(i,{shouldBreak:!0}):o?Ise(i):i,s])];return n.body?u.push(" ",r("body")):u.push(t.semi?";":""),u}function Cpe(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){let{node:t}=e;return function(e){let t=_oe(e);return!(1!==t.length||e.typeParameters||Uoe(e,Roe.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||Uoe(t[0])||t[0].optional||e.predicate||e.returnType)}(t)}return!1}function Ppe(e,t){let{node:r}=e,n=[yce(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function wpe(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let e=r("argument");!function(e,t){if(poe(e.originalText,t))return!0;if(Rae(t)){let r,n=t;for(;r=$ae(n);)if(n=r,poe(e.originalText,n))return!0}return!1}(t,n.argument)?(noe(n.argument)||"SequenceExpression"===n.argument.type)&&(e=Ise([Bse("("),kse([Vse,e]),Vse,Bse(")")])):e=["(",kse([zse,e]),zse,")"],s.push(" ",e)}let a=Uoe(n,Roe.Dangling),o=i&&a&&Uoe(n,Roe.Last|Roe.Line);return o&&s.push(i),a&&s.push(" ",nue(e,t)),o||s.push(i),s}var kpe=Nae(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Fpe(e,t,r){let{node:n}=e,i=[Ace(e),Pce(e),"class"],s=Uoe(n.id,Roe.Trailing)||Uoe(n.typeParameters,Roe.Trailing)||Uoe(n.superClass)||oae(n.extends)||oae(n.mixins)||oae(n.implements),a=[],o=[];if(n.id&&a.push(" ",r("id")),a.push(r("typeParameters")),n.superClass){let n=[Bpe(e,t,r),r("superTypeParameters")],i=e.call((e=>["extends ",sue(e,n,t)]),"superClass");s?o.push(Use,Ise(i)):o.push(" ",i)}else o.push(Ope(e,t,r,"extends"));if(o.push(Ope(e,t,r,"mixins"),Ope(e,t,r,"implements")),s){let e;e=Npe(n)?[...a,kse(o)]:kse([...a,o]),i.push(Ise(e,{id:Ipe(n)}))}else i.push(...a,...o);return i.push(" ",r("body")),i}var Ipe=ppe("heritageGroup");function _pe(e){return Bse(zse,"",{groupId:Ipe(e)})}function Npe(e){return e.typeParameters&&!Uoe(e.typeParameters,Roe.Trailing|Roe.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 Ope(e,t,r,n){let{node:i}=e;if(!oae(i[n]))return"";let s=nue(e,t,{marker:n});return[Npe(i)?Bse(" ",Use,{groupId:fpe(i.typeParameters)}):Use,s,s&&zse,n,Ise(kse([Use,Wse([",",Use],e.map(r,n))]))]}function Bpe(e,t,r){let n=r("superClass"),{parent:i}=e;return"AssignmentExpression"===i.type?Ise(Bse(["(",kse([Vse,n]),Vse,")"],n)):n}function Lpe(e,t,r){let{node:n}=e,i=[];return oae(n.decorators)&&i.push(Nce(e,t,r)),i.push(_ce(n)),n.static&&i.push("static "),i.push(Pce(e)),n.override&&i.push("override "),i.push(Tpe(e,t,r)),i}function Mpe(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";return oae(n.decorators)&&i.push(Nce(e,t,r)),i.push(_ce(n),Ace(e)),n.static&&i.push("static "),i.push(Pce(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(Epe(e,t,r),Sce(e),Dce(e),yce(e,r)),[Jle(e,t,r,i," =","TSAbstractPropertyDefinition"===n.type||"TSAbstractAccessorProperty"===n.type?void 0:"value"),s]}function jpe(e,t,r){let{node:n}=e,i=[];return e.each((({node:e,next:n,isLast:s})=>{i.push(r()),!t.semi&&kpe(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(kpe(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(zse),zoe(e,t)&&i.push(zse))}),"body"),Uoe(n,Roe.Dangling)&&i.push(nue(e,t)),[oae(n.body)?_pe(e.parent):"","{",i.length>0?[kse([zse,i]),zse]:"","}"]}function Rpe(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:Aae(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&&mue(t.originalText,Aae(s),l[0].loc),f=d?";":"TSInterfaceBody"===s.type||"TSTypeLiteral"===s.type?Bse(i,";"):",",m="RecordExpression"===s.type?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",g=[],b=l.map((e=>{let r=[...g,Ise(e.printed)];return g=[f,Use],("TSPropertySignature"===e.node.type||"TSMethodSignature"===e.node.type||"TSConstructSignatureDeclaration"===e.node.type||"TSCallSignatureDeclaration"===e.node.type)&&Uoe(e.node,Roe.PrettierIgnore)&&g.shift(),zoe(e.node,t)&&g.push(zse),r}));if(s.inexact||s.hasUnknownMembers){let r;if(Uoe(s,Roe.Dangling)){let n=Uoe(s,Roe.Line);r=[nue(e,t),n||bae(t.originalText,Cae(Hse(!1,Voe(s),-1)))?zse:Use,"..."]}else r=["..."];b.push([...g,...r])}let v,x=null==(n=Hse(!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)&&Uoe(x,Roe.PrettierIgnore)));if(0===b.length){if(!Uoe(s,Roe.Dangling))return[m,y,yce(e,r)];v=Ise([m,nue(e,t,{indent:!0}),Vse,y,Sce(e),yce(e,r)])}else v=[d&&oae(s.properties)?_pe(c):"",m,kse([t.bracketSpacing?Use:Vse,...b]),Bse(E&&(","!==f||Soe(t))?f:""),t.bracketSpacing?Use:Vse,y,Sce(e),yce(e,r)];return e.match((e=>"ObjectPattern"===e.type&&!e.decorators),$pe)||Gae(s)&&(e.match(void 0,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),$pe)||e.match(void 0,((e,t)=>"FunctionTypeParam"===e.type&&"typeAnnotation"===t),$pe))||!h&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?v:Ise(v,{shouldBreak:h})}function $pe(e,t){return("params"===t||"parameters"===t||"this"===t||"rest"===t)&&nce(e)}var Upe=new WeakMap;function Vpe(e){return Upe.has(e)||Upe.set(e,"ConditionalExpression"===e.type&&!Doe(e,(e=>"ObjectExpression"===e.type))),Upe.get(e)}var zpe=e=>"SequenceExpression"===e.type;function Kpe(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 "),Cpe(e,t))s.push(r(["params",0]));else{let i=n.expandLastArg||n.expandFirstArg,a=Ppe(e,r);if(i){if(Zse(a))throw new wle;a=Ise(rae(a))}s.push(Ise([rce(e,r,t,i,!0),a]))}let a=nue(e,t,{filter(e){let r=hue(t.originalText,Cae(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}=iue(e,t);a.push([r,d]),o.unshift(n)}l&&(u||(u=p.returnType&&_oe(p).length>0||p.typeParameters||_oe(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=!poe(t.originalText,s)&&(zpe(s)||function(e,t,r){var n,i;return Kae(e)||qae(e)||"ArrowFunctionExpression"===e.type||"DoExpression"===e.type||"BlockStatement"===e.type||Zae(e)||!1!==(null==(n=t.label)?void 0:n.hug)&&((null==(i=t.label)?void 0:i.embed)||moe(e,r.originalText))}(s,i,t)||!u&&Vpe(s)),d="callee"===e.key&&Koe(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&&Koe(i)||noe(i)?Ise([r[0]," =>",kse([Use,Wse([" =>",Use],r.slice(1))])],{shouldBreak:n}):"callee"===s&&Koe(i)||t.assignmentLayout?Ise(Wse([" =>",Use],r),{shouldBreak:n}):Ise(kse(Wse([" =>",Use],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&&Soe(t,"all")?Bse(","):"",c=!r.expandLastArg&&"JSXExpressionContainer"!==u.type||Uoe(o)?"":Vse;return a&&Vpe(s)?[" ",Ise([Bse("","("),kse([Vse,n]),Bse("",")"),l,c]),i]:(zpe(s)&&(n=Ise(["(",kse([Vse,n]),Vse,")"])),a?[" ",n,i]:[kse([Use,n,i]),l,c])}(e,t,n,{bodyDoc:i,bodyComments:o,functionBody:s,shouldPutBodyOnSameLine:p}),Ise([Ise(m?kse([Vse,f]):f,{shouldBreak:c,id:h})," =>",l?Lse(i,{groupId:h}):Ise(i),l&&d?Bse(Vse,"",{groupId:h}):""])}function qpe(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(zse),zoe(e,t)&&s.push(zse)))}),n),s}function Wpe(e,t,r){let{node:n}=e,i=[];"StaticBlock"===n.type&&i.push("static "),i.push("{");let s=Jpe(e,t,r);if(s)i.push(kse([zse,s]),zse);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(zse)}return i.push("}"),i}function Jpe(e,t,r){var n;let{node:i}=e,s=oae(i.directives),a=i.body.some((e=>"EmptyStatement"!==e.type)),o=Uoe(i,Roe.Dangling);if(!s&&!a&&!o)return"";let u=[];return s&&(u.push(qpe(e,t,r,"directives")),(a||o)&&(u.push(zse),zoe(Hse(!1,i.directives,-1),t)&&u.push(zse))),a&&u.push(qpe(e,t,r,"body")),o&&u.push(nue(e,t)),"Program"===i.type&&"ModuleExpression"!==(null==(n=e.parent)?void 0:n.type)&&u.push(zse),u}function Hpe(e,t){if(t.semi||Gpe(e,t)||Qpe(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((()=>Xpe(e,t)),"expression"))}function Xpe(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(!Cpe(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(Zae(r))return!0}return!!Qoe(e,t)||!!Rae(r)&&e.call((()=>Xpe(e,t)),...Uae(r))}function Gpe({node:e,parent:t},r){return("markdown"===r.parentParser||"mdx"===r.parentParser)&&"ExpressionStatement"===e.type&&Zae(e.expression)&&"Program"===t.type&&1===t.body.length}function Ype(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return Ype(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Qpe({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 Zpe(e,t,r){let n=[r("expression")];return Qpe(e,t)?Ype(e.node.expression)&&n.push(";"):Gpe(e,t)||t.semi&&n.push(";"),Uoe(e.node,Roe.Dangling,(({marker:e})=>e===Woe))&&n.push(" ",nue(e,t,{marker:Woe})),n}function ede(e,t,r,n){let{node:i}=e;if(Wle(i))return function(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return Kle(r);case"BigIntLiteral":return zle(r.extra.raw);case"NumericLiteral":return Vle(r.extra.raw);case"StringLiteral":return iae(Ule(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Vle(r.value)+"m";case"DirectiveLiteral":return qle(r.extra.raw,t);case"Literal":{if(r.regex)return Kle(r.regex);if(r.bigint)return zle(r.raw);if(r.decimal)return Vle(r.decimal)+"m";let{value:n}=r;return"number"==typeof n?Vle(r.raw):"string"==typeof n?function(e){if("expression"!==e.key)return;let{parent:t}=e;return"ExpressionStatement"===t.type&&t.directive}(e)?qle(r.raw,t):iae(Ule(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"),zse];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=Wse([",",Use],n);return t.__isVueForBindingLeft?["(",kse([Vse,Ise(i)]),Vse,")"]:i}}(e,t,r)??r("program");case"Program":return Jpe(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Zpe(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return Uoe(i.expression)||!qae(i.expression)&&!Kae(i.expression)?Ise(["(",kse([Vse,r("expression")]),Vse,")"]):["(",r("expression"),")"];case"AssignmentExpression":return function(e,t,r){let{node:n}=e;return Jle(e,t,r,r("left"),[" ",n.operator],"right")}(e,t,r);case"VariableDeclarator":return function(e,t,r){return Jle(e,t,r,r("id")," =","init")}(e,t,r);case"BinaryExpression":case"LogicalExpression":return Tle(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=Mle(e,0,r),{node:a,parent:o}=e,u=e.findAncestor((e=>!(coe(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&&!coe(o)||("AssignmentExpression"===o.type||"VariableDeclarator"===o.type)&&(loe(a.object)&&a.object.arguments.length>0||"TSNonNullExpression"===a.object.type&&loe(a.object.expression)&&a.object.expression.arguments.length>0||(null==(n=i.label)?void 0:n.memberChain));return Jse(i.label,[i,l?s:Ise(kse([Vse,s]))])}(e,0,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&a.push(r("object")),a.push(Ise(kse([Vse,kce(0,0,r)]))),a;case"Identifier":return[i.name,Sce(e),Dce(e),yce(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Ice(e,r);case"FunctionDeclaration":case"FunctionExpression":return Dpe(e,r,t,n);case"ArrowFunctionExpression":return Kpe(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(loe(t)&&t.callee===i||coe(t)&&t.object===i){a=[kse([Vse,...a]),Vse];let t=e.findAncestor((e=>"AwaitExpression"===e.type||"BlockStatement"===e.type));if("AwaitExpression"!==(null==t?void 0:t.type)||!Doe(t.argument,(e=>e===i)))return Ise(a)}}return a;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return jce(e,t,r);case"ImportDeclaration":return function(e,t,r){let{node:n}=e;return["import",n.module?" module":"",Uce(n),zce(e,t,r),Vce(e,t,r),qce(e,t,r),t.semi?";":""]}(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Wce(e,0,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Wpe(e,t,r);case"ClassBody":return jpe(e,t,r);case"ThrowStatement":return function(e,t,r){return["throw",wpe(e,t,r)]}(e,t,r);case"ReturnStatement":return function(e,t,r){return["return",wpe(e,t,r)]}(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Rle(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return Rpe(e,t,r);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?Tpe(e,t,r):function(e,t,r){let{node:n}=e;return n.shorthand?r("value"):Jle(e,t,r,Epe(e,t,r),":","value")}(e,t,r);case"ObjectMethod":return Tpe(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return kle(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(",",kse([Use,r()]))}),"expressions"),Ise(t)}return Ise(Wse([",",Use],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(" "),Uoe(i.argument)?a.push(Ise(["(",kse([Vse,r("argument")]),Vse,")"])):a.push(r("argument")),a;case"UpdateExpression":return a.push(r("argument"),i.operator),i.prefix&&a.reverse(),a;case"ConditionalExpression":return Xce(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||Uoe(i.declarations[0])?n.length>0&&(t=kse(n[0])):t=n[0],a=[Ace(e),i.kind,t?[" ",t]:"",kse(n.slice(1).map((e=>[",",l&&!u?zse:Use,e])))],u&&o.body!==i||a.push(s),Ise(a)}case"WithStatement":return Ise(["with (",r("object"),")",Fce(i.body,r("body"))]);case"IfStatement":{let n=Fce(i.consequent,r("consequent")),s=Ise(["if (",Ise([kse([Vse,r("test")]),Vse]),")",n]);if(a.push(s),i.alternate){let n=Uoe(i.consequent,Roe.Trailing|Roe.Line)||yoe(i),s="BlockStatement"===i.consequent.type&&!n;a.push(s?" ":zse),Uoe(i,Roe.Dangling)&&a.push(nue(e,t),n?zse:" "),a.push("else",Ise(Fce(i.alternate,r("alternate"),"IfStatement"===i.alternate.type)))}return a}case"ForStatement":{let n=Fce(i.body,r("body")),s=nue(e,t),a=s?[s,Vse]:"";return i.init||i.test||i.update?[a,Ise(["for (",Ise([kse([Vse,r("init"),";",Use,r("test"),";",Use,r("update")]),Vse]),")",n])]:[a,Ise(["for (;;)",n])]}case"WhileStatement":return Ise(["while (",Ise([kse([Vse,r("test")]),Vse]),")",Fce(i.body,r("body"))]);case"ForInStatement":return Ise(["for (",r("left")," in ",r("right"),")",Fce(i.body,r("body"))]);case"ForOfStatement":return Ise(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Fce(i.body,r("body"))]);case"DoWhileStatement":return a=[Ise(["do",Fce(i.body,r("body"))])],"BlockStatement"===i.body.type?a.push(" "):a.push(zse),a.push("while (",Ise([kse([Vse,r("test")]),Vse]),")",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=Uoe(i.param,(e=>!Oae(e)||e.leading&&bae(t.originalText,Cae(e))||e.trailing&&bae(t.originalText,Aae(e),{backwards:!0}))),n=r("param");return["catch ",e?["(",kse([Vse,n]),Vse,") "]:["(",n,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[Ise(["switch (",kse([Vse,r("discriminant")]),Vse,")"])," {",i.cases.length>0?kse([zse,Wse(zse,e.map((({node:e,isLast:n})=>[r(),!n&&zoe(e,t)?zse:""]),"cases"))]):"",zse,"}"];case"SwitchCase":{i.test?a.push("case ",r("test"),":"):a.push("default:"),Uoe(i,Roe.Dangling)&&a.push(" ",nue(e,t));let n=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(n.length>0){let i=qpe(e,t,r,"consequent");a.push(1===n.length&&"BlockStatement"===n[0].type?[" ",i]:kse([zse,i]))}return a}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return Fpe(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Lpe(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Mpe(e,t,r);case"TemplateElement":return iae(i.value.raw);case"TemplateLiteral":return ope(e,r,t);case"TaggedTemplateExpression":return function(e){let t=e("quasi");return Jse(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),jse,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(kse([zse,e]),zse),a.push("}"),a}default:throw new oue(i,"ESTree")}}function tde(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),Uoe(n.node)?" //"+Voe(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return Tle(e,t,r);case"NGChainedExpression":return Ise(Wse([";",Use],e.map((()=>function({node:e}){return jae(e,nde)}(e)?r():["(",r(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map((()=>[e.isFirst?"":rde(e)?" ":[";",Use],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=rde(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 oue(n,"Angular")}}function rde({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 nde=Nae(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function ide(e,t,r){let{node:n}=e,i=[Ace(e),"interface"],s=[],a=[];"InterfaceTypeAnnotation"!==n.type&&s.push(" ",r("id"),r("typeParameters"));let o=n.typeParameters&&!Uoe(n.typeParameters,Roe.Trailing|Roe.Line);return oae(n.extends)&&a.push(o?Bse(" ",Use,{groupId:fpe(n.typeParameters)}):Use,"extends ",(1===n.extends.length?Eoe:kse)(Wse([",",Use],e.map(r,"extends")))),Uoe(n.id,Roe.Trailing)||oae(n.extends)?o?i.push(Ise([...s,kse(a)])):i.push(Ise(kse([...s,...a]))):i.push(...s,...a),i.push(" ",r("body")),Ise(i)}function sde(e,t,r){return Rpe(e,r,t)}function ade(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 ode(e,t,r){let{node:n}=e;return[Ace(e),n.const?"const ":"","enum ",t("id")," ","TSEnumDeclaration"===n.type?sde(e,t,r):t("body")]}function ude(e,t,r){let{node:n}=e;if(Lae(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return Fpe(e,t,r);case"DeclareFunction":return[Ace(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",yce(e,r),i];case"DeclareVariable":return[Ace(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return jce(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return function(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Ace(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 ace(e,t,r);case"IntersectionTypeAnnotation":return oce(e,0,r);case"UnionTypeAnnotation":return uce(e,t,r);case"ConditionalTypeAnnotation":return Xce(e,t,r);case"InferTypeAnnotation":return pce(0,0,r);case"FunctionTypeAnnotation":return lce(e,t,r);case"TupleTypeAnnotation":return kle(e,t,r);case"TupleTypeLabeledElement":return fce(e,0,r);case"TupleTypeSpreadElement":return hce(e,0,r);case"GenericTypeAnnotation":return[r("id"),mpe(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return cce(e,0,r);case"TypeAnnotation":return bce(e,0,r);case"TypeParameter":return gpe(e,0,r);case"TypeofTypeAnnotation":return xce(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return vce(r);case"DeclareEnum":case"EnumDeclaration":return ode(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} `:"",sde(e,t,r)]}(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return ade(e,r);case"FunctionTypeParam":{let t=n.name?r("name"):e.parent.this===n?"this":"";return[t,Sce(e),t?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return ide(e,0,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:e}=n;return vpe.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 Ise([n.variance?r("variance"):"","[",kse([r("keyTparam")," in ",r("sourceType")]),"]",dpe(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,eoe(n)?n.kind+" ":"",n.variance?r("variance"):"",Epe(e,t,r),Sce(e),toe(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return Rpe(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",Sce(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Ice(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return iae(Ule(xoe(n),t));case"NumberLiteralTypeAnnotation":return Vle(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return zle(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),yce(e,r),")"];case"TypePredicate":return Ece(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return mpe(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 lde(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(Mae(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",a=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let e=!(Kae(i.expression)||qae(i.expression)),t=Ise(["<",kse([Vse,r("typeAnnotation")]),Vse,">"]),n=[Bse("("),kse([Vse,r("expression")]),Vse,Bse(")")];return e?Nse([[t,r("expression")],[t,Ise(n,{shouldBreak:!0})],[t,r("expression")]]):Ise([t,r("expression")])}case"TSDeclareFunction":return Dpe(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Wpe(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Rpe(e,t,r);case"TSTypeAliasDeclaration":return ace(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Lpe(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Mpe(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return ope(e,r,t);case"TSNamedTupleMember":return fce(e,0,r);case"TSRestType":return hce(e,0,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return ide(e,0,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return mpe(e,t,r,"params");case"TSTypeParameter":return gpe(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 loe(n)&&n.callee===i||coe(n)&&n.object===i?Ise([kse([Vse,...a]),Vse]):a}case"TSArrayType":return vce(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",Epe(e,t,r),Sce(e),yce(e,r)];case"TSParameterProperty":return[_ce(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return xce(e,r);case"TSIndexSignature":{let n=i.parameters.length>1?Bse(Soe(t)?",":""):"",a=Ise([kse([Vse,Wse([", ",Vse],e.map(r,"parameters"))]),n,Vse]),o="ClassBody"===e.parent.type&&"body"===e.key;return[o&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",yce(e,r),o?s:""]}case"TSTypePredicate":return Ece(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r(i.parameter?"parameter":"argument"),")",i.qualifier?[".",r("qualifier")]:"",mpe(e,t,r,"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return cce(e,0,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return function(e,t,r){let{node:n}=e,i=mue(t.originalText,Aae(n),Aae(n.typeParameter));return Ise(["{",kse([t.bracketSpacing?Use:Vse,Ise([r("typeParameter"),n.optional?hpe(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?Bse(";"):""]),nue(e,t),t.bracketSpacing?Use:Vse,"}"],{shouldBreak:i})}(e,t,r);case"TSMethodSignature":{let n=i.kind&&"method"!==i.kind?`${i.kind} `:"";a.push(_ce(i),n,i.computed?"[":"",r("key"),i.computed?"]":"",Sce(e));let s=rce(e,r,t,!1,!0),o=i.returnType?"returnType":"typeAnnotation",u=i[o],l=u?yce(e,r,o):"",c=ice(i,l);return a.push(c?Ise(s):s),u&&a.push(Ise(l)),Ise(a)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return ode(e,r,t);case"TSEnumMember":return ade(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",Uce(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(Ace(e)),"global"!==i.kind&&!i.global){let e=i.kind??(Hae(i.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(Aae(i),Aae(i.id)))?"module":"namespace");a.push(e," ")}return a.push(r("id")),l?a.push(r("body")):i.body?a.push(" ",Ise(r("body"))):a.push(s),a}case"TSConditionalType":return Xce(e,t,r);case"TSInferType":return pce(0,0,r);case"TSIntersectionType":return oce(e,0,r);case"TSUnionType":return uce(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return lce(e,t,r);case"TSTupleType":return kle(e,t,r);case"TSTypeReference":return[r("typeName"),mpe(e,t,r,"typeParameters")];case"TSTypeAnnotation":return bce(e,0,r);case"TSEmptyBodyFunctionExpression":return Ape(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return dce(e,r,"?");case"TSJSDocNonNullableType":return dce(e,r,"!");default:throw new oue(i,"TypeScript")}}var cde=Nae(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);var pde=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(Sle(e))return ase(e,t);for(let i of[tde,xle,ude,lde,ede]){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(cde(a))return s;let o=oae(a.decorators),u=function(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!oae(s)||Lce(i)||Sle(e))return"";let a="ClassExpression"===n.type||"ClassDeclaration"===n.type||Bce(n,t);return["declaration"===e.key&&zae(i)?zse:a?Rse:"",Wse(Use,e.map(r,"decorators")),Use]}(e,t,r),l="ClassExpression"===a.type;if(o&&!l)return aae(s,(e=>Ise([u,e])));let c=Qoe(e,t),p=Hpe(e,t);return u||c||p?aae(s,(e=>[p?";":"",c?"(":"",c&&l&&o?[kse([Use,u,e]),Use]:[u,e],c?")":""])):s},dde=[(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 hde(e,t){return Uoe(e,Roe.Block|Roe.Leading,(({value:e})=>e===` ${t} `))}async function fde(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(!oae(t))return e;let r=0,n=Gse(nae(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,n)=>n%2==0?iae(e):(r++,t[e]))):e));return t.length===r?n:null}(await e(a,{parser:"scss"}),upe(r,t));if(!o)throw new Error("Couldn't insert all the expressions");return["`",kse([zse,o]),Vse,"`"]}function mde(e){return"Identifier"===e.type&&"styled"===e.name}function yde(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}var gde=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 mde(t.object)||yde(t);case"CallExpression":return mde(t.callee)||"MemberExpression"===t.callee.type&&("MemberExpression"===t.callee.object.type&&(mde(t.callee.object.object)||yde(t.callee.object))||"CallExpression"===t.callee.object.type&&mde(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)=>Kae(e)&&"elements"===t),((e,t)=>qoe(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...dde)}(e))return fde};async function bde(e,t,r){let{node:n}=r,i=n.quasis.length,s=upe(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?vde(l):await e(u,{parser:"graphql"}),m?(m=lpe(m,!1),!r&&d&&a.push(""),a.push(m),!o&&h&&a.push("")):!r&&!o&&d&&a.push(""),p&&a.push(p)}return["`",kse([zse,Wse(zse,a)]),zse,"`"]}function vde(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([zse,i]):t.push(i),r=!0);return 0===t.length?null:Wse(zse,t)}var xde=function(e){if(function({node:e,parent:t}){return hde(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 bde},Ede=0;async function Sde(e,t,r,n,i){let{node:s}=n,a=Ede;Ede=Ede+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=upe(n,r),c=new RegExp(o("(\\d+)"),"g"),p=0,d=await t(u,{parser:e,__onHtmlRoot(e){p=e.children.length}}),h=Gse(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=cpe(n),i.__embeddedInHtml&&(n=Zoe(!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?zse:f&&m?Use:null;return y?Ise(["`",kse([y,Ise(h)]),y,"`"]):Jse({hug:!1},Ise(["`",f,p>1?kse(Ise(h)):Ise(h),m,"`"]))}var Dde=Sde.bind(void 0,"html"),Tde=Sde.bind(void 0,"angular");var Ade=function(e){return function(e){return hde(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)?Dde:function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>qoe(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...dde)}(e)?Tde:void 0};async function Cde(e,t,r){let{node:n}=r,i=Zoe(!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=Zoe(!1,i,new RegExp(`^${s}`,"gm"),""));let o=lpe(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?kse([Vse,o]):[Kse,_se(o)],Vse,"`"]}var Pde=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 Cde};var wde=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[gde,xde,Ade,Pde])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&&Jse({embed:!0,...r.label},r)}},kde=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Fde=e=>{for(let t of e.quasis)delete t.value};function Ide(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&&Fde(r);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&Fde(t.value.expression),"JSXAttribute"===e.type&&"Literal"===(null==(n=e.value)?void 0:n.type)&&/["']|"|'/.test(e.value.value)&&(t.value.value=Zoe(!1,t.value.value,/["']|"|'/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":Kae(n.value)&&Fde(n.value.elements[0]);break;case"template":"TemplateLiteral"===n.value.type&&Fde(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)&&Fde(t.quasi),"TemplateLiteral"===e.type&&(null!=(i=e.leadingComments)&&i.some((e=>Oae(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===r.type&&"graphql"===r.callee.name||!e.leadingComments)&&Fde(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])}Ide.ignoredProperties=kde;var _de=Ide,Nde=((e,t,r)=>(r=null!=e?Hie(Qie(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Yie(t))!Zie.call(e,i)&&i!==r&&Xie(e,i,{get:()=>t[i],enumerable:!(n=Gie(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:Xie(r,"default",{value:e,enumerable:!0}),e)))(nse(),1);var Ode=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};function Bde(e){let{shebang:t,text:r,pragmas:n,comments:i}=function(e){let t=Ode(e);t&&(e=e.slice(t.length+1));let r=(0,Nde.extract)(e),{pragmas:n,comments:i}=(0,Nde.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e),s=(0,Nde.strip)(r);return(t?`${t}\n`:"")+(0,Nde.print)({pragmas:{format:"",...n},comments:i.trimStart()})+(s.startsWith("\n")?"\n":"\n\n")+s}var Lde={avoidAstMutation:!0},Mde={};ese(Mde,{getVisitorKeys:()=>jde,massageAstNode:()=>Vde,print:()=>Rde});var jde=Iae({JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]});function Rde(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),zse];case"ArrayExpression":{if(0===n.elements.length)return"[]";let t=e.map((()=>null===e.node?"null":r()),"elements");return["[",kse([zse,Wse([",",zse],t)]),zse,"]"]}case"ObjectExpression":return 0===n.properties.length?"{}":["{",kse([zse,Wse([",",zse],e.map(r,"properties"))]),zse,"}"];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 $de(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return $de(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new oue(n,"JSON")}}function $de(e){return"key"===e.key&&"ObjectProperty"===e.parent.type}var Ude=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Vde(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)})}}Vde.ignoredProperties=Ude;var zde,Kde,qde,Wde,Jde,Hde={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."}},Xde="JavaScript",Gde={arrowParens:{category:Xde,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:Hde.bracketSameLine,bracketSpacing:Hde.bracketSpacing,jsxBracketSameLine:{category:Xde,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Xde,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:Hde.singleQuote,jsxSingleQuote:{category:Xde,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Xde,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:Xde,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:Hde.singleAttributePerLine},Yde={estree:sse,"estree-json":Mde},Qde=[{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"]}],Zde=ise,ehe=Object.freeze({__proto__:null,default:Zde,languages:Qde,options:Gde,printers:Yde});function the(e,t={}){return Ine(function(...e){return F1(...e)}(e,{isJSX:Boolean(t.filepath?.match(/\.[jt]sx$/)),isTS:!0,printer:"recast",plugins:[["remove-unused-variables",K6]]}).code,{parser:"babel-ts",plugins:[Jie,ehe]})}function rhe(e,t={}){return e=e.replaceAll("import.meta","BATI_META"),e=`var BATI_META = ${JSON.stringify(t)};(${e})`,(0,eval)(e)}function nhe(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_")&&(rhe(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;rhe(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;this.traverse(e.get("test"),{visitMemberExpression(e){Io(e.value).code.startsWith("import.meta.BATI_")&&(r=!0),this.traverse(e)}}),this.traverse(e),r&&(rhe(Io(e.value.test).code,t)?b.namedTypes.BlockStatement.check(e.value.consequent)?e.replace(...e.value.consequent.body):e.replace(e.value.consequent):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 the(Io(n).code,r)}function ihe(e,t){if(!e)throw new Error(t)}async function she(e){const t=await(e?.());return ihe("string"==typeof t,"Unable to load previous JSON module"),JSON.parse(t)}async function ahe(e){const t=await(e?.());return ihe("string"==typeof t,"Unable to load previous module"),Fo(t)}async function ohe(e,t){const r=p(t.url),n=d(r);return _o(h(n,e))}function uhe(e,t){const r=function(e){return"function-call"===e.exports.default.$type?e.exports.default.$args[0]:e.exports.default}(e),n=t.index??r.plugins?.length??0;return r.plugins||(r.plugins=[]),r.plugins.splice(n,0,t.options?Oo.functionCall(t.constructor,t.options):Oo.functionCall(t.constructor)),e.imports.$add({from:t.from,local:t.constructor,imported:t.imported||"default"}),!0}function*lhe(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 che(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 lhe(n,r.devDependencies??[]))t in e.dependencies||(e.devDependencies[t]=i);for(const[t,i]of lhe(n,r.dependencies??[]))t in e.devDependencies&&delete e.devDependencies[t],e.dependencies[t]=i;return e}Jde="win32"===process.platform||y.TESTING_WINDOWS?function(){if(Kde)return zde;Kde=1,zde=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 zde}():function(){if(Wde)return qde;Wde=1,qde=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 qde}();var phe=dhe;function dhe(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){dhe(e,t||{},(function(e,t){e?n(e):r(t)}))}))}Jde(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}dhe.sync=function(e,t){try{return Jde.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}};const hhe=phe,{join:fhe,delimiter:mhe,sep:yhe,posix:ghe}=a,bhe="win32"===process.platform,vhe=new RegExp(`[${ghe.sep}${yhe===ghe.sep?"":yhe}]`.replace(/(\\)/g,"\\$1")),xhe=new RegExp(`^\\.${vhe.source}`),Ehe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),She=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=mhe})=>{const i=e.match(vhe)?[""]:[...bhe?[process.cwd()]:[],...(t||"").split(n)];if(bhe){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:[""]}},Dhe=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&xhe.test(t)?t.slice(0,2):"")+fhe(r,t)},The=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=She(e,t),s=[];for(const a of r){const r=Dhe(a,e);for(const e of n){const n=r+e;if(await hhe(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 Ehe(e)};var Ahe=The;The.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=She(e,t),s=[];for(const a of r){const r=Dhe(a,e);for(const e of n){const n=r+e;if(hhe.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 Ehe(e)};var Che=g(Ahe);function Phe(e,t,r=0){const n=`${" ".repeat(2*r)}${t?t(e):e}`;return e=>`${n} ${e}`}export{che as addDependency,uhe as addVitePlugin,f as features,m as flags,Io as generateCode,she as loadAsJson,ahe as loadAsMagicast,_o as loadFile,ohe as loadRelativeFileAsMagicast,Fo as parseModule,nhe as transformAndGenerate,Che as which,Phe 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}(s5);var a5={};Object.defineProperty(a5,"__esModule",{value:!0});const o5=W2(),u5=J2,l5={message:"property name must be valid",params:({params:e})=>o5._`{propertyName: ${e.propertyName}}`},c5={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:l5,code(e){const{gen:t,schema:r,data:n,it:i}=e;if((0,u5.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,o5.not)(s),(()=>{e.error(!0),i.allErrors||t.break()}))})),e.ok(s)}};a5.default=c5;var p5={};Object.defineProperty(p5,"__esModule",{value:!0});const d5=d3(),h5=W2(),f5=Q2(),m5=J2,y5={message:"must NOT have additional properties",params:({params:e})=>h5._`{additionalProperty: ${e.additionalProperty}}`},g5={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:y5,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,m5.alwaysValidSchema)(a,r))return;const l=(0,d5.allSchemaProperties)(n.properties),c=(0,d5.allSchemaProperties)(n.patternProperties);function p(e){t.code(h5._`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,m5.alwaysValidSchema)(a,r)){const r=t.name("valid");"failing"===u.removeAdditional?(h(n,r,!1),t.if((0,h5.not)(r),(()=>{e.reset(),p(n)}))):(h(n,r),o||t.if((0,h5.not)(r),(()=>t.break())))}}}function h(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:m5.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,m5.schemaRefOrVal)(a,n.properties,"properties");i=(0,d5.isOwnProperty)(t,e,r)}else i=l.length?(0,h5.or)(...l.map((e=>h5._`${r} === ${e}`))):h5.nil;return c.length&&(i=(0,h5.or)(i,...c.map((t=>h5._`${(0,d5.usePattern)(e,t)}.test(${r})`)))),(0,h5.not)(i)}(r),(()=>d(r))):d(r)})),e.ok(h5._`${s} === ${f5.default.errors}`)}};p5.default=g5;var b5={};Object.defineProperty(b5,"__esModule",{value:!0});const v5=B3(),x5=d3(),E5=J2,S5=p5,D5={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&&S5.default.code(new v5.KeywordCxt(s,S5.default,"additionalProperties"));const a=(0,x5.allSchemaProperties)(r);for(const e of a)s.definedProperties.add(e);s.opts.unevaluated&&a.length&&!0!==s.props&&(s.props=E5.mergeEvaluated.props(t,(0,E5.toHash)(a),s.props));const o=a.filter((e=>!(0,E5.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,x5.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)}}};b5.default=D5;var T5={};Object.defineProperty(T5,"__esModule",{value:!0});const A5=d3(),C5=W2(),P5=J2,w5=J2,k5={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,A5.allSchemaProperties)(r),u=o.filter((e=>(0,P5.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 C5.Name||(s.props=(0,w5.evaluatedPropsToName)(t,s.props));const{props:p}=s;function d(e){for(const t in l)new RegExp(e).test(t)&&(0,P5.checkStrictMode)(s,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function h(r){t.forIn("key",n,(n=>{t.if(C5._`${(0,A5.usePattern)(e,r)}.test(${n})`,(()=>{const i=u.includes(r);i||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:n,dataPropType:w5.Type.Str},c),s.opts.unevaluated&&!0!==p?t.assign(C5._`${p}[${n}]`,!0):i||s.allErrors||t.if((0,C5.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))}()}};T5.default=k5;var F5={};Object.defineProperty(F5,"__esModule",{value:!0});const I5=J2,_5={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,I5.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"}};F5.default=_5;var N5={};Object.defineProperty(N5,"__esModule",{value:!0});const O5={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:d3().validateUnion,error:{message:"must match a schema in anyOf"}};N5.default=O5;var B5={};Object.defineProperty(B5,"__esModule",{value:!0});const L5=W2(),M5=J2,j5={message:"must match exactly one schema in oneOf",params:({params:e})=>L5._`{passingSchemas: ${e.passing}}`},R5={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:j5,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,M5.alwaysValidSchema)(i,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:n,compositeRule:!0},u),n>0&&t.if(L5._`${u} && ${a}`).assign(a,!1).assign(o,L5._`[${o}, ${n}]`).else(),t.if(u,(()=>{t.assign(a,!0),t.assign(o,n),s&&e.mergeEvaluated(s,L5.Name)}))}))})),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}};B5.default=R5;var $5={};Object.defineProperty($5,"__esModule",{value:!0});const U5=J2,V5={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,U5.alwaysValidSchema)(n,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(s)}))}};$5.default=V5;var z5={};Object.defineProperty(z5,"__esModule",{value:!0});const K5=W2(),q5=J2,W5={message:({params:e})=>K5.str`must match "${e.ifClause}" schema`,params:({params:e})=>K5._`{failingKeyword: ${e.ifClause}}`},J5={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:W5,code(e){const{gen:t,parentSchema:r,it:n}=e;void 0===r.then&&void 0===r.else&&(0,q5.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const i=H5(n,"then"),s=H5(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,K5.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,K5._`${r}`):e.setParams({ifClause:r})}}e.pass(a,(()=>e.error(!0)))}};function H5(e,t){const r=e.schema[t];return void 0!==r&&!(0,q5.alwaysValidSchema)(e,r)}z5.default=J5;var X5={};Object.defineProperty(X5,"__esModule",{value:!0});const G5=J2,Y5={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,G5.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};X5.default=Y5,Object.defineProperty(O8,"__esModule",{value:!0});const Q5=B8,Z5=$8,e6=U8,t6=X8,r6=t5,n6=s5,i6=a5,s6=p5,a6=b5,o6=T5,u6=F5,l6=N5,c6=B5,p6=$5,d6=z5,h6=X5;O8.default=function(e=!1){const t=[u6.default,l6.default,c6.default,p6.default,d6.default,h6.default,i6.default,s6.default,n6.default,a6.default,o6.default];return e?t.push(Z5.default,t6.default):t.push(Q5.default,e6.default),t.push(r6.default),t};var f6={},m6={};Object.defineProperty(m6,"__esModule",{value:!0});const y6=W2(),g6={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>y6.str`must match format "${e}"`,params:({schemaCode:e})=>y6._`{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",y6._`${i}[${a}]`),o=r.let("fType"),l=r.let("format");r.if(y6._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(o,y6._`${s}.type || "string"`).assign(l,y6._`${s}.validate`)),(()=>r.assign(o,y6._`"string"`).assign(l,s))),e.fail$data((0,y6.or)(!1===u.strictSchema?y6.nil:y6._`${a} && !${l}`,function(){const e=c.$async?y6._`(${s}.async ? await ${l}(${n}) : ${l}(${n}))`:y6._`${l}(${n})`,r=y6._`(typeof ${l} == "function" ? ${e} : ${l}.test(${n}))`;return y6._`${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,y6.regexpCode)(e):u.code.formats?y6._`${u.code.formats}${(0,y6.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,y6._`${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 y6._`await ${d}(${n})`}return"function"==typeof o?y6._`${d}(${n})`:y6._`${d}.test(${n})`}())}())}};m6.default=g6,Object.defineProperty(f6,"__esModule",{value:!0});const b6=[m6.default];f6.default=b6;var v6={};Object.defineProperty(v6,"__esModule",{value:!0}),v6.contentVocabulary=v6.metadataVocabulary=void 0,v6.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],v6.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty(u4,"__esModule",{value:!0});const x6=T4,E6=O8,S6=f6,D6=v6,T6=[l4.default,x6.default,(0,E6.default)(),S6.default,D6.metadataVocabulary,D6.contentVocabulary];u4.default=T6;var A6,C6,P6={},w6={};A6=w6,Object.defineProperty(A6,"__esModule",{value:!0}),A6.DiscrError=void 0,(C6=A6.DiscrError||(A6.DiscrError={})).Tag="tag",C6.Mapping="mapping",Object.defineProperty(P6,"__esModule",{value:!0});const k6=W2(),F6=w6,I6=V3,_6=J2,N6={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===F6.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>k6._`{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",k6._`${r}${(0,k6.getProperty)(o)}`);function c(r){const n=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},n);return e.mergeEvaluated(i,k6.Name),n}t.if(k6._`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,_6.schemaHasRulesButRef)(i,s.self.RULES)&&(i=I6.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,null==i?void 0:i.$ref),i instanceof I6.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(k6._`${l} === ${e}`),t.assign(u,c(r[e]));t.else(),e.error(!1,{discrError:F6.DiscrError.Mapping,tag:l,tagName:o}),t.endIf()}()),(()=>e.error(!1,{discrError:F6.DiscrError.Tag,tag:l,tagName:o}))),e.ok(u)}};P6.default=N6;var O6={$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=B2,n=u4,i=P6,s=O6,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=B3();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var c=W2();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=j3();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=U3();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})}(O2,O2.exports);const B6={$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,O2.exports)({strict:!0,allowUnionTypes:!0}).compile(B6);const{homedir:L6}=r,{readdirSync:M6}=i,{dirname:j6,join:R6}=a,$6=tT,U6=XD,V6=L6(),z6=e=>"."!==e[0]&&!/(^not-rule-.*|^node_modules$)/.test(e);$6((()=>{const e=R6(V6,".putout.json"),[,t={}]=U6(hO,e);return t})),$6((()=>function(e,t){if(!t)return{};let r=R6(e,t);r.startsWith("/")||(r=R6(process.cwd(),t));const[n,i]=U6(M6,r);if(n)return{};const s=[];for(const e of i.filter(z6)){const t=hO(R6(r,e)),n=e.replace("putout-plugin-","");s.push([n,t])}return{plugins:s}}(V6,".putout"))),process.cwd();var K6={},q6={};const{isIdentifier:W6,isObjectExpression:J6,isObjectPattern:H6,isTemplateLiteral:X6,isAssignmentPattern:G6}=k1().types,Y6=({use:e,declare:t})=>{const r=t7({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)}}}};q6.traverseObjectPattern=Y6;const Q6=({use:e,declare:t})=>r=>{for(const n of r){const{key:r,value:i,computed:s}=n.node;if(s&&W6(r)&&e(n,r.name),W6(i))t(n,i.name);else if(H6(i)){Q6({use:e,declare:t})(n.get("value.properties"))}else if(G6(i)){t7({use:e})(n.get("value.right"));const r=n.get("value.left");if("Identifier"===r.type){t(n,r.node.name);continue}}}};q6.processObjectPattern=Q6;const Z6=e=>{const t=e7(e);return r=>{for(const n of r){const{node:r}=n,{key:i,value:s,computed:a}=r;if(a&&W6(i)&&e(n,i.name),W6(s))e(n,s.name);else if(X6(s))t(n,s.expressions);else if(J6(s)){Z6(e)(n.get("value.properties"))}else;}}};q6.traverseObjectExpression=Z6;q6.traverseArrayExpression=e=>{const t=Z6(e);return e=>{for(const r of e){const{node:e}=r;J6(e)&&t(r.get("properties"))}}};q6.traverseAssignmentExpression=({use:e,declare:t})=>{const r=Y6({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 e7=e=>(t,r)=>{for(const n of r)W6(n)&&e(t,n.name)};q6.traverseTemplateLiteral=e7;const t7=({use:e})=>t=>{const{node:r}=t,{right:n}=r;W6(r)&&e(t.parentPath,r.name),W6(n)&&e(t,n.name)};q6.traverseAssignmentPattern=t7;const{types:r7}=k1(),{isIdentifier:n7,isJSXIdentifier:i7}=r7;const{types:s7}=k1(),{isIdentifier:a7}=s7;const{types:o7}=k1(),{isIdentifier:u7,isTSModuleDeclaration:l7}=o7;const{isAssignmentPattern:c7,isClassDeclaration:p7,isIdentifier:d7,isSpreadElement:h7,isObjectPattern:f7,isObjectExpression:m7,isFunctionDeclaration:y7,isArrayExpression:g7,isVariableDeclaration:b7,isRestElement:v7}=k1().types,{traverseObjectExpression:x7,processObjectPattern:E7,traverseArrayExpression:S7,traverseAssignmentExpression:D7,traverseTemplateLiteral:T7}=q6,A7=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;i7(n)&&e(t,n.name)},JSXExpressionContainer(t){const{node:r}=t,{expression:n}=r;n7(n)&&e(t,n.name)}}),C7=({use:e,declare:t})=>({GenericTypeAnnotation(t){const{node:r}=t,{id:n}=r;a7(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)}}),P7=({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":u7(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(l7)&&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:w7}=Object;const k7=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 F7={};const{types:I7}=k1(),{isIdentifier:_7,isObjectPattern:N7,isRestElement:O7}=I7;function B7(e,t,r){const{length:n}=r,i=r[n-1];if(O7(i))for(let i=0;i<n-1;i++){const{value:n}=r[i],{type:s}=n;"Identifier"!==s||e(t,n.name)}}F7.usePropertiesBeforeRest=({use:e})=>({path:t,params:r})=>{for(const n of r)N7(n)&&B7(e,t,n.properties)},F7.useParamsBeforeLastUsed=({use:e,isUsed:t})=>({path:r,params:n})=>{let i=n.length;for(;--i>0;){const e=n[i];if(L7(t,r,e))break}for(;--i>=0;)_7(n[i])&&e(r,n[i].name);return{path:r,params:n}};const L7=(e,t,r)=>{const{type:n}=r;switch(n){case"Identifier":return e(t,r.name);case"ObjectPattern":return j7(e,t,r);case"AssignmentPattern":return M7(e,t,r)}},M7=(e,t,r)=>{const{left:n}=r,{type:i}=n;switch(i){case"Identifier":return e(t,n.name);case"ObjectPattern":return j7(e,t,n)}},j7=(e,t,r)=>{for(const{value:n}of r.properties)if(_7(n)){if(e(t,n.name))return!0}else;return!1},{types:R7}=k1(),$7=({use:e,declare:t,addParams:r})=>{const n=x7(e),i=E7({use:e,declare:t}),s=D7({use:e,declare:t}),a=T7(e),o=S7(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;d7(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;d7(r)&&t(e,r.name)},VariableDeclarator(r){const{node:n}=r,{init:a}=n,u=r.get("id"),l=r.parentPath.parentPath.isForInStatement();if(d7(n.id))t(r,n.id.name),l&&e(r,n.id.name);else if(f7(n.id))u.traverse({ObjectProperty(i){if(c7(i.node.value)&&s(i.get("value")),i.node.computed&&d7(i.node.key)&&e(i.get("key"),i.node.key.name),!d7(i.node.value))return;const{properties:a}=n.id,o=1===a.length?r:i,{name:u}=i.node.value;t(o,u),v7(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),w7(r,{remove:k7(n)})}n.isIdentifier()&&(w7(n,{remove:k7(n)}),t(n,n.node.name))}}const c=r.get("init");d7(a)?e(r,a.name):g7(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)d7(n)?e(t,n.name):h7(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");d7(r)&&e(t,r.name),d7(n)&&e(t,n.name),d7(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;d7(r)&&e(t,r.name),d7(n)&&e(t,n.name)},MemberExpression(t){const{property:r,object:n,computed:i}=t.node;d7(n)&&e(t,n.name),i&&d7(r)&&e(t,r.name)},OptionalMemberExpression(t){const{object:r,property:n,computed:i}=t.node;d7(r)&&e(t,r.name),i&&d7(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)d7(r)&&e(t,r.name)},TaggedTemplateExpression(t){const{tag:r}=t.node;d7(r)&&e(t,r.name)},UnaryExpression(t){const{argument:r}=t.node;d7(r)&&e(t,r.name)},UpdateExpression(t){const{argument:r}=t.node;d7(r)&&e(t,r.name)},ThrowStatement(t){const{argument:r}=t.node;d7(r)&&e(t,r.name)},IfStatement(t){const{node:r}=t,{test:n}=r;if(d7(n))return e(t,n.name)},ForInStatement(t){const{node:r}=t,{left:n,right:i}=r;d7(n)&&e(t,n.name),d7(i)&&e(t,i.name)},ForOfStatement(r){const{node:n}=r,{left:i,right:s}=n;d7(s)&&e(r,s.name),d7(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;d7(r.expression)&&e(t,r.expression.name)},SwitchStatement(t){const{node:r}=t;d7(r.discriminant)&&e(t,r.discriminant.name);for(const{test:n}of r.cases)d7(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;d7(r)&&t(e,r.name)}r({path:e,params:n})},"CallExpression|OptionalCallExpression"(t){const{node:r}=t,{callee:n}=r;d7(n)&&e(t,r.callee.name),t.traverse({SpreadElement(t){const{argument:r}=t.node;d7(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;d7(r)&&e(t,r.name),d7(n)&&e(t,n.name)},ImportDeclaration(e){const r=e.get("specifiers");for(const e of r){const{local:r}=e.node;d7(r)&&t(e,r.name)}},ExportDefaultDeclaration(t){const r=t.get("declaration"),{declaration:i}=t.node,{id:s}=i;s&&y7(i)?e(t,i.id.name):d7(i)?e(t,i.name):s&&p7(i)?e(t,i.id.name):m7(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(b7(n)){const{declarations:r}=n;for(const{id:n}of r)d7(n)&&e(t,n.name)}else for(const{local:r}of i)d7(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;d7(r)?t(e,r.name):c7(r)?s(e):f7(r)&&i(e.get("properties"))}d7(l)&&e(n,l.name),r({path:n,params:c})},...A7(e),...C7({use:e,declare:t}),...P7({use:e,declare:t})}},{useParamsBeforeLastUsed:U7,usePropertiesBeforeRest:V7}=F7,{isClassDeclaration:z7,isFunctionDeclaration:K7}=R7;const q7=e=>({path:t,params:r})=>{e.push({path:t,params:r})};function W7({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 J7=({vars:e})=>(t,r)=>{const{scope:n}=t,i=W7({name:r,scope:n}),s=e[i],{used:a}=s[r];return a};const H7=({vars:e,setPath:t})=>(r,n)=>{const i=function(e){const{node:t,scope:r}=e;return K7(t)||z7(t)?e.parentPath.scope:r}(r),s=W7({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)},X7=({vars:e})=>(t,r)=>{const{scope:n}=t,i=W7({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 G7([e,t]){return{name:e,...t}}const Y7=({declared:e,used:t})=>e&&!t;const{operator:Q7}=k1(),Z7=(e,t)=>{const r={},n=[],{setPath:i,traverse:s}=t,a=X7({vars:r}),o=H7({vars:r,setPath:i}),u=J7({vars:r}),l=q7(n);return s(e,$7({use:a,declare:o,addParams:l})),n.map(U7({use:a,isUsed:u})).map(V7({use:a})),Object.values(r)},e9=e=>{const t=[];for(const r of e){const e=Object.entries(r);for(const r of e)t.push(G7(r))}return t},t9=e=>e.filter(Y7),{replaceWith:r9,compare:n9,remove:i9}=Q7;K6.report=({name:e})=>`'${e}' is defined but never used`,K6.fix=({path:e})=>n9(e,"const __a = __b = __c")?r9(e.parentPath,e.node.init):function({parentPath:e}){return!!e.isImportDeclaration()&&1===e.node.specifiers.length}(e)?e.parentPath.remove():void i9(e),K6.find=(e,{traverse:t})=>{const r=Z7(e,{setPath:!0,traverse:t}),n=e9(r);return t9(n)};var s9=Object.create,a9=Object.defineProperty,o9=Object.getOwnPropertyDescriptor,u9=Object.getOwnPropertyNames,l9=Object.getPrototypeOf,c9=Object.prototype.hasOwnProperty,p9=(e,t)=>()=>(e&&(t=e(e=0)),t),d9=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h9=(e,t)=>{for(var r in t)a9(e,r,{get:t[r],enumerable:!0})},f9=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of u9(t))!c9.call(e,i)&&i!==r&&a9(e,i,{get:()=>t[i],enumerable:!(n=o9(t,i))||n.enumerable});return e},m9=(e,t,r)=>(r=null!=e?s9(l9(e)):{},f9(!t&&e&&e.__esModule?r:a9(r,"default",{value:e,enumerable:!0}),e)),y9=e=>f9(a9({},"__esModule",{value:!0}),e),g9=(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)},b9=(e,t,r)=>(((e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)})(e,t,"access private method"),r),v9=d9((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("")}}})),x9=d9((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}}(v9());var r=new t.default;e.arrayDiff=r,r.tokenize=function(e){return e.slice()},r.join=r.removeEmpty=function(e){return e}})),E9={};function S9(e,t){function r(){this.constructor=e}K9(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function D9(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 T9(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 A9(e,t){return function(r,n){t(r,n,e)}}function C9(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function P9(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 w9(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 k9(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}function F9(e,t){for(var r in e)"default"!==r&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function I9(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 _9(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 N9(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_9(arguments[t]));return e}function O9(){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 B9(e){return this instanceof B9?(this.v=e,this):new B9(e)}function L9(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 B9?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 M9(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:B9(e[n](t)),done:"return"===n}:i?i(t):t}:i}}function j9(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=I9(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 R9(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function $9(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 U9(e){return e&&e.__esModule?e:{default:e}}function V9(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function z9(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}h9(E9,{__assign:()=>q9,__asyncDelegator:()=>M9,__asyncGenerator:()=>L9,__asyncValues:()=>j9,__await:()=>B9,__awaiter:()=>P9,__classPrivateFieldGet:()=>V9,__classPrivateFieldSet:()=>z9,__createBinding:()=>k9,__decorate:()=>T9,__exportStar:()=>F9,__extends:()=>S9,__generator:()=>w9,__importDefault:()=>U9,__importStar:()=>$9,__makeTemplateObject:()=>R9,__metadata:()=>C9,__param:()=>A9,__read:()=>_9,__rest:()=>D9,__spread:()=>N9,__spreadArrays:()=>O9,__values:()=>I9});var K9,q9,W9=p9((()=>{K9=function(e,t){return K9=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])},K9(e,t)},q9=function(){return q9=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},q9.apply(this,arguments)}})),J9=d9((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})}})),H9=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(J9(),e)})),X9={};h9(X9,{default:()=>Y9});var G9,Y9,Q9=p9((()=>{G9=e=>e,G9.grey=G9,G9.red=G9,G9.bold=G9,G9.yellow=G9,G9.blue=G9,G9.default=G9,Y9=G9})),Z9=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Q9(),y9(X9));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("; ")+"."}})),eee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(Z9(),e)})),tee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Q9(),y9(X9));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(" ")})),ree=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(tee(),e)})),nee=d9(((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}})),iee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(Q9(),y9(X9)),r=nee();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(" "))}})),see=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0}),(W9(),y9(E9)).__exportStar(iee(),e)})),aee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9));t.__exportStar(eee(),e),t.__exportStar(ree(),e),t.__exportStar(see(),e)})),oee=d9((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})),uee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),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})),lee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"anything"}validate(){return!0}};e.AnySchema=r})),cee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9)),r=oee(),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})),pee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"true or false"}validate(e){return"boolean"==typeof e}};e.BooleanSchema=r})),dee=d9((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}}})),hee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=dee(),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})),fee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"a number"}validate(e,t){return"number"==typeof e}};e.NumberSchema=r})),mee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=dee(),r=fee(),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})),yee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=oee(),r=class extends t.Schema{expected(){return"a string"}validate(e){return"string"==typeof e}};e.StringSchema=r})),gee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9));t.__exportStar(uee(),e),t.__exportStar(lee(),e),t.__exportStar(cee(),e),t.__exportStar(pee(),e),t.__exportStar(hee(),e),t.__exportStar(mee(),e),t.__exportStar(fee(),e),t.__exportStar(yee(),e)})),bee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=J9(),r=Z9(),n=ree(),i=iee();e.defaultDescriptor=t.apiDescriptor,e.defaultUnknownHandler=i.levenUnknownHandler,e.defaultInvalidHandler=n.commonInvalidHandler,e.defaultDeprecatedHandler=r.commonDeprecatedHandler})),vee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=bee(),r=dee();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})),xee=d9((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=(W9(),y9(E9));t.__exportStar(H9(),e),t.__exportStar(aee(),e),t.__exportStar(gee(),e),t.__exportStar(vee(),e),t.__exportStar(oee(),e)})),Eee={};h9(Eee,{getChalk:()=>Dee,shouldHighlight:()=>See});var See,Dee,Tee=p9((()=>{Q9(),See=()=>!1,Dee=()=>Y9})),Aee=d9((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=(Tee(),y9(Eee)),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}}));h9({},{__debug:()=>One,check:()=>_ne,doc:()=>Tne,format:()=>Ine,formatWithCursor:()=>Fne,getSupportInfo:()=>Nne,util:()=>cne,version:()=>wne});var Cee=(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)},Pee=m9(x9(),1),wee="string",kee="array",Fee="cursor",Iee="indent",_ee="align",Nee="trim",Oee="group",Bee="fill",Lee="if-break",Mee="indent-if-break",jee="line-suffix",Ree="line-suffix-boundary",$ee="line",Uee="label",Vee="break-parent",zee=new Set([Fee,Iee,_ee,Nee,Oee,Bee,Lee,Mee,jee,Ree,$ee,Uee,Vee]);var Kee=function(e){if("string"==typeof e)return wee;if(Array.isArray(e))return kee;if(!e)return;let{type:t}=e;return zee.has(t)?t:void 0};function qee(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(Kee(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))([...zee].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var Wee=class extends Error{name="InvalidDocError";constructor(e){super(qee(e)),this.doc=e}},Jee={};var Hee=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Jee){r(i.pop());continue}r&&i.push(e,Jee);let s=Kee(e);if(!s)throw new Wee(e);if(!1!==(null==t?void 0:t(e)))switch(s){case kee:case Bee:{let t=s===kee?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case Lee:i.push(e.flatContents,e.breakContents);break;case Oee: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 _ee:case Iee:case Mee:case Uee:case jee:i.push(e.contents);break;case wee:case Fee:case Nee:case Ree:case $ee:case Vee:break;default:throw new Wee(e)}}},Xee=()=>{};function Gee(e){return{type:Iee,contents:e}}function Yee(e,t){return{type:_ee,contents:t,n:e}}function Qee(e,t={}){return Xee(t.expandedStates),{type:Oee,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Zee(e){return{type:Bee,parts:e}}function ete(e){return{type:jee,contents:e}}var tte={type:Ree},rte={type:Vee},nte={type:Nee},ite={type:$ee,hard:!0},ste={type:$ee,hard:!0,literal:!0},ate={type:$ee},ote={type:$ee,soft:!0},ute=[ite,rte],lte=[ste,rte],cte={type:Fee};function pte(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function dte(e,t,r){let n=e;if(t>0){for(let e=0;e<Math.floor(t/r);++e)n=Gee(n);n=Yee(t%r,n),n=Yee(Number.NEGATIVE_INFINITY,n)}return n}var hte=(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 fte(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}function mte(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 yte={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"}},gte=/[^\x20-\x7F]/;var bte=function(e){if(!e)return 0;if(!gte.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=yte.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t},vte=e=>{if(Array.isArray(e))return e;if(e.type!==Bee)throw new Error(`Expect doc to be 'array' or '${Bee}'.`);return e.parts};function xte(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(Kee(e)){case kee:return t(e.map(n));case Bee:return t({...e,parts:e.parts.map(n)});case Lee:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case Oee:{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 _ee:case Iee:case Mee:case Uee:case jee:return t({...e,contents:n(e.contents)});case wee:case Fee:case Nee:case Ree:case $ee:case Vee:return t(e);default:throw new Wee(e)}}(e);return r.set(e,i),i}}function Ete(e,t,r){let n=r,i=!1;return Hee(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function Ste(e){if(e.type===Oee&&e.break||e.type===$ee&&e.hard||e.type===Vee)return!0}function Dte(e){if(e.length>0){let t=hte(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function Tte(e){return e.type!==$ee||e.hard?e.type===Lee?e.flatContents:e:e.soft?"":" "}function Ate(e){for(e=[...e];e.length>=2&&hte(!1,e,-2).type===$ee&&hte(!1,e,-1).type===Vee;)e.length-=2;if(e.length>0){let t=Cte(hte(!1,e,-1));e[e.length-1]=t}return e}function Cte(e){switch(Kee(e)){case _ee:case Iee:case Mee:case Oee:case jee:case Uee:{let t=Cte(e.contents);return{...e,contents:t}}case Lee:return{...e,breakContents:Cte(e.breakContents),flatContents:Cte(e.flatContents)};case Bee:return{...e,parts:Ate(e.parts)};case kee:return Ate(e);case wee:return e.replace(/[\n\r]*$/,"");case Fee:case Nee:case Ree:case $ee:case Vee:break;default:throw new Wee(e)}return e}function Pte(e){return Cte(function(e){return xte(e,(e=>function(e){switch(Kee(e)){case Bee:if(e.parts.every((e=>""===e)))return"";break;case Oee:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===Oee&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case _ee:case Iee:case Mee:case jee:if(!e.contents)return"";break;case Lee:if(!e.flatContents&&!e.breakContents)return"";break;case kee:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof hte(!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 wee:case Fee:case Nee:case Ree:case $ee:case Uee:case Vee:break;default:throw new Wee(e)}return e}(e)))}(e))}function wte(e){if(e.type===$ee)return!0}function kte(e,t){return e.type===Uee?{...e,contents:t(e.contents)}:t(e)}var Fte=Symbol("MODE_BREAK"),Ite=Symbol("MODE_FLAT"),_te=Symbol("cursor");function Nte(e,t){return Bte(e,{type:"indent"},t)}function Ote(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?Bte(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:Bte(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function Bte(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 Lte(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==_te)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(_te);return t}function Mte(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(Kee(l)){case wee:u.push(l),r-=bte(l);break;case kee:case Bee:{let t=vte(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case Iee:case _ee:case Mee:case Uee:o.push({mode:e,doc:l.contents});break;case Nee:r+=Lte(u);break;case Oee:{if(s&&l.break)return!1;let t=l.break?Fte:e,r=l.expandedStates&&t===Fte?hte(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case Lee:{let t=(l.groupId?i[l.groupId]||Ite:e)===Fte?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case $ee:if(e===Fte||l.hard)return!0;l.soft||(u.push(" "),r--);break;case jee:n=!0;break;case Ree:if(n)return!1}}return!1}function jte(e,t){let r={},n=t.printWidth,i=fte(t.endOfLine),s=0,a=[{ind:{value:"",length:0,queue:[]},mode:Fte,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];Hee(e,(function(e){if(e.type===Vee&&Dte(r),e.type===Oee){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===Oee&&r.pop().break&&Dte(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(Kee(d)){case wee:{let e="\n"!==i?Cee(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=bte(e));break}case kee:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case Fee:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(_te),c++;break;case Iee:a.push({ind:Nte(e,t),mode:p,doc:d.contents});break;case _ee:a.push({ind:Ote(e,d.n,t),mode:p,doc:d.contents});break;case Nee:s-=Lte(o);break;case Oee:switch(p){case Ite:if(!u){a.push({ind:e,mode:d.break?Fte:Ite,doc:d.contents});break}case Fte:{u=!1;let t={ind:e,mode:Ite,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&Mte(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=hte(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Fte,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Fte,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Ite,doc:t};if(Mte(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Fte,doc:d.contents});break}}d.id&&(r[d.id]=hte(!1,a,-1).mode);break;case Bee:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Ite,doc:o},h={ind:e,mode:Fte,doc:o},f=Mte(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Ite,doc:u},y={ind:e,mode:Fte,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:Zee(i)},b=i[0];Mte({ind:e,mode:Ite,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 Lee:case Mee:{let t=d.groupId?r[d.groupId]:p;if(t===Fte){let t=d.type===Lee?d.breakContents:d.negate?d.contents:Gee(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Ite){let t=d.type===Lee?d.flatContents:d.negate?Gee(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case jee:l.push({ind:e,mode:p,doc:d.contents});break;case Ree:l.length>0&&a.push({ind:e,mode:p,doc:ite});break;case $ee:switch(p){case Ite:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Fte: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-=Lte(o),o.push(i+e.value),s=e.length)}break;case Uee:a.push({ind:e,mode:p,doc:d.contents});break;case Vee:break;default:throw new Wee(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(_te);if(-1!==p){let e=o.indexOf(_te,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 Rte(e){var t;if(!e)return"";if(Array.isArray(e)){let t=[];for(let r of e)if(Array.isArray(r))t.push(...Rte(r));else{let e=Rte(r);""!==e&&t.push(e)}return t}return e.type===Lee?{...e,breakContents:Rte(e.breakContents),flatContents:Rte(e.flatContents)}:e.type===Oee?{...e,contents:Rte(e.contents),expandedStates:null==(t=e.expandedStates)?void 0:t.map(Rte)}:e.type===Bee?{type:"fill",parts:e.parts.map(Rte)}:e.contents?{...e,contents:Rte(e.contents)}:e}var $te=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},Ute=class extends Error{name="ConfigError"},Vte=class extends Error{name="UndefinedParserError"},zte={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 Kte({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=hte(!1,e.default,-1).value),t.push(e)}return t}(Object.assign({},...e.map((({options:e})=>e)),zte)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter((e=>!e.deprecated))),"parser"===i.name&&(i.choices=[...i.choices,...qte(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*qte(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 Wte=e=>e.split(/[/\\]/).pop();function Jte(e,t){if(!t)return;let r=Wte(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 Hte,Xte=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)??Jte(r,t.physicalFile)??Jte(r,t.file)??void t.physicalFile;return null==n?void 0:n.parsers[0]},Gte=m9(xee(),1);function Yte(e,{isCLI:t,optionInfos:r,FlagSchema:n}){let i,{name:s}=e,a={name:s},o={};switch(e.type){case"int":i=Gte.default.IntegerSchema,t&&(a.preprocess=Number);break;case"string":case"path":i=Gte.default.StringSchema;break;case"choice":i=Gte.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=Gte.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)?hte(!1,t,-1):t),n)}return e.array?Gte.default.ArraySchema.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...o,valueSchema:i.create(a)}):i.create({...a,...o})}var Qte=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=Gte.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 Gte.default.levenUnknownHandler(e,t,{...r,schemas:i})},u=function(e,{isCLI:t,FlagSchema:r}){let n=[];t&&n.push(Gte.default.AnySchema.create({name:"_"}));for(let i of e)n.push(Yte(i,{isCLI:t,optionInfos:e,FlagSchema:r})),i.alias&&t&&n.push(Gte.default.AliasSchema.create({name:i.alias,sourceName:i.name}));return n}(t,{isCLI:n,FlagSchema:s}),l=new Gte.default.Normalizer(u,{logger:r,unknown:o,descriptor:a}),c=!1!==r;c&&Hte&&(l._hasDeprecationWarned=Hte);let p=l.normalize(e);return c&&(Hte=l._hasDeprecationWarned),p};function Zte(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 Ute(r)}function ere({plugins:e,parser:t}){return tre(Zte(e,t),t)}function tre(e,t){let r=e.parsers[t];return"function"==typeof r?r():r}var rre={astFormat:"estree",printer:{},originalText:void 0,locStart:null,locEnd:null};var nre=async function(e,t={}){var r;let n={...e};if(!n.parser){if(!n.filepath)throw new Vte("No parser and no file path given, couldn't infer a parser.");if(n.parser=Xte(n,{physicalFile:n.filepath}),!n.parser)throw new Vte(`No parser could be inferred for file "${n.filepath}".`)}let i=Kte({plugins:e.plugins,showDeprecated:!0}).options,s={...rre,...Object.fromEntries(i.filter((e=>void 0!==e.default)).map((e=>[e.name,e.default])))},a=Zte(n.plugins,n.parser),o=await tre(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 Ute(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"),Qte(n,i,{passThrough:Object.keys(rre),...t})},ire=new Set(["tokens","comments","parent","enclosingNode","precedingNode","followingNode"]),sre=e=>Object.keys(e).filter((e=>!ire.has(e)));var are=function(e){return e?t=>e(t,ire):sre};var ore=function(e,t){let{printer:{massageAstNode:r,getVisitorKeys:n}}=t;if(!r)return e;let i=are(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)},ure=m9(Aee(),1);var lre,cre,pre,dre,hre=async function(e,t){let r,n=await ere(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,ure.codeFrameColumns)(t,r,{highlightCode:!0});throw e.message+="\n"+n,e.codeFrame=n,e}throw e}(t,e)}return{text:i,ast:r}};lre=new WeakSet,cre=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},pre=new WeakSet,dre=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 fre=class{constructor(e){g9(this,lre),g9(this,pre),this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return hte(!1,e,null===t?-2:-4)??null}get index(){return null===this.siblings?null:hte(!1,this.stack,-2)}get node(){return hte(!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=hte(!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[...b9(this,pre,dre).call(this)]}getName(){let{stack:e}=this,{length:t}=e;return t>1?hte(!1,e,-2):null}getValue(){return hte(!1,this.stack,-1)}getNode(e=0){let t=b9(this,lre,cre).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=hte(!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=b9(this,lre,cre).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=hte(!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 b9(this,pre,dre).call(this))if(e(t))return t}hasAncestor(e){for(let t of b9(this,pre,dre).call(this))if(e(t))return!0;return!1}},mre=()=>{};mre.ok=mre,mre.strictEqual=mre;var yre=mre;function gre(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 bre=gre(/\s/),vre=gre(" \t"),xre=gre(",; \t"),Ere=gre(/[^\n\r]/);var Sre=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 Dre=function(e,t,r={}){let n=vre(e,r.backwards?t-1:t,r);return n!==Sre(e,n,r)};var Tre=function(e){return Array.isArray(e)&&e.length>0};var Are=function(e){return null!==e&&"object"==typeof e};function*Cre(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>Are(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 Pre(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 wre(e,t){t.leading=!0,t.trailing=!1,Pre(e,t)}function kre(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),Pre(e,t)}function Fre(e,t){t.leading=!1,t.trailing=!0,Pre(e,t)}var Ire=new WeakMap;function _re(e,t){if(Ire.has(e))return Ire.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))??[...Cre(e,{getVisitorKeys:are(i)})]).flatMap((e=>n(e)?[e]:_re(e,t)));return o.sort(((e,t)=>s(e)-s(t)||a(e)-a(t))),Ire.set(e,o),o}function Nre(e,t,r,n){let i,s,{locStart:a,locEnd:o}=r,u=a(t),l=o(t),c=_re(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 Nre(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=Rre(e,t,r);i&&Rre(e,i,r)!==a&&(i=null),s&&Rre(e,s,r)!==a&&(s=null)}return{enclosingNode:n,precedingNode:i,followingNode:s}}var Ore=()=>!1;var Bre=e=>!/[\S\n\u2028\u2029]/.test(e);function Lre(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||!Bre(e.slice(o(n),u)))break;u=a(n)}return Dre(e,u,{backwards:!0})}function Mre(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||!Bre(e.slice(u,a(n))))break;u=o(n)}return Dre(e,u)}function jre(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];yre.strictEqual(l,a),yre.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?Fre(a,r):wre(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 Rre(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 $re=function(e,t){let r=t-1;return r=vre(e,r,{backwards:!0}),r=Sre(e,r,{backwards:!0}),r=vre(e,r,{backwards:!0}),r!==Sre(e,r,{backwards:!0})};function Ure(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function Vre(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=[Ure(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=Dre(a,u(n))?Dre(a,o(n),{backwards:!0})?ute:ate:" ";i.push(e)}else i.push(ute);let l=Sre(a,vre(a,u(n)));return!1!==l&&Dre(a,l)&&i.push(ute),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=Ure(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)||Dre(o,u(i),{backwards:!0})){let e=$re(o,u(i));return{doc:ete([ute,e?ute:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[ete([" ",s]),rte],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}async function zre(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=are(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 nre({...r,...t,parentParser:r.parser,originalText:e},{passThrough:!0}),{ast:s}=await hre(e,i),a=await n(s,i);return Pte(a)}(e,t,r,n)}e.stack=p}var Kre=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 qre(e,t){({ast:e}=await Jre(e,t));let r=new Map,n=new fre(e),i=new Map;await zre(n,a,t,qre,i);let s=await Wre(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=Wre(n,t,a,e,i);return o&&r.set(s,u),u}}function Wre(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)?Kre(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}=Vre(e,r);return n||i?kte(t,(e=>[n,e,i])):t}(e,a,t)),o===t.cursorNode&&(a=kte(a,(e=>[cte,e,cte]))),a}async function Jre(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,!Tre(r)||!t.printer.canAttachComment)return;let n=[],{locStart:i,locEnd:s,printer:{experimentalFeatures:{avoidAstMutation:a=!1}={},handleComments:o={}},originalText:u}=t,{ownLine:l=Ore,endOfLine:c=Ore,remaining:p=Ore}=o,d=r.map(((n,i)=>({...Nre(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){wre(g,o);continue}if(s(o)-s(g)>=0){Fre(g,o);continue}}if(a?r=[t]:(o.enclosingNode=h,o.precedingNode=u,o.followingNode=f,r=[o,m,y,g,b]),Lre(m,y,d,e))o.placement="ownLine",l(...r)||(f?wre(f,o):u?Fre(u,o):kre(h||g,o));else if(Mre(m,y,d,e))o.placement="endOfLine",c(...r)||(u?Fre(u,o):f?wre(f,o):kre(h||g,o));else if(o.placement="remaining",!p(...r))if(u&&f){let e=n.length;e>0&&n[e-1].followingNode!==f&&jre(n,y),n.push(t)}else u?Fre(u,o):f?wre(f,o):kre(h||g,o)}if(jre(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 Hre=({parser:e})=>"json"===e||"json5"===e||"json-stringify"===e;function Xre(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 Gre(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 _re(e,r)){let o=Gre(a,t,r,n,[e,...i],s);if(o)return o}if(!n||n(e,i[0]))return{node:e,parentNodes:i}}}var Yre=new Set(["JsonRoot","ObjectExpression","ArrayExpression","StringLiteral","NumericLiteral","BooleanLiteral","NullLiteral","UnaryExpression","TemplateLiteral"]),Qre=new Set(["OperationDefinition","FragmentDefinition","VariableDefinition","TypeExtensionDefinition","ObjectTypeDefinition","FieldDefinition","DirectiveDefinition","EnumTypeDefinition","EnumValueDefinition","InputValueDefinition","InputObjectTypeDefinition","SchemaDefinition","OperationTypeDefinition","InterfaceTypeDefinition","UnionTypeDefinition","ScalarTypeDefinition"]);function Zre(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 Yre.has(t.type);case"graphql":return Qre.has(t.kind);case"vue":return"root"!==t.tag}return!1}function ene(e,t,r){let{rangeStart:n,rangeEnd:i,locStart:s,locEnd:a}=t;yre.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=Gre(r,n,t,((e,r)=>Zre(t,e,r)),[],"rangeStart"),d=u?p:Gre(r,i,t,(e=>Zre(t,e)),[],"rangeEnd");if(!p||!d)return{rangeStart:0,rangeEnd:0};if(Hre(t)){let e=function(e,t){let r=[e.node,...e.parentNodes],n=new Set([t.node,...t.parentNodes]);return r.find((e=>Yre.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 Xre(t.parentNodes)){if(!(r(e)>=a))break;s=e}let o=n(t.node);for(let t of Xre(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 tne=function(e,t){let{cursorOffset:r,locStart:n,locEnd:i}=t,s=are(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 Cre(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:s,filter:a}))o=t;return o},rne="\ufeff",nne=Symbol("cursor");async function ine(e,t,r=0){if(!e||0===e.trim().length)return{formatted:"",cursorOffset:-1,comments:[]};let{ast:n,text:i}=await hre(e,t);t.cursorOffset>=0&&(t.cursorNode=tne(n,t));let s=await qre(n,t);r>0&&(s=dte([ute,s],r,t.tabWidth));let a=jte(s,t);if(r>0){let e=a.formatted.trim();void 0!==a.cursorNodeStart&&(a.cursorNodeStart-=a.formatted.indexOf(e)),a.formatted=e+fte(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,nne);let c=u.split(""),p=(0,Pee.diffArrays)(l,c),d=s;for(let e of p)if(e.removed){if(e.value.includes(nne))break}else d+=e.count;return{formatted:a.formatted,cursorOffset:d,comments:o}}return{formatted:a.formatted,cursorOffset:-1,comments:o}}function sne(e,t,r){return"number"!=typeof t||Number.isNaN(t)||t<0||t>e.length?r:t}function ane(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i}=t;return r=sne(e,r,-1),n=sne(e,n,0),i=sne(e,i,e.length),{...t,cursorOffset:r,rangeStart:n,rangeEnd:i}}function one(e,t){let{cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s}=ane(e,t),a=e.charAt(0)===rne;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=>mte(e.slice(0,Math.max(t,0)),"\r\n");r-=t(r),n-=t(n),i-=t(i),e=function(e){return Cee(!1,e,/\r\n?/g,"\n")}(e)}return{hasBOM:a,text:e,options:ane(e,{...t,cursorOffset:r,rangeStart:n,rangeEnd:i,endOfLine:s})}}async function une(e,t){let r=await ere(t);return!r.hasPragma||r.hasPragma(e)}async function lne(e,t){let r,{hasBOM:n,text:i,options:s}=one(e,await nre(t));return s.rangeStart>=s.rangeEnd&&""!==i||s.requirePragma&&!await une(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 hre(e,t),{rangeStart:i,rangeEnd:s}=ene(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=$te(u,t.tabWidth),c=await ine(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=fte(t.endOfLine);d>=0&&"\r\n"===e&&(d+=mte(h.slice(0,d),"\n")),h=Cee(!1,h,"\n",e)}return{formatted:h,cursorOffset:d,comments:c.comments}}(i,s):(!s.requirePragma&&s.insertPragma&&s.printer.insertPragma&&!await une(i,s)&&(i=s.printer.insertPragma(i)),r=await ine(i,s)),n&&(r.formatted=rne+r.formatted,r.cursorOffset>=0&&r.cursorOffset++),r)}var cne={};h9(cne,{addDanglingComment:()=>kre,addLeadingComment:()=>wre,addTrailingComment:()=>Fre,getAlignmentSize:()=>$te,getIndentSize:()=>yne,getMaxContinuousCount:()=>mne,getNextNonSpaceNonCommentCharacter:()=>vne,getNextNonSpaceNonCommentCharacterIndex:()=>Ene,getStringWidth:()=>bte,hasNewline:()=>Dre,hasNewlineInRange:()=>gne,hasSpaces:()=>bne,isNextLineEmpty:()=>Dne,isNextLineEmptyAfterIndex:()=>fne,isPreviousLineEmpty:()=>Sne,makeString:()=>xne,skip:()=>gre,skipEverythingButNewLine:()=>Ere,skipInlineComment:()=>pne,skipNewline:()=>Sre,skipSpaces:()=>vre,skipToLineEnd:()=>xre,skipTrailingComment:()=>dne,skipWhitespace:()=>bre});var pne=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 dne=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Ere(e,t):t)};var hne=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=vre(e,n),n=pne(e,n),n=dne(e,n),n=Sre(e,n);return n};var fne=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=xre(e,n),n=pne(e,n),n=vre(e,n);return n=dne(e,n),n=Sre(e,n),!1!==n&&Dre(e,n)};var mne=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 yne=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:$te(e.slice(r+1).match(/^[\t ]*/)[0],t)};var gne=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};var bne=function(e,t,r={}){return vre(e,r.backwards?t-1:t,r)!==t};var vne=function(e,t){let r=hne(e,t);return!1===r?"":e.charAt(r)};var xne=function(e,t,r){let n='"'===t?"'":'"',i=Cee(!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 Ene(e,t){return 2===arguments.length||"number"==typeof t?hne(e,t):function(e,t,r){return hne(e,r(t))}(...arguments)}function Sne(e,t){return 2===arguments.length||"number"==typeof t?$re(e,t):function(e,t,r){return $re(e,r(t))}(...arguments)}function Dne(e,t){return 2===arguments.length||"number"==typeof t?fne(e,t):function(e,t,r){return fne(e,r(t))}(...arguments)}var Tne={};h9(Tne,{builders:()=>Ane,printer:()=>Cne,utils:()=>Pne});var Ane={join:pte,line:ate,softline:ote,hardline:ute,literalline:lte,group:Qee,conditionalGroup:function(e,t){return Qee(e[0],{...t,expandedStates:e})},fill:Zee,lineSuffix:ete,lineSuffixBoundary:tte,cursor:cte,breakParent:rte,ifBreak:function(e,t="",r={}){return{type:Lee,breakContents:e,flatContents:t,groupId:r.groupId}},trim:nte,indent:Gee,indentIfBreak:function(e,t){return{type:Mee,contents:e,groupId:t.groupId,negate:t.negate}},align:Yee,addAlignmentToDoc:dte,markAsRoot:function(e){return Yee({type:"root"},e)},dedentToRoot:function(e){return Yee(Number.NEGATIVE_INFINITY,e)},dedent:function(e){return Yee(-1,e)},hardlineWithoutBreakParent:ite,literallineWithoutBreakParent:ste,label:function(e,t){return e?{type:Uee,label:e,contents:t}:t},concat:e=>e},Cne={printDocToString:jte},Pne={willBreak:function(e){return Ete(e,Ste,!1)},traverseDoc:Hee,findInDoc:Ete,mapDoc:xte,removeLines:function(e){return xte(e,Tte)},stripTrailingHardline:Pte,replaceEndOfLine:function(e,t=lte){return xte(e,(e=>"string"==typeof e?pte(t,e.split("\n")):e))},canBreak:function(e){return Ete(e,wte,!1)}},wne="3.0.0";function kne(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 Fne=kne(lne);async function Ine(e,t){let{formatted:r}=await Fne(e,{...t,cursorOffset:-1});return r}async function _ne(e,t){return await Ine(e,t)===e}var Nne=kne(Kte,0),One={parse:kne((async function(e,t,r){let{text:n,options:i}=one(e,await nre(t)),s=await hre(n,i);return r&&(r.preprocessForPrint&&(s.ast=await Jre(s.ast,i)),r.massage&&(s.ast=ore(s.ast,i))),s})),formatAST:kne((async function(e,t){return t=await nre(t),jte(await qre(e,t),t)})),formatDoc:kne((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===$ee){let e=(null==(s=null==i?void 0:i[r+1])?void 0:s.type)===Vee;return t.literal?e?"literalline":"literallineWithoutBreakParent":t.hard?e?"hardline":"hardlineWithoutBreakParent":t.soft?"softline":"line"}if(t.type===Vee)return(null==(a=null==i?void 0:i[r-1])?void 0:a.type)===$ee&&i[r-1].hard?void 0:"breakParent";if(t.type===Nee)return"trim";if(t.type===Iee)return"indent("+e(t.contents)+")";if(t.type===_ee)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===Lee)return"ifBreak("+e(t.breakContents)+(t.flatContents?", "+e(t.flatContents):"")+(t.groupId?(t.flatContents?"":', ""')+`, { groupId: ${n(t.groupId)} }`:"")+")";if(t.type===Mee){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===Oee){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===Bee)return`fill([${t.parts.map((t=>e(t))).join(", ")}])`;if(t.type===jee)return"lineSuffix("+e(t.contents)+")";if(t.type===Ree)return"lineSuffixBoundary";if(t.type===Uee)return`label(${JSON.stringify(t.label)}, ${e(t.contents)})`;throw new Error("Unknown doc type "+t.type)}(Rte(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 lne(r,{...t,parser:"__js_expression"});return n})),printToDoc:kne((async function(e,t){t=await nre(t);let{ast:r}=await hre(e,t);return qre(r,t)})),printDocToString:kne((async function(e,t){return jte(e,await nre(t))}))},Bne=Object.create,Lne=Object.defineProperty,Mne=Object.getOwnPropertyDescriptor,jne=Object.getOwnPropertyNames,Rne=Object.getPrototypeOf,$ne=Object.prototype.hasOwnProperty,Une=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vne=(e,t,r)=>(r=null!=e?Bne(Rne(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of jne(t))!$ne.call(e,i)&&i!==r&&Lne(e,i,{get:()=>t[i],enumerable:!(n=Mne(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:Lne(r,"default",{value:e,enumerable:!0}),e)),zne=Une((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})),Kne=Une((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()))}})),qne={};((e,t)=>{for(var r in t)Lne(e,r,{get:t[r],enumerable:!0})})(qne,{parsers:()=>qie});var Wne=Vne(zne(),1);var Jne=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 Hne=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};var Xne=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 Gne=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 Yne(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 Qne=Yne(" \t"),Zne=Yne(/[^\n\r]/);var eie=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?Zne(e,t):t)};var tie=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Qne(e,n),n=Xne(e,n),n=eie(e,n),n=Gne(e,n);return n},rie=Vne(Kne(),1);function nie(e){let{pragmas:t}=function(e){let t=Hne(e);t&&(e=e.slice(t.length+1));let r=(0,rie.extract)(e),{pragmas:n,comments:i}=(0,rie.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 iie=function(e){return Array.isArray(e)&&e.length>0};function sie(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return iie(n)?Math.min(sie(n[0]),r):r}function aie(e){return e.range?e.range[1]:e.end}var oie=function(e){return e="function"==typeof e?{parse:e}:e,{astFormat:"estree",hasPragma:nie,locStart:sie,locEnd:aie,...e}};var uie=function(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)};var lie=function(e){let{message:t,loc:r}=e;return uie(t.replace(/ \(.*\)$/,""),{loc:{start:{line:r?r.line:0,column:r?r.column+1:0}},cause:e})},cie=(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 pie=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)}(["Block","CommentBlock","MultiLine"]);var die=function(e){return pie(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};var hie=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))},fie=null;function mie(e){if(null!==fie&&(fie.property,1)){let e=fie;return fie=mie.prototype=null,e}return fie=mie.prototype=e??Object.create(null),new mie}for(let e=0;e<=10;e++)mie();var yie=function(e,t="type"){return function(e){mie(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 gie=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=yie(t);for(let i=0;i<n.length;i++)t[n[i]]=e(t[n[i]],r);return r(t)||t};var bie=function(e,t){let{start:r,end:n}=e.loc;throw uie(t,{loc:{start:{line:r.line,column:r.column+1},end:{line:n.line,column:n.column+1}}})};function vie(e){return"LogicalExpression"===e.type&&"LogicalExpression"===e.right.type&&e.operator===e.right.operator}function xie(e){return vie(e)?xie({type:"LogicalExpression",operator:e.operator,left:xie({type:"LogicalExpression",operator:e.operator,left:e.left,right:e.right.left,range:[sie(e.left),aie(e.right.left)]}),right:e.right.right,range:[sie(e),aie(e)]}):e}var Eie=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=gie(e,(e=>{var r;null!=(r=e.leadingComments)&&r.some(die)&&t.add(sie(e))})),e=gie(e,(e=>{if("ParenthesizedExpression"===e.type){let{expression:r}=e;if("TypeCastExpression"===r.type)return r.range=e.range,r;let n=sie(e);if(!t.has(n))return r.extra={...r.extra,parenthesized:!0},r}}))}if(e=gie(e,(t=>{switch(t.type){case"LogicalExpression":if(vie(t))return xie(t);break;case"VariableDeclaration":{let e=cie(!1,t.declarations,-1);null!=e&&e.init&&function(e,t){";"!==n[aie(t)]&&(e.range=[sie(e),aie(t)])}(t,e);break}case"TSParenthesizedType":return t.typeAnnotation;case"TSTypeParameter":if("string"==typeof t.name){let e=sie(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&&bie(e.value,"Unexpected token.")}break;case"TSInterfaceDeclaration":iie(t.implements)&&bie(t.implements[0],"Interface declaration cannot have 'implements' clause.");break;case"TSPropertySignature":t.initializer&&bie(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(sie(e),aie(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]}})),iie(e.comments)){let t=cie(!1,e.comments,-1);for(let r=e.comments.length-2;r>=0;r--){let n=e.comments[r];aie(n)===sie(t)&&pie(n)&&pie(t)&&hie(n)&&hie(t)&&(e.comments.splice(r+1,1),n.value+="*//*"+t.value,n.range=[sie(n),aie(t)]),t=n}}return"Program"===e.type&&(e.range=[0,n.length]),e};var Sie=function(e){let{filepath:t}=e;if(t){if(t=t.toLowerCase(),t.endsWith(".cjs"))return"script";if(t.endsWith(".mjs"))return"module"}};var Die=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}},Tie=e=>oie(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=Hne(e);n&&(e=e.slice(n.length));let i=tie(e,0);return!1!==i&&(e=e.slice(0,i)),Fie.test(e)}(r,n))return n.parser="babel-flow",Mie.parse(r,n);let i=t;"script"===(n.__babelSourceType??Sie(n))&&(i=i.map((e=>({...e,sourceType:"script"})))),/#[[{]/.test(r)&&(i=i.map((e=>kie([Cie],e))));let s=/%[A-Z]/.test(r);r.includes("|>")?i=(s?[...wie,Pie]:wie).flatMap((e=>i.map((t=>kie([e],t))))):s&&(i=i.map((e=>kie([Pie],e))));let a,o=e?Wne.parseExpression:Wne.parse;try{a=Jne(i.map((e=>()=>function(e,t,r){let n=e(t,r),i=n.errors.find((e=>!Iie.has(e.reasonCode)));if(i)throw i;return n}(o,r,e))))}catch({errors:[e]}){throw lie(e)}return e&&(a=Die(a,{text:r,rootMarker:n.rootMarker})),Eie(a,{parser:"babel",text:r})}}(e)),Aie={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},Cie=["recordAndTuple",{syntaxType:"hash"}],Pie="v8intrinsic",wie=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"minimal"}],["pipelineOperator",{proposal:"fsharp"}]],kie=(e,t=Aie)=>({...t,plugins:[...t.plugins,...e]}),Fie=/@(?:no)?flow\b/;var Iie=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"]),_ie=[kie(["jsx"])],Nie=Tie({optionsCombinations:_ie}),Oie=Tie({optionsCombinations:[kie(["jsx","typescript"]),kie(["typescript"])]}),Bie=Tie({isExpression:!0,optionsCombinations:[kie(["jsx"])]}),Lie=Tie({isExpression:!0,optionsCombinations:[kie(["typescript"])]}),Mie=Tie({optionsCombinations:[kie(["jsx",["flow",{all:!0,enums:!0}],"flowComments"])]}),jie=Tie({optionsCombinations:_ie.map((e=>kie(["estree"],e)))}),Rie={babel:Nie,"babel-flow":Mie,"babel-ts":Oie,__js_expression:Bie,__ts_expression:Lie,__vue_expression:Bie,__vue_ts_expression:Lie,__vue_event_binding:Nie,__vue_ts_event_binding:Oie,__babel_estree:jie},$ie=Vne(zne(),1);function Uie(e={}){let{allowComments:t=!0}=e;return function(e){let r;try{r=(0,$ie.parseExpression)(e,{tokens:!0,ranges:!0})}catch(e){throw"MissingPlugin"===(null==e?void 0:e.reasonCode)||"MissingOneOfPlugins"===(null==e?void 0:e.reasonCode)?lie({message:"Unexpected token",loc:e.loc}):lie(e)}if(!t&&iie(r.comments))throw Vie(r.comments[0],"Comment");return zie(r),Die(r,{type:"JsonRoot",text:e})}}function Vie(e,t){let[r,n]=[e.loc.start,e.loc.end].map((({line:e,column:t})=>({line:e,column:t+1})));return uie(`${t} is not allowed in JSON.`,{loc:{start:r,end:n}})}function zie(e){switch(e.type){case"ArrayExpression":for(let t of e.elements)null!==t&&zie(t);return;case"ObjectExpression":for(let t of e.properties)zie(t);return;case"ObjectProperty":if(e.computed)throw Vie(e.key,"Computed key");if(e.shorthand)throw Vie(e.key,"Shorthand property");return"Identifier"!==e.key.type&&zie(e.key),void zie(e.value);case"UnaryExpression":{let{operator:t,argument:r}=e;if("+"!==t&&"-"!==t)throw Vie(e,`Operator '${e.operator}'`);if("NumericLiteral"===r.type||"Identifier"===r.type&&("Infinity"===r.name||"NaN"===r.name))return;throw Vie(r,`Operator '${t}' before '${r.type}'`)}case"Identifier":if("Infinity"!==e.name&&"NaN"!==e.name&&"undefined"!==e.name)throw Vie(e,`Identifier '${e.name}'`);return;case"TemplateLiteral":if(iie(e.expressions))throw Vie(e.expressions[0],"'TemplateLiteral' with expression");for(let t of e.quasis)zie(t);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Vie(e,`'${e.type}'`)}}var Kie=Uie(),qie={...Rie,...{json:oie({parse:Kie,hasPragma:()=>!0}),json5:oie(Kie),"json-stringify":oie({parse:Uie({allowComments:!1}),astFormat:"estree-json"})}},Wie=qne,Jie=Object.freeze({__proto__:null,default:Wie,parsers:qie}),Hie=Object.create,Xie=Object.defineProperty,Gie=Object.getOwnPropertyDescriptor,Yie=Object.getOwnPropertyNames,Qie=Object.getPrototypeOf,Zie=Object.prototype.hasOwnProperty,ese=(e,t)=>{for(var r in t)Xie(e,r,{get:t[r],enumerable:!0})},tse=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},rse=(e,t,r)=>(tse(e,t,"read from private field"),r?r.call(e):t.get(e)),nse=((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()))}})),ise={};ese(ise,{languages:()=>Qde,options:()=>Gde,printers:()=>Yde});var sse={};ese(sse,{canAttachComment:()=>ule,embed:()=>wde,experimentalFeatures:()=>Lde,getCommentChildNodes:()=>lle,getVisitorKeys:()=>_ae,handleComments:()=>due,insertPragma:()=>Bde,isBlockComment:()=>Oae,isGap:()=>ple,massageAstNode:()=>_de,print:()=>pde,printComment:()=>ale,willPrintOwnComments:()=>cle});var ase=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)},ose="string",use="array",lse="cursor",cse="indent",pse="align",dse="trim",hse="group",fse="fill",mse="if-break",yse="indent-if-break",gse="line-suffix",bse="line-suffix-boundary",vse="line",xse="label",Ese="break-parent",Sse=new Set([lse,cse,pse,dse,hse,fse,mse,yse,gse,bse,vse,xse,Ese]);var Dse=function(e){if("string"==typeof e)return ose;if(Array.isArray(e))return use;if(!e)return;let{type:t}=e;return Sse.has(t)?t:void 0};function Tse(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(Dse(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))([...Sse].map((e=>`'${e}'`)));return`Unexpected doc.type '${e.type}'.\nExpected it to be ${n}.`}var Ase=class extends Error{name="InvalidDocError";constructor(e){super(Tse(e)),this.doc=e}},Cse={};var Pse=function(e,t,r,n){let i=[e];for(;i.length>0;){let e=i.pop();if(e===Cse){r(i.pop());continue}r&&i.push(e,Cse);let s=Dse(e);if(!s)throw new Ase(e);if(!1!==(null==t?void 0:t(e)))switch(s){case use:case fse:{let t=s===use?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case mse:i.push(e.flatContents,e.breakContents);break;case hse: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 pse:case cse:case yse:case xse:case gse:i.push(e.contents);break;case ose:case lse:case dse:case bse:case vse:case Ese:break;default:throw new Ase(e)}}},wse=()=>{};function kse(e){return{type:cse,contents:e}}function Fse(e,t){return{type:pse,contents:t,n:e}}function Ise(e,t={}){return wse(t.expandedStates),{type:hse,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function _se(e){return Fse(Number.NEGATIVE_INFINITY,e)}function Nse(e,t){return Ise(e[0],{...t,expandedStates:e})}function Ose(e){return{type:fse,parts:e}}function Bse(e,t="",r={}){return{type:mse,breakContents:e,flatContents:t,groupId:r.groupId}}function Lse(e,t){return{type:yse,contents:e,groupId:t.groupId,negate:t.negate}}function Mse(e){return{type:gse,contents:e}}var jse={type:bse},Rse={type:Ese},$se={type:vse,hard:!0},Use={type:vse},Vse={type:vse,soft:!0},zse=[$se,Rse],Kse=[{type:vse,hard:!0,literal:!0},Rse],qse={type:lse};function Wse(e,t){let r=[];for(let n=0;n<t.length;n++)0!==n&&r.push(e),r.push(t[n]);return r}function Jse(e,t){return e?{type:xse,label:e,contents:t}:t}var Hse=(e,t,r)=>{if(!e||null!=t)return Array.isArray(t)||"string"==typeof t?t[r<0?t.length+r:r]:t.at(r)},Xse=e=>{if(Array.isArray(e))return e;if(e.type!==fse)throw new Error(`Expect doc to be 'array' or '${fse}'.`);return e.parts};function Gse(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(Dse(e)){case use:return t(e.map(n));case fse:return t({...e,parts:e.parts.map(n)});case mse:return t({...e,breakContents:n(e.breakContents),flatContents:n(e.flatContents)});case hse:{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 pse:case cse:case yse:case xse:case gse:return t({...e,contents:n(e.contents)});case ose:case lse:case dse:case bse:case vse:case Ese:return t(e);default:throw new Ase(e)}}(e);return r.set(e,i),i}}function Yse(e,t,r){let n=r,i=!1;return Pse(e,(function(e){if(i)return!1;let r=t(e);void 0!==r&&(i=!0,n=r)})),n}function Qse(e){if(e.type===hse&&e.break||e.type===vse&&e.hard||e.type===Ese)return!0}function Zse(e){return Yse(e,Qse,!1)}function eae(e){if(e.length>0){let t=Hse(!1,e,-1);!t.expandedStates&&!t.break&&(t.break="propagated")}return null}function tae(e){return e.type!==vse||e.hard?e.type===mse?e.flatContents:e:e.soft?"":" "}function rae(e){return Gse(e,tae)}function nae(e){return Gse(e,(e=>function(e){switch(Dse(e)){case fse:if(e.parts.every((e=>""===e)))return"";break;case hse:if(!(e.contents||e.id||e.break||e.expandedStates))return"";if(e.contents.type===hse&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case pse:case cse:case yse:case gse:if(!e.contents)return"";break;case mse:if(!e.flatContents&&!e.breakContents)return"";break;case use:{let t=[];for(let r of e){if(!r)continue;let[e,...n]=Array.isArray(r)?r:[r];"string"==typeof e&&"string"==typeof Hse(!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 ose:case lse:case dse:case bse:case vse:case xse:case Ese:break;default:throw new Ase(e)}return e}(e)))}function iae(e,t=Kse){return Gse(e,(e=>"string"==typeof e?Wse(t,e.split("\n")):e))}function sae(e){if(e.type===vse)return!0}function aae(e,t){return e.type===xse?{...e,contents:t(e.contents)}:t(e)}var oae=function(e){return Array.isArray(e)&&e.length>0},uae=/^[\$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]*$/,lae=e=>uae.test(e);var cae=function(e){return null!==e&&"object"==typeof e};function*pae(e,t){let{getVisitorKeys:r,filter:n=(()=>!0)}=t,i=e=>cae(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 dae(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 pae(n,t))yield e,r.push(e)}}(e,{getVisitorKeys:t}))if(r(n))return!0;return!1}function hae(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 fae=hae(" \t"),mae=hae(",; \t"),yae=hae(/[^\n\r]/);var gae=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 bae=function(e,t,r={}){let n=fae(e,r.backwards?t-1:t,r);return n!==gae(e,n,r)};var vae=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 xae=function(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?yae(e,t):t)};var Eae=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=mae(e,n),n=vae(e,n),n=fae(e,n);return n=xae(e,n),n=gae(e,n),!1!==n&&bae(e,n)},Sae={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"}},Dae=/[^\x20-\x7F]/;var Tae=function(e){if(!e)return 0;if(!Dae.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=Sae.eastAsianWidth(r);t+="F"===n||"W"===n?2:1}return t};function Aae(e){var t;let r=e.range?e.range[0]:e.start,n=(null==(t=e.declaration)?void 0:t.decorators)??e.decorators;return oae(n)?Math.min(Aae(n[0]),r):r}function Cae(e){return e.range?e.range[1]:e.end}function Pae(e,t){let r=Aae(e);return Number.isInteger(r)&&r===Aae(t)}function wae(e,t){return Pae(e,t)&&function(e,t){let r=Cae(e);return Number.isInteger(r)&&r===Cae(t)}(e,t)}var kae=null;function Fae(e){if(null!==kae&&(kae.property,1)){let e=kae;return kae=Fae.prototype=null,e}return kae=Fae.prototype=e??Object.create(null),new Fae}for(let e=0;e<=10;e++)Fae();var Iae=function(e,t="type"){return function(e){Fae(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}},_ae=Iae({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 Nae=function(e){return e=new Set(e),t=>e.has(null==t?void 0:t.type)},Oae=Nae(["Block","CommentBlock","MultiLine"]);var Bae=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)))},Lae=Nae(["AnyTypeAnnotation","ThisTypeAnnotation","NumberTypeAnnotation","VoidTypeAnnotation","BooleanTypeAnnotation","BigIntTypeAnnotation","SymbolTypeAnnotation","StringTypeAnnotation","NeverTypeAnnotation","UndefinedTypeAnnotation","UnknownTypeAnnotation","EmptyTypeAnnotation","MixedTypeAnnotation"]);var Mae=function({type:e}){return e.startsWith("TS")&&e.endsWith("Keyword")};function jae(e,t){return t(e)||dae(e,{getVisitorKeys:_ae,predicate:t})}function Rae(e){return"AssignmentExpression"===e.type||"BinaryExpression"===e.type||"LogicalExpression"===e.type||"NGPipeExpression"===e.type||"ConditionalExpression"===e.type||loe(e)||coe(e)||"SequenceExpression"===e.type||"TaggedTemplateExpression"===e.type||"BindExpression"===e.type||"UpdateExpression"===e.type&&!e.prefix||Joe(e)||"TSNonNullExpression"===e.type||"ChainExpression"===e.type}function $ae(e){return e.expressions?e.expressions[0]:e.left??e.test??e.callee??e.object??e.tag??e.argument??e.expression}function Uae(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 Vae=Nae(["Line","CommentLine","SingleLine","HashbangComment","HTMLOpen","HTMLClose","Hashbang","InterpreterDirective"]),zae=Nae(["ExportDefaultDeclaration","DeclareExportDeclaration","ExportNamedDeclaration","ExportAllDeclaration","DeclareExportAllDeclaration"]),Kae=Nae(["ArrayExpression","TupleExpression"]),qae=Nae(["ObjectExpression","RecordExpression"]);function Wae(e){return"NumericLiteral"===e.type||"Literal"===e.type&&"number"==typeof e.value}function Jae(e){return"UnaryExpression"===e.type&&("+"===e.operator||"-"===e.operator)&&Wae(e.argument)}function Hae(e){return"StringLiteral"===e.type||"Literal"===e.type&&"string"==typeof e.value}function Xae(e){return"RegExpLiteral"===e.type||"Literal"===e.type&&!!e.regex}var Gae=Nae(["ObjectTypeAnnotation","TSTypeLiteral","TSMappedType"]),Yae=Nae(["FunctionExpression","ArrowFunctionExpression"]);function Qae(e){return loe(e)&&"Identifier"===e.callee.type&&["async","inject","fakeAsync","waitForAsync"].includes(e.callee.name)}var Zae=Nae(["JSXElement","JSXFragment"]);function eoe(e){return"get"===e.kind||"set"===e.kind}function toe(e){return eoe(e)||Pae(e,e.value)}function roe(e){return!("ObjectTypeProperty"!==e.type&&"ObjectTypeInternalSlot"!==e.type||"FunctionTypeAnnotation"!==e.value.type||e.static||toe(e))}var noe=Nae(["BinaryExpression","LogicalExpression","NGPipeExpression"]);function ioe(e){return coe(e)||"BindExpression"===e.type&&!!e.object}var soe=Nae(["TSThisType","NullLiteralTypeAnnotation","BooleanLiteralTypeAnnotation","StringLiteralTypeAnnotation","BigIntLiteralTypeAnnotation","NumberLiteralTypeAnnotation","TSLiteralType","TSTemplateLiteralType"]);function aoe(e){return Mae(e)||Lae(e)||soe(e)||("GenericTypeAnnotation"===e.type||"TSTypeReference"===e.type)&&!e.typeParameters}var ooe=["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 uoe(e,t){if("CallExpression"!==e.type)return!1;if(1===e.arguments.length){if(Qae(e)&&t&&uoe(t))return Yae(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 Qae(e.arguments[0])}else if((2===e.arguments.length||3===e.arguments.length)&&("TemplateLiteral"===e.arguments[0].type||Hae(e.arguments[0]))&&function(e){return Bae(e,ooe)}(e.callee))return!(e.arguments[2]&&!Wae(e.arguments[2]))&&((2===e.arguments.length?Yae(e.arguments[1]):function(e){return"FunctionExpression"===e.type||"ArrowFunctionExpression"===e.type&&"BlockStatement"===e.body.type}(e.arguments[1])&&_oe(e.arguments[1]).length<=1)||Qae(e.arguments[1]));return!1}var loe=Nae(["CallExpression","OptionalCallExpression"]),coe=Nae(["MemberExpression","OptionalMemberExpression"]);function poe(e,t){return Zae(t)?joe(t):Uoe(t,Roe.Leading,(t=>bae(e,Cae(t))))}function doe(e,t){return"json"!==t.parser&&Hae(e.key)&&xoe(e.key).slice(1,-1)===e.key.value&&(lae(e.key.value)&&!("babel-ts"===t.parser&&"ClassProperty"===e.type||"typescript"===t.parser&&"PropertyDefinition"===e.type)||hoe(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 hoe(e){return/^(?:\d+|\d+\.\d+)$/.test(e)}function foe(e){return e.quasis.some((e=>e.value.raw.includes("\n")))}function moe(e,t){return("TemplateLiteral"===e.type&&foe(e)||"TaggedTemplateExpression"===e.type&&foe(e.quasi))&&!bae(t,Aae(e),{backwards:!0})}function yoe(e){if(!Uoe(e))return!1;let t=Hse(!1,Voe(e,Roe.Dangling),-1);return t&&!Oae(t)}function goe(e){let{node:t,parent:r,key:n}=e;return"callee"===n&&loe(t)&&loe(r)&&r.arguments.length>0&&t.arguments.length>r.arguments.length}var boe=new Set(["!","-","+","~"]);function voe(e,t=2){if(t<=0)return!1;let r=e=>voe(e,t-1);if(Xae(e))return Tae(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(qae(e))return e.properties.every((e=>!e.computed&&(e.shorthand||e.value&&r(e.value))));if(Kae(e))return e.elements.every((e=>null===e||r(e)));if(Koe(e)){if("ImportExpression"===e.type||voe(e.callee,t)){let n=Ooe(e);return n.length<=t&&n.every(r)}return!1}return coe(e)?voe(e.object,t)&&voe(e.property,t):"UnaryExpression"===e.type&&boe.has(e.operator)||"UpdateExpression"===e.type?voe(e.argument,t):"TSNonNullExpression"===e.type&&voe(e.expression,t)}function xoe(e){var t;return(null==(t=e.extra)?void 0:t.raw)??e.raw}function Eoe(e){return e}function Soe(e,t="es5"){return"es5"===e.trailingComma&&"es5"===t||"all"===e.trailingComma&&("all"===t||"es5"===t)}function Doe(e,t){switch(e.type){case"BinaryExpression":case"LogicalExpression":case"AssignmentExpression":case"NGPipeExpression":return Doe(e.left,t);case"MemberExpression":case"OptionalMemberExpression":return Doe(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&Doe(e.tag,t);case"CallExpression":case"OptionalCallExpression":return"FunctionExpression"!==e.callee.type&&Doe(e.callee,t);case"ConditionalExpression":return Doe(e.test,t);case"UpdateExpression":return!e.prefix&&Doe(e.argument,t);case"BindExpression":return e.object&&Doe(e.object,t);case"SequenceExpression":return Doe(e.expressions[0],t);case"ChainExpression":case"TSSatisfiesExpression":case"TSAsExpression":case"TSNonNullExpression":return Doe(e.expression,t);default:return t(e)}}var Toe={"==":!0,"!=":!0,"===":!0,"!==":!0},Aoe={"*":!0,"/":!0,"%":!0},Coe={">>":!0,">>>":!0,"<<":!0};function Poe(e,t){return!(koe(t)!==koe(e)||"**"===e||Toe[e]&&Toe[t]||"%"===t&&Aoe[e]||"%"===e&&Aoe[t]||t!==e&&Aoe[t]&&Aoe[e]||Coe[e]&&Coe[t])}var woe=new Map([["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].flatMap(((e,t)=>e.map((e=>[e,t])))));function koe(e){return woe.get(e)}function Foe(e){var t;if(e.rest)return!0;let r=_oe(e);return"RestElement"===(null==(t=Hse(!1,r,-1))?void 0:t.type)}var Ioe=new WeakMap;function _oe(e){if(Ioe.has(e))return Ioe.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),Ioe.set(e,t),t}var Noe=new WeakMap;function Ooe(e){if(Noe.has(e))return Noe.get(e);let t=e.arguments;return"ImportExpression"===e.type&&(t=[e.source],e.attributes&&t.push(e.attributes)),Noe.set(e,t),t}function Boe(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 Loe(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 Moe(e){return"prettier-ignore"===e.value.trim()&&!e.unignore}function joe(e){return(null==e?void 0:e.prettierIgnore)||Uoe(e,Roe.PrettierIgnore)}var Roe={Leading:2,Trailing:4,Dangling:8,Block:16,Line:32,PrettierIgnore:64,First:128,Last:256},$oe=(e,t)=>{if("function"==typeof e&&(t=e,e=0),e||t)return(r,n,i)=>!(e&Roe.Leading&&!r.leading||e&Roe.Trailing&&!r.trailing||e&Roe.Dangling&&(r.leading||r.trailing)||e&Roe.Block&&!Oae(r)||e&Roe.Line&&!Vae(r)||e&Roe.First&&0!==n||e&Roe.Last&&n!==i.length-1||e&Roe.PrettierIgnore&&!Moe(r)||t&&!t(r))};function Uoe(e,t,r){if(!oae(null==e?void 0:e.comments))return!1;let n=$oe(t,r);return!n||e.comments.some(n)}function Voe(e,t,r){if(!Array.isArray(null==e?void 0:e.comments))return[];let n=$oe(t,r);return n?e.comments.filter(n):e.comments}var zoe=(e,{originalText:t})=>Eae(t,Cae(e));function Koe(e){return loe(e)||"NewExpression"===e.type||"ImportExpression"===e.type}function qoe(e){return e&&("ObjectProperty"===e.type||"Property"===e.type&&!e.method&&"init"===e.kind)}var Woe=Symbol("ifWithoutBlockAndSameLineComment"),Joe=Nae(["TSAsExpression","TSSatisfiesExpression"]);function Hoe(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 qae(e)}(l)&&Goe(e))return!0;if(Xoe(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&&Doe(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&&Doe(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&&Doe(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&&Doe(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&&oae(l.decorators)))return!0;break;case"ExportDefaultDeclaration":return Yoe(e,t)||"SequenceExpression"===l.type;case"Decorator":if("expression"===c){if(coe(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 jae(e,(e=>"ObjectTypeAnnotation"===e.type&&jae(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!Joe(l);case"ConditionalExpression":return Joe(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||Joe(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=koe(e),n=p.operator,i=koe(n);return i>r||"right"===c&&i===r||i===r&&!Poe(n,e)||(i<r&&"%"===e?"+"===n||"-"===n:!!function(e){return!!Coe[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&&_oe(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&&coe(p);case"NGPipeExpression":return!("NGRoot"===p.type||"NGMicrosyntaxExpression"===p.type||"ObjectProperty"===p.type&&(null==(u=l.extra)||!u.parenthesized)||Kae(p)||"arguments"===c&&loe(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||!Kae(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&&!loe(p)&&!qoe(p)&&"ReturnStatement"!==p.type&&"ThrowStatement"!==p.type&&"TypeCastExpression"!==p.type&&"VariableDeclarator"!==p.type&&"YieldExpression"!==p.type;case"TSInstantiationExpression":return"object"===c&&coe(p)}return!1}var Xoe=Nae(["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 Goe(e){let{parent:t,key:r}=e;switch(t.type){case"NGPipeExpression":if("arguments"===r&&e.isLast)return e.callParent(Goe);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(Goe);break;case"ConditionalExpression":if("alternate"===r)return e.callParent(Goe);break;case"UnaryExpression":if(t.prefix)return e.callParent(Goe)}return!1}function Yoe(e,t){let{node:r,parent:n}=e;return"FunctionExpression"===r.type||"ClassExpression"===r.type?"ExportDefaultDeclaration"===n.type||!Hoe(e,t):!(!Rae(r)||"ExportDefaultDeclaration"!==n.type&&Hoe(e,t))&&e.call((()=>Yoe(e,t)),...Uae(r))}var Qoe=Hoe,Zoe=(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 eue=function(e,t){let r=t-1;return r=fae(e,r,{backwards:!0}),r=gae(e,r,{backwards:!0}),r=fae(e,r,{backwards:!0}),r!==gae(e,r,{backwards:!0})},tue=()=>!0;function rue(e,t){return e.node.printed=!0,t.printer.printComment(e,t)}function nue(e,t,r={}){let{node:n}=e;if(!oae(null==n?void 0:n.comments))return"";let{indent:i=!1,marker:s,filter:a=tue}=r,o=[];if(e.each((({node:r})=>{r.leading||r.trailing||r.marker!==s||!a(r)||o.push(rue(e,t))}),"comments"),0===o.length)return"";let u=Wse(zse,o);return i?kse([zse,u]):u}function iue(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=[rue(e,t)],{printer:s,originalText:a,locStart:o,locEnd:u}=t;if(null==(r=s.isBlockComment)?void 0:r.call(s,n)){let e=bae(a,u(n))?bae(a,o(n),{backwards:!0})?zse:Use:" ";i.push(e)}else i.push(zse);let l=gae(a,fae(a,u(n)));return!1!==l&&bae(a,l)&&i.push(zse),i}(e,t)):u&&(i=function(e,t,r){var n;let i=e.node,s=rue(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)||bae(o,u(i),{backwards:!0})){let e=eue(o,u(i));return{doc:Mse([zse,e?zse:"",s]),isBlock:l,hasLineSuffix:!0}}return!l||null!=r&&r.hasLineSuffix?{doc:[Mse([" ",s]),Rse],isBlock:l,hasLineSuffix:!0}:{doc:[" ",s],isBlock:l,hasLineSuffix:!1}}(e,t,i),a.push(i.doc))}),"comments"),{leading:s,trailing:a}}function sue(e,t,r){let{leading:n,trailing:i}=iue(e,r);return n||i?aae(t,(e=>[n,e,i])):t}var aue=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},oue=aue,uue="'";var lue=function(e,t){let r=!0===t||t===uue?uue:'"',n=r===uue?'"':uue,i=0,s=0;for(let t of e)t===r?i++:t===n&&s++;return i>s?n:r};var cue;cue=new WeakMap;var pue=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,cue,void 0),((e,t,r,n)=>{tse(e,t,"write to private field"),n?n.call(e,r):t.set(e,r)})(this,cue,new Set(e))}getLeadingWhitespaceCount(e){let t=rse(this,cue),r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=rse(this,cue),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 rse(this,cue).has(e.charAt(0))}hasTrailingWhitespace(e){return rse(this,cue).has(Hse(!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")}([...rse(this,cue)].join(""))}]+`,n=new RegExp(t?`(${r})`:r);return e.split(n)}hasWhitespaceCharacter(e){let t=rse(this,cue);return Array.prototype.some.call(e,(e=>t.has(e)))}hasNonWhitespaceCharacter(e){let t=rse(this,cue);return Array.prototype.some.call(e,(e=>!t.has(e)))}isWhitespaceOnly(e){let t=rse(this,cue);return Array.prototype.every.call(e,(e=>t.has(e)))}},due={};ese(due,{endOfLine:()=>Sue,ownLine:()=>Eue,remaining:()=>Due});var hue=function(e,t){let r=null,n=t;for(;n!==r;)r=n,n=fae(e,n),n=vae(e,n),n=xae(e,n),n=gae(e,n);return n};var fue=function(e,t){let r=hue(e,t);return!1===r?"":e.charAt(r)};var mue=function(e,t,r){for(let n=t;n<r;++n)if("\n"===e.charAt(n))return!0;return!1};function yue(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 gue(e,t){t.leading=!0,t.trailing=!1,yue(e,t)}function bue(e,t,r){t.leading=!1,t.trailing=!1,r&&(t.marker=r),yue(e,t)}function vue(e,t){t.leading=!1,t.trailing=!0,yue(e,t)}var xue=function(e){return Oae(e)&&"*"===e.value[0]&&/@(?:type|satisfies)\b/.test(e.value)};function Eue(e){return[tle,Uue,Fue,Pue,wue,kue,Oue,Hue,que,Jue,Xue,Gue,Lue,Vue,zue].some((t=>t(e)))}function Sue(e){return[Cue,Uue,Iue,Xue,Pue,wue,kue,Oue,Vue,Kue,Wue,Jue,Zue,zue,nle].some((t=>t(e)))}function Due(e){return[tle,Pue,wue,_ue,$ue,Lue,Jue,Rue,jue,rle,zue,ele].some((t=>t(e)))}function Tue(e,t){let r=(e.body||e.properties).find((({type:e})=>"EmptyStatement"!==e));r?gue(r,t):bue(e,t)}function Aue(e,t){"BlockStatement"===e.type?Tue(e,t):gue(e,t)}function Cue({comment:e,followingNode:t}){return!(!t||!xue(e))&&(gue(t,e),!0)}function Pue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){if("IfStatement"!==(null==r?void 0:r.type)||!n)return!1;if(")"===fue(i,Cae(e)))return vue(t,e),!0;if(t===r.consequent&&n===r.alternate){if("BlockStatement"===t.type)vue(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?bue(t,e,Woe):bue(r,e)}return!0}return"BlockStatement"===n.type?(Tue(n,e),!0):"IfStatement"===n.type?(Aue(n.consequent,e),!0):r.consequent===n&&(gue(n,e),!0)}function wue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){return!("WhileStatement"!==(null==r?void 0:r.type)||!n)&&(")"===fue(i,Cae(e))?(vue(t,e),!0):"BlockStatement"===n.type?(Tue(n,e),!0):r.body===n&&(gue(n,e),!0))}function kue({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?(vue(t,e),!0):"BlockStatement"===n.type?(Tue(n,e),!0):"TryStatement"===n.type?(Aue(n.finalizer,e),!0):"CatchClause"===n.type&&(Aue(n.body,e),!0))}function Fue({comment:e,enclosingNode:t,followingNode:r}){return!(!coe(t)||"Identifier"!==(null==r?void 0:r.type))&&(gue(t,e),!0)}function Iue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n,text:i}){let s=t&&!mue(i,Cae(t),Aae(e));return!(t&&s||"ConditionalExpression"!==(null==r?void 0:r.type)&&"TSConditionalType"!==(null==r?void 0:r.type)||!n)&&(gue(n,e),!0)}function _ue({comment:e,precedingNode:t,enclosingNode:r}){return!(!qoe(r)||!r.shorthand||r.key!==t||"AssignmentPattern"!==r.value.type)&&(vue(r.value.left,e),!0)}var Nue=new Set(["ClassDeclaration","ClassExpression","DeclareClass","DeclareInterface","InterfaceDeclaration","TSInterfaceDeclaration"]);function Oue({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){if(Nue.has(null==r?void 0:r.type)){if(oae(r.decorators)&&"Decorator"!==(null==n?void 0:n.type))return vue(Hse(!1,r.decorators,-1),e),!0;if(r.body&&n===r.body)return Tue(r.body,e),!0;if(n){if(r.superClass&&n===r.superClass&&t&&(t===r.id||t===r.typeParameters))return vue(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?bue(r,e,i):vue(t,e),!0}}return!1}var Bue=new Set(["ClassMethod","ClassProperty","PropertyDefinition","TSAbstractPropertyDefinition","TSAbstractMethodDefinition","TSDeclareMethod","MethodDefinition","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty"]);function Lue({comment:e,precedingNode:t,enclosingNode:r,text:n}){return(r&&t&&"("===fue(n,Cae(e))&&("Property"===r.type||"TSDeclareMethod"===r.type||"TSAbstractMethodDefinition"===r.type)&&"Identifier"===t.type&&r.key===t&&":"!==fue(n,Cae(t))||!("Decorator"!==(null==t?void 0:t.type)||!Bue.has(null==r?void 0:r.type)))&&(vue(t,e),!0)}var Mue=new Set(["FunctionDeclaration","FunctionExpression","ClassMethod","MethodDefinition","ObjectMethod"]);function jue({comment:e,precedingNode:t,enclosingNode:r,text:n}){return"("===fue(n,Cae(e))&&(!(!t||!Mue.has(null==r?void 0:r.type))&&(vue(t,e),!0))}function Rue({comment:e,enclosingNode:t,text:r}){if("ArrowFunctionExpression"!==(null==t?void 0:t.type))return!1;let n=hue(r,Cae(e));return!1!==n&&"=>"===r.slice(n,n+2)&&(bue(t,e),!0)}function $ue({comment:e,enclosingNode:t,text:r}){return")"===fue(r,Cae(e))&&(t&&(ile(t)&&0===_oe(t).length||Koe(t)&&0===Ooe(t).length)?(bue(t,e),!0):("MethodDefinition"===(null==t?void 0:t.type)||"TSAbstractMethodDefinition"===(null==t?void 0:t.type))&&0===_oe(t.value).length&&(bue(t.value,e),!0))}function Uue({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 vue(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&&ile(r)&&")"===fue(i,Cae(e)))return vue(t,e),!0;if("FunctionDeclaration"===(null==r?void 0:r.type)&&"BlockStatement"===(null==n?void 0:n.type)){let t=(()=>{let e=_oe(r);if(e.length>0)return hue(i,Cae(Hse(!1,e,-1)));let t=hue(i,Cae(r.id));return!1!==t&&hue(i,t+1)})();if(Aae(e)>t)return Tue(n,e),!0}return!1}function Vue({comment:e,enclosingNode:t}){return"LabeledStatement"===(null==t?void 0:t.type)&&(gue(t,e),!0)}function zue({comment:e,enclosingNode:t}){return!("ContinueStatement"!==(null==t?void 0:t.type)&&"BreakStatement"!==(null==t?void 0:t.type)||t.label)&&(vue(t,e),!0)}function Kue({comment:e,precedingNode:t,enclosingNode:r}){return!!(loe(r)&&t&&r.callee===t&&r.arguments.length>0)&&(gue(r.arguments[0],e),!0)}function que({comment:e,precedingNode:t,enclosingNode:r,followingNode:n}){return"UnionTypeAnnotation"===(null==r?void 0:r.type)||"TSUnionType"===(null==r?void 0:r.type)?(Moe(e)&&(n.prettierIgnore=!0,e.unignore=!0),!!t&&(vue(t,e),!0)):(("UnionTypeAnnotation"===(null==n?void 0:n.type)||"TSUnionType"===(null==n?void 0:n.type))&&Moe(e)&&(n.types[0].prettierIgnore=!0,e.unignore=!0),!1)}function Wue({comment:e,enclosingNode:t}){return!!qoe(t)&&(gue(t,e),!0)}function Jue({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?bue(n,e):gue(n,e),!0):"Program"!==(null==t?void 0:t.type)||0!==t.body.length||oae(t.directives)?"Program"===(null==r?void 0:r.type)&&0===r.body.length&&"ModuleExpression"===(null==t?void 0:t.type)&&(bue(r,e),!0):(i?bue(t,e):gue(t,e),!0)}function Hue({comment:e,enclosingNode:t}){return("ForInStatement"===(null==t?void 0:t.type)||"ForOfStatement"===(null==t?void 0:t.type))&&(gue(t,e),!0)}function Xue({comment:e,precedingNode:t,enclosingNode:r,text:n}){if("ImportSpecifier"===(null==r?void 0:r.type)||"ExportSpecifier"===(null==r?void 0:r.type))return gue(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||!bae(n,Cae(e)))&&(vue(t,e),!0)}function Gue({comment:e,enclosingNode:t}){return"AssignmentPattern"===(null==t?void 0:t.type)&&(gue(t,e),!0)}var Yue=new Set(["VariableDeclarator","AssignmentExpression","TypeAlias","TSTypeAliasDeclaration"]),Que=new Set(["ObjectExpression","RecordExpression","ArrayExpression","TupleExpression","TemplateLiteral","TaggedTemplateExpression","ObjectTypeAnnotation","TSTypeLiteral"]);function Zue({comment:e,enclosingNode:t,followingNode:r}){return!(!Yue.has(null==t?void 0:t.type)||!r||!Que.has(r.type)&&!Oae(e))&&(gue(r,e),!0)}function ele({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)||";"!==fue(n,Cae(e)))&&(vue(t,e),!0)}function tle({comment:e,enclosingNode:t,followingNode:r}){if(Moe(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 rle({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?(gue(n.name,e),!0):!("TSTypeParameter"!==(null==t?void 0:t.type)||!t.constraint)&&(vue(t.constraint,e),!0))}function nle({comment:e,enclosingNode:t,followingNode:r}){return!(!t||"SwitchCase"!==t.type||t.test||!r||r!==t.consequent[0])&&("BlockStatement"===r.type&&Vae(e)?Tue(r,e):bue(t,e),!0)}var ile=Nae(["ArrowFunctionExpression","FunctionExpression","FunctionDeclaration","ObjectMethod","ClassMethod","TSDeclareFunction","TSCallSignatureDeclaration","TSConstructSignatureDeclaration","TSMethodSignature","TSConstructorType","TSFunctionType","TSDeclareMethod"]);var sle=function(e){let t=`*${e.value}*`.split("\n");return t.length>1&&t.every((e=>"*"===e.trimStart()[0]))};function ale(e,t){let r=e.node;if(Vae(r))return t.originalText.slice(Aae(r),Cae(r)).trimEnd();if(Oae(r))return sle(r)?function(e){let t=e.value.split("\n");return["/*",Wse(zse,t.map(((e,r)=>0===r?e.trimEnd():" "+(r<t.length-1?e.trim():e.trimStart())))),"*/"]}(r):["/*",iae(r.value),"*/"];throw new Error("Not a comment: "+JSON.stringify(r))}var ole=new Set(["EmptyStatement","TemplateElement","Import","TSEmptyBodyFunctionExpression","ChainExpression"]);function ule(e){return!ole.has(e.type)}function lle(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===_oe(e.value).length&&!e.value.returnType&&!oae(e.value.typeParameters)&&e.value.body)return[...e.decorators||[],e.key,e.value.body]}function cle(e){let{node:t,parent:r}=e;return(Zae(t)||r&&("JSXSpreadAttribute"===r.type||"JSXSpreadChild"===r.type||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type||("ClassDeclaration"===r.type||"ClassExpression"===r.type)&&r.superClass===t))&&(!joe(t)||"UnionTypeAnnotation"===r.type||"TSUnionType"===r.type)}function ple(e,{parser:t}){if("flow"===t||"babel-flow"===t)return""===(e=Zoe(!1,e,/[\s(]/g,""))||"/*"===e||"/*::"===e}var dle=new pue(" \n\r\t"),hle=e=>""===e||e===Use||e===zse||e===Vse;function fle(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&&!Ele(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&&Hae(e.expression)&&" "===e.expression.value&&!Uoe(e.expression)}(e)?{type:"JSXText",value:" ",raw:" "}:e));let l=a.children.some(Zae),c=a.children.filter((e=>"JSXExpressionContainer"===e.type)).length>1,p="JSXElement"===a.type&&a.openingElement.attributes.length>1,d=Zse(o)||l||p||c,h="mdx"===e.parent.rootMarker,f=t.singleQuote?"{' '}":'{" "}',m=h?" ":Bse([f,Vse]," "),y=function(e,t,r,n,i){let s=[];return e.each((({node:e,next:t})=>{if("JSXText"===e.type){let r=xoe(e);if(Ele(e)){let a,o=dle.split(r,!0);if(""===o[0]&&(s.push(""),o.shift(),/\n/.test(o[0])?s.push(yle(i,o[1],e,t)):s.push(n),o.shift()),""===Hse(!1,o,-1)&&(o.pop(),a=o.pop()),0===o.length)return;for(let[e,t]of o.entries())e%2==1?s.push(Use):s.push(t);void 0!==a?/\n/.test(a)?s.push(yle(i,Hse(!1,s,-1),e,t)):s.push(n):s.push(mle(i,Hse(!1,s,-1),e,t))}else/\n/.test(r)?r.match(/\n/g).length>1&&s.push("",zse):s.push("",n)}else{let n=r();if(s.push(n),t&&Ele(t)){let r=dle.trim(xoe(t)),[n]=dle.split(r);s.push(mle(i,n,e,t))}else s.push(zse)}}),"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=>Ele(e)));for(let e=y.length-2;e>=0;e--){let t=""===y[e]&&""===y[e+1],r=y[e]===zse&&""===y[e+1]&&y[e+2]===zse,n=(y[e]===Vse||y[e]===zse)&&""===y[e+1]&&y[e+2]===m,i=y[e]===m&&""===y[e+1]&&(y[e+2]===Vse||y[e+2]===zse),s=y[e]===m&&""===y[e+1]&&y[e+2]===m,a=y[e]===Vse&&""===y[e+1]&&y[e+2]===zse||y[e]===zse&&""===y[e+1]&&y[e+2]===Vse;r&&g||t||n||s||a?y.splice(e,2):i&&y.splice(e+1,2)}for(;y.length>0&&hle(Hse(!1,y,-1));)y.pop();for(;y.length>1&&hle(y[0])&&hle(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,zse]);continue}if(e===y.length-1){b.push(f);continue}if(""===y[e-1]&&y[e-2]===zse){b.push(f);continue}}b.push(t),Zse(t)&&(d=!0)}let v=g?Ose(b):Ise(b,{shouldBreak:!0});if("JSXText"===(null==(s=t.cursorNode)?void 0:s.type)&&a.children.includes(t.cursorNode)&&(v=[qse,v,qse]),h)return v;let x=Ise([o,kse([zse,v]),zse,u]);return d?x:Nse([Ise([o,...y,u]),x])}function mle(e,t,r,n){return e?"":"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?1===t.length?Vse:zse:Vse}function yle(e,t,r,n){return e?zse:1===t.length?"JSXElement"===r.type&&!r.closingElement||"JSXElement"===(null==n?void 0:n.type)&&!n.closingElement?zse:Vse:zse}var gle=new Set(["ArrayExpression","TupleExpression","JSXAttribute","JSXElement","JSXExpressionContainer","JSXFragment","ExpressionStatement","CallExpression","OptionalCallExpression","ConditionalExpression","JsExpressionRoot"]);function ble(e,t,r){return e.selfClosing?[Use,"/>"]:function(e,t,r){let n=e.attributes.length>0&&Uoe(Hse(!1,e.attributes,-1),Roe.Trailing);return 0===e.attributes.length&&!r||(t.bracketSameLine||t.jsxBracketSameLine)&&(!r||e.attributes.length>0)&&!n}(e,t,r)?[">"]:[Vse,">"]}function vle(e,t,r){return function(e,t,r){let{parent:n}=e;if(gle.has(n.type))return t;let i=e.match(void 0,(e=>"ArrowFunctionExpression"===e.type),loe,(e=>"JSXExpressionContainer"===e.type)),s=Qoe(e,r);return Ise([s?"":Bse("("),kse([Vse,t]),Vse,s?"":Bse(")")],{shouldBreak:i})}(e,sue(e,fle(e,t,r),t),t)}function xle(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(Hae(n.value)){let r=xoe(n.value),i=Zoe(!1,Zoe(!1,r.slice(1,-1),"'","'"),""",'"'),a=lue(i,t.jsxSingleQuote);i='"'===a?Zoe(!1,i,'"',"""):Zoe(!1,i,"'","'"),s=e.call((()=>sue(e,iae(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 Wse(":",[r("namespace"),r("name")]);case"JSXMemberExpression":return Wse(".",[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 Uoe(n)&&cle(e)?[kse([Vse,sue(e,i,t)]),Vse]: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||!Uoe(e)&&(Kae(e)||qae(e)||"ArrowFunctionExpression"===e.type||"AwaitExpression"===e.type&&(i(e.argument,e)||"JSXElement"===e.argument.type)||loe(e)||"ChainExpression"===e.type&&loe(e.expression)||"FunctionExpression"===e.type||"TemplateLiteral"===e.type||"TaggedTemplateExpression"===e.type||"DoExpression"===e.type||Zae(t)&&("ConditionalExpression"===e.type||noe(e)));return i(n.expression,e.parent)?Ise(["{",r("expression"),jse,"}"]):Ise(["{",kse([Vse,r("expression")]),Vse,jse,"}"])}(e,0,r);case"JSXFragment":case"JSXElement":return vle(e,t,r);case"JSXOpeningElement":return function(e,t,r){var n,i;let{node:s}=e,a=Uoe(s.name)||Uoe(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&&Hae(s.attributes[0].value)&&!s.attributes[0].value.value.includes("\n")&&!a&&!Uoe(s.attributes[0]))return Ise(["<",r("name"),r("typeParameters")," ",...e.map(r,"attributes"),s.selfClosing?" />":">"]);let o=null==(i=s.attributes)?void 0:i.some((e=>e.value&&Hae(e.value)&&e.value.value.includes("\n"))),u=t.singleAttributePerLine&&s.attributes.length>1?zse:Use;return Ise(["<",r("name"),r("typeParameters"),kse(e.map((()=>[u,r()]),"attributes")),...ble(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 Uoe(n.name,Roe.Leading|Roe.Line)?i.push(kse([zse,s]),zse):Uoe(n.name,Roe.Leading|Roe.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=Uoe(r),i=Uoe(r,Roe.Line),s="JSXOpeningFragment"===r.type;return[s?"<":"</",kse([i?zse:n&&!s?" ":"",nue(e,t)]),i?zse:"",">"]}(e,t);case"JSXEmptyExpression":return function(e,t){let{node:r}=e,n=Uoe(r,Roe.Line);return[nue(e,t,{indent:n}),n?zse:""]}(e,t);case"JSXText":throw new Error("JSXText should be handled by JSXElement");default:throw new oue(n,"JSX")}}function Ele(e){return"JSXText"===e.type&&(dle.hasNonWhitespaceCharacter(xoe(e))||!/\n/.test(xoe(e)))}var Sle=function(e){return joe(e.node)||function(e){let{node:t,parent:r}=e;if(!Zae(t)||!Zae(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||Ele(t)){n=t;break}}return"JSXExpressionContainer"===(null==n?void 0:n.type)&&"JSXEmptyExpression"===n.expression.type&&joe(n.expression)}(e)},Dle=0;function Tle(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=Ale(e,r,t,!1,u);if(u)return c;if(l)return Ise(c);if(loe(s)&&s.callee===i||"UnaryExpression"===s.type||coe(s)&&!s.computed)return Ise([kse([Vse,...c]),Vse]);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&&!loe(a)||"TemplateLiteral"===s.type,d="AssignmentExpression"===s.type||"VariableDeclarator"===s.type||"ClassProperty"===s.type||"PropertyDefinition"===s.type||"TSAbstractPropertyDefinition"===s.type||"ClassPrivateProperty"===s.type||qoe(s),h=noe(i.left)&&Poe(i.operator,i.left.operator);if(p||Cle(i)&&!h||!Cle(i)&&d)return Ise(c);if(0===c.length)return"";let f=Zae(i.right),m=c.findIndex((e=>"string"!=typeof e&&!Array.isArray(e)&&e.type===hse)),y=c.slice(0,-1===m?1:m+1),g=c.slice(y.length,f?-1:void 0),b=Symbol("logicalChain-"+ ++Dle),v=Ise([...y,kse(g)],{id:b});return f?Ise([v,Lse(Hse(!1,c,-1),{groupId:b})]):v}function Ale(e,t,r,n,i){var s;let{node:a}=e;if(!noe(a))return[Ise(t())];let o=[];Poe(a.operator,a.left.operator)?o=e.call((e=>Ale(e,t,r,!0,i)),"left"):o.push(Ise(t("left")));let u,l=Cle(a),c=("|>"===a.operator||"NGPipeExpression"===a.type||function(e,t){return("__vue_expression"===t.parser||"__vue_ts_expression"===t.parser)&&Ple(e.node)&&!e.hasAncestor((e=>!Ple(e)&&"JsExpressionRoot"!==e.type))}(e,r))&&!poe(r.originalText,a.right),p="NGPipeExpression"===a.type?"|":a.operator,d="NGPipeExpression"===a.type&&a.arguments.length>0?Ise(kse([Vse,": ",Wse([Use,": "],e.map((()=>Fse(2,Ise(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=>Ale(e,t,r,!0,i)),"right"):t("right");u=[c?Use:"",p,c?" ":Use,n,d]}let{parent:h}=e,f=Uoe(a.left,Roe.Trailing|Roe.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?Ise(u,{shouldBreak:f}):u),n&&Uoe(a)){let t=nae(sue(e,o,r));return Array.isArray(t)||t.type===fse?Xse(t):[t]}return o}function Cle(e){return"LogicalExpression"===e.type&&!!(qae(e.right)&&e.right.properties.length>0||Kae(e.right)&&e.right.elements.length>0||Zae(e.right))}var Ple=e=>"BinaryExpression"===e.type&&"|"===e.operator;var wle=class extends Error{name="ArgExpansionBailout"};function kle(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 Uoe(i,Roe.Dangling)?Ise([r,nue(e,t,{indent:!0}),Vse,n]):[r,n]}(e,t,s,"]"));else{let u=Hse(!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(!Kae(e)&&!qae(e))return!1;let i=r[t+1];if(i&&n!==i.type)return!1;let s=Kae(e)?"elements":"properties";return e[s]&&e[s].length>1})),h=Fle(n,t),f=l?c?",":Soe(t)?h?Bse(",","",{groupId:p}):Bse(","):"":"";i.push(Ise([s,kse([Vse,h?Nle(e,t,r,f):[_le(e,t,a,r),f],nue(e,t)]),Vse,"]"],{shouldBreak:d,id:p}))}return i.push(Sce(e),yce(e,r)),i}function Fle(e,t){return Kae(e)&&e.elements.length>1&&e.elements.every((e=>e&&(Wae(e)||Jae(e)&&!Uoe(e.argument))&&!Uoe(e,Roe.Trailing|Roe.Line,(e=>!bae(t.originalText,Aae(e),{backwards:!0})))))}function Ile({node:e},{originalText:t}){let r=e=>","===t[e]?e:r((e=>vae(t,xae(t,e)))(e+1));return Eae(t,r(Cae(e)))}function _le(e,t,r,n){let i=[];return e.each((({node:r,isLast:s})=>{i.push(r?Ise(n()):""),s||i.push([",",Use,r&&Ile(e,t)?Vse:""])}),r),i}function Nle(e,t,r,n){let i=[];return e.each((({isLast:s,next:a})=>{i.push([r(),s?n:","]),s||i.push(Ile(e,t)?[zse,zse]:Uoe(a,Roe.Leading|Roe.Line)?zse:Use)}),"elements"),Ose(i)}function Ole(e,t=!1){return qae(e)&&(e.properties.length>0||Uoe(e))||Kae(e)&&(e.elements.length>0||Uoe(e))||"TSTypeAssertion"===e.type&&Ole(e.expression)||Joe(e)&&Ole(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))||Uoe(e,Roe.Dangling))}(e.body))&&("BlockStatement"===e.body.type||"ArrowFunctionExpression"===e.body.type&&Ole(e.body,!0)||qae(e.body)||Kae(e.body)||!t&&(loe(e.body)||"ConditionalExpression"===e.body.type)||Zae(e.body))||"DoExpression"===e.type||"ModuleExpression"===e.type}function Ble(e){var t;if("ParenthesizedExpression"===e.type)return Ble(e.expression);if(Joe(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]),aoe(r)&&voe(e.expression,1)}return!(Koe(e)&&Ooe(e).length>1)&&(noe(e)?voe(e.left,1)&&voe(e.right,1):Xae(e)||voe(e))}var Lle=function(e,t,r){let{node:n}=e,i=Ooe(n);if(0===i.length)return["(",nue(e,t),")"];if(function(e){return 2===e.length&&"ArrowFunctionExpression"===e[0].type&&0===_oe(e[0]).length&&"BlockStatement"===e[0].body.type&&"ArrayExpression"===e[1].type&&!e.some((e=>Uoe(e)))}(i))return["(",r(["arguments",0]),", ",r(["arguments",1]),")"];let s=!1,a=i.length-1,o=[];Boe(e,(({node:e},n)=>{let i=r();n===a||(zoe(e,t)?(s=!0,i=[i,",",zse,zse]):i=[i,",",Use]),o.push(i)}));let u="ImportExpression"!==n.type&&"Import"!==n.callee.type&&Soe(t,"all")?",":"";function l(){return Ise(["(",kse([Use,...o]),u,Use,")"],{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(Yae(r)){if(t+=1,t>1)return!0}else if(loe(r))for(let e of r.arguments)if(Yae(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&&qoe(e.properties[0])&&"Identifier"===e.properties[0].key.type&&"type"===e.properties[0].key.name&&Hae(e.properties[0].value)&&"module"===e.properties[0].value.value}(r))||!Uoe(t)&&("FunctionExpression"===t.type||"ArrowFunctionExpression"===t.type&&"BlockStatement"===t.body.type)&&"FunctionExpression"!==r.type&&"ArrowFunctionExpression"!==r.type&&"ConditionalExpression"!==r.type&&Ble(r)&&!Ole(r)}(i)){let e,t=o.slice(1);if(t.some(Zse))return l();try{e=r(Loe(n,0),{expandFirstArg:!0})}catch(e){if(e instanceof wle)return l();throw e}return Zse(e)?[Rse,Nse([["(",Ise(e,{shouldBreak:!0}),", ",...t,")"],l()])]:Nse([["(",e,", ",...t,")"],["(",Ise(e,{shouldBreak:!0}),", ",...t,")"],l()])}if(function(e,t,r){var n,i;let s=Hse(!1,e,-1);if(1===e.length){let e=Hse(!1,t,-1);if(null!=(n=e.label)&&n.embed&&!1!==(null==(i=e.label)?void 0:i.hug))return!0}let a=Hse(!1,e,-2);return!Uoe(s,Roe.Leading)&&!Uoe(s,Roe.Trailing)&&Ole(s)&&(!a||a.type!==s.type)&&(2!==e.length||"ArrowFunctionExpression"!==a.type||!Kae(s))&&!(e.length>1&&Fle(s,r))}(i,o,t)){let e,t=o.slice(0,-1);if(t.some(Zse))return l();try{e=r(Loe(n,-1),{expandLastArg:!0})}catch(e){if(e instanceof wle)return l();throw e}return Zse(e)?[Rse,Nse([["(",...t,Ise(e,{shouldBreak:!0}),")"],l()])]:Nse([["(",...t,e,")"],["(",...t,Ise(e,{shouldBreak:!0}),")"],l()])}let c=["(",kse([Vse,...o]),Bse(u),Vse,")"];return goe(e)?c:Ise(c,{shouldBreak:o.some(Zse)||s})};function Mle(e,t,r){let n=r("property"),{node:i}=e,s=Sce(e);return i.computed?!i.property||Wae(i.property)?[s,"[",n,"]"]:Ise([s,"[",kse([Vse,n]),Vse,"]"]):[s,".",n]}var jle=function(e,t,r){let{parent:n}=e,i=!n||"ExpressionStatement"===n.type,s=[];function a(e){let{originalText:r}=t,n=hue(r,Cae(e));return")"===r.charAt(n)?!1!==n&&Eae(r,n+1):zoe(e,t)}function o(e){let{node:n}=e;loe(n)&&(ioe(n.callee)||loe(n.callee))?(s.unshift({node:n,printed:[sue(e,[Sce(e),wce(e,t,r),Lle(e,t,r)],t),a(n)?zse:""]}),e.call((e=>o(e)),"callee")):ioe(n)?(s.unshift({node:n,needsParens:Qoe(e,t),printed:sue(e,coe(n)?Mle(e,0,r):kce(e,t,r),t)}),e.call((e=>o(e)),"object")):"TSNonNullExpression"===n.type?(s.unshift({node:n,printed:sue(e,"!",t)}),e.call((e=>o(e)),"expression")):s.unshift({node:n,printed:r()})}let{node:u}=e;s.unshift({node:u,printed:[Sce(e),wce(e,t,r),Lle(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||loe(s[p].node)||coe(s[p].node)&&s[p].node.computed&&Wae(s[p].node.property));++p)c.push(s[p]);if(!loe(s[0].node))for(;p+1<s.length&&ioe(s[p].node)&&ioe(s[p+1].node);++p)c.push(s[p]);l.push(c),c=[];let d=!1;for(;p<s.length;++p){if(d&&ioe(s[p].node)){if(s[p].node.computed&&Wae(s[p].node.property)){c.push(s[p]);continue}l.push(c),c=[],d=!1}(loe(s[p].node)||"ImportExpression"===s[p].node.type)&&(d=!0),c.push(s[p]),Uoe(s[p].node,Roe.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&&!Uoe(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=Hse(!1,e[0],-1).node;return coe(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&&Hse(!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=>Uoe(e.node,Roe.Leading)))||v.slice(0,-1).some((e=>Uoe(e.node,Roe.Trailing)))||l[b]&&Uoe(l[b][0].node,Roe.Leading);if(l.length<=b&&!x)return goe(e)?g:Ise(g);let E,S=Hse(!1,l[f?1:0],-1).node,D=!loe(S)&&a(S),T=[m(l[0]),f?l.slice(1,2).map(m):"",D?zse:"",function(e){return 0===e.length?"":kse(Ise([zse,Wse(zse,e.map(m))]))}(l.slice(f?2:1))],A=s.map((({node:e})=>e)).filter(loe);return E=x||A.length>2&&A.some((e=>!e.arguments.every((e=>voe(e)))))||y.slice(0,-1).some(Zse)||function(){let e=Hse(!1,Hse(!1,l,-1),-1).node,t=Hse(!1,y,-1);return loe(e)&&Zse(t)&&A.slice(0,-1).some((e=>e.arguments.some(Yae)))}()?Ise(T):[Zse(g)||D?Rse:"",Nse([g,T])],Jse({memberChain:!0},E)};function Rle(e,t,r){var n;let{node:i,parent:s}=e,a="NewExpression"===i.type,o="ImportExpression"===i.type,u=Sce(e),l=Ooe(i),c=1===l.length&&moe(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=Ooe(e);return"ExpressionStatement"===t.type&&(1===r.length||2===r.length&&"ArrayExpression"===r[0].type||3===r.length&&Hae(r[0])&&"ArrayExpression"===r[1].type)}return!1}(i,s)||uoe(i,s))){let i=[];if(Boe(e,(()=>{i.push(r())})),!c||null==(n=i[0].label)||!n.embed)return[a?"new ":"",r("callee"),u,wce(e,t,r),"(",Wse(", ",i),")"]}if(!o&&!a&&ioe(i.callee)&&!e.call((e=>Qoe(e,t)),"callee"))return jle(e,t,r);let p=[a?"new ":"",o?"import":r("callee"),u,wce(e,t,r),Lle(e,t,r)];return o||loe(i.callee)?Ise(p):p}var $le=function(e,t,r){let n='"'===t?"'":'"',i=Zoe(!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 Ule=function(e,t){let r=e.slice(1,-1),n="json"===t.parser||"json5"===t.parser&&"preserve"===t.quoteProps&&!t.singleQuote?'"':t.__isInHtmlAttribute?"'":lue(r,t.singleQuote);return $le(r,n,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.__embeddedInHtml))};var Vle=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 zle(e){return e.toLowerCase()}function Kle({pattern:e,flags:t}){return`/${e}/${t=[...t].sort().join("")}`}function qle(e,t){let r=e.slice(1,-1);if(r.includes('"')||r.includes("'"))return e;let n=t.singleQuote?"'":'"';return n+r+n}var Wle=Nae(["Literal","BigIntLiteral","BooleanLiteral","DecimalLiteral","DirectiveLiteral","NullLiteral","NumericLiteral","RegExpLiteral","StringLiteral"]);function Jle(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=!Hle(a);if(e.match(Hle,Xle,(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&&Hle(a.right)||poe(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(Xle(e)){let t=e.left||e.id;return"ObjectPattern"===t.type&&t.properties.length>2&&t.properties.some((e=>{var t;return qoe(e)&&(!e.shorthand||"AssignmentPattern"===(null==(t=e.value)?void 0:t.type))}))}return!1}(s)||function(e){let t=function(e){var t;if(Gle(e))return null==(t=e.typeParameters)?void 0:t.params}(e);if(oae(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=Zle(t.typeAnnotation);return oae(r)&&r.length>1&&r.some((e=>oae(Zle(e))||"TSConditionalType"===e.type))}(s)||Yle(s)&&function(e){return Yse(e,sae,!1)}(n))return"break-lhs";let u=function(e,t,r){if(!qoe(e))return!1;t=nae(t);let n=3;return"string"==typeof t&&Tae(t)<r.tabWidth+n}(s,n,t);return e.call((()=>function(e,t,r,n){let i=e.node;if(noe(i)&&!Cle(i))return!0;switch(i.type){case"StringLiteralTypeAnnotation":case"SequenceExpression":return!0;case"ConditionalExpression":{let{test:e}=i;return noe(e)&&!Cle(e)}case"ClassExpression":return oae(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!(!Hae(s)&&!e.call((()=>ece(e,t,r)),...a))}(e,t,r,u)),i)?"break-after-operator":u||"TemplateLiteral"===a.type||"TaggedTemplateExpression"===a.type||"BooleanLiteral"===a.type||Wae(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 Ise([Ise(n),i,Ise(kse([Use,o]))]);case"never-break-after-operator":return Ise([Ise(n),i," ",o]);case"fluid":{let e=Symbol("assignment");return Ise([Ise(n),i,Ise(kse(Use),{id:e}),jse,Lse(o,{groupId:e})])}case"break-lhs":return Ise([n,i," ",Ise(o)]);case"chain":return[Ise(n),i,Use,o];case"chain-tail":return[Ise(n),i,kse([Use,o])];case"chain-tail-arrow-chain":return[Ise(n),i,o];case"only-left":return n}}function Hle(e){return"AssignmentExpression"===e.type}function Xle(e){return Hle(e)||"VariableDeclarator"===e.type}var Gle=Nae(["TSTypeAliasDeclaration","TypeAlias"]);function Yle(e){var t;return"VariableDeclarator"===e.type&&"ArrowFunctionExpression"===(null==(t=e.init)?void 0:t.type)}var Qle=Nae(["TSTypeReference","GenericTypeAnnotation"]);function Zle(e){var t;if(Qle(e))return null==(t=e.typeParameters)?void 0:t.params}function ece(e,t,r,n=!1){var i;let{node:s}=e,a=()=>ece(e,t,r,!0);if("ChainExpression"===s.type||"TSNonNullExpression"===s.type)return e.call(a,"expression");if(loe(s)){if(null!=(i=Rle(e,t,r).label)&&i.memberChain)return!1;let n=Ooe(s);return!(!(0===n.length||1===n.length&&function(e,{printWidth:t}){if(Uoe(e))return!1;let r=t*tce;if("ThisExpression"===e.type||"Identifier"===e.type&&e.name.length<=r||Jae(e)&&!Uoe(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:Hae(e)?xoe(e).length<=r:"TemplateLiteral"===e.type?0===e.expressions.length&&e.quasis[0].value.raw.length<=r&&!e.quasis[0].value.raw.includes("\n"):Wle(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(oae(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(Zse(t(e.typeParameters?"typeParameters":"typeArguments")))return!0}return!1}(s,r))&&e.call(a,"callee")}return coe(s)?e.call(a,"object"):n&&("Identifier"===s.type||"ThisExpression"===s.type)}var tce=.25;function rce(e,t,r,n,i){let s=e.node,a=_oe(s),o=i?wce(e,r,t):"";if(0===a.length)return[o,"(",nue(e,r,{filter:e=>")"===fue(r.originalText,Cae(e))}),")"];let{parent:u}=e,l=uoe(u),c=nce(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(" "):zoe(a[n],r)?p.push(zse,zse):p.push(Use))})),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(Zse(o)||Zse(p))throw new wle;return Ise([rae(o),"(",rae(p),")"])}let d=a.every((e=>!e.decorators));return c&&d||l?[o,"(",...p,")"]:(roe(u)||function(e){return!("TypeAnnotation"!==e.type&&"TSTypeAnnotation"!==e.type||"FunctionTypeAnnotation"!==e.typeAnnotation.type||e.static||Pae(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&&aoe(a[0].typeAnnotation)&&!s.rest?"always"===r.arrowParens?["(",...p,")"]:p:[o,"(",kse([Vse,...p]),Bse(!Foe(s)&&Soe(r,"all")?",":""),Vse,")"]}function nce(e){if(!e)return!1;let t=_oe(e);if(1!==t.length)return!1;let[r]=t;return!Uoe(r)&&("ObjectPattern"===r.type||"ArrayPattern"===r.type||"Identifier"===r.type&&r.typeAnnotation&&("TypeAnnotation"===r.typeAnnotation.type||"TSTypeAnnotation"===r.typeAnnotation.type)&&Gae(r.typeAnnotation.typeAnnotation)||"FunctionTypeParam"===r.type&&Gae(r.typeAnnotation)&&r!==e.rest||"AssignmentPattern"===r.type&&("ObjectPattern"===r.left.type||"ArrayPattern"===r.left.type)&&("Identifier"===r.right.type||qae(r.right)&&0===r.right.properties.length||Kae(r.right)&&0===r.right.elements.length))}function ice(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===_oe(e).length&&(Gae(n)||Zse(t))}function sce(e){if(aoe(e)||Gae(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=>Uoe(e)));if(e.types.length-1===t&&r&&!n)return!0}return!1}function ace(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Ace(e)];return s.push("type ",r("id"),r("typeParameters")),[Jle(e,t,r,s," =","TSTypeAliasDeclaration"===i.type?"typeAnnotation":"right"),n]}function oce(e,t,r){let n=!1;return Ise(e.map((({isFirst:e,previous:t,node:i,index:s})=>{let a=r();if(e)return a;let o=Gae(i),u=Gae(t);return u&&o?[" & ",n?kse(a):a]:u||o?(s>1&&(n=!0),[" & ",s>1?kse(a):a]):kse([" &",Use,a])}),"types"))}function uce(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)&&poe(t.originalText,n)),a=sce(n),o=e.map((e=>{let n=r();return a||(n=Fse(2,n)),sue(e,n,t)}),"types");if(a)return Wse(" | ",o);let u=[Bse([s&&!poe(t.originalText,n)?Use:"","| "]),Wse([Use,"| "],o)];return Qoe(e,t)?Ise([kse(u),Vse]):("TupleTypeAnnotation"===i.type||"TSTupleType"===i.type)&&i["TupleTypeAnnotation"===i.type&&i.types?"types":"elementTypes"].length>1?Ise([kse([Bse(["(",Vse]),u]),Vse,Bse(")")]):Ise(s?kse(u):u)}function lce(e,t,r){let{node:n}=e,i=[Pce(e)];("TSConstructorType"===n.type||"TSConstructSignatureDeclaration"===n.type)&&i.push("new ");let s=rce(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&&(roe(n)||!(("ObjectTypeProperty"===n.type||"ObjectTypeInternalSlot"===n.type)&&!n.variance&&!n.optional&&Pae(n,r)||"ObjectTypeCallProperty"===n.type||"DeclareFunction"===(null==(t=e.getParentNode(2))?void 0:t.type)))}(e)?" => ":": ",r("returnType")):a.push(yce(e,r,n.returnType?"returnType":"typeAnnotation")),ice(n,a)&&(s=Ise(s)),i.push(s,a),Ise(i)}function cce(e,t,r){return[r("objectType"),Sce(e),"[",r("indexType"),"]"]}function pce(e,t,r){return["infer ",r("typeParameter")]}function dce(e,t,r){let{node:n}=e;return[n.postfix?"":r,yce(e,t),n.postfix?r:""]}function hce(e,t,r){let{node:n}=e;return["...",..."TupleTypeSpreadElement"===n.type&&n.label?[r("label"),": "]:[],r("typeAnnotation")]}function fce(e,t,r){let{node:n}=e;return[n.variance?r("variance"):"",r("label"),n.optional?"?":"",": ",r("elementType")]}var mce=new WeakSet;function yce(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(gce,r);("=>"===t||":"===t&&Uoe(n,Roe.Leading))&&(i=!0),mce.add(n)}return i?[" ",t(r)]:t(r)}var gce=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 bce(e,t,r){let n=gce(e);return n?[n," ",r("typeAnnotation")]:r("typeAnnotation")}function vce(e){return[e("elementType"),"[]"]}function xce({node:e},t){return["typeof ",..."TSTypeQuery"===e.type?[t("exprName"),t("typeParameters")]:[t("argument")]]}function Ece(e,t){let{node:r}=e;return[r.asserts?"asserts ":"",t("parameterName"),r.typeAnnotation?[" is ",yce(e,t)]:""]}function Sce(e){let{node:t}=e;return!t.optional||"Identifier"===t.type&&t===e.parent.key?"":loe(t)||coe(t)&&t.computed||"OptionalIndexedAccessType"===t.type?"?.":"?"}function Dce(e){return e.node.definite||e.match(void 0,((e,t)=>"id"===t&&"VariableDeclarator"===e.type&&e.definite))?"!":""}var Tce=new Set(["DeclareClass","DeclareFunction","DeclareVariable","DeclareExportDeclaration","DeclareExportAllDeclaration","DeclareOpaqueType","DeclareTypeAlias","DeclareEnum","DeclareInterface"]);function Ace(e){let{node:t}=e;return t.declare||Tce.has(t.type)&&"DeclareExportDeclaration"!==e.parent.type?"declare ":""}var Cce=new Set(["TSAbstractMethodDefinition","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Pce({node:e}){return e.abstract||Cce.has(e.type)?"abstract ":""}function wce(e,t,r){let n=e.node;return n.typeArguments?r("typeArguments"):n.typeParameters?r("typeParameters"):""}function kce(e,t,r){return["::",r("callee")]}function Fce(e,t,r){return"EmptyStatement"===e.type?";":"BlockStatement"===e.type||r?[" ",t]:kse([Use,t])}function Ice(e,t){return["...",t("argument"),yce(e,t)]}function _ce(e){return e.accessibility?e.accessibility+" ":""}function Nce(e,t,r){let{node:n}=e;return Ise([Wse(Use,e.map(r,"decorators")),Bce(n,t)?zse:Use])}function Oce(e,t,r){return Lce(e.node)?[Wse(zse,e.map(r,"declaration","decorators")),zse]:""}function Bce(e,t){return e.decorators.some((e=>bae(t.originalText,Cae(e))))}function Lce(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 oae(r)&&Pae(e,r[0])}var Mce=e=>"ExportDefaultDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&e.default;function jce(e,t,r){let{node:n}=e,i=[Oce(e,0,r),Ace(e),"export",Mce(n)?" default":""],{declaration:s,exported:a}=n;return Uoe(n,Roe.Dangling)&&(i.push(" ",nue(e,t)),yoe(n)&&i.push(zse)),s?i.push(" ",r("declaration")):(i.push(function(e){return $ce(e.exportKind)}(n)),"ExportAllDeclaration"===n.type||"DeclareExportAllDeclaration"===n.type?(i.push(" *"),a&&i.push(" as ",r("exported"))):i.push(zce(e,t,r)),i.push(Vce(e,t,r),qce(e,t,r))),i.push(function(e,t){return t.semi&&(!e.declaration||Mce(e)&&!Rce(e.declaration))?";":""}(n,t)),i}var Rce=Nae(["ClassDeclaration","FunctionDeclaration","TSInterfaceDeclaration","DeclareClass","DeclareFunction","TSDeclareFunction","EnumDeclaration"]);function $ce(e,t=!0){return e&&"value"!==e?`${t?" ":""}${e}${t?"":" "}`:""}function Uce(e,t){return $ce(e.importKind,t)}function Vce(e,t,r){let{node:n}=e;if(!n.source)return"";let i=[];return Kce(n,t)||i.push(" from"),i.push(" ",r("source")),i}function zce(e,t,r){let{node:n}=e;if(Kce(n,t))return"";let i=[" "];if(oae(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 oue(n,"specifier");a.push(r())}}),"specifiers"),i.push(Wse(", ",s)),a.length>0&&(s.length>0&&i.push(", "),a.length>1||s.length>0||n.specifiers.some((e=>Uoe(e)))?i.push(Ise(["{",kse([t.bracketSpacing?Use:Vse,Wse([",",Use],a)]),Bse(Soe(t)?",":""),t.bracketSpacing?Use:Vse,"}"])):i.push(["{",t.bracketSpacing?" ":"",...a,t.bracketSpacing?" ":"","}"]))}else i.push("{}");return i}function Kce(e,t){let{type:r,importKind:n,source:i,specifiers:s}=e;return"ImportDeclaration"===r&&!oae(s)&&"type"!==n&&!/{\s*}/.test(t.originalText.slice(Aae(e),Aae(i)))}function qce(e,t,r){var n;let{node:i}=e,s=oae(i.attributes)?"attributes":oae(i.assertions)?"assertions":void 0;return s?[` ${"assertions"===s||null!=(n=i.extra)&&n.deprecatedAssertSyntax?"assert":"with"} {`,t.bracketSpacing?" ":"",Wse(", ",e.map(r,s)),t.bracketSpacing?" ":"","}"]:""}function Wce(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||!wae(t,r))return!1;if(Hae(t))return t.value===r.value&&xoe(t)===xoe(r);if("Identifier"===t.type)return t.name===r.name;return!1}(n)&&(p=r(o)),[$ce("ImportSpecifier"===i?n.importKind:n.exportKind,!1),c,c&&p?" as ":"",p]}function Jce(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?Fse(2,o):o}var Hce=new Map([["AssignmentExpression","right"],["VariableDeclarator","init"],["ReturnStatement","argument"],["ThrowStatement","argument"],["UnaryExpression","argument"],["YieldExpression","argument"]]);function Xce(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&&(Zae(s[l[0]])||Zae(c)||Zae(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(Zae(n))return!0;"ConditionalExpression"===n.type&&t.push(n)}}return!1}(v))){h=!0,y=!0;let e=e=>[Bse("("),kse([Vse,e]),Vse,Bse(")")],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=[Use,"? ",c.type===s.type?Bse("","("):"",Fse(2,r(o)),c.type===s.type?Bse("",")"):"",Use,": ",p.type===s.type?r(u):Fse(2,r(u))];d.push(f.type!==s.type||f[u]===s||m?e:t.useTabs?function(e){return Fse(-1,e)}(kse(e)):Fse(Math.max(0,t.tabWidth-2),e))}let x=[o,u,...l].some((e=>Uoe(s[e],(e=>Oae(e)&&mue(t.originalText,Aae(e),Cae(e)))))),E=!h&&(coe(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||loe(i)&&i.callee===n||coe(i)&&i.object===n||"TSNonNullExpression"===i.type&&i.expression===n?n=i:"NewExpression"===i.type&&i.callee===n||Joe(i)&&i.expression===n?(r=e.getParentNode(t+1),n=i):r=i}return n!==t&&r[Hce.get(r.type)]===n}(e),D=(e=>f===b?Ise(e,{shouldBreak:x}):x?[e,Rse]:e)([Jce(e,0,r),y?d:kse(d),a&&E&&!S?Vse:""]);return m||S?Ise([kse([Vse,D]),Vse]):D}var Gce=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 Yce=function(e,t){let r=e.lastIndexOf("\n");return-1===r?0:Gce(e.slice(r+1).match(/^[\t ]*/)[0],t)};var Qce=Symbol("MODE_BREAK"),Zce=Symbol("MODE_FLAT"),epe=Symbol("cursor");function tpe(e,t){return npe(e,{type:"indent"},t)}function rpe(e,t,r){return t===Number.NEGATIVE_INFINITY?e.root||{value:"",length:0,queue:[]}:t<0?npe(e,{type:"dedent"},r):t?"root"===t.type?{...e,root:e}:npe(e,{type:"string"==typeof t?"stringAlign":"numberAlign",n:t},r):e}function npe(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 ipe(e){let t=0,r=0,n=e.length;e:for(;n--;){let i=e[n];if(i!==epe)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(epe);return t}function spe(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(Dse(l)){case ose:u.push(l),r-=Tae(l);break;case use:case fse:{let t=Xse(l);for(let r=t.length-1;r>=0;r--)o.push({mode:e,doc:t[r]});break}case cse:case pse:case yse:case xse:o.push({mode:e,doc:l.contents});break;case dse:r+=ipe(u);break;case hse:{if(s&&l.break)return!1;let t=l.break?Qce:e,r=l.expandedStates&&t===Qce?Hse(!1,l.expandedStates,-1):l.contents;o.push({mode:t,doc:r});break}case mse:{let t=(l.groupId?i[l.groupId]||Zce:e)===Qce?l.breakContents:l.flatContents;t&&o.push({mode:e,doc:t});break}case vse:if(e===Qce||l.hard)return!0;l.soft||(u.push(" "),r--);break;case gse:n=!0;break;case bse:if(n)return!1}}return!1}function ape(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:Qce,doc:e}],o=[],u=!1,l=[],c=0;for(function(e){let t=new Set,r=[];Pse(e,(function(e){if(e.type===Ese&&eae(r),e.type===hse){if(r.push(e),t.has(e))return!1;t.add(e)}}),(function(e){e.type===hse&&r.pop().break&&eae(r)}),!0)}(e);a.length>0;){let{ind:e,mode:p,doc:d}=a.pop();switch(Dse(d)){case ose:{let e="\n"!==i?Zoe(!1,d,"\n",i):d;o.push(e),a.length>0&&(s+=Tae(e));break}case use:for(let t=d.length-1;t>=0;t--)a.push({ind:e,mode:p,doc:d[t]});break;case lse:if(c>=2)throw new Error("There are too many 'cursor' in doc.");o.push(epe),c++;break;case cse:a.push({ind:tpe(e,t),mode:p,doc:d.contents});break;case pse:a.push({ind:rpe(e,d.n,t),mode:p,doc:d.contents});break;case dse:s-=ipe(o);break;case hse:switch(p){case Zce:if(!u){a.push({ind:e,mode:d.break?Qce:Zce,doc:d.contents});break}case Qce:{u=!1;let t={ind:e,mode:Zce,doc:d.contents},i=n-s,o=l.length>0;if(!d.break&&spe(t,a,i,o,r))a.push(t);else if(d.expandedStates){let t=Hse(!1,d.expandedStates,-1);if(d.break){a.push({ind:e,mode:Qce,doc:t});break}for(let n=1;n<d.expandedStates.length+1;n++){if(n>=d.expandedStates.length){a.push({ind:e,mode:Qce,doc:t});break}{let t=d.expandedStates[n],s={ind:e,mode:Zce,doc:t};if(spe(s,a,i,o,r)){a.push(s);break}}}}else a.push({ind:e,mode:Qce,doc:d.contents});break}}d.id&&(r[d.id]=Hse(!1,a,-1).mode);break;case fse:{let t=n-s,{parts:i}=d;if(0===i.length)break;let[o,u]=i,c={ind:e,mode:Zce,doc:o},h={ind:e,mode:Qce,doc:o},f=spe(c,[],t,l.length>0,r,!0);if(1===i.length){f?a.push(c):a.push(h);break}let m={ind:e,mode:Zce,doc:u},y={ind:e,mode:Qce,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:Ose(i)},b=i[0];spe({ind:e,mode:Zce,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 mse:case yse:{let t=d.groupId?r[d.groupId]:p;if(t===Qce){let t=d.type===mse?d.breakContents:d.negate?d.contents:kse(d.contents);t&&a.push({ind:e,mode:p,doc:t})}if(t===Zce){let t=d.type===mse?d.flatContents:d.negate?kse(d.contents):d.contents;t&&a.push({ind:e,mode:p,doc:t})}break}case gse:l.push({ind:e,mode:p,doc:d.contents});break;case bse:l.length>0&&a.push({ind:e,mode:p,doc:$se});break;case vse:switch(p){case Zce:if(!d.hard){d.soft||(o.push(" "),s+=1);break}u=!0;case Qce: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-=ipe(o),o.push(i+e.value),s=e.length)}break;case xse:a.push({ind:e,mode:p,doc:d.contents});break;case Ese:break;default:throw new Ase(d)}0===a.length&&l.length>0&&(a.push(...l.reverse()),l.length=0)}let p=o.indexOf(epe);if(-1!==p){let e=o.indexOf(epe,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 ope(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=>"${"+ape(e,{...t,printWidth:Number.POSITIVE_INFINITY,endOfLine:"lf"}).formatted+"}")),u=[{hasLineBreak:!1,cells:[]}];for(let e=1;e<n.quasis.length;e++){let t=Hse(!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],Tae(r));return a.push(jse,"`",kse([zse,Wse(zse,p.map((e=>Wse(" | ",e.cells.map(((t,r)=>e.hasLineBreak?t:t+" ".repeat(c[r]-Tae(t))))))))]),zse,"`"),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(Uoe(e))return!1;if("Identifier"===e.type||"ThisExpression"===e.type)return!0;if("ChainExpression"===e.type&&(e=e.expression),coe(e)){let t=e;for(;coe(t);)if("Identifier"!==t.property.type&&"Literal"!==t.property.type&&"StringLiteral"!==t.property.type&&"NumericLiteral"!==t.property.type||(t=t.object,Uoe(t)))return!1;return"Identifier"===t.type||"ThisExpression"===t.type}return!1}))}(n);o&&(a=a.map((e=>ape(e,{...r,printWidth:Number.POSITIVE_INFINITY}).formatted))),s.push(jse,"`");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")?Yce(p,c):u;u=d;let h=a[e];if(!o){let t=n[i][e];(Uoe(t)||coe(t)||"ConditionalExpression"===t.type||"SequenceExpression"===t.type||Joe(t)||noe(t))&&(h=[kse([Vse,h]),Vse])}let f=0===d&&p.endsWith("\n")?Fse(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=kse(n);n=Fse(t%r,n),n=Fse(Number.NEGATIVE_INFINITY,n)}return n}(h,d,c);s.push(Ise(["${",f,jse,"}"]))}),"quasis"),s.push("`"),s}function upe(e,t){return e.map((e=>function(e,t){let{node:r}=e,n=t();return Uoe(r)&&(n=Ise([kse([Vse,n]),Vse])),["${",n,jse,"}"]}(e,t)),"expressions")}function lpe(e,t){return Gse(e,(e=>"string"==typeof e?t?Zoe(!1,e,/(\\*)`/g,"$1$1\\`"):cpe(e):e))}function cpe(e){return Zoe(!1,e,/([\\`]|\${)/g,"\\$1")}var ppe=function(e){let t=new WeakMap;return function(r){return t.has(r)||t.set(r,Symbol(e)),t.get(r)}};function dpe(e){switch(e){case null:return"";case"PlusOptional":return"+?";case"MinusOptional":return"-?";case"Optional":return"?"}}function hpe(e,t){return"+"===e||"-"===e?e+t:t}var fpe=ppe("typeParameters");function mpe(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&&uoe(s),o=e.match((e=>!(1===e[n].length&&Gae(e[n][0]))),void 0,((e,t)=>"typeAnnotation"===t),(e=>"Identifier"===e.type),Yle);if(0===i[n].length||!o&&(a||1===i[n].length&&("NullableTypeAnnotation"===i[n][0].type||sce(i[n][0]))))return["<",Wse(", ",e.map(r,n)),ype(e,t),">"];let u="TSTypeParameterInstantiation"===i.type?"":function(e,t,r){let{node:n}=e;return 1===_oe(n).length&&n.type.startsWith("TS")&&!n[r][0].constraint&&"ArrowFunctionExpression"===e.parent.type&&!(t.filepath&&/\.ts$/.test(t.filepath))}(e,t,n)?",":Soe(t)?Bse(","):"";return Ise(["<",kse([Vse,Wse([",",Use],e.map(r,n))]),u,Vse,">"],{id:fpe(i)})}function ype(e,t){let{node:r}=e;if(!Uoe(r,Roe.Dangling))return"";let n=!Uoe(r,Roe.Line),i=nue(e,t,{indent:!n});return n?i:[i,zse]}function gpe(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(hpe(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(yce(e,r,"bound"))),n.constraint){let e=Symbol("constraint");s.push(" extends",Ise(kse(Use),{id:e}),jse,Lse(r("constraint"),{groupId:e}))}return n.default&&s.push(" = ",r("default")),Ise(s)}var bpe=()=>{};bpe.ok=bpe,bpe.strictEqual=bpe;var vpe=bpe,xpe=new WeakMap;function Epe(e,t,r){let{node:n}=e;if(n.computed)return["[",r("key"),"]"];let{parent:i}=e,{key:s}=n;if("consistent"===t.quoteProps&&!xpe.has(i)){let e=(i.properties||i.body||i.members).some((e=>!e.computed&&e.key&&Hae(e.key)&&!doe(e,t)));xpe.set(i,e)}if(("Identifier"===s.type||Wae(s)&&hoe(Vle(xoe(s)))&&String(s.value)===Vle(xoe(s))&&"typescript"!==t.parser&&"babel-ts"!==t.parser)&&("json"===t.parser||"consistent"===t.quoteProps&&xpe.get(i))){let r=Ule(JSON.stringify("Identifier"===s.type?s.name:s.value.toString()),t);return e.call((e=>sue(e,r,t)),"key")}return doe(n,t)&&("as-needed"===t.quoteProps||"consistent"===t.quoteProps&&!xpe.get(i))?e.call((e=>sue(e,/^\d/.test(s.value)?Vle(s.value):s.value,t)),"key"):r("key")}var Spe=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 Dpe(e,t,r,n){if(Spe(e))return Ape(e,r,t);let{node:i}=e,s=!1;if(("FunctionDeclaration"===i.type||"FunctionExpression"===i.type)&&null!=n&&n.expandLastArg){let{parent:t}=e;loe(t)&&(Ooe(t).length>1||_oe(i).every((e=>"Identifier"===e.type&&!e.typeAnnotation)))&&(s=!0)}let a=[Ace(e),i.async?"async ":"",`function${i.generator?"*":""} `,i.id?t("id"):""],o=rce(e,t,r,s),u=Ppe(e,t),l=ice(i,u);return a.push(wce(e,0,t),Ise([l?Ise(o):o,u]),i.body?" ":"",t("body")),r.semi&&(i.declare||!i.body)&&a.push(";"),a}function Tpe(e,t,r){let{node:n}=e,{kind:i}=n,s=n.value||n,a=[];return i&&"init"!==i&&"method"!==i&&"constructor"!==i?(vpe.ok("get"===i||"set"===i),a.push(i," ")):s.async&&a.push("async "),s.generator&&a.push("*"),a.push(Epe(e,t,r),n.optional||n.key.optional?"?":"",n===s?Ape(e,t,r):r("value")),a}function Ape(e,t,r){let{node:n}=e,i=rce(e,r,t),s=Ppe(e,r),a=function(e){let t=_oe(e);return t.length>1&&t.some((e=>"TSParameterProperty"===e.type))}(n),o=ice(n,s),u=[wce(e,0,r),Ise([a?Ise(i,{shouldBreak:!0}):o?Ise(i):i,s])];return n.body?u.push(" ",r("body")):u.push(t.semi?";":""),u}function Cpe(e,t){if("always"===t.arrowParens)return!1;if("avoid"===t.arrowParens){let{node:t}=e;return function(e){let t=_oe(e);return!(1!==t.length||e.typeParameters||Uoe(e,Roe.Dangling)||"Identifier"!==t[0].type||t[0].typeAnnotation||Uoe(t[0])||t[0].optional||e.predicate||e.returnType)}(t)}return!1}function Ppe(e,t){let{node:r}=e,n=[yce(e,t,"returnType")];return r.predicate&&n.push(t("predicate")),n}function wpe(e,t,r){let{node:n}=e,i=t.semi?";":"",s=[];if(n.argument){let e=r("argument");!function(e,t){if(poe(e.originalText,t))return!0;if(Rae(t)){let r,n=t;for(;r=$ae(n);)if(n=r,poe(e.originalText,n))return!0}return!1}(t,n.argument)?(noe(n.argument)||"SequenceExpression"===n.argument.type)&&(e=Ise([Bse("("),kse([Vse,e]),Vse,Bse(")")])):e=["(",kse([zse,e]),zse,")"],s.push(" ",e)}let a=Uoe(n,Roe.Dangling),o=i&&a&&Uoe(n,Roe.Last|Roe.Line);return o&&s.push(i),a&&s.push(" ",nue(e,t)),o||s.push(i),s}var kpe=Nae(["ClassProperty","PropertyDefinition","ClassPrivateProperty","ClassAccessorProperty","AccessorProperty","TSAbstractPropertyDefinition","TSAbstractAccessorProperty"]);function Fpe(e,t,r){let{node:n}=e,i=[Ace(e),Pce(e),"class"],s=Uoe(n.id,Roe.Trailing)||Uoe(n.typeParameters,Roe.Trailing)||Uoe(n.superClass)||oae(n.extends)||oae(n.mixins)||oae(n.implements),a=[],o=[];if(n.id&&a.push(" ",r("id")),a.push(r("typeParameters")),n.superClass){let n=[Bpe(e,t,r),r("superTypeParameters")],i=e.call((e=>["extends ",sue(e,n,t)]),"superClass");s?o.push(Use,Ise(i)):o.push(" ",i)}else o.push(Ope(e,t,r,"extends"));if(o.push(Ope(e,t,r,"mixins"),Ope(e,t,r,"implements")),s){let e;e=Npe(n)?[...a,kse(o)]:kse([...a,o]),i.push(Ise(e,{id:Ipe(n)}))}else i.push(...a,...o);return i.push(" ",r("body")),i}var Ipe=ppe("heritageGroup");function _pe(e){return Bse(zse,"",{groupId:Ipe(e)})}function Npe(e){return e.typeParameters&&!Uoe(e.typeParameters,Roe.Trailing|Roe.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 Ope(e,t,r,n){let{node:i}=e;if(!oae(i[n]))return"";let s=nue(e,t,{marker:n});return[Npe(i)?Bse(" ",Use,{groupId:fpe(i.typeParameters)}):Use,s,s&&zse,n,Ise(kse([Use,Wse([",",Use],e.map(r,n))]))]}function Bpe(e,t,r){let n=r("superClass"),{parent:i}=e;return"AssignmentExpression"===i.type?Ise(Bse(["(",kse([Vse,n]),Vse,")"],n)):n}function Lpe(e,t,r){let{node:n}=e,i=[];return oae(n.decorators)&&i.push(Nce(e,t,r)),i.push(_ce(n)),n.static&&i.push("static "),i.push(Pce(e)),n.override&&i.push("override "),i.push(Tpe(e,t,r)),i}function Mpe(e,t,r){let{node:n}=e,i=[],s=t.semi?";":"";return oae(n.decorators)&&i.push(Nce(e,t,r)),i.push(_ce(n),Ace(e)),n.static&&i.push("static "),i.push(Pce(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(Epe(e,t,r),Sce(e),Dce(e),yce(e,r)),[Jle(e,t,r,i," =","TSAbstractPropertyDefinition"===n.type||"TSAbstractAccessorProperty"===n.type?void 0:"value"),s]}function jpe(e,t,r){let{node:n}=e,i=[];return e.each((({node:e,next:n,isLast:s})=>{i.push(r()),!t.semi&&kpe(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(kpe(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(zse),zoe(e,t)&&i.push(zse))}),"body"),Uoe(n,Roe.Dangling)&&i.push(nue(e,t)),[oae(n.body)?_pe(e.parent):"","{",i.length>0?[kse([zse,i]),zse]:"","}"]}function Rpe(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:Aae(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&&mue(t.originalText,Aae(s),l[0].loc),f=d?";":"TSInterfaceBody"===s.type||"TSTypeLiteral"===s.type?Bse(i,";"):",",m="RecordExpression"===s.type?"#{":s.exact?"{|":"{",y=s.exact?"|}":"}",g=[],b=l.map((e=>{let r=[...g,Ise(e.printed)];return g=[f,Use],("TSPropertySignature"===e.node.type||"TSMethodSignature"===e.node.type||"TSConstructSignatureDeclaration"===e.node.type||"TSCallSignatureDeclaration"===e.node.type)&&Uoe(e.node,Roe.PrettierIgnore)&&g.shift(),zoe(e.node,t)&&g.push(zse),r}));if(s.inexact||s.hasUnknownMembers){let r;if(Uoe(s,Roe.Dangling)){let n=Uoe(s,Roe.Line);r=[nue(e,t),n||bae(t.originalText,Cae(Hse(!1,Voe(s),-1)))?zse:Use,"..."]}else r=["..."];b.push([...g,...r])}let v,x=null==(n=Hse(!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)&&Uoe(x,Roe.PrettierIgnore)));if(0===b.length){if(!Uoe(s,Roe.Dangling))return[m,y,yce(e,r)];v=Ise([m,nue(e,t,{indent:!0}),Vse,y,Sce(e),yce(e,r)])}else v=[d&&oae(s.properties)?_pe(c):"",m,kse([t.bracketSpacing?Use:Vse,...b]),Bse(E&&(","!==f||Soe(t))?f:""),t.bracketSpacing?Use:Vse,y,Sce(e),yce(e,r)];return e.match((e=>"ObjectPattern"===e.type&&!e.decorators),$pe)||Gae(s)&&(e.match(void 0,((e,t)=>"typeAnnotation"===t),((e,t)=>"typeAnnotation"===t),$pe)||e.match(void 0,((e,t)=>"FunctionTypeParam"===e.type&&"typeAnnotation"===t),$pe))||!h&&e.match((e=>"ObjectPattern"===e.type),(e=>"AssignmentExpression"===e.type||"VariableDeclarator"===e.type))?v:Ise(v,{shouldBreak:h})}function $pe(e,t){return("params"===t||"parameters"===t||"this"===t||"rest"===t)&&nce(e)}var Upe=new WeakMap;function Vpe(e){return Upe.has(e)||Upe.set(e,"ConditionalExpression"===e.type&&!Doe(e,(e=>"ObjectExpression"===e.type))),Upe.get(e)}var zpe=e=>"SequenceExpression"===e.type;function Kpe(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 "),Cpe(e,t))s.push(r(["params",0]));else{let i=n.expandLastArg||n.expandFirstArg,a=Ppe(e,r);if(i){if(Zse(a))throw new wle;a=Ise(rae(a))}s.push(Ise([rce(e,r,t,i,!0),a]))}let a=nue(e,t,{filter(e){let r=hue(t.originalText,Cae(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}=iue(e,t);a.push([r,d]),o.unshift(n)}l&&(u||(u=p.returnType&&_oe(p).length>0||p.typeParameters||_oe(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=!poe(t.originalText,s)&&(zpe(s)||function(e,t,r){var n,i;return Kae(e)||qae(e)||"ArrowFunctionExpression"===e.type||"DoExpression"===e.type||"BlockStatement"===e.type||Zae(e)||!1!==(null==(n=t.label)?void 0:n.hug)&&((null==(i=t.label)?void 0:i.embed)||moe(e,r.originalText))}(s,i,t)||!u&&Vpe(s)),d="callee"===e.key&&Koe(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&&Koe(i)||noe(i)?Ise([r[0]," =>",kse([Use,Wse([" =>",Use],r.slice(1))])],{shouldBreak:n}):"callee"===s&&Koe(i)||t.assignmentLayout?Ise(Wse([" =>",Use],r),{shouldBreak:n}):Ise(kse(Wse([" =>",Use],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&&Soe(t,"all")?Bse(","):"",c=!r.expandLastArg&&"JSXExpressionContainer"!==u.type||Uoe(o)?"":Vse;return a&&Vpe(s)?[" ",Ise([Bse("","("),kse([Vse,n]),Bse("",")"),l,c]),i]:(zpe(s)&&(n=Ise(["(",kse([Vse,n]),Vse,")"])),a?[" ",n,i]:[kse([Use,n,i]),l,c])}(e,t,n,{bodyDoc:i,bodyComments:o,functionBody:s,shouldPutBodyOnSameLine:p}),Ise([Ise(m?kse([Vse,f]):f,{shouldBreak:c,id:h})," =>",l?Lse(i,{groupId:h}):Ise(i),l&&d?Bse(Vse,"",{groupId:h}):""])}function qpe(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(zse),zoe(e,t)&&s.push(zse)))}),n),s}function Wpe(e,t,r){let{node:n}=e,i=[];"StaticBlock"===n.type&&i.push("static "),i.push("{");let s=Jpe(e,t,r);if(s)i.push(kse([zse,s]),zse);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(zse)}return i.push("}"),i}function Jpe(e,t,r){var n;let{node:i}=e,s=oae(i.directives),a=i.body.some((e=>"EmptyStatement"!==e.type)),o=Uoe(i,Roe.Dangling);if(!s&&!a&&!o)return"";let u=[];return s&&(u.push(qpe(e,t,r,"directives")),(a||o)&&(u.push(zse),zoe(Hse(!1,i.directives,-1),t)&&u.push(zse))),a&&u.push(qpe(e,t,r,"body")),o&&u.push(nue(e,t)),"Program"===i.type&&"ModuleExpression"!==(null==(n=e.parent)?void 0:n.type)&&u.push(zse),u}function Hpe(e,t){if(t.semi||Gpe(e,t)||Qpe(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((()=>Xpe(e,t)),"expression"))}function Xpe(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(!Cpe(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(Zae(r))return!0}return!!Qoe(e,t)||!!Rae(r)&&e.call((()=>Xpe(e,t)),...Uae(r))}function Gpe({node:e,parent:t},r){return("markdown"===r.parentParser||"mdx"===r.parentParser)&&"ExpressionStatement"===e.type&&Zae(e.expression)&&"Program"===t.type&&1===t.body.length}function Ype(e){switch(e.type){case"MemberExpression":switch(e.property.type){case"Identifier":case"NumericLiteral":case"StringLiteral":return Ype(e.object)}return!1;case"Identifier":return!0;default:return!1}}function Qpe({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 Zpe(e,t,r){let n=[r("expression")];return Qpe(e,t)?Ype(e.node.expression)&&n.push(";"):Gpe(e,t)||t.semi&&n.push(";"),Uoe(e.node,Roe.Dangling,(({marker:e})=>e===Woe))&&n.push(" ",nue(e,t,{marker:Woe})),n}function ede(e,t,r,n){let{node:i}=e;if(Wle(i))return function(e,t){let{node:r}=e;switch(r.type){case"RegExpLiteral":return Kle(r);case"BigIntLiteral":return zle(r.extra.raw);case"NumericLiteral":return Vle(r.extra.raw);case"StringLiteral":return iae(Ule(r.extra.raw,t));case"NullLiteral":return"null";case"BooleanLiteral":return String(r.value);case"DecimalLiteral":return Vle(r.value)+"m";case"DirectiveLiteral":return qle(r.extra.raw,t);case"Literal":{if(r.regex)return Kle(r.regex);if(r.bigint)return zle(r.raw);if(r.decimal)return Vle(r.decimal)+"m";let{value:n}=r;return"number"==typeof n?Vle(r.raw):"string"==typeof n?function(e){if("expression"!==e.key)return;let{parent:t}=e;return"ExpressionStatement"===t.type&&t.directive}(e)?qle(r.raw,t):iae(Ule(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"),zse];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=Wse([",",Use],n);return t.__isVueForBindingLeft?["(",kse([Vse,Ise(i)]),Vse,")"]:i}}(e,t,r)??r("program");case"Program":return Jpe(e,t,r);case"EmptyStatement":return"";case"ExpressionStatement":return Zpe(e,t,r);case"ChainExpression":return r("expression");case"ParenthesizedExpression":return Uoe(i.expression)||!qae(i.expression)&&!Kae(i.expression)?Ise(["(",kse([Vse,r("expression")]),Vse,")"]):["(",r("expression"),")"];case"AssignmentExpression":return function(e,t,r){let{node:n}=e;return Jle(e,t,r,r("left"),[" ",n.operator],"right")}(e,t,r);case"VariableDeclarator":return function(e,t,r){return Jle(e,t,r,r("id")," =","init")}(e,t,r);case"BinaryExpression":case"LogicalExpression":return Tle(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=Mle(e,0,r),{node:a,parent:o}=e,u=e.findAncestor((e=>!(coe(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&&!coe(o)||("AssignmentExpression"===o.type||"VariableDeclarator"===o.type)&&(loe(a.object)&&a.object.arguments.length>0||"TSNonNullExpression"===a.object.type&&loe(a.object.expression)&&a.object.expression.arguments.length>0||(null==(n=i.label)?void 0:n.memberChain));return Jse(i.label,[i,l?s:Ise(kse([Vse,s]))])}(e,0,r);case"MetaProperty":return[r("meta"),".",r("property")];case"BindExpression":return i.object&&a.push(r("object")),a.push(Ise(kse([Vse,kce(0,0,r)]))),a;case"Identifier":return[i.name,Sce(e),Dce(e),yce(e,r)];case"V8IntrinsicIdentifier":return["%",i.name];case"SpreadElement":case"SpreadElementPattern":case"SpreadPropertyPattern":case"RestElement":return Ice(e,r);case"FunctionDeclaration":case"FunctionExpression":return Dpe(e,r,t,n);case"ArrowFunctionExpression":return Kpe(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(loe(t)&&t.callee===i||coe(t)&&t.object===i){a=[kse([Vse,...a]),Vse];let t=e.findAncestor((e=>"AwaitExpression"===e.type||"BlockStatement"===e.type));if("AwaitExpression"!==(null==t?void 0:t.type)||!Doe(t.argument,(e=>e===i)))return Ise(a)}}return a;case"ExportDefaultDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return jce(e,t,r);case"ImportDeclaration":return function(e,t,r){let{node:n}=e;return["import",n.module?" module":"",Uce(n),zce(e,t,r),Vce(e,t,r),qce(e,t,r),t.semi?";":""]}(e,t,r);case"ImportSpecifier":case"ExportSpecifier":case"ImportNamespaceSpecifier":case"ExportNamespaceSpecifier":case"ImportDefaultSpecifier":case"ExportDefaultSpecifier":return Wce(e,0,r);case"ImportAttribute":return[r("key"),": ",r("value")];case"Import":return"import";case"BlockStatement":case"StaticBlock":return Wpe(e,t,r);case"ClassBody":return jpe(e,t,r);case"ThrowStatement":return function(e,t,r){return["throw",wpe(e,t,r)]}(e,t,r);case"ReturnStatement":return function(e,t,r){return["return",wpe(e,t,r)]}(e,t,r);case"NewExpression":case"ImportExpression":case"OptionalCallExpression":case"CallExpression":return Rle(e,t,r);case"ObjectExpression":case"ObjectPattern":case"RecordExpression":return Rpe(e,t,r);case"ObjectProperty":case"Property":return i.method||"get"===i.kind||"set"===i.kind?Tpe(e,t,r):function(e,t,r){let{node:n}=e;return n.shorthand?r("value"):Jle(e,t,r,Epe(e,t,r),":","value")}(e,t,r);case"ObjectMethod":return Tpe(e,t,r);case"Decorator":return["@",r("expression")];case"ArrayExpression":case"ArrayPattern":case"TupleExpression":return kle(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(",",kse([Use,r()]))}),"expressions"),Ise(t)}return Ise(Wse([",",Use],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(" "),Uoe(i.argument)?a.push(Ise(["(",kse([Vse,r("argument")]),Vse,")"])):a.push(r("argument")),a;case"UpdateExpression":return a.push(r("argument"),i.operator),i.prefix&&a.reverse(),a;case"ConditionalExpression":return Xce(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||Uoe(i.declarations[0])?n.length>0&&(t=kse(n[0])):t=n[0],a=[Ace(e),i.kind,t?[" ",t]:"",kse(n.slice(1).map((e=>[",",l&&!u?zse:Use,e])))],u&&o.body!==i||a.push(s),Ise(a)}case"WithStatement":return Ise(["with (",r("object"),")",Fce(i.body,r("body"))]);case"IfStatement":{let n=Fce(i.consequent,r("consequent")),s=Ise(["if (",Ise([kse([Vse,r("test")]),Vse]),")",n]);if(a.push(s),i.alternate){let n=Uoe(i.consequent,Roe.Trailing|Roe.Line)||yoe(i),s="BlockStatement"===i.consequent.type&&!n;a.push(s?" ":zse),Uoe(i,Roe.Dangling)&&a.push(nue(e,t),n?zse:" "),a.push("else",Ise(Fce(i.alternate,r("alternate"),"IfStatement"===i.alternate.type)))}return a}case"ForStatement":{let n=Fce(i.body,r("body")),s=nue(e,t),a=s?[s,Vse]:"";return i.init||i.test||i.update?[a,Ise(["for (",Ise([kse([Vse,r("init"),";",Use,r("test"),";",Use,r("update")]),Vse]),")",n])]:[a,Ise(["for (;;)",n])]}case"WhileStatement":return Ise(["while (",Ise([kse([Vse,r("test")]),Vse]),")",Fce(i.body,r("body"))]);case"ForInStatement":return Ise(["for (",r("left")," in ",r("right"),")",Fce(i.body,r("body"))]);case"ForOfStatement":return Ise(["for",i.await?" await":""," (",r("left")," of ",r("right"),")",Fce(i.body,r("body"))]);case"DoWhileStatement":return a=[Ise(["do",Fce(i.body,r("body"))])],"BlockStatement"===i.body.type?a.push(" "):a.push(zse),a.push("while (",Ise([kse([Vse,r("test")]),Vse]),")",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=Uoe(i.param,(e=>!Oae(e)||e.leading&&bae(t.originalText,Cae(e))||e.trailing&&bae(t.originalText,Aae(e),{backwards:!0}))),n=r("param");return["catch ",e?["(",kse([Vse,n]),Vse,") "]:["(",n,") "],r("body")]}return["catch ",r("body")];case"SwitchStatement":return[Ise(["switch (",kse([Vse,r("discriminant")]),Vse,")"])," {",i.cases.length>0?kse([zse,Wse(zse,e.map((({node:e,isLast:n})=>[r(),!n&&zoe(e,t)?zse:""]),"cases"))]):"",zse,"}"];case"SwitchCase":{i.test?a.push("case ",r("test"),":"):a.push("default:"),Uoe(i,Roe.Dangling)&&a.push(" ",nue(e,t));let n=i.consequent.filter((e=>"EmptyStatement"!==e.type));if(n.length>0){let i=qpe(e,t,r,"consequent");a.push(1===n.length&&"BlockStatement"===n[0].type?[" ",i]:kse([zse,i]))}return a}case"DebuggerStatement":return["debugger",s];case"ClassDeclaration":case"ClassExpression":return Fpe(e,t,r);case"ClassMethod":case"ClassPrivateMethod":case"MethodDefinition":return Lpe(e,t,r);case"ClassProperty":case"PropertyDefinition":case"ClassPrivateProperty":case"ClassAccessorProperty":case"AccessorProperty":return Mpe(e,t,r);case"TemplateElement":return iae(i.value.raw);case"TemplateLiteral":return ope(e,r,t);case"TaggedTemplateExpression":return function(e){let t=e("quasi");return Jse(t.label&&{tagged:!0,...t.label},[e("tag"),e("typeParameters"),jse,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(kse([zse,e]),zse),a.push("}"),a}default:throw new oue(i,"ESTree")}}function tde(e,t,r){let{node:n}=e;if(n.type.startsWith("NG"))switch(n.type){case"NGRoot":return[r("node"),Uoe(n.node)?" //"+Voe(n.node)[0].value.trimEnd():""];case"NGPipeExpression":return Tle(e,t,r);case"NGChainedExpression":return Ise(Wse([";",Use],e.map((()=>function({node:e}){return jae(e,nde)}(e)?r():["(",r(),")"]),"expressions")));case"NGEmptyExpression":return"";case"NGMicrosyntax":return e.map((()=>[e.isFirst?"":rde(e)?" ":[";",Use],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=rde(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 oue(n,"Angular")}}function rde({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 nde=Nae(["CallExpression","OptionalCallExpression","AssignmentExpression"]);function ide(e,t,r){let{node:n}=e,i=[Ace(e),"interface"],s=[],a=[];"InterfaceTypeAnnotation"!==n.type&&s.push(" ",r("id"),r("typeParameters"));let o=n.typeParameters&&!Uoe(n.typeParameters,Roe.Trailing|Roe.Line);return oae(n.extends)&&a.push(o?Bse(" ",Use,{groupId:fpe(n.typeParameters)}):Use,"extends ",(1===n.extends.length?Eoe:kse)(Wse([",",Use],e.map(r,"extends")))),Uoe(n.id,Roe.Trailing)||oae(n.extends)?o?i.push(Ise([...s,kse(a)])):i.push(Ise(kse([...s,...a]))):i.push(...s,...a),i.push(" ",r("body")),Ise(i)}function sde(e,t,r){return Rpe(e,r,t)}function ade(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 ode(e,t,r){let{node:n}=e;return[Ace(e),n.const?"const ":"","enum ",t("id")," ","TSEnumDeclaration"===n.type?sde(e,t,r):t("body")]}function ude(e,t,r){let{node:n}=e;if(Lae(n))return n.type.slice(0,-14).toLowerCase();let i=t.semi?";":"";switch(n.type){case"DeclareClass":return Fpe(e,t,r);case"DeclareFunction":return[Ace(e),"function ",r("id"),r("predicate"),i];case"DeclareModule":return["declare module ",r("id")," ",r("body")];case"DeclareModuleExports":return["declare module.exports",yce(e,r),i];case"DeclareVariable":return[Ace(e),n.kind??"var"," ",r("id"),i];case"DeclareExportDeclaration":case"DeclareExportAllDeclaration":return jce(e,t,r);case"DeclareOpaqueType":case"OpaqueType":return function(e,t,r){let n=t.semi?";":"",{node:i}=e,s=[Ace(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 ace(e,t,r);case"IntersectionTypeAnnotation":return oce(e,0,r);case"UnionTypeAnnotation":return uce(e,t,r);case"ConditionalTypeAnnotation":return Xce(e,t,r);case"InferTypeAnnotation":return pce(0,0,r);case"FunctionTypeAnnotation":return lce(e,t,r);case"TupleTypeAnnotation":return kle(e,t,r);case"TupleTypeLabeledElement":return fce(e,0,r);case"TupleTypeSpreadElement":return hce(e,0,r);case"GenericTypeAnnotation":return[r("id"),mpe(e,t,r,"typeParameters")];case"IndexedAccessType":case"OptionalIndexedAccessType":return cce(e,0,r);case"TypeAnnotation":return bce(e,0,r);case"TypeParameter":return gpe(e,0,r);case"TypeofTypeAnnotation":return xce(e,r);case"ExistsTypeAnnotation":return"*";case"ArrayTypeAnnotation":return vce(r);case"DeclareEnum":case"EnumDeclaration":return ode(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} `:"",sde(e,t,r)]}(e,r,t);case"EnumBooleanMember":case"EnumNumberMember":case"EnumStringMember":case"EnumDefaultedMember":return ade(e,r);case"FunctionTypeParam":{let t=n.name?r("name"):e.parent.this===n?"this":"";return[t,Sce(e),t?": ":"",r("typeAnnotation")]}case"DeclareInterface":case"InterfaceDeclaration":case"InterfaceTypeAnnotation":return ide(e,0,r);case"ClassImplements":case"InterfaceExtends":return[r("id"),r("typeParameters")];case"NullableTypeAnnotation":return["?",r("typeAnnotation")];case"Variance":{let{kind:e}=n;return vpe.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 Ise([n.variance?r("variance"):"","[",kse([r("keyTparam")," in ",r("sourceType")]),"]",dpe(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,eoe(n)?n.kind+" ":"",n.variance?r("variance"):"",Epe(e,t,r),Sce(e),toe(n)?"":": ",r("value")]}case"ObjectTypeAnnotation":return Rpe(e,t,r);case"ObjectTypeInternalSlot":return[n.static?"static ":"","[[",r("id"),"]]",Sce(e),n.method?"":": ",r("value")];case"ObjectTypeSpreadProperty":return Ice(e,r);case"QualifiedTypeofIdentifier":case"QualifiedTypeIdentifier":return[r("qualification"),".",r("id")];case"NullLiteralTypeAnnotation":return"null";case"BooleanLiteralTypeAnnotation":return String(n.value);case"StringLiteralTypeAnnotation":return iae(Ule(xoe(n),t));case"NumberLiteralTypeAnnotation":return Vle(n.raw??n.extra.raw);case"BigIntLiteralTypeAnnotation":return zle(n.raw??n.extra.raw);case"TypeCastExpression":return["(",r("expression"),yce(e,r),")"];case"TypePredicate":return Ece(e,r);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return mpe(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 lde(e,t,r){var n;let{node:i}=e;if(!i.type.startsWith("TS"))return;if(Mae(i))return i.type.slice(2,-7).toLowerCase();let s=t.semi?";":"",a=[];switch(i.type){case"TSThisType":return"this";case"TSTypeAssertion":{let e=!(Kae(i.expression)||qae(i.expression)),t=Ise(["<",kse([Vse,r("typeAnnotation")]),Vse,">"]),n=[Bse("("),kse([Vse,r("expression")]),Vse,Bse(")")];return e?Nse([[t,r("expression")],[t,Ise(n,{shouldBreak:!0})],[t,r("expression")]]):Ise([t,r("expression")])}case"TSDeclareFunction":return Dpe(e,r,t);case"TSExportAssignment":return["export = ",r("expression"),s];case"TSModuleBlock":return Wpe(e,t,r);case"TSInterfaceBody":case"TSTypeLiteral":return Rpe(e,t,r);case"TSTypeAliasDeclaration":return ace(e,t,r);case"TSQualifiedName":return[r("left"),".",r("right")];case"TSAbstractMethodDefinition":case"TSDeclareMethod":return Lpe(e,t,r);case"TSAbstractAccessorProperty":case"TSAbstractPropertyDefinition":return Mpe(e,t,r);case"TSInterfaceHeritage":case"TSClassImplements":case"TSExpressionWithTypeArguments":case"TSInstantiationExpression":return[r("expression"),r("typeParameters")];case"TSTemplateLiteralType":return ope(e,r,t);case"TSNamedTupleMember":return fce(e,0,r);case"TSRestType":return hce(e,0,r);case"TSOptionalType":return[r("typeAnnotation"),"?"];case"TSInterfaceDeclaration":return ide(e,0,r);case"TSTypeParameterDeclaration":case"TSTypeParameterInstantiation":return mpe(e,t,r,"params");case"TSTypeParameter":return gpe(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 loe(n)&&n.callee===i||coe(n)&&n.object===i?Ise([kse([Vse,...a]),Vse]):a}case"TSArrayType":return vce(r);case"TSPropertySignature":return[i.readonly?"readonly ":"",Epe(e,t,r),Sce(e),yce(e,r)];case"TSParameterProperty":return[_ce(i),i.static?"static ":"",i.override?"override ":"",i.readonly?"readonly ":"",r("parameter")];case"TSTypeQuery":return xce(e,r);case"TSIndexSignature":{let n=i.parameters.length>1?Bse(Soe(t)?",":""):"",a=Ise([kse([Vse,Wse([", ",Vse],e.map(r,"parameters"))]),n,Vse]),o="ClassBody"===e.parent.type&&"body"===e.key;return[o&&i.static?"static ":"",i.readonly?"readonly ":"","[",i.parameters?a:"","]",yce(e,r),o?s:""]}case"TSTypePredicate":return Ece(e,r);case"TSNonNullExpression":return[r("expression"),"!"];case"TSImportType":return[i.isTypeOf?"typeof ":"","import(",r(i.parameter?"parameter":"argument"),")",i.qualifier?[".",r("qualifier")]:"",mpe(e,t,r,"typeParameters")];case"TSLiteralType":return r("literal");case"TSIndexedAccessType":return cce(e,0,r);case"TSTypeOperator":return[i.operator," ",r("typeAnnotation")];case"TSMappedType":return function(e,t,r){let{node:n}=e,i=mue(t.originalText,Aae(n),Aae(n.typeParameter));return Ise(["{",kse([t.bracketSpacing?Use:Vse,Ise([r("typeParameter"),n.optional?hpe(n.optional,"?"):"",n.typeAnnotation?": ":"",r("typeAnnotation")]),t.semi?Bse(";"):""]),nue(e,t),t.bracketSpacing?Use:Vse,"}"],{shouldBreak:i})}(e,t,r);case"TSMethodSignature":{let n=i.kind&&"method"!==i.kind?`${i.kind} `:"";a.push(_ce(i),n,i.computed?"[":"",r("key"),i.computed?"]":"",Sce(e));let s=rce(e,r,t,!1,!0),o=i.returnType?"returnType":"typeAnnotation",u=i[o],l=u?yce(e,r,o):"",c=ice(i,l);return a.push(c?Ise(s):s),u&&a.push(Ise(l)),Ise(a)}case"TSNamespaceExportDeclaration":return["export as namespace ",r("id"),t.semi?";":""];case"TSEnumDeclaration":return ode(e,r,t);case"TSEnumMember":return ade(e,r);case"TSImportEqualsDeclaration":return[i.isExport?"export ":"","import ",Uce(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(Ace(e)),"global"!==i.kind&&!i.global){let e=i.kind??(Hae(i.id)||/(?:^|\s)module(?:\s|$)/.test(t.originalText.slice(Aae(i),Aae(i.id)))?"module":"namespace");a.push(e," ")}return a.push(r("id")),l?a.push(r("body")):i.body?a.push(" ",Ise(r("body"))):a.push(s),a}case"TSConditionalType":return Xce(e,t,r);case"TSInferType":return pce(0,0,r);case"TSIntersectionType":return oce(e,0,r);case"TSUnionType":return uce(e,t,r);case"TSFunctionType":case"TSCallSignatureDeclaration":case"TSConstructorType":case"TSConstructSignatureDeclaration":return lce(e,t,r);case"TSTupleType":return kle(e,t,r);case"TSTypeReference":return[r("typeName"),mpe(e,t,r,"typeParameters")];case"TSTypeAnnotation":return bce(e,0,r);case"TSEmptyBodyFunctionExpression":return Ape(e,t,r);case"TSJSDocAllType":return"*";case"TSJSDocUnknownType":return"?";case"TSJSDocNullableType":return dce(e,r,"?");case"TSJSDocNonNullableType":return dce(e,r,"!");default:throw new oue(i,"TypeScript")}}var cde=Nae(["ClassMethod","ClassPrivateMethod","ClassProperty","ClassAccessorProperty","AccessorProperty","TSAbstractAccessorProperty","PropertyDefinition","TSAbstractPropertyDefinition","ClassPrivateProperty","MethodDefinition","TSAbstractMethodDefinition","TSDeclareMethod"]);var pde=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(Sle(e))return ase(e,t);for(let i of[tde,xle,ude,lde,ede]){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(cde(a))return s;let o=oae(a.decorators),u=function(e,t,r){let{node:n,parent:i}=e,{decorators:s}=n;if(!oae(s)||Lce(i)||Sle(e))return"";let a="ClassExpression"===n.type||"ClassDeclaration"===n.type||Bce(n,t);return["declaration"===e.key&&zae(i)?zse:a?Rse:"",Wse(Use,e.map(r,"decorators")),Use]}(e,t,r),l="ClassExpression"===a.type;if(o&&!l)return aae(s,(e=>Ise([u,e])));let c=Qoe(e,t),p=Hpe(e,t);return u||c||p?aae(s,(e=>[p?";":"",c?"(":"",c&&l&&o?[kse([Use,u,e]),Use]:[u,e],c?")":""])):s},dde=[(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 hde(e,t){return Uoe(e,Roe.Block|Roe.Leading,(({value:e})=>e===` ${t} `))}async function fde(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(!oae(t))return e;let r=0,n=Gse(nae(e),(e=>"string"==typeof e&&e.includes("@prettier-placeholder")?e.split(/@prettier-placeholder-(\d+)-id/).map(((e,n)=>n%2==0?iae(e):(r++,t[e]))):e));return t.length===r?n:null}(await e(a,{parser:"scss"}),upe(r,t));if(!o)throw new Error("Couldn't insert all the expressions");return["`",kse([zse,o]),Vse,"`"]}function mde(e){return"Identifier"===e.type&&"styled"===e.name}function yde(e){return/^[A-Z]/.test(e.object.name)&&"extend"===e.property.name}var gde=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 mde(t.object)||yde(t);case"CallExpression":return mde(t.callee)||"MemberExpression"===t.callee.type&&("MemberExpression"===t.callee.object.type&&(mde(t.callee.object.object)||yde(t.callee.object))||"CallExpression"===t.callee.object.type&&mde(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)=>Kae(e)&&"elements"===t),((e,t)=>qoe(e)&&"Identifier"===e.key.type&&"styles"===e.key.name&&"value"===t),...dde)}(e))return fde};async function bde(e,t,r){let{node:n}=r,i=n.quasis.length,s=upe(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?vde(l):await e(u,{parser:"graphql"}),m?(m=lpe(m,!1),!r&&d&&a.push(""),a.push(m),!o&&h&&a.push("")):!r&&!o&&d&&a.push(""),p&&a.push(p)}return["`",kse([zse,Wse(zse,a)]),zse,"`"]}function vde(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([zse,i]):t.push(i),r=!0);return 0===t.length?null:Wse(zse,t)}var xde=function(e){if(function({node:e,parent:t}){return hde(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 bde},Ede=0;async function Sde(e,t,r,n,i){let{node:s}=n,a=Ede;Ede=Ede+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=upe(n,r),c=new RegExp(o("(\\d+)"),"g"),p=0,d=await t(u,{parser:e,__onHtmlRoot(e){p=e.children.length}}),h=Gse(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=cpe(n),i.__embeddedInHtml&&(n=Zoe(!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?zse:f&&m?Use:null;return y?Ise(["`",kse([y,Ise(h)]),y,"`"]):Jse({hug:!1},Ise(["`",f,p>1?kse(Ise(h)):Ise(h),m,"`"]))}var Dde=Sde.bind(void 0,"html"),Tde=Sde.bind(void 0,"angular");var Ade=function(e){return function(e){return hde(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)?Dde:function(e){return e.match((e=>"TemplateLiteral"===e.type),((e,t)=>qoe(e)&&"Identifier"===e.key.type&&"template"===e.key.name&&"value"===t),...dde)}(e)?Tde:void 0};async function Cde(e,t,r){let{node:n}=r,i=Zoe(!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=Zoe(!1,i,new RegExp(`^${s}`,"gm"),""));let o=lpe(await e(i,{parser:"markdown",__inJsTemplate:!0}),!0);return["`",a?kse([Vse,o]):[Kse,_se(o)],Vse,"`"]}var Pde=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 Cde};var wde=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[gde,xde,Ade,Pde])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&&Jse({embed:!0,...r.label},r)}},kde=new Set(["range","raw","comments","leadingComments","trailingComments","innerComments","extra","start","end","loc","flags","errors","tokens"]),Fde=e=>{for(let t of e.quasis)delete t.value};function Ide(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&&Fde(r);"JSXAttribute"===e.type&&"css"===e.name.name&&"JSXExpressionContainer"===e.value.type&&"TemplateLiteral"===e.value.expression.type&&Fde(t.value.expression),"JSXAttribute"===e.type&&"Literal"===(null==(n=e.value)?void 0:n.type)&&/["']|"|'/.test(e.value.value)&&(t.value.value=Zoe(!1,t.value.value,/["']|"|'/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":Kae(n.value)&&Fde(n.value.elements[0]);break;case"template":"TemplateLiteral"===n.value.type&&Fde(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)&&Fde(t.quasi),"TemplateLiteral"===e.type&&(null!=(i=e.leadingComments)&&i.some((e=>Oae(e)&&["GraphQL","HTML"].some((t=>e.value===` ${t} `))))||"CallExpression"===r.type&&"graphql"===r.callee.name||!e.leadingComments)&&Fde(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])}Ide.ignoredProperties=kde;var _de=Ide,Nde=((e,t,r)=>(r=null!=e?Hie(Qie(e)):{},((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of Yie(t))!Zie.call(e,i)&&i!==r&&Xie(e,i,{get:()=>t[i],enumerable:!(n=Gie(t,i))||n.enumerable});return e})(!t&&e&&e.__esModule?r:Xie(r,"default",{value:e,enumerable:!0}),e)))(nse(),1);var Ode=function(e){if(!e.startsWith("#!"))return"";let t=e.indexOf("\n");return-1===t?e:e.slice(0,t)};function Bde(e){let{shebang:t,text:r,pragmas:n,comments:i}=function(e){let t=Ode(e);t&&(e=e.slice(t.length+1));let r=(0,Nde.extract)(e),{pragmas:n,comments:i}=(0,Nde.parseWithComments)(r);return{shebang:t,text:e,pragmas:n,comments:i}}(e),s=(0,Nde.strip)(r);return(t?`${t}\n`:"")+(0,Nde.print)({pragmas:{format:"",...n},comments:i.trimStart()})+(s.startsWith("\n")?"\n":"\n\n")+s}var Lde={avoidAstMutation:!0},Mde={};ese(Mde,{getVisitorKeys:()=>jde,massageAstNode:()=>Vde,print:()=>Rde});var jde=Iae({JsonRoot:["node"],ArrayExpression:["elements"],ObjectExpression:["properties"],ObjectProperty:["key","value"],UnaryExpression:["argument"],NullLiteral:[],BooleanLiteral:[],StringLiteral:[],NumericLiteral:[],Identifier:[],TemplateLiteral:["quasis"],TemplateElement:[]});function Rde(e,t,r){let{node:n}=e;switch(n.type){case"JsonRoot":return[r("node"),zse];case"ArrayExpression":{if(0===n.elements.length)return"[]";let t=e.map((()=>null===e.node?"null":r()),"elements");return["[",kse([zse,Wse([",",zse],t)]),zse,"]"]}case"ObjectExpression":return 0===n.properties.length?"{}":["{",kse([zse,Wse([",",zse],e.map(r,"properties"))]),zse,"}"];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 $de(e)?JSON.stringify(String(n.value)):JSON.stringify(n.value);case"Identifier":return $de(e)?JSON.stringify(n.name):n.name;case"TemplateLiteral":return r(["quasis",0]);case"TemplateElement":return JSON.stringify(n.value.cooked);default:throw new oue(n,"JSON")}}function $de(e){return"key"===e.key&&"ObjectProperty"===e.parent.type}var Ude=new Set(["start","end","extra","loc","comments","leadingComments","trailingComments","innerComments","errors","range","tokens"]);function Vde(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)})}}Vde.ignoredProperties=Ude;var zde,Kde,qde,Wde,Jde,Hde={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."}},Xde="JavaScript",Gde={arrowParens:{category:Xde,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:Hde.bracketSameLine,bracketSpacing:Hde.bracketSpacing,jsxBracketSameLine:{category:Xde,type:"boolean",description:"Put > on the last line instead of at a new line.",deprecated:"2.4.0"},semi:{category:Xde,type:"boolean",default:!0,description:"Print semicolons.",oppositeDescription:"Do not print semicolons, except at the beginning of lines which may need them."},singleQuote:Hde.singleQuote,jsxSingleQuote:{category:Xde,type:"boolean",default:!1,description:"Use single quotes in JSX."},quoteProps:{category:Xde,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:Xde,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:Hde.singleAttributePerLine},Yde={estree:sse,"estree-json":Mde},Qde=[{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"]}],Zde=ise,ehe=Object.freeze({__proto__:null,default:Zde,languages:Qde,options:Gde,printers:Yde});function the(e,t={}){return Ine(function(...e){return F1(...e)}(e,{isJSX:Boolean(t.filepath?.match(/\.[jt]sx$/)),isTS:!0,printer:"recast",plugins:[["remove-unused-variables",K6]]}).code,{parser:"babel-ts",plugins:[Jie,ehe]})}function rhe(e,t={}){return e=e.replaceAll("import.meta","BATI_META"),e=`var BATI_META = ${JSON.stringify(t)};(${e})`,(0,eval)(e)}function nhe(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_")&&(rhe(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;rhe(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){Io(e.value).code.startsWith("import.meta.BATI_")&&(r=!0),this.traverse(e)}}),this.traverse(e),r)if(rhe(Io(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 the(Io(n).code,r)}function ihe(e,t){if(!e)throw new Error(t)}async function she(e){const t=await(e?.());return ihe("string"==typeof t,"Unable to load previous JSON module"),JSON.parse(t)}async function ahe(e){const t=await(e?.());return ihe("string"==typeof t,"Unable to load previous module"),Fo(t)}async function ohe(e,t){const r=p(t.url),n=d(r);return _o(h(n,e))}function uhe(e,t){const r=function(e){return"function-call"===e.exports.default.$type?e.exports.default.$args[0]:e.exports.default}(e),n=t.index??r.plugins?.length??0;return r.plugins||(r.plugins=[]),r.plugins.splice(n,0,t.options?Oo.functionCall(t.constructor,t.options):Oo.functionCall(t.constructor)),e.imports.$add({from:t.from,local:t.constructor,imported:t.imported||"default"}),!0}function*lhe(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 che(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 lhe(n,r.devDependencies??[]))t in e.dependencies||(e.devDependencies[t]=i);for(const[t,i]of lhe(n,r.dependencies??[]))t in e.devDependencies&&delete e.devDependencies[t],e.dependencies[t]=i;return e}Jde="win32"===process.platform||y.TESTING_WINDOWS?function(){if(Kde)return zde;Kde=1,zde=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 zde}():function(){if(Wde)return qde;Wde=1,qde=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 qde}();var phe=dhe;function dhe(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){dhe(e,t||{},(function(e,t){e?n(e):r(t)}))}))}Jde(e,t||{},(function(e,n){e&&("EACCES"===e.code||t&&t.ignoreErrors)&&(e=null,n=!1),r(e,n)}))}dhe.sync=function(e,t){try{return Jde.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||"EACCES"===e.code)return!1;throw e}};const hhe=phe,{join:fhe,delimiter:mhe,sep:yhe,posix:ghe}=a,bhe="win32"===process.platform,vhe=new RegExp(`[${ghe.sep}${yhe===ghe.sep?"":yhe}]`.replace(/(\\)/g,"\\$1")),xhe=new RegExp(`^\\.${vhe.source}`),Ehe=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"}),She=(e,{path:t=process.env.PATH,pathExt:r=process.env.PATHEXT,delimiter:n=mhe})=>{const i=e.match(vhe)?[""]:[...bhe?[process.cwd()]:[],...(t||"").split(n)];if(bhe){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:[""]}},Dhe=(e,t)=>{const r=/^".*"$/.test(e)?e.slice(1,-1):e;return(!r&&xhe.test(t)?t.slice(0,2):"")+fhe(r,t)},The=async(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=She(e,t),s=[];for(const a of r){const r=Dhe(a,e);for(const e of n){const n=r+e;if(await hhe(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 Ehe(e)};var Ahe=The;The.sync=(e,t={})=>{const{pathEnv:r,pathExt:n,pathExtExe:i}=She(e,t),s=[];for(const a of r){const r=Dhe(a,e);for(const e of n){const n=r+e;if(hhe.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 Ehe(e)};var Che=g(Ahe);function Phe(e,t,r=0){const n=`${" ".repeat(2*r)}${t?t(e):e}`;return e=>`${n} ${e}`}export{che as addDependency,uhe as addVitePlugin,f as features,m as flags,Io as generateCode,she as loadAsJson,ahe as loadAsMagicast,_o as loadFile,ohe as loadRelativeFileAsMagicast,Fo as parseModule,nhe as transformAndGenerate,Che as which,Phe as withIcon};
|